Hacker News new | ask | show | jobs
by vmarsy 3361 days ago
That's a huge setup :)

One questions I have regarding NAS is backups of the NAS itself.

If I have a very simple NAS with 2 drives in Raid 1 (let's call it Drive A and B), and I want to make a physical backup of my NAS in a different location. How easy is it ? What is the best practice. Ideally you could just have a big rsync method that takes care of it, or rclone as described in the article, but what if you want to do it without any network transfer (because your connection is too slow/ you can't afford it)

Does the following protocol make sense: Removing Drive A , replacing it with an empty drive C. Wait for the NAS to synchronize drive C. Then remove Drive B, replace with drive D, wait for the NAS to synchronize drive D.

Taking Drive A and B to a different location, plug them, and have the backup working out of the box.

Is it that easy? What about more complicated RAID setups?

is there an easy "Prepare Backup -> Please insert First drive for your backup -> First drive filled up -> please insert second drive for your backup -> ... -> Please insert last drive for your backup" and then you take all those newly filled drives and shove them in a different box and they have all the data at the time of the backup, with either the right zfs and raid configuration, or at least a simple data dump in a non-raid configuration.

4 comments

If you're using ZFS, the right thing to do is to attach drives C and D temporarily, create a second zpool on them, them use zfs send/receive to replicate snapshots from the primary drives to the backups. You can then export the zpool and move it to a different location.

Refreshing the backups is either done by putting the backups online at the remote location and syncing the deltas between the last snapshot and the current over the net, or by bringing the drives back to the primary, and sending the deltas.

The sanoid/syncoid toolset will help immensely with handing the necessary zfs snapshot and send/receive commands: https://github.com/jimsalterjrs/sanoid

If your NAS is small enough, you could get a couple of external drives and rotate them.

I've got a QNAP 4-drive NAS and the stuff I want to keep backed up fits in under 2TB. Based on that, I've got a 2TB external drive and have set up a backup job to sync the stuff I want to keep to that drive every morning.

There's no reason you can't get two drives and swap them every week. Just set your backup job to run weekly and unmount/eject the target drive when complete. Every Monday you just grab your drive and take it to work, and every Friday you bring the old drive home and plug it in.

Of course, any backup that requires manual work is likely to get neglected eventually. "Oh, I haven't done much work in the last week, I don't need to take the drive to work today" is something I've told myself all too often when it comes to my Mac backups.

Automated is better. If you have a second NAS at a remote site, you should be able to use ZFS send/receive to update a remote NAS over the internet.

Am on a similar raid1 setup -

For me, I have 2x extra drives and a USB caddy, and rsync the array onto the caddy automatically, keepping the unused drive offsite.

This does mean that the wear on the live array is higher than the offsite ones, and I have to have 4 drives total, but since RAID1 with a traditional filesystem doesn't provide integrity protection (e.g. bit errors on 1 drive can cause silent corruption), I don't have to worry about subtle raid rebuild issues gradually propagating through the entire raid set.

The 'cheaper' version would be to only have 1 offsite drive, but that means my data on the raid array is only protected from severe failures up to the last time I ran the sync.

Longer run, I'm looking at moving up to something with integrity protection, but since my server is OpenBSD (less storage configuration options), this means RAID5 which was only recently OK'd for rebuilds, and soft-raid5 rebuilds take forever on spinny drives - Will probably wait and upgrade to 4x SSD's 1st or get a hardware raid card (my data set is fairly small).

Another thought I had was to setup a raspberry PI at a friend/relative's place and have an Rsync run nightly to it, and offer same to them... but haven't gotten around to it.

If you really don't want to go over ethernet (and I'm assuming fiber is out of the question, too), there aren't really any great methods to automate this process. If you don't want to pull drives and put your data at risk, you might be able to add a third drive to the mirror, let it replicate, then disconnect it and plug it into the second system. If you're on FreeNAS, check out this section for guidelines on how to add an extra drive to the array: http://doc.freenas.org/9.10/storage.html#replacing-drives-to...

...but really, you should figure out a way to go over ethernet. Even if it takes a really long time, it'll be soooo much easier to have everything automated. You also don't have to risk pulling drives, etc...