Post backup script

Interesting... I see the log in Proxmox displays the hooks however the email log of the job does not. Accordingly it would appear that to monitor the success failure of the job-start or job-end hook scripts that the email log is lacking.

Below is the online log of the job:

Search:
INFO: starting new backup job: vzdump 1003 --mode snapshot --script /root/vzdump-hook-script.pl --mailnotification always --storage backup --compress lzo --quiet 1 --mailto henry@here.com
INFO: HOOK: job-start
INFO: HOOK-ENV: dumpdir=/mnt/backup/dump;storeid=backup
INFO: Starting Backup of VM 1003 (lxc)
INFO: status = running
INFO: mode failure - some volumes does not support snapshots
INFO: trying 'suspend' mode instead
INFO: backup mode: suspend
INFO: ionice priority: 7
INFO: HOOK: backup-start suspend 1003
INFO: HOOK-ENV: vmtype=lxc;dumpdir=/mnt/backup/dump;storeid=backup;hostname=apollo;tarfile=/mnt/backup/dump/vzdump-lxc-1003-2016_05_12-21_30_02.tar.lzo;logfile=/mnt/backup/dump/vzdump-lxc-1003-2016_05_12-21_30_02.log
INFO: starting first sync /proc/20321/root// to /mnt/backup/dump/vzdump-lxc-1003-2016_05_12-21_30_02.tmp
INFO: Number of files: 27,745 (reg: 22,145, dir: 2,473, link: 3,095, dev: 2, special: 30)
INFO: Number of created files: 27,744 (reg: 22,145, dir: 2,472, link: 3,095, dev: 2, special: 30)
INFO: Number of deleted files: 0
INFO: Number of regular files transferred: 22,130
INFO: Total file size: 736,748,906 bytes
INFO: Total transferred file size: 732,653,528 bytes
INFO: Literal data: 732,653,528 bytes
INFO: Matched data: 0 bytes
INFO: File list size: 720,813
INFO: File list generation time: 0.001 seconds
INFO: File list transfer time: 0.000 seconds
INFO: Total bytes sent: 734,540,923
INFO: Total bytes received: 444,340
INFO: sent 734,540,923 bytes received 444,340 bytes 293,994,105.20 bytes/sec
INFO: total size is 736,748,906 speedup is 1.00
INFO: first sync finished (2 seconds)
INFO: suspend vm
INFO: HOOK: pre-stop suspend 1003
INFO: HOOK-ENV: vmtype=lxc;dumpdir=/mnt/backup/dump;storeid=backup;hostname=apollo;tarfile=/mnt/backup/dump/vzdump-lxc-1003-2016_05_12-21_30_02.tar.lzo;logfile=/mnt/backup/dump/vzdump-lxc-1003-2016_05_12-21_30_02.log
INFO: starting final sync /proc/20321/root// to /mnt/backup/dump/vzdump-lxc-1003-2016_05_12-21_30_02.tmp
INFO: Number of files: 27,745 (reg: 22,145, dir: 2,473, link: 3,095, dev: 2, special: 30)
INFO: Number of created files: 0
INFO: Number of deleted files: 0
INFO: Number of regular files transferred: 0
INFO: Total file size: 736,748,906 bytes
INFO: Total transferred file size: 0 bytes
INFO: Literal data: 0 bytes
INFO: Matched data: 0 bytes
INFO: File list size: 65,533
INFO: File list generation time: 0.001 seconds
INFO: File list transfer time: 0.000 seconds
INFO: Total bytes sent: 764,290
INFO: Total bytes received: 2,675
INFO: sent 764,290 bytes received 2,675 bytes 511,310.00 bytes/sec
INFO: total size is 736,748,906 speedup is 960.60
INFO: final sync finished (1 seconds)
INFO: resume vm
INFO: HOOK: pre-restart suspend 1003
INFO: HOOK-ENV: vmtype=lxc;dumpdir=/mnt/backup/dump;storeid=backup;hostname=apollo;tarfile=/mnt/backup/dump/vzdump-lxc-1003-2016_05_12-21_30_02.tar.lzo;logfile=/mnt/backup/dump/vzdump-lxc-1003-2016_05_12-21_30_02.log
INFO: vm is online again after 1 seconds
INFO: creating archive '/mnt/backup/dump/vzdump-lxc-1003-2016_05_12-21_30_02.tar.lzo'
INFO: Total bytes written: 781035520 (745MiB, 281MiB/s)
INFO: archive file size: 360MB
INFO: delete old backup '/mnt/backup/dump/vzdump-lxc-1003-2016_05_12-00_52_05.tar.lzo'
INFO: HOOK: backup-end suspend 1003
INFO: HOOK-ENV: vmtype=lxc;dumpdir=/mnt/backup/dump;storeid=backup;hostname=apollo;tarfile=/mnt/backup/dump/vzdump-lxc-1003-2016_05_12-21_30_02.tar.lzo;logfile=/mnt/backup/dump/vzdump-lxc-1003-2016_05_12-21_30_02.log
INFO: Finished Backup of VM 1003 (00:00:06)
INFO: HOOK: log-end suspend 1003
INFO: HOOK-ENV: vmtype=lxc;dumpdir=/mnt/backup/dump;storeid=backup;hostname=apollo;tarfile=/mnt/backup/dump/vzdump-lxc-1003-2016_05_12-21_30_02.tar.lzo;logfile=/mnt/backup/dump/vzdump-lxc-1003-2016_05_12-21_30_02.log
INFO: HOOK: job-end
INFO: HOOK-ENV: dumpdir=/mnt/backup/dump;storeid=backup
INFO: Backup job finished successfully
TASK OK


Below is the email log of the job:

Detailed backup logs:

vzdump 1003 --mode snapshot --script /root/vzdump-hook-script.pl --mailnotification always --storage backup --compress lzo --quiet 1 --mailto henry@here.com

1003: May 12 21:30:02 INFO: Starting Backup of VM 1003 (lxc)
1003: May 12 21:30:02 INFO: status = running
1003: May 12 21:30:02 INFO: mode failure - some volumes does not support snapshots
1003: May 12 21:30:02 INFO: trying 'suspend' mode instead
1003: May 12 21:30:02 INFO: backup mode: suspend
1003: May 12 21:30:02 INFO: ionice priority: 7
1003: May 12 21:30:02 INFO: HOOK: backup-start suspend 1003
1003: May 12 21:30:02 INFO: HOOK-ENV: vmtype=lxc;dumpdir=/mnt/backup/dump;storeid=backup;hostname=apollo;tarfile=/mnt/backup/dump/vzdump-lxc-1003-2016_05_12-21_30_02.tar.lzo;logfile=/mnt/backup/dump/vzdump-lxc-1003-2016_05_12-21_30_02.log
1003: May 12 21:30:02 INFO: starting first sync /proc/20321/root// to /mnt/backup/dump/vzdump-lxc-1003-2016_05_12-21_30_02.tmp
1003: May 12 21:30:04 INFO: Number of files: 27,745 (reg: 22,145, dir: 2,473, link: 3,095, dev: 2, special: 30)
1003: May 12 21:30:04 INFO: Number of created files: 27,744 (reg: 22,145, dir: 2,472, link: 3,095, dev: 2, special: 30)
1003: May 12 21:30:04 INFO: Number of deleted files: 0
1003: May 12 21:30:04 INFO: Number of regular files transferred: 22,130
1003: May 12 21:30:04 INFO: Total file size: 736,748,906 bytes
1003: May 12 21:30:04 INFO: Total transferred file size: 732,653,528 bytes
1003: May 12 21:30:04 INFO: Literal data: 732,653,528 bytes
1003: May 12 21:30:04 INFO: Matched data: 0 bytes
1003: May 12 21:30:04 INFO: File list size: 720,813
1003: May 12 21:30:04 INFO: File list generation time: 0.001 seconds
1003: May 12 21:30:04 INFO: File list transfer time: 0.000 seconds
1003: May 12 21:30:04 INFO: Total bytes sent: 734,540,923
1003: May 12 21:30:04 INFO: Total bytes received: 444,340
1003: May 12 21:30:04 INFO: sent 734,540,923 bytes received 444,340 bytes 293,994,105.20 bytes/sec
1003: May 12 21:30:04 INFO: total size is 736,748,906 speedup is 1.00
1003: May 12 21:30:04 INFO: first sync finished (2 seconds)
1003: May 12 21:30:04 INFO: suspend vm
1003: May 12 21:30:04 INFO: HOOK: pre-stop suspend 1003
1003: May 12 21:30:04 INFO: HOOK-ENV: vmtype=lxc;dumpdir=/mnt/backup/dump;storeid=backup;hostname=apollo;tarfile=/mnt/backup/dump/vzdump-lxc-1003-2016_05_12-21_30_02.tar.lzo;logfile=/mnt/backup/dump/vzdump-lxc-1003-2016_05_12-21_30_02.log
1003: May 12 21:30:04 INFO: starting final sync /proc/20321/root// to /mnt/backup/dump/vzdump-lxc-1003-2016_05_12-21_30_02.tmp
1003: May 12 21:30:05 INFO: Number of files: 27,745 (reg: 22,145, dir: 2,473, link: 3,095, dev: 2, special: 30)
1003: May 12 21:30:05 INFO: Number of created files: 0
1003: May 12 21:30:05 INFO: Number of deleted files: 0
1003: May 12 21:30:05 INFO: Number of regular files transferred: 0
1003: May 12 21:30:05 INFO: Total file size: 736,748,906 bytes
1003: May 12 21:30:05 INFO: Total transferred file size: 0 bytes
1003: May 12 21:30:05 INFO: Literal data: 0 bytes
1003: May 12 21:30:05 INFO: Matched data: 0 bytes
1003: May 12 21:30:05 INFO: File list size: 65,533
1003: May 12 21:30:05 INFO: File list generation time: 0.001 seconds
1003: May 12 21:30:05 INFO: File list transfer time: 0.000 seconds
1003: May 12 21:30:05 INFO: Total bytes sent: 764,290
1003: May 12 21:30:05 INFO: Total bytes received: 2,675
1003: May 12 21:30:05 INFO: sent 764,290 bytes received 2,675 bytes 511,310.00 bytes/sec
1003: May 12 21:30:05 INFO: total size is 736,748,906 speedup is 960.60
1003: May 12 21:30:05 INFO: final sync finished (1 seconds)
1003: May 12 21:30:05 INFO: resume vm
1003: May 12 21:30:05 INFO: HOOK: pre-restart suspend 1003
1003: May 12 21:30:05 INFO: HOOK-ENV: vmtype=lxc;dumpdir=/mnt/backup/dump;storeid=backup;hostname=apollo;tarfile=/mnt/backup/dump/vzdump-lxc-1003-2016_05_12-21_30_02.tar.lzo;logfile=/mnt/backup/dump/vzdump-lxc-1003-2016_05_12-21_30_02.log
1003: May 12 21:30:05 INFO: vm is online again after 1 seconds
1003: May 12 21:30:05 INFO: creating archive '/mnt/backup/dump/vzdump-lxc-1003-2016_05_12-21_30_02.tar.lzo'
1003: May 12 21:30:07 INFO: Total bytes written: 781035520 (745MiB, 281MiB/s)
1003: May 12 21:30:07 INFO: archive file size: 360MB
1003: May 12 21:30:07 INFO: delete old backup '/mnt/backup/dump/vzdump-lxc-1003-2016_05_12-00_52_05.tar.lzo'
1003: May 12 21:30:07 INFO: HOOK: backup-end suspend 1003
1003: May 12 21:30:07 INFO: HOOK-ENV: vmtype=lxc;dumpdir=/mnt/backup/dump;storeid=backup;hostname=apollo;tarfile=/mnt/backup/dump/vzdump-lxc-1003-2016_05_12-21_30_02.tar.lzo;logfile=/mnt/backup/dump/vzdump-lxc-1003-2016_05_12-21_30_02.log
1003: May 12 21:30:08 INFO: Finished Backup of VM 1003 (00:00:06)


root@pve:~# pveversion -v
proxmox-ve: 4.1-26 (running kernel: 4.2.6-1-pve)
pve-manager: 4.1-1 (running version: 4.1-1/2f9650d4)
pve-kernel-4.2.6-1-pve: 4.2.6-26
lvm2: 2.02.116-pve2
corosync-pve: 2.3.5-2
libqb0: 0.17.2-1
pve-cluster: 4.0-29
qemu-server: 4.0-41
pve-firmware: 1.1-7
libpve-common-perl: 4.0-41
libpve-access-control: 4.0-10
libpve-storage-perl: 4.0-38
pve-libspice-server1: 0.12.5-2
vncterm: 1.2-1
pve-qemu-kvm: 2.4-17
pve-container: 1.0-32
pve-firewall: 2.0-14
pve-ha-manager: 1.0-14
ksm-control-daemon: 1.2-1
glusterfs-client: 3.5.2-2+deb8u1
lxc-pve: 1.1.5-5
lxcfs: 0.13-pve1
cgmanager: 0.39-pve1
criu: 1.6.0-1
zfsutils: 0.6.5-pve6~jessie
root@pve:~#
 
Yes, that is correct. The mail only contains the information about/output of the individual backup tasks, not the whole backup job.

Off-topic: I would highly recommend updating your system to the current version - it seems you have not installed updates in quite a while ;)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!