mirror of
https://github.com/lephisto/crossover.git
synced 2025-12-06 04:09:20 +01:00
Fix regression where multiple existing snaps on source prevented full copies to run.
This commit is contained in:
@@ -88,7 +88,7 @@ it's not aware of that paramter.
|
|||||||
|
|
||||||
## Installation of prerequisites
|
## Installation of prerequisites
|
||||||
|
|
||||||
```apt install git pv gawk
|
```apt install git pv gawk jq
|
||||||
|
|
||||||
## Install the Script somewhere, eg to /opt
|
## Install the Script somewhere, eg to /opt
|
||||||
|
|
||||||
|
|||||||
@@ -387,7 +387,7 @@ function mirror() {
|
|||||||
if [ -z $basets ]; then
|
if [ -z $basets ]; then
|
||||||
log debug "No matching Snapshot found on destination - Full Copy $src_image_pool/$src_image_name$snapshot_name to $dst_image_pool/$dst_image_name"
|
log debug "No matching Snapshot found on destination - Full Copy $src_image_pool/$src_image_name$snapshot_name to $dst_image_pool/$dst_image_name"
|
||||||
snapts=$(echo $currentlocal | sed -r -e 's/.*@mirror-(.*)/\1/')
|
snapts=$(echo $currentlocal | sed -r -e 's/.*@mirror-(.*)/\1/')
|
||||||
snapshotsize=$(rbd du --pretty-format --format json $src_image_pool/$src_image_name|jq '.images[] | select (.snapshot_id == null) | {provisioned_size}.provisioned_size')
|
snapshotsize=$(rbd du --pretty-format --format json $src_image_pool/$src_image_name|jq '.images[] | select (.snapshot_id == null) | {provisioned_size}.provisioned_size'|tail -1)
|
||||||
log debug "snapsize $snapname: $snapshotsize "
|
log debug "snapsize $snapname: $snapshotsize "
|
||||||
xmitjob="rbd export --rbd-concurrent-management-ops 8 $src_image_pool/$src_image_name$snapshot_name --no-progress - | pv -s $snapshotsize -F \"VM $vm_id - Full xmit: $PVFORMAT_FULL\" | ssh $opt_destination rbd import --image-format 2 - $dst_image_pool/$dst_image_name"
|
xmitjob="rbd export --rbd-concurrent-management-ops 8 $src_image_pool/$src_image_name$snapshot_name --no-progress - | pv -s $snapshotsize -F \"VM $vm_id - Full xmit: $PVFORMAT_FULL\" | ssh $opt_destination rbd import --image-format 2 - $dst_image_pool/$dst_image_name"
|
||||||
# create initial snapshot on destination
|
# create initial snapshot on destination
|
||||||
|
|||||||
1
eve4pve-barc
Symbolic link
1
eve4pve-barc
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../cv4pve-barc/eve4pve-barc
|
||||||
Reference in New Issue
Block a user