#!/bin/bash
if [ "$1" == "backup-end" ]; then
mount -L Backup /mnt/external-hdd/
if mountpoint -q /mnt/external-hdd; then
cp /mnt/backup/* /mnt/external-hdd/
umount /mnt/external-hdd
exit 0
else
exit 1
fi
fi
INFO: starting new backup job: vzdump 101 100 --script /tmp/vzdump-hook-script.pl --mode stop --storage backups --compress lzo
INFO: HOOK: job-start
INFO: HOOK-ENV: dumpdir=/backups/dump;storeid=backups
INFO: Starting Backup of VM 100 (lxc)
INFO: status = stopped
INFO: backup mode: stop
INFO: ionice priority: 7
INFO: HOOK: backup-start stop 100
INFO: HOOK-ENV: vmtype=lxc;dumpdir=/backups/dump;storeid=backups;hostname=host100;tarfile=/backups/dump/vzdump-lxc-100-2016_05_11-09_02_10.tar.lzo;logfile=/backups/dump/vzdump-lxc-100-2016_05_11-09_02_10.log
INFO: creating archive '/backups/dump/vzdump-lxc-100-2016_05_11-09_02_10.tar.lzo'
INFO: Total bytes written: 709539840 (677MiB, 18MiB/s)
INFO: archive file size: 363MB
INFO: delete old backup '/backups/dump/vzdump-lxc-100-2016_01_19-10_48_21.tar.lzo'
INFO: HOOK: backup-end stop 100
INFO: HOOK-ENV: vmtype=lxc;dumpdir=/backups/dump;storeid=backups;hostname=host100;tarfile=/backups/dump/vzdump-lxc-100-2016_05_11-09_02_10.tar.lzo;logfile=/backups/dump/vzdump-lxc-100-2016_05_11-09_02_10.log
INFO: Finished Backup of VM 100 (00:00:40)
INFO: HOOK: log-end stop 100
INFO: HOOK-ENV: vmtype=lxc;dumpdir=/backups/dump;storeid=backups;hostname=host100;tarfile=/backups/dump/vzdump-lxc-100-2016_05_11-09_02_10.tar.lzo;logfile=/backups/dump/vzdump-lxc-100-2016_05_11-09_02_10.log
INFO: Starting Backup of VM 101 (lxc)
INFO: status = stopped
INFO: backup mode: stop
INFO: ionice priority: 7
INFO: HOOK: backup-start stop 101
INFO: HOOK-ENV: vmtype=lxc;dumpdir=/backups/dump;storeid=backups;hostname=host101;tarfile=/backups/dump/vzdump-lxc-101-2016_05_11-09_02_50.tar.lzo;logfile=/backups/dump/vzdump-lxc-101-2016_05_11-09_02_50.log
INFO: creating archive '/backups/dump/vzdump-lxc-101-2016_05_11-09_02_50.tar.lzo'
INFO: Total bytes written: 1836308480 (1.8GiB, 27MiB/s)
INFO: archive file size: 1.33GB
INFO: delete old backup '/backups/dump/vzdump-lxc-101-2016_05_04-11_34_29.tar'
INFO: HOOK: backup-end stop 101
INFO: HOOK-ENV: vmtype=lxc;dumpdir=/backups/dump;storeid=backups;hostname=host101;tarfile=/backups/dump/vzdump-lxc-101-2016_05_11-09_02_50.tar.lzo;logfile=/backups/dump/vzdump-lxc-101-2016_05_11-09_02_50.log
INFO: Finished Backup of VM 101 (00:01:07)
INFO: HOOK: log-end stop 101
INFO: HOOK-ENV: vmtype=lxc;dumpdir=/backups/dump;storeid=backups;hostname=host101;tarfile=/backups/dump/vzdump-lxc-101-2016_05_11-09_02_50.tar.lzo;logfile=/backups/dump/vzdump-lxc-101-2016_05_11-09_02_50.log
INFO: HOOK: job-end
INFO: HOOK-ENV: dumpdir=/backups/dump;storeid=backups
INFO: Backup job finished successfully