Résolution bug mv backup

This commit is contained in:
admin666 2022-08-05 15:03:27 +02:00
parent 496e52e97c
commit cc6b45c5a9
5 changed files with 7 additions and 5 deletions

View File

@ -12,7 +12,7 @@ do
echo MIGRATING $vm ...
sudo virsh migrate --verbose --live --persistent --undefinesource --abort-on-error $vm qemu+ssh://192.169.254.3:223/system
if [ $? != 0 ]; then
if [ $? == 0 ]; then
sudo mv /var/backups/vm/mother/$vm /var/backups/vm/aunt
fi

View File

@ -12,7 +12,7 @@ do
echo MIGRATING $vm ...
sudo virsh migrate --verbose --live --persistent --undefinesource --abort-on-error $vm qemu+ssh://192.169.254.2:222/system
if [ $? != 0 ]; then
if [ $? == 0 ]; then
sudo mv /var/backups/vm/aunt/$vm /var/backups/vm/mother
fi
done

View File

@ -10,7 +10,7 @@ fi
echo MIGRATING $vm ...
sudo virsh migrate --verbose --live --persistent --undefinesource --abort-on-error $vm qemu+ssh://192.169.254.3:223/system
if [ $? != 0 ]; then
if [ $? == 0 ]; then
sudo mv /var/backups/vm/mother/$vm /var/backups/vm/aunt
fi

View File

@ -10,6 +10,6 @@ fi
echo MIGRATING $vm ...
sudo virsh migrate --verbose --live --persistent --undefinesource --abort-on-error $vm qemu+ssh://192.169.254.2:222/system
if [ $? != 0 ]; then
if [ $? == 0 ]; then
sudo mv /var/backups/vm/aunt/$vm /var/backups/vm/mother
fi

View File

@ -4,4 +4,6 @@ vm=$1
echo MIGRATING $vm ...
virsh migrate --p2p $vm --live --verbose --undefinesource --persistent --copy-storage-all --abort-on-error qemu+ssh://mother.onlink/system
if [ $? == 0]; then
sudo mv /var/backups/vm/aunt/* /var/backups/vm/mother
fi