weizhouapache commented on code in PR #6422:
URL: https://github.com/apache/cloudstack/pull/6422#discussion_r885031940
##########
scripts/storage/qcow2/managesnapshot.sh:
##########
@@ -226,14 +226,48 @@ backup_snapshot() {
return 2
fi
elif [ -f ${disk} ]; then
+ if [[ $disk == *"/snapshots/"* ]]; then
+ #Backup volume snapshot
+ cp "$disk" "${destPath}/${destName}"
+ ret_code=$?
- cp "$disk" "${destPath}/${destName}"
- ret_code=$?
+ if [ $ret_code -gt 0 ]
+ then
+ printf "Failed to backup $snapshotname for disk $disk to $destPath\n"
>&2
+ return 2
+ fi
+ else
+ # Backup VM snapshot
+ qemuimg_ret=$($qemu_img snapshot $forceShareFlag -l $disk 2>&1)
Review Comment:
@GutoVeronezi
looks good to me. let's fix the issue now and refactor in next releases.
--
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]