Commit Graph

11 Commits

Author SHA1 Message Date
Kevin McCormick
fcd5fb0e08 Implement catchup mode to fix interrupted transfer
When zfs send -R is interrupted, some child filesystems will be at a
more recent snapshot than their parent. There's then no way to do a
zfs send -R from the root/parent, as the children are inconsistent.

Catchup mode handles recursion on its own, instead of relying on zfs to
do it. Basically picking a single consistent snapshot across the board,
then bringing all to that level.
2016-10-10 10:17:33 -07:00
Kevin McCormick
6d906ad640 When verbose, make zfs send/recv verbose as well 2016-10-10 09:56:22 -07:00
Kevin McCormick
cf353fafd4 Allow matching any snapshot between src & dest
Previously we looked for the specific tagged snapshot, but that doesn't
actually work properly. Now simply find the most recent snapshot on dest
and compare to src. It must exist on src.
2016-09-16 16:10:33 -07:00
Kevin McCormick
0850e82df3 exit on failure of critical zfs commands
Execution should not continue upon failure of certain zfs commands. In
particular, cleanup/rotation of the oldest snapshots will no longer
occur upon a failure to send/receive.
2016-09-12 11:39:29 -07:00
Kevin McCormick
12f7666a2f fail early if destination fs doesn't exist
zfs receive will fail, but the source snapshot has already been created,
and the rotation/cleanup of old snapshots will be triggered
2016-09-12 11:28:48 -07:00
Kevin McCormick
481212e5e6 Improve usage statement 2016-08-04 16:29:28 -07:00
Kevin McCormick
f2b40a2ce8 save only last component of src fs in dest
Change zfs receive command to use -e (was -d).

Allow greater control of dest placement. srcpool/a/really/long/path
should not force me to deal with destpool/backupdest/a/really/long/path.
2016-08-04 16:26:07 -07:00
Kevin McCormick
473e51d89c split snapshot/syslog "tag" to independent values 2016-08-04 16:24:08 -07:00
Kevin McCormick
2eb6a5644e change dateformat to more generic date options
Allow switching to UTC or any other full control of date(1)
2016-08-04 16:23:02 -07:00
Kevin McCormick
c7dc56255e add quiet mode 2016-08-04 15:02:33 -07:00
Kevin McCormick
c6a82a7ccd Import scripts
* supports either local or remote usage
* always uses sudo
* getopts for a few settings
* keeps its own snapshots for send/recv purposes, independent of others
2016-08-04 15:01:54 -07:00