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