forked from movitto/snap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
105 lines (72 loc) · 4.09 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
[About]
Snap is a utility to take and restore system snapshots on Linux, Windows, and Mac
The end user can accomplish this by using the 'snaptool' command, the command line
utility, as well as the 'gsnap' tool, the graphical user interface.
Snap will use the native system tooling to take snapshots of package repositories,
installed packages, files modified outside of the package system (only those files
so as to keep snapshots lightweight and portable), and the services running on the system.
Snap also permits converting Snapshots between alternative systems. Thus for example
it is possible to take a snapshot of a Ubuntu Linux system and convert it to a Fedora
snapshot or take a snapshot of a Windows system and convert it to a Mac snapshot.
[Installing]
Both RPM and DEB packages are provided for systems which use those package formats.
Additionally Windows and Mac installers are provided.
- In install from a source checkout / tarball simply run 'make install'
- To install on Fedora/RHEL/etc, simply run 'yum install snap'
- To install on Debian/Ubuntu/etc, simple run 'apt-get install snap' (coming soon!)
- http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=649585
- Windows Vista / Win7 Installer:
- http://mo.morsi.org/files/snap/snap-installer.exe
- WinXP / MacOSX installers (coming soon!)
[Running from the Command Line]
Run 'snaptool --help' for all available command line options
To take a snapshot:
snaptool --backup --log-level=verbose --snapfile /tmp/snapfile.tgz \
--repos --packages --files=/home:/etc:!/etc/shadow
--backup instructs snap to run in backup mode
--log-level instructs snap to output verbose log messages
--snapfile instructs snap to write the resulting snapshot to /tmp/snapfile.tgz
--repos instructs snap to take a snapshot of the package repositories
--packages instructs snap to take a snapshot of the packages installed locally
--files instructs snap to take a snapshot of the specified files,
specifically those under /home, /etc, but not the /etc/shadow file
To restore a snapshot:
snaptool --restore --snapfile /tmp/snap-12.06.2007-23.57.54.tgz
--restore instructs snap to in snapshot restoration mode
--log-level instructs snap to output verbose log messages
--snapfile specifies the location of the snapfile to restore
If running from a source checkout, be sure to set 'PYTHONPATH' before
invoking snaptool or gsnap, eg
git clone git://github.com/movitto/snap
cd snap
sudo PYTHONPATH='.' ./bin/snaptool --help
When invoking the command line tools pass in the snapshot targets which you
would like to backup. Additionally you may exclude targets by passing them
in prefixed with 'no'. For example to backup repositories but not packages,
specify:
--repos --nopackages
To restrict specific entities which get backed up (specific files for example)
pass that as a colon-seperated parameter list into the target's command line flag.
Indicate which specific entities you would like to exclude by prefixing those in
the list with a '!'. For example, to backup the files in the /home directory,
excluding jsmith's home, specify:
--files=/home:!/home/jsmith
[Running the Graphical Interface]
To launch the graphical user interface:
gsnap
You may click on the 'help' button for help w/ the graphical utility
[Configuring]
You may set configuration options for Snap by modifying /etc/snap.conf
(on Windows C:\Program Files\Snap\snap.conf)
Default values are provided there with regard to the default targets to
backup / restore and the default parameters to use during Snap operations
(for example the default postgresql/mysql root password, various default
service directories, etc)
[Extending]
Developers can extend snap by defining new snapshot targets, or abstract
entities which snapshots can be taken of / restored, and backends implementing
those targets.
See the EXTENDING document for more info on how to extend Snap
[Legal]
Snap is written by and copyright (C) of Mohammed Morsi ([email protected]) 2007-2011
Licensed under the GPLv3