cd359c04cd64bb58a976cca8301df8f3002ea42a
[rrq/buckap.git] / README.adoc
1 Backup Control Scripting
2 ========================
3
4 The script +dupltool+ is a wrapper for duplicity that usually just
5 invokes duplicity with all arguents passed on, but every month it
6 first makes a stash of the most recent succession of daily snapshots,
7 so that the duplicity run at this time is a monthly snapshot.
8
9 The script +duplicity-daily+ is a simple control script for daily
10 backup that uses configuration from +/etc/duplicity-daily.conf+ that
11 defines which backups to make, and from +~/.ssh/config+ as to how to
12 connect to the target host (or hosts).
13
14 Administration Example
15 ----------------------
16
17 .This is a +/etc/duplicity-daily+ sample
18 ----
19 ENABLED=yes
20 OPTIONS=--no-encryption
21 TARGET=backup/backup
22 /root
23 /etc
24 /home
25 ----
26
27 The above sample declares backup (without encryption) of directory
28 trees +/root+, +/etc+, +/home+ to host +backup+ (as declared in
29 +~/.ssh/config+) into directories under the user's directory +backup+.
30
31 .This is a +~/.ssh/config+ sample
32 ----
33 host backup
34     hostname backup.lan
35     user thishost
36     identityfile ~/.ssh/thishost-backup
37     ServerAliveInterval 15
38     ServerAliveCountMax 4
39     TCPKeepAlive yes
40     RekeyLimit 100M
41     IPQoS reliability
42 ----
43
44 Note that for the above sample, the backup client +root@thishost+ has
45 prepared a password-less ssh key to +thishost@backup.lan+ so that
46 daily backup can happen without operator intervention.
47
48 Debian Package
49 --------------
50
51 A debian package is built with
52 ----
53 $ make deb
54 ----
55 provided that the build environment is set up, i.e. an ordinary debian
56 package building environment.
57
58 The package is then installed with
59 ----
60 # dpkg -i ../buckap_<TAB>
61 ----
62 Doing so will install +/usr/bin/dupltool+ and
63 +/etc/cron.daily/duplicity-daily+, as well as providing an example
64 +/etc/duplicity-daily.conf+ (incuding rudimentary instructions).