[pve-devel] [PATCH v2 guest-common 1/4] replication: prepare: adapt/expand function comment

Fabian Ebner f.ebner at proxmox.com
Mon Jun 13 12:29:56 CEST 2022


Commit 8d1cd44 ("partially fix #3111: replication: be less picky when
selecting incremental base") changed prepare() to return all local
snapshots.

Special behavior regarding last_sync is also better mentioned
explicitly.

Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---

New in v2.

 src/PVE/Replication.pm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/PVE/Replication.pm b/src/PVE/Replication.pm
index 31cabec..fcd59bb 100644
--- a/src/PVE/Replication.pm
+++ b/src/PVE/Replication.pm
@@ -156,8 +156,9 @@ sub remote_finalize_local_job {
     PVE::Tools::run_command($cmd, outfunc => $logger, errfunc => $logger);
 }
 
-# finds local replication snapshots from $last_sync
-# and removes all replication snapshots with other time stamps
+# Finds all local snapshots and removes replication snapshots not matching $last_sync. Use
+# last_sync=0 (or undef) to prevent removal (useful if VM was stolen). Use last_sync=1 to remove all
+# replication snapshots (limited to job if specified).
 sub prepare {
     my ($storecfg, $volids, $jobid, $last_sync, $parent_snapname, $logfunc) = @_;
 
-- 
2.30.2





More information about the pve-devel mailing list