This commit is contained in:
Edwin Eefting 2024-09-24 15:14:41 +02:00
parent 6b987b2460
commit cc1e7c24b1
No known key found for this signature in database
GPG Key ID: 0F3C35D8E9887737
2 changed files with 6 additions and 4 deletions

View File

@ -549,7 +549,7 @@ test_target1/test_source2/fs2/sub@test-20101111000000 canmount - -
with mocktime("20101111000003"):
#--test should succeed by destroying incompatibles
self.assertFalse(ZfsAutobackup("test test_target1 --no-progress --verbose --allow-empty --destroy-incompatible --test".split(" ")).run())
self.assertFalse(ZfsAutobackup("test test_target1 --no-progress --verbose --allow-empty --destroy-incompatible --test --debug".split(" ")).run())
with mocktime("20101111000003"):
#should succeed by destroying incompatibles

View File

@ -1140,7 +1140,10 @@ class ZfsDataset:
if source_common_snapshot:
source_snapshot=self.find_next_snapshot(source_common_snapshot )
else:
source_snapshot=self.snapshots[0]
if self.snapshots:
source_snapshot=self.snapshots[0]
else:
source_snapshot=None
while source_snapshot:
# we want it?
@ -1243,7 +1246,7 @@ class ZfsDataset:
target_dataset.handle_incompatible_snapshots(incompatible_target_snapshots, destroy_incompatible)
# now actually transfer the snapshots, if we want
if no_send:
if no_send or len(target_transfers)==0:
return
# check if we can resume
@ -1270,7 +1273,6 @@ class ZfsDataset:
source_snapshot=self.find_snapshot(target_snapshot)
# do the rollback, one time at first transfer
if do_rollback:
target_dataset.rollback()