mirror of
https://github.com/psy0rz/zfs_autobackup.git
synced 2025-05-28 01:09:13 +03:00
fix
This commit is contained in:
parent
6b987b2460
commit
cc1e7c24b1
@ -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
|
||||
|
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user