dsnap-sync: resolve bug when sending incremental snapshots
* run_backup(): btrfs send needs valid parent if last_sync id on target does not match id on source, use a valid common sync_id Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
This commit is contained in:
@@ -1613,9 +1613,17 @@ run_backup () {
|
||||
fi
|
||||
fi
|
||||
else
|
||||
# use source_id as common sync-id
|
||||
snapper_common_sync_id=$snapper_source_id
|
||||
snapper_common_sync_snapshot=$snapper_source_sync_snapshot
|
||||
fi
|
||||
else
|
||||
# we have a common sync_id
|
||||
if [ ${snapper_source_sync_id} != ${snapper_target_sync_id} ]; then
|
||||
# btrfs send: we need to use the common sync_id as a valid parent
|
||||
snapper_source_sync_id=$snapper_common_sync_id
|
||||
snapper_source_sync_snapshot=$SUBVOLUME/.snapshots/$snapper_source_sync_id/snapshot
|
||||
fi
|
||||
fi
|
||||
|
||||
cmd="$ssh stat --format %i $snapper_target_snapshot 2>/dev/null"
|
||||
|
||||
Reference in New Issue
Block a user