diff --git a/lebackup-all.sh b/lebackup-all.sh index 29d2d9e..68f6455 100755 --- a/lebackup-all.sh +++ b/lebackup-all.sh @@ -1,6 +1,7 @@ #!/bin/bash source $(dirname "$0")/config-vars -# mount backup target +# mount and create backup target +mkdir -p $BACKUPDIR mount $NFSSERVER $BACKUPDIR #back up files $(dirname "$0")/lebackup-files.sh @@ -14,4 +15,6 @@ for VM in $VMS do $(dirname "$0")/lebackup-vm.sh $VM done - +# remove and unmout backupdir +umount $BACKUPDIR +rm -Rf $BACKUPDIR diff --git a/lebackup-vm.sh b/lebackup-vm.sh index 5260897..fb1211f 100755 --- a/lebackup-vm.sh +++ b/lebackup-vm.sh @@ -1,5 +1,5 @@ #!/bin/bash -set -x +set -e source $(dirname "$0")/config-vars VM=$1 if [ -z $1 ];