Backups not working

itconstruct

Active Member
Aug 3, 2009
77
0
26
I have recently noticed my backups aren't working within proxmox even though they have been scheduled.

I am also no longer receiving an email about the backups when they should be performed even just to say they have failed.

I would really like to get this fixed asap.

Please advise.
 
Try checking in /var/log/vzdump/

are you backing up openvz (i think so from the looks of it) or kvm ? or both ?

are you able to execute a vzdump yourself manually - or does that fail ?


The logs state the backups have not run since the 7 or 8th of September.

I am backing up both OpenVZ and KVM and both are not working.

I tried the following command:
vzdump --dumpdir /mnt/samba1/ --suspend 106

and I get INFO: trying to get a global lock -waiting...

I am not sure if there is another command I should be issuing instead to do them manually. This then just seems to hang at this point. I will leave it for some time and see if anything changes.

1. What are you backing up to? (local drive, iscsi, nfs share, usb drive, or another? )
2. anything showing under the /var/log/vzdump directory ?
3. are you able to manually run a vzdump command ?

1. Samba share on windows pc. This share should currently be up.
2. Yes but only logs from the 7 and 8th of September which all worked.
3. See above.

Please advise.
 
I might be wrong - but according to the openvz wiki - The rsync command used by vzdump to create the backup in suspend mode partially ignores the "--exclude-path" option. In fact, even if the excluded paths won't appear in the final output, the whole VPS will be moved to the temporary directory, meaning that you need as much free disk space as your VPS size to use vzdump. It can be an issue in the case of a file server handling many files.

Backups have 3 options

  • Stop the CT during backup (very long downtime)
  • Use rsync and suspend/resume (minimal downtime)
  • Use LVM2 (no downtime)
I would try and see if, when you stop the vps, if the backup takes place...
 
I might be wrong - but according to the openvz wiki - The rsync command used by vzdump to create the backup in suspend mode partially ignores the "--exclude-path" option. In fact, even if the excluded paths won't appear in the final output, the whole VPS will be moved to the temporary directory, meaning that you need as much free disk space as your VPS size to use vzdump. It can be an issue in the case of a file server handling many files.

Backups have 3 options


  • Stop the CT during backup (very long downtime)
  • Use rsync and suspend/resume (minimal downtime)
  • Use LVM2 (no downtime)

I would try and see if, when you stop the vps, if the backup takes place...

I am trying LVM2 backup now with machine down running the following command:
vzdump --dumpdir /mnt/samba1/ --snapshot 107

but it still seems to hang on:
INFO: trying to get global lock - waiting...

Please advise.
 
I am trying LVM2 backup now with machine down running the following command:
vzdump --dumpdir /mnt/samba1/ --snapshot 107

but it still seems to hang on:
INFO: trying to get global lock - waiting...

Please advise.


Please note this was left until the following appeared:
INFO: trying to get global lock - waiting...
ERROR: can't aquire lock '/var/run/vzdump.lock' - got timeout
proxmox2:/mnt/samba1#

Please advise.
 
This seems to now be fixed.

I worked out that only one vzdump process could work at a time so I ran ps -el to see if vzdump was running as a process already.

It was and so I killed it by running kill and the processID and then the manual backup completed using the above command.

An automatic backup should be run in the morning at 3am.

I will let you know how it goes.

Thank you to Dietmar and Typo3USA very much for your help in this regard.
 
no worries - happy to help.
Do please, let us know how it goes

Ok will do.

Ok we are getting there slowly.

I am now at least starting to receive backup emails again now even though they are failing:

OpenVZ machine Backup:
Code:
103: Oct 04 03:00:01 INFO: Starting Backup of VM 103 (openvz) 103: Oct 04 03:00:01 INFO: CTID 103 exist mounted running 103: Oct 04 03:00:01 INFO: status = CTID 103 exist mounted running 103: Oct 04 03:00:01 INFO: backup mode: snapshot 103: Oct 04 03:00:01 INFO: ionice priority: 7 103: Oct 04 03:00:01 INFO: trying to remove stale snapshot '/dev/pve/vzsnap-proxmox2-0' 103: Oct 04 03:00:01 INFO: umount: /mnt/vzsnap0: device is busy 103: Oct 04 03:00:01 INFO: umount: /mnt/vzsnap0: device is busy 103: [COLOR=red]Oct 04 03:00:01 ERROR: command 'umount /mnt/vzsnap0' failed with exit code 1 [/COLOR]103: Oct 04 03:00:01 INFO:   Can't remove open logical volume "vzsnap-proxmox2-0" 103: [COLOR=red]Oct 04 03:00:01 ERROR: command 'lvremove -f /dev/pve/vzsnap-proxmox2-0' failed with exit code 5 [/COLOR]103: Oct 04 03:00:01 INFO: creating lvm snapshot of /dev/mapper/pve-data ('/dev/pve/vzsnap-proxmox2-0') 103: Oct 04 03:00:01 INFO:   Logical volume "vzsnap-proxmox2-0" already exists in volume group "pve" 103: Oct 04 03:00:01 INFO:   Can't remove open logical volume "vzsnap-proxmox2-0" 103: [COLOR=red]Oct 04 03:00:01 ERROR: command 'lvremove -f /dev/pve/vzsnap-proxmox2-0' failed with exit code 5 [/COLOR]103: [COLOR=red]Oct 04 03:00:01 ERROR: Backup of VM 103 failed - command 'lvcreate --size 1024M --snapshot --name vzsnap-proxmox2-0 /dev/pve/data' failed with exit code 5 [/COLOR]

KVM Backup:
Code:
vzdump --quiet --snapshot --storage Samba1 --mailto [EMAIL="admin@itconstruct.com.au"]admin@itconstruct.com.au[/EMAIL] 110  110: Sep 08 10:00:01 INFO: Starting Backup of VM 110 (qemu) 110: Sep 08 10:00:02 INFO: running 110: Sep 08 10:00:02 INFO: status = running 110: Sep 08 10:00:02 INFO: backup mode: snapshot 110: Sep 08 10:00:02 INFO: ionice priority: 7 110: Sep 08 10:00:03 INFO:   Logical volume "vzsnap-proxmox2-0" created 110: Sep 08 10:00:03 INFO: creating archive '/mnt/samba1/vzdump-qemu-110-2010_09_08-10_00_01.tar' 110: Sep 08 10:00:03 INFO: adding '/mnt/samba1/vzdump-qemu-110-2010_09_08-10_00_01.tmp/qemu-server.conf' to archive ('qemu-server.conf') 110: Sep 08 10:00:03 INFO: adding '/mnt/vzsnap0/images/110/vm-110-disk.qcow2' to archive ('vm-disk-ide0.qcow2') 110: Oct 03 23:43:05 INFO: umount: /mnt/vzsnap0: device is busy 110: Oct 03 23:43:05 INFO: umount: /mnt/vzsnap0: device is busy 110: [COLOR=red]Oct 03 23:43:05 ERROR: command 'umount /mnt/vzsnap0' failed with exit code 1 [/COLOR]110: Oct 03 23:43:05 INFO:   Can't remove open logical volume "vzsnap-proxmox2-0" 110: [COLOR=red]Oct 03 23:43:05 ERROR: command 'lvremove -f '/dev/pve/vzsnap-proxmox2-0'' failed with exit code 5 [/COLOR]110: [COLOR=red]Oct 03 23:43:05 ERROR: Backup of VM 110 failed - interrupted by signal [/COLOR]

Please advise.

I have been trying to lookup other threads on this site to see if there is a solution to this problem however have not yet been able to resolve.
 
UPDATE:

I ran the following command
Code:
fuser-km /mnt/vzsnap0
It then reported:
Code:
/mnt/vzsnap0/: 31205
and then I ran
Code:
 /mnt/samba1# vzdump --snapshot --storage Samba1 --mailto [EMAIL="admin@itconstruct.com.au"]admin@itconstruct.com.au[/EMAIL] 106
and I got the following report:

Code:
INFO: starting new backup job: vzdump --snapshot --storage Samba1 --mailto admin@itconstruct.com.au 106
INFO: filesystem type on dumpdir is 'cifs' -using /var/tmp/vzdumptmp28751 for temporary files
INFO: Starting Backup of VM 106 (openvz)
INFO: CTID 106 exist mounted running
INFO: status = CTID 106 exist mounted running
INFO: backup mode: snapshot
INFO: ionice priority: 7
INFO: trying to remove stale snapshot '/dev/pve/vzsnap-proxmox2-0'
INFO:   Logical volume "vzsnap-proxmox2-0" successfully removed
INFO: creating lvm snapshot of /dev/mapper/pve-data ('/dev/pve/vzsnap-proxmox2-0')
INFO:   Logical volume "vzsnap-proxmox2-0" created
INFO: creating archive '/mnt/samba1/vzdump-openvz-106-2010_10_04-11_20_35.tar'
INFO: Total bytes written: 1045944320 (998MiB, 9.9MiB/s)
INFO: archive file size: 997MB
INFO: delete old backup '/mnt/samba1/vzdump-openvz-106-2010_09_07-03_04_12.tar'
INFO:   Logical volume "vzsnap-proxmox2-0" successfully removed
INFO: Finished Backup of VM 106 (00:01:49)
INFO: Backup job finished successfuly

Seems like the manual backup worked well.

Will let you know how tomorrow morning's automatic backups run.

Thanks again.