Is a ZFS Snapshot to an external disk a backup?

Status
Not open for further replies.

SwisherSweet

Contributor
Joined
May 13, 2017
Messages
139
I'm considering backup strategies:

- Rsync to external drive
- Snapshot to external drive

I understand rsync will recreate files in the destination drive.

I also read others are using scheduled snapshots to make a backup of their pool.

However, I'm not sure if one could recover from a entire pool failure from snapshots alone on an external drive. If this is possible, this seems to be the simplest and most thorough way to backup a pool.

If I setup automatic snapshots to backup my pool to an external drive, will I be able to recover the pool if it fails for some reason using only the snapshots?

Thank you!
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Yes, zfs send | zfs recv is a possibility for backups.
 

toadman

Guru
Joined
Jun 4, 2013
Messages
619
Yes, they are equivalent. i.e. a view of the filesystem at a point in time.

To restore you would create a pool and send the backup snapshot to the new pool. Easy. :)
 

SwisherSweet

Contributor
Joined
May 13, 2017
Messages
139
Yes, they are equivalent. i.e. a view of the filesystem at a point in time.

To restore you would create a pool and send the backup snapshot to the new pool. Easy. :)

Great news! Thanks!

I forgot to mention that I hope to use a Drobo attached via USB. Will I be able to use this to send snapshots to? I assume I will have to import it and format it for use with ZFS?

My concern is Drobo is a RAID system , and ZFS won't like that.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
If the Drobo will present itself over USB as a single mass storage device, then it can probably be made to work--but you'd be pretty much on your own if there were any problems with it, since (as you note) it's doing its own RAID thing.
 

SwisherSweet

Contributor
Joined
May 13, 2017
Messages
139
If the Drobo will present itself over USB as a single mass storage device, then it can probably be made to work--but you'd be pretty much on your own if there were any problems with it, since (as you note) it's doing its own RAID thing.

Thanks Danb35,

Since the pool will be about 9TB, I don't know of any other local/external options for backup, except for something like a Drobo, which will combine disks for massive storage. I suppose one could use a single, external 10TB disk, but that's a single point of failure and very expensive ($400+).

What do others for local, external backups when they are backing up volumes larger than a single HDD?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
What do others for local, external backups when they are backing up volumes larger than a single HDD?
Backing up to another FreeNAS box is probably the ideal solution.
 

zoomzoom

Guru
Joined
Sep 6, 2015
Messages
677
Yes, zfs send | zfs recv is a possibility for backups.
Aren't snapshots incremental backups only? If that's the case, an actual backup via Rsync would be much safer.
  • For example, if they are incremental, say there's 30 snapshots, one for each day of the month and the snapshot from day 10 is corrupted or accidentally deleted... wouldn't that result with snapshots from day 11 - 30 being affected (as incremental backups only backup changes made since the previous incremental backup)?
...I hope to use a Drobo attached via USB.
Provided the USB connection is made direct to the motherboard, not to a PCIe USB card (disconnects due to issues with usbconfig will result with a PCIe USB card). Unless the USB interfaces are 3.0+, you'd gain greater r/w speeds via eSATA with a cable no longer than 1m.​

Since the pool will be about 9TB, I don't know of any other local/external options for backup, except for something like a Drobo, which will combine disks for massive storage. ...What do others for local, external backups when they are backing up volumes larger than a single HDD?
An external casing with eSATA support, combined with a quality eSATA Port Multiplier PCIe card. I use two SilverStone TS431Us and a StarTech PEXESAT322I eSATA Port Multiplier.​
 
Last edited:

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
Great news! Thanks!

I forgot to mention that I hope to use a Drobo attached via USB. Will I be able to use this to send snapshots to? I assume I will have to import it and format it for use with ZFS?

My concern is Drobo is a RAID system , and ZFS won't like that.

You can't format a drobo as ZFS.

You could make a dummy file on the drobo and create a pool from that file. That would maybe work, ZFS would provide integrity, drobo would provide the redundancy.

Not sure if the drobo magic would conflict with ZFS. But you're in unsupported land there.

You have all the same issues as running a pool on a hw raid card combined with drobo mysticism. And the fun of using a developer targeted feature for production.
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
It's important to regularly scrub your backup.
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
an actual backup via Rsync would be much safer
By default rsync only examines files that are transferred, so it wouldn't be any safer.
say there's 30 snapshots, one for each day of the month and the snapshot from day 10 is corrupted or accidentally deleted... wouldn't that result with snapshots from day 11 - 30 being affected
Deleting a snapshot won't break other snapshots.

Corrupt data would be detected by a scrub, and corrected if the pool has redundancy, so this aspect is a wash for rsync vs snapshots.
 

zoomzoom

Guru
Joined
Sep 6, 2015
Messages
677
By default rsync only examines files that are transferred, so it wouldn't be any safer. ...Corrupt data would be detected by a scrub, and corrected if the pool has redundancy, so this aspect is a wash for rsync vs snapshots.
Right, they were asking about transfering the snapshots to an external drive or using rsync to backup the files to an external... ergo my reply was in regards to the external drive, which is not ZFS, not the pool.

Deleting a snapshot won't break other snapshots.
Some data has to be affected as snapshots are incremental backups or differential backups, not full backups. Therefore that statement makes zero sense.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
my reply was in regards to the external drive, which is not ZFS, not the pool.
The only way you're transferring snapshots to it is if it's ZFS.
 

zoomzoom

Guru
Joined
Sep 6, 2015
Messages
677
The only way you're transferring snapshots to it is if it's ZFS.
That should have been in this post, not a reply to my post.

Again, they asked which they should choose for what they're looking to do, and if the external is meant to be a backup of the primary pools, simply sending snapshots to the external is not a backup, as snapshots are either incremental or differential. In fact, it's been stated quite clearly numerous times in this forum over the years that snapshots are not a backup of one's data, so I'm a bit baffled by the response.
 
Last edited:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
In fact, it's been stated quite clearly numerous times in this forum over the years that snapshots are not a backup of one's data, so I'm a bit baffled by the response.
Nonsense. Snapshots replicated to a separate pool are absolutely a backup of your data, and "I'm a bit baffled" by any suggestion that it would be otherwise. What else would they be? In what world is another copy of your data on another volume not a backup? Snapshots on the original pool might not count as a backup (the question is somewhat semantic, but they'd be subject to many of the hazards that would affect the rest of the pool), but once they've been sent somewhere else, of course they are.

Snapshots are neither incremental nor differential--they're a snapshot (hence the name) of the contents of the filesystem at a specified point in time. They form the foundation of a number of handy ZFS features, including replication, and there's no way that a remote system would end up with only the delta between two snapshots. I think you fundamentally misunderstand what they are, which might explain why you're so baffled.

Now, if it's not possible to create a ZFS pool on a USB-attached Drobo, then this thread is moot, as snapshots can only practically be sent to another ZFS pool (OK, you could simply redirect zfs send to a file, and that file could then live on any filesystem, but that would be silly).
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Snapshot to external drive
To be clear on this: You can't "snapshot to an external drive." You can, though, create snapshots in your pool, and then replicate them to an external drive (or collection of external drives), so long as that drive (or drives) comprise a ZFS pool. ZFS replication can only go to a ZFS pool (or, more precisely, a dataset); if your destination isn't ZFS, you'd need to do something else.
 

SwisherSweet

Contributor
Joined
May 13, 2017
Messages
139
Thank you all for your comments. :)

I'll take the Drobo out of the equation for this discussion, assuming that I use an eSata solution (external eStata enclosure like zoomzoom recommended), would I be able to perform a full pool restore from my last known snapshot (assuming I was copied to external system) in the event I lost my entire pool?

That is, could I rely on the snapshots alone to rebuild my FreeNAS server if I lost all of my pool drives (massive hardware failure for example)?

Obviously, I wouldn't rely only on a single backup, but I need to know that each backup can be recoverable, or I'm effectively doing just that.

Thanks again!
 

zoomzoom

Guru
Joined
Sep 6, 2015
Messages
677
Snapshots on the original pool might not count as a backup (the question is somewhat semantic, but they'd be subject to many of the hazards that would affect the rest of the pool), but once they've been sent somewhere else, of course they are.
This difference is not specified in posts where one says, often in bolded text by a senior member, "snapshots are not a redundant backup of data", or at least I've never come across a post that has differentiated the two, of which then leads lay users to believe there isn't a differentiation.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
That is, could I rely on the snapshots alone to rebuild my FreeNAS server if I lost all of my pool drives (massive hardware failure for example)?
Yes. The snapshot replicated to an external source is a complete copy of the data contained in the snapshot (beware of child datasets, though; they aren't included unless you've made the snapshot recursive), so you can replicate it back just as easily. I've done something similar myself--my server had a pool consisting of two three-disk RAIDZ1 vdevs, which aren't recommended here (I didn't know better at the time). It was time to expand the pool anyway, so I created a new pool with six disks in RAIDZ2 and replicated the data to that pool. Destroyed the old pool, renamed the new pool to the old pool's name, and added the old six disks as a second RAIDZ2 vdev to the pool. It was as if nothing ever happened, and very minimal interruption in service.
 

zoomzoom

Guru
Joined
Sep 6, 2015
Messages
677
@danb35 What are the advantages to utilizing snapshots as a backup via external replication with zfs send, versus that of using rsync in archive mode, with a command similar to: rsync -avrt --human-readable --partial --stats --info=name0"
 
Status
Not open for further replies.
Top