Is there a way to replicate my backups to an off-site NAS?

Urbackup includes everything I need but I would like to add some redundancy to my backup solution. I am planning on adding a NAS to my network 25 miles away from my primary site. Is there a way to replicate all backup data to this NAS while continuing to store it on my server at my primary site? I am a few updates behind but have found no documentation on a feature like this. Thanks!

Sometimes if you use good NAS software (like FreeNAS) it has replication features.

I’m running on FreeNAS and use a cron job to incrementally back up to another FreeNAS box, via SSH, at 3am each day.
It takes 3+ hours to backup the days changes over GB ethernet. I was planning on having the second FreeNAS at a second remote location. However, with that much data to transfer each night it’s now located in a separate building on the same site.

I’d be happy to share the script if anyone is interested. It’s pretty simple but it works.

I don’t use FreeNAS but can’t you configure that via GUI?

Yes. I did look at it but decided to roll my own in the end.

I would like to see your script please.

Here you go.

Second remote snapshot now becomes original remote snapshot

ssh -p 22 “zfs rename mypool/test2@second original”

Create new second remote snapshot

ssh -p 22 “zfs snap mypool/test2@second”

Second local snapshot now becomes original local snapshot

zfs rename mypool/test2@second original

Incremental receive of remote second snapshot (this brings the local pool up to date)

ssh -p 22 “zfs send -i original mypool/test2@second” | zfs recv -F mypool/test2

Destroy local and remote original snapshots

ssh -p 22 “zfs destroy mypool/test2@original”
zfs destroy mypool/test2@original

I replaced the user and domain. You can also leave out the -p 22 if you’re using the standard ssh port.

I’ve actually stopped using the script now and use the built in snapshot and replication tasks. It’s easier to configure than rolling your own.

1 Like