ZFS backups: retrieving a few files?
David Magda
dmagda at ee.ryerson.ca
Tue Nov 23 20:07:49 UTC 2010
On Tue, November 23, 2010 14:14, Mike Tancsa wrote:
> I am still trying to figure out the best way to do zfs backups locally
> here for rollbacks as well as DR. I was looking at some of the
> techniques at
>
> http://www.cuddletech.com/blog/pivot/entry.php?id=984
>
> But thats outdated ? WRT errors in the file, perhaps PAR* tools can
> overcome some of these issues if you are dumping to a file on tape
>
> */usr/ports/archivers/par2cmdline
The above is still quite valid, and snapshots are one of base principles
of ZFS. From the official ZFS Admin Guide:
> The following solutions for saving ZFS data are provided:
> * Saving ZFS snapshots and rolling back snapshots, if necessary.
> * Saving full and incremental copies of ZFS snapshots and restoring
> the snapshots and file systems, if necessary.
> * Remotely replicating ZFS file systems by saving and restoring ZFS
> snapshots and file systems.
> * Saving ZFS data with archive utilities such as tar and cpio or
> third-party backup products.
http://dlc.sun.com/osol/docs/content/ZFSADMIN/gbchx.html
You'll notice that 3/4 mention snapshots. I think them and zfs send/recv
are the starting points for getting consistent images of disks. There's no
equivalent to dump(8)/restore(8), and so tar and cpio are the main
utilities if you want offline stuff:
http://www.freebsd.org/doc/handbook/backup-basics.html
Until very recently the output format of "zfs send" was not stabilized, so
there was no guarantee that it was readable from one version to the next.
I believe that has been fixed in [Open]Solaris, but I haven't been
tracking pjd's commits that closely to know about FreeBSD.
Hopefully "zfs diff" will make it into FreeBSD soon-ish, so that it's
easier to do incremental backups to previous snapshots/check points.
Traversing large file systems is getting really old in this day-and-age,
and that one little thing can certainly remove a lot of I/O seeks if you
only want to grab the files that have changed recently.
See also the best practice guide, which should be generic enough to cover
most operating systems:
http://tinyurl.com/2gehn4#Recommendations_for_Saving_ZFS_Data
http://www.solarisinternals.com/wiki/index.php/ZFS_Best_Practices_Guide#Recommendations_for_Saving_ZFS_Data
--
David Magda
Toronto, Canada
More information about the freebsd-stable
mailing list