1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

bug #1175: move old checkpoint files before save action

This commit is contained in:
Javi Fontan 2012-04-03 10:05:28 +02:00
parent 16003fb2f4
commit d5ef946230
2 changed files with 17 additions and 3 deletions

View File

@ -22,10 +22,16 @@ source $(dirname $0)/../../scripts_common.sh
deploy_id=$1
file=$2
if [ ! -f $file ]; then
touch $file
chmod 666 $file
if [ -f $file ]; then
log "Moving old checkpoint file $file"
epoch=`date +%s`
exec_and_log "mv $file $file.$epoch" \
"Could not move $file to $file.$epoch"
fi
touch $file
chmod 666 $file
exec_and_log "virsh --connect $LIBVIRT_URI save $deploy_id $file" \
"Could not save $deploy_id to $file"

View File

@ -22,5 +22,13 @@ source $(dirname $0)/../../scripts_common.sh
deploy_id=$1
file=$2
if [ -f $file ]; then
log "Moving old checkpoint file $file"
epoch=`date +%s`
exec_and_log "mv $file $file.$epoch" \
"Could not move $file to $file.$epoch"
fi
exec_and_log "$XM_SAVE $deploy_id $file" \
"Could not save $deploy_id to $file"