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