transfer blocked by wrong comparison

This commit is contained in:
shoopea
2023-06-29 23:42:46 +02:00
parent 0e0e5db303
commit f94f9b9f71
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -188,7 +188,7 @@ func TransferZfs(from, to Addr) error {
return err
}
if fromSnapshots[fromFromSnapshotId].name != lastToSnapshot.name {
if fromFromSnapshotId < len(fromSnapshots)-1 {
log.WithFields(log.Fields{"from": from, "to": to}).Debugf("transfering from %s to %s", fromSnapshots[fromFromSnapshotId].name, fromSnapshots[len(fromSnapshots)-1].name)
if _, err := to.BoxExec("ssh " + from.Box() + " zfs send -I " + fromSnapshots[fromFromSnapshotId].String() + " " + fromSnapshots[len(fromSnapshots)-1].String() + " | zfs recv -F " + to.Path()); err != nil {