Rework restart logic, introduce --max-errors.
[dss.git] / INSTALL
1 Type
2
3         make
4
5 in the dss source directory to build the dss executable and copy it to
6 some directory that is included in your PATH, e.g. to $HOME/bin or to
7 /usr/local/bin.
8
9 Note that you'll likely need a recent version of
10 ftp://ftp.gnu.org/pub/gnu/gengetopt/ (gnu gengetopt) to compile dss.
11
12 Optionally, type
13
14          make man
15
16 to create the man page of dss. This invokes help2man so make sure
17 that help2man is installed on your system. Note that the man page is
18 just the nroff variant of the output of "dss --detailed-help".
19
20 dss is known to compile on Linux, MacOS, Solaris, FreeBSD and
21 NetBSD. However, it is run-tested only on Linux.
22
23 Also make sure that http://rsync.samba.org/ (rsync) is installed on
24 your system. Version 2.6.1 or newer is required.
25
26 Examples:
27 ---------
28
29 Suppose you'd like to create snapshots of the existing directory
30
31         /foo/bar
32
33 in the directory
34
35         /baz/qux.
36
37 Create the config file
38
39         ~/.dssrc
40
41 that contains the values for the source and the destination directories
42 as follows:
43
44         echo 'source-dir "/foo/bar"' > ~/.dssrc
45         echo 'dest-dir "/baz/qux"' >> ~/.dssrc
46
47 Then execute the commands
48
49         mkdir /baz/qux
50         dss --run
51
52 In order to print the list of all snapshots created so far, use
53
54         dss --ls
55
56 Yes, it's really that easy.
57
58 The second example involves a slightly more sophisticated config file.
59 It instructs dss to exclude everything which matches at least one
60 pattern of the given exclude file, prevents rsync from crossing file
61 system boundaries and increases the number of snapshots.
62
63         source-dir "/foo/bar"
64         dest-dir "/baz/qux"
65         # exclude files matching patterns in /etc/dss.exclude
66         rsync-option "--exclude-from=/etc/dss.exclude"
67         # don't cross filesystem boundaries
68         rsync-option "--one-file-system"
69         # maintain 2^6 - 1 = 63 snaphots
70         num-intervals "6"
71
72 The /etc/dss.exclude file could look like this (see rsync(1) for
73 more examples)
74
75  
76          - /proc
77          - /**/tmp/
78
79 Note that dss supports many more features and config options such
80 as taking snapshots from remote hosts and several hooks that are
81 executed on certain events, for example whenever a snapshot was
82 created successfully. Try
83
84         dss -h
85
86 for an overview of all supported command line options or
87
88         dss --detailed-help
89
90 for the full help text.