dup, rdiff: implemented and documented simpler and clearer symlinks/globbing
[matthijs/upstream/backupninja.git] / examples / example.rdiff
1 ##
2 ## This is an example rdiff-backup configuration file.
3 ## The defaults are useful in most cases, just make sure
4 ## to configure the destination host and user.
5 ##
6
7 ## passed directly to rdiff-backup
8 # options = --force
9
10 ## default is 0, but set to 19 if you want to lower the priority.
11 # nicelevel = 19
12
13 ## default is yes. set to no to skip the test if the remote host is alive
14 # testconnect = no
15
16 ######################################################
17 ## source section
18 ## (where the files to be backed up are coming from)
19
20 [source]
21
22 # an optional subdirectory below 'directory' (see [dest])
23 label = thishostname
24
25 # type can be "local" or "remote"
26 type = local
27
28 # only use if '[source] type = remote'
29 #host = srchost
30 #user = srcuser
31
32 # how many days of data to keep
33 # (you can also use the time format of rdiff-backup, e.g. 6D5h)
34 keep = 60
35
36 # A few notes about includes and excludes:
37 # 1. include, exclude and vsinclude statements support globbing with '*'
38 # 2. Symlinks are not dereferenced. Moreover, an include line whose path
39 #    contains, at any level, a symlink to a directory, will only have the
40 #    symlink backed-up, not the target directory's content. Yes, you have to
41 #    dereference yourself the symlinks, or to use 'mount --bind' instead.
42 #    Example: let's say /home is a symlink to /mnt/crypt/home ; the following
43 #    line will only backup a "/home" symlink ; neither /home/user nor
44 #    /home/user/Mail will be backed-up :
45 #      include = /home/user/Mail
46 #    A workaround is to 'mount --bind /mnt/crypt/home /home' ; another one is to
47 #    write :
48 #      include = /mnt/crypt/home/user/Mail
49 # 3. All the excludes come after all the includes. The order is not otherwise
50 #    taken into account.
51
52 # files to include in the backup
53 include = /var/spool/cron/crontabs
54 include = /var/backups
55 include = /etc
56 include = /root
57 include = /home
58 include = /usr/local/bin
59 include = /usr/local/sbin
60 include = /var/lib/dpkg/status
61 include = /var/lib/dpkg/status-old
62
63 # If vservers = yes in /etc/backupninja.conf then the following variables can
64 # be used:
65 # vsnames = all | <vserver1> <vserver2> ... (default = all)
66 # vsinclude = <path>
67 # vsinclude = <path>
68 # ...
69 # Any path specified in vsinclude is added to the include list for each vserver
70 # listed in vsnames (or all if vsnames = all, which is the default).
71 #
72 # For example, vsinclude = /home will backup the /home directory in every
73 # vserver listed in vsnames. If you have 'vsnames = foo bar baz', this
74 # vsinclude will add to the include list /vservers/foo/home, /vservers/bar/home
75 # and /vservers/baz/home.
76 # Vservers paths are derived from $VROOTDIR.
77
78 # files to exclude from the backup
79 #exclude = /home/*/.gnupg
80
81 ######################################################
82 ## destination section
83 ## (where the files are copied to)
84
85 [dest]
86
87 # type can be "local" or "remote"
88 type = remote
89
90 # put the backups under this directory
91 directory = /backups
92
93 # the machine which will receive the backups.
94 # only use if "[dest] type = remote"
95 host = backuphost
96
97 # make the files owned by this user. you must be able to
98 # `su -c "ssh backupuser@backhost"` without specifying a password.
99 # only use if "[dest] type = remote"
100 user = backupuser
101