rohityadavcloud commented on a change in pull request #5297:
URL: https://github.com/apache/cloudstack/pull/5297#discussion_r818438657
##########
File path: scripts/storage/qcow2/managesnapshot.sh
##########
@@ -226,34 +226,10 @@ backup_snapshot() {
return 2
fi
elif [ -f ${disk} ]; then
- # Does the snapshot exist?
- qemuimg_ret=$($qemu_img snapshot $forceShareFlag -l $disk 2>&1)
- ret_code=$?
- if [ $ret_code -gt 0 ] && [[ $qemuimg_ret == *"snapshot: invalid option --
'U'"* ]]
- then
- forceShareFlag=""
- qemuimg_ret=$($qemu_img snapshot $forceShareFlag -l $disk)
- ret_code=$?
- fi
- if [ $ret_code -gt 0 ] || [[ ! $qemuimg_ret == *"$snapshotname"* ]]
- then
- printf "there is no $snapshotname on disk $disk\n" >&2
- return 1
- fi
- qemuimg_ret=$($qemu_img convert $forceShareFlag -f qcow2 -O qcow2 -l
snapshot.name=$snapshotname $disk $destPath/$destName 2>&1 > /dev/null)
+ cp "$disk" "${destPath}/${destName}"
Review comment:
using qemu-img convert might be necessary, it's possible the source is
raw disk etc, furthermore convert might compress the snapshot. cc @nvazquez
@DaanHoogland @weizhouapache what do you think?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]