forked from third-party-mirrors/zfs_autobackup
--destroy-incompatible now only rolls back if needed
This commit is contained in:
parent
06420978d5
commit
f8cd77e6e4
@ -33,8 +33,8 @@ class ZfsAutobackup(ZfsAuto):
|
||||
if args.allow_empty:
|
||||
args.min_change = 0
|
||||
|
||||
if args.destroy_incompatible:
|
||||
args.rollback = True
|
||||
# if args.destroy_incompatible:
|
||||
# args.rollback = True
|
||||
|
||||
if args.resume:
|
||||
self.warning("The --resume option isn't needed anymore (it's autodetected now)")
|
||||
@ -99,7 +99,7 @@ class ZfsAutobackup(ZfsAuto):
|
||||
group.add_argument('--force', '-F', action='store_true',
|
||||
help='Use zfs -F option to force overwrite/rollback. (Useful with --strip-path=1, but use with care)')
|
||||
group.add_argument('--destroy-incompatible', action='store_true',
|
||||
help='Destroy incompatible snapshots on target. Use with care! (implies --rollback)')
|
||||
help='Destroy incompatible snapshots on target. Use with care! (also does rollback of dataset)')
|
||||
group.add_argument('--ignore-transfer-errors', action='store_true',
|
||||
help='Ignore transfer errors (still checks if received filesystem exists. useful for '
|
||||
'acltype errors)')
|
||||
|
@ -1038,6 +1038,9 @@ class ZfsDataset:
|
||||
snapshot.destroy()
|
||||
self.snapshots.remove(snapshot)
|
||||
|
||||
if len(incompatible_target_snapshots)>0:
|
||||
self.rollback()
|
||||
|
||||
|
||||
def sync_snapshots(self, target_dataset, features, show_progress, filter_properties, set_properties,
|
||||
ignore_recv_exit_code, holds, rollback, decrypt, encrypt, also_other_snapshots,
|
||||
|
Loading…
x
Reference in New Issue
Block a user