[rescue] ZFS backup (was Re: Oracle making just...)
francois.dion at gmail.com
Mon May 10 10:15:44 CDT 2010
On Sat, May 8, 2010 at 7:16 AM, Rich Kulawiec <rsk at gsp.org> wrote:
> On Fri, May 07, 2010 at 12:01:24PM -0400, Joshua Boyd wrote:
>> What do you need from a zfsdump that zfs send won't do?
> Among other things, the ability to restore files on a system with
> a different architecture and a different operating system.
Different architecture, check. Different operating system, for that,
you'll probably have to use star ( ftp://ftp.berlios.de/pub/star/ ).
You can try, but if the version dont match, you'll get on the receive
cannot mount 'simplex/livedata': Operation not supported
> And perhaps this is just my lack of zfs savvy speaking, but it's
> not clear to me yet how to do incremental backups using this method.
> One of the systems that I run has ~40T of storage mostly consisting
> of large files that are very infrequently modified (in some cases:
> never) and I'd like to leverage that into making backups run as
> quickly as possible and occupy as little space as possible.
# zfs snapshot -r tank/home at 3am
# zfs send tank/home at 3am > /backup/snaps/home.3am
This does a full backup of your home zfs filesystem (recursive) on
zpool tank. Instead of redirecting to a file like the above, you can
also pipe to ssh zfs recv on a remote box. Of course, piping to a file
doesn't guarantee data integrity because while zfs checksums the file
i/os, the inflight data could get corrupted. The only way to do that
is using the zfs send and receive pair (zfs recv will abort on error),
#zfs send tank/home at 3am | ssh -p port user at server 'zfs recv -F
Whereas on a file, you'll get the error only when you do need the
backup when zfs recv complains. Anyway, that's the obvious part. As
far as the incremental:
send diffs between 3am and 9am:
# zfs snapshot -r tank/home at 9am
# zfs send -i tank/home at 3am tank/home at 9am > /backup/snaps/home.9am
send diffs between 9am and 10am
# zfs snapshot -r tank/home at 10am
# zfs send -i tank/home at 9am tank/home at 10am > /backup/snaps/home.10am
More information about the rescue