I wrote a simple script to dump zfs snapshots in a similar way to what I did with ufsdump. In particular, it supports dump levels. This is still very crude, but I'd appreciate comments. Does what I'm doing make sense, or do I misunderstand zfs?
Thanks. ----- #!/bin/ksh # # XXX - real option parsing # level=$1 fs=$2 snap="[EMAIL PROTECTED]" zfs destroy "$snap" >/dev/null 2>&1 zfs snapshot "$snap" base="[EMAIL PROTECTED]" # # find the newest numbered dump snapshot that exists # ((i=level-1)) basecr=0 while ((i>=0)) do if zfs list -H -o name -t snapshot "[EMAIL PROTECTED]" >/dev/null 2>&1 then cr=`zfs get -Hp -o value creation "[EMAIL PROTECTED]"` if ((cr > basecr)) then base="[EMAIL PROTECTED]" basecr=$cr fi fi ((i=i-1)) done echo >&2 zfs send -R -v -i "$base" "$snap" zfs send -R -v -i "$base" "$snap" _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss