skip pruning with --no-sync-snap (as by PR #218)

This commit is contained in:
Gionatan Danti 2018-06-11 10:16:18 +02:00
parent 4ed6ff0e44
commit 0aaac42057
1 changed files with 5 additions and 3 deletions

View File

@ -398,9 +398,11 @@ sub syncdataset {
}
}
# prune obsolete sync snaps on source and target.
pruneoldsyncsnaps($sourcehost,$sourcefs,$newsyncsnap,$sourceisroot,keys %{ $snaps{'source'}});
pruneoldsyncsnaps($targethost,$targetfs,$newsyncsnap,$targetisroot,keys %{ $snaps{'target'}});
if (!defined $args{'no-sync-snap'}) {
# prune obsolete sync snaps on source and target (only if this run created ones).
pruneoldsyncsnaps($sourcehost,$sourcefs,$newsyncsnap,$sourceisroot,keys %{ $snaps{'source'}});
pruneoldsyncsnaps($targethost,$targetfs,$newsyncsnap,$targetisroot,keys %{ $snaps{'target'}});
}
} # end syncdataset()