Simplicity is abandoned (sorry!) in favour of a much simpler program sb
.
sb
does effectively the same thing (make it easy to do duplicity backups),
but is much smaller and more focused. It also front-ends rdiff-backup in case
you need that instead of duplicity.
There's a sample conf file below. You run it by saying, for example:
sb wd_d mail
(Look for wd_d
and mail
in the conf and you will understand).
The only additional point to note is that if you're using different USB disks, put in a ".volname" file in the root directory of each, which contains a simple name for the specific disk (e.g., "seagate500") etc., otherwise duplicity's signature caching gets confused.
Sample ~/.config/sb.conf
file:
# must be valid shell syntax; will be sourced from 'sb'
# comments are not allowed within a "FILES" section (till blank line)
# (note syntax well, including the ending single quotes you may miss if you
# don't look carefully!)
[email protected]
# disk/key sets for testing rdiff-backup and duplicity
testr='
DST=/tmp/testbk
KEY=none
'
testd='
DST=file:///tmp/testbk
KEY=ask
'
# disk/key sets for work machine; note different "path" syntax for r and d.
The email address in the "key" in the second set is a GPG key ID
wd_r='
DST=work::rdif
KEY=none
'
wd_d='
DST=ssh://work/dupl
[email protected]
'
# ad hoc duplicity backups using typed password
wd_d_ASK='
DST=ssh://work/dupl
KEY=ask
'
# disk/key sets USB backups
USB_r='
DST=$USB/rdif
KEY=none
'
USB_d='
DST=file://$USB/dupl
[email protected]
'
USB_d_ASK='
DST=file://$USB/dupl
KEY=ask
'
# This line is mandatory. The entire list of filesets needs to be in this
# file, but since the file itself is a shell script, it should ignore it.
cat <<EOF >/dev/null
FILES _test /home/sitaram
+ testdir
FILES ASK /
+ /home/ff/.ssh
+ /home/sitaram/.gnupg
+ /home/sitaram/.ssh
FILES daily /
+ /root/foo
+ /home/sitaram/bar
FILES mail /
+ /home/sitaram/.thunderbird
FILES weekly /
+ /root/.config
+ /home/sitaram/.config
FILES dump /
+ /root/misc
+ /home/sitaram/misc
+ /home/sitaram/something-else
EOF