[zfs-discuss] offsite backup strategies

Gordan Bobic gordan.bobic at gmail.com
Sun Jun 17 06:35:02 EDT 2012


On 17/06/2012 01:58, Shamus Rask wrote:
> I've just been notified by my ISP that VDSL is now available, this
> will give me 25Mbps down and 10 up. The 10Mbps up is of particular
> interest as this will allow me to finally consider offsite backups a
> reality.
>
> I'm looking for any collective wisdom on the best backup strategies,
> specifically as they pertain to zfs. I read up on snapshots, but want
> to go at this assuming a catastrophic failure of my main server. As I
> understand it, the snapshot needs a reference point.
>
> Are there other tips/tricks that you can suggest? rsync is always a
> favourite; I'm just hoping there is something more elegant that I
> could consider.

I use lsyncd and copyfs.

Target system:

ZFS with dedupe enabled (compression may also be useful depending on the 
nature of your data). Mount copyfs backed by that deduped ZFS. Rsync 
write-only instance is listening and set to write to the copyfs.

Source system:

lsyncd running and monitoring the paths you want to keep backed up. 
Configure it so that rsync it invokes is set to use 128KB blocks where 
possible to optimize the ZFS writes.

That's pretty much it. This will not only give you continuous off-site 
mirroring, but it will give you continuous backup as well, courtesy of 
CopyFS, which will let you retrieve any version of any file that was 
ever saved (lsyncd does copy-on-close-after-write).

It is also 100% asynchronous so you shouldn't notice any performance 
degradation on the system being backed up.

Not really a ZFS specific solution, granted - I only use ZFS to protect 
me from disk failings, silent and otherwise, and deduplication 
functionality (and it makes a HUGE difference on something like this as 
far as space usage is concerned, especially if you are using it to back 
up complete rootfs of many machines on a network all of which are 
running the same OS (just remember to disable the eeeeeevil prelink on 
everything).

Gordan



More information about the zfs-discuss mailing list