projects
/
pve-guest-common.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5d31e77
)
PVE::ReplicationState - new helper replication_snapshot_name()
author
Dietmar Maurer
<dietmar@proxmox.com>
Tue, 6 Jun 2017 09:47:38 +0000
(11:47 +0200)
committer
Dietmar Maurer
<dietmar@proxmox.com>
Tue, 6 Jun 2017 09:47:38 +0000
(11:47 +0200)
Changed replication snapshot naming to __replicate_<jobid>_<lastsync>__
to avoid conflicts with normal snapshot names.
PVE/ReplicationState.pm
patch
|
blob
|
blame
|
history
diff --git
a/PVE/ReplicationState.pm
b/PVE/ReplicationState.pm
index d0eaf80def72b7cec7395d59c299d76e69dbe801..be5cf5fab010eb805552fad7447ab4eec6d4f92f 100644
(file)
--- a/
PVE/ReplicationState.pm
+++ b/
PVE/ReplicationState.pm
@@
-83,4
+83,13
@@
sub write_job_state {
PVE::GuestHelpers::guest_migration_lock($vmid, undef, $code);
}
+sub replication_snapshot_name {
+ my ($jobid, $last_sync) = @_;
+
+ my $prefix = "__replicate_${jobid}_";
+ my $snapname = "${prefix}${last_sync}__";
+
+ wantarray ? ($prefix, $snapname) : $snapname;
+}
+
1;