You are not logged in.
this is a re-write of my old backup solution. Written in BASH, it leverages the power of rsync, LUKS, and virtual disks to create secure, portable, snapshot-style backups. I'll leave it to you to decide whether the design is stupid or not.
My biggest problem with my original setup was that a) it relied on LUKS-encrypted disk partitions, which limited the disk for uses other than backups, and b) it made backups to multiple disks serially, rather than in parallel. So, here is my design:
there are physical disks which contain a regular filesystem. The script mounts all physical disks specified as hosting backups and looks for files called *_backup.disk, which is a ~20GB (in my case) regular file that contains a LUKS-encrypted filesystem. it decrypts each virtual disk with a keyfile, mounts it in a directory owned by root+chmod 0700, and uses rsync to create/update a backup inside a timestamped directory on the virtual disk, with an rsync process spawned for each backup disk. Once the transfer is complete, the virtual disk is unmounted and closed. I believe this system has several advantages:
1. backups are entirely portable. The use of a virtual disk rather than a physical disk partition means that backups can be transferred to another storage device just like any other file (albiet a large one).
2. the use of virtual disks rather than logical partitions or similar means that backups can be safely stored on a regular filesystem alongside other files, rather than on a dedicated partition that cannot be easily moved or copied to a new location.
3. the use of one rsync process for each backup location means that backing up to multiple disks simultaneously is much faster, as opposed to running rsync serially for each backup disk.
whether or not this setup makes complete sense or is an elaborate waste of time, I'm not sure. I've tested my script, and it works well so far. However, I do have a question: is it safe to run multiple rsync instances that operate on the same source? that is, can several rsync processes copy data from /* to different destinations simultaneously without corrupting data or interfering with eachother's copy/read operations? This is the final bit I have to work out before I can run a full-scale test and/or implement it in place of my existing setup.
I'd paste the script into this post, but uzbl crashes when I try... I have a github account that contains a buggy copy of my current backup solution, but I'm having issues logging in. I may create a pastebin or similar and link to it once I have everything tested and in order, so that someone smarter than me can take a look at it.
Last edited by ParanoidAndroid (2014-03-14 01:25:03)
Offline