diff options
author | Dave Reisner <d@falconindy.com> | 2010-01-07 23:02:24 -0500 |
---|---|---|
committer | Dave Reisner <d@falconindy.com> | 2010-01-07 23:02:24 -0500 |
commit | 68b1571b8c0deedf6366c24fabb69b4ed3b8348f (patch) | |
tree | 3603cec684ea0d263021fc5219025fa4335d008b /DOCUMENTATION | |
download | squashfu-68b1571b8c0deedf6366c24fabb69b4ed3b8348f.tar.gz |
Initial commit: extremely alpha
Diffstat (limited to 'DOCUMENTATION')
-rw-r--r-- | DOCUMENTATION | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/DOCUMENTATION b/DOCUMENTATION new file mode 100644 index 0000000..af175b7 --- /dev/null +++ b/DOCUMENTATION @@ -0,0 +1,41 @@ +SquashFu - an alternative backup solution + Inspired by http://forums.gentoo.org/viewtopic-p-4732709.html + +Requirements: aufs, aufs2-util, squashfs-tools, rsync + +Goal: To create a backup solution which provides incremental backups and compression, + and which also provides an easy way to roll back. + +Design: + A directory structure is created as follows: + backup_root/ + |- seed.sfs + |- ro/ + |- rw/ + |- bins/ + |-1/ <-- Monday incremental + |-2/ <-- Tuesday incremental + |-3/ <-- Wednesday incremental + |-4/ <-- Thursday incremental + |-5/ <-- Friday incremental + |-6/ <-- Saturday incremental + |-7/ <-- Sunday incremental + + seed.sfs is created from an initial backup and compressed using SquashFS. It + is then mounted, using a loopback device on ro/. Using aufs2, a union mount is + formed by ro/ and each of the numbered bins, each corresponding to a day. + + At the time of the backup, the day is determined in order to prepare the union. If + today is Thursday, `date +%u` returns 4. In order for rsync to properly create our + incremental, we need to compare current data with the seed plus incrementals leading + up to Thursday, so we create our Aufs mount with the branches bins/4, bins/3, bins/2, + bins/1, and ro/ (in that order). When rsync now writes to the resulting union, aufs + happily receives the data into the first available (writable) branch of the union, + which is bins/4. The next day, the union mount is reformed adding the next bin... + + If and when you want to roll back, the process is simple. Mount the seed plus + the necessary bins to increment the seed up to the day of interest. + + + + |