ZFS Backup/Restore How-To

Status
Not open for further replies.

TravisT

Patron
Joined
May 29, 2011
Messages
297
So I've been planning to get my backup solution created for some time now after getting my new FreeNAS box up and running. Things have settled down a little and I'm trying to figure out exactly HOW to backup my data. Sure I can go into the GUI and schedule periodic snapshots, and maybe even restore those snapshots successfully. There should be much more to it than that.

I can't seem to find any easy to understand backup tutorial regarding ZFS. If I can't find it, I'm sure others can't either. Everyone preaches that your data isn't safe without backups, but without a straight-forward way for the average user to backup the data, you're stuck.

I recently found myself in a dilemma because I added two disks to a zpool incorrectly. Instead of adding the disks as a mirror of the two disk pool, I striped the pool across those two disks as well (resulting in a 4 disk stripe). By doing so, I've just doubled the likelihood of a failure resulting in data loss. Now I need to move that data off of those drives onto a temporary drive so I can re-create the pool correctly, as well as nail down a good backup strategy for both my zvol and zpool datasets.

With a little help, hopefully I'll be able to lay out a good backup/restore strategy for the average user to adopt/implement to help protect their data.
 

JaimieV

Guru
Joined
Oct 12, 2012
Messages
742
I use rsync to another machine. Very simple indeed as it's fully supported by the GUI - except you need another machine that includes rsync. Admittedly this means basically everything modern except Windows. It's a shame Windows is so popular, otherwise this would be easy to generally recommend as a backup method...

But if you have Mac or Linux or *BSD machines in the house, or most other NASes, then rsync is your tool of choice.

If you have another FreeNAS or *BSD or Solaris then you have a second option of ZFS replication, which should be rather quicker than rsync.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
I use rsync to another machine. Very simple indeed as it's fully supported by the GUI - except you need another machine that includes rsync. Admittedly this means basically everything modern except Windows. It's a shame Windows is so popular, otherwise this would be easy to generally recommend as a backup method...

There are several options for rsync on windows, the first that comes to mind is Cygwin (free @ cygwin.com)
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
As JaimieV said, rsync and ZFS replication are the 2 main options for backing up your FreeNAS data to somewhere else. The manual gives detailed instructions on how to use both. I was able to setup rsync and ZFS replication correctly the first time despite never using them before ever. There is also a Windows program that lets you use rsync in Windows both as a source and destination(its called Deltacopy).
 

TravisT

Patron
Joined
May 29, 2011
Messages
297
I've used delta copy before and it works rather well. If that is the best way to backup data from freenas, then that is relatively straightforward. Next on the list is backing up zvols, which seems more complex, and unfortunately is what I'm faced with presently. I'd like to hear more opinions on how to effectively configure a backup and restore of a zvol, which is what my iscsi targets point to.
 

TravisT

Patron
Joined
May 29, 2011
Messages
297
Sorry for reviving an old thread, but I'm trying to nail down a backup solution for my data that is scalable and works for a relatively large amount of data.

I currently am using FreeNAS to host a media server with just under 2TB of used space. This includes pictures, movies, home videos and music. Obviously, these are not all equally important and the movies take up over 50% of that space.

I also have some file space that is only a few GB, as well as a reference drive that I keep some books and other reference material on, in addition to a software drive that I have just under 500GB of OEM software, etc.

In the past, I've used deltacopy running on a VM with two USB drives attached to RSync the files over to. I alternated drives each month, just as a precaution. This worked, but I'd like to explore options to have a better backup solution.

Ideally, I could setup another FreeNAS box and use ZFS replication. The drawbacks are duplicating the storage pools, or even using JBOD, but then it will require more hardware and power usage. Maybe a real small, low power system? Has anyone built anything like this they would be willing to share the specs/performance?
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Actually, someone (here?) just pointed out the new Avotons coming out. Apparently Asrock is releasing a C2550D4I and C2750D4I (quad/octa) with 12 SATA ports and Intel ethernets, and Supermicro is releasing the A1SAi-2750F with quad ethernets. All of them go up to 32GB. This has the potential to be a potent backup system platform, substantially faster than the E350/NxxL/Atom stuff often used in this role.

Seriously, though, if your needs are not significant, it may be as simple as setting up an older PC with WOL, and writing a script on your FreeNAS to ping it for WOL, wait a bit, rsync everything over, then ssh in and power it down. Make that run once a week. A 4TB drive can be had for $150 if you watch for sales.
 
Status
Not open for further replies.
Top