1 yhager's rsync based backup scripts
3 yet another backup script suite, that does exactly what I want.
7 * bandwidth and space efficient
10 Some more detailed list of the features:
12 * use rsync snapshots with hardlinks[1] - a no frills working backup solution:
13 * allows going back in time for as long as you want
14 * uses the minimal amount of storage space required
15 * clear up old backups easily by deleting a directory
16 * can retry the backup if the network failed during the process
17 * use crontab to control backup initiation
18 * simple, simple, simple
20 The script more or less implement the method outlined by rsync.net's
23 [1] http://www.mikerubel.org/computers/rsync_snapshots/
24 [2] http://www.rsync.net/resources/howto/rsync_snapshots.html
28 # most of the steps require root privilege
31 # copy this entire directory onto /usr/local/backup
32 cp -a . /usr/local/backup
35 # edit the file conf.d/backup to match your settings
38 # copy the file to /etc/conf.d
39 cp conf.d/backup /etc/conf.d/
41 # edit the rules file to match your setup
46 cp conf.d/rsync-rules /etc/backup/.
48 # create a directory for mysql backups
49 mkdir -p /var/backups/mysql
51 # Add the crontab to your existing crontab
52 crontab -l > /tmp/crontab && cat /tmp/crontab crontab | crontab - && rm /tmp/crontab
56 I do not encrypt my backups. I am getting too nervous about losing
57 the private key (where would I keep it? in a USB storage? in a bank?
58 printed and kept at a friend's house? - I was never able to solve
59 that question), so I decided that encryption might give me more
60 headache than benefit.
64 I used rdiff-backup[3] for a while and it is generally very good,
65 however, it has it's own format of backup files, and it is very
66 dependent on completing a full run everytime, and failures are disastrous.
68 At one time, the command '--list-increments-sizes' could never be
69 completed, and this convinced me I am looking for something less fancy.
71 In addition, removing a huge directory that snuck in by mistake is
72 nearly impossible, and you are stuck with it until it is phased out
75 There are quite a lot of other options, like rsnapshot[4] or
76 duplicity[5]. They are all good - choose whatever fits your needs.
78 [3] http://rdiff-backup.nongnu.org/
79 [4] http://rsnapshot.org
80 [5] http://www.nongnu.org/duplicity/
84 All you need is ssh access and rsync to be installed at the remote
85 side. This is very common, and I doubt if you will find a backup
86 provider that does not give you these.
88 I use rsync.net[6], which are very friendly, and give great value
89 for the money. However, use any service that rsync works with (I
90 believe Amazon s3 is not on this list).
94 Suggestions, Questions:
96 send me an email (see LICENSE file), or use github.