[SOLVED] Old backups are not being removed

  • Thread starter Thread starter kerosin
  • Start date Start date
K

kerosin

Guest
Hello,

I have problem on my newly installed Proxnox VE 2.1-1 machine. Old backups are not being removed ...

Do you have any idea what could be the cause?


The backup storage is set to NFS.

Here is listing of /etc/vzdump.conf:

Code:
# vzdump default settings

#tmpdir: DIR
#dumpdir: DIR
#storage: STORAGE_ID
#mode: snapshot|suspend|stop
#bwlimit: KBPS
#ionice: PRI
#lockwait: MINUTES
#stopwait: MINUTES
#size: MB
[B]maxfiles: 1[/B]
#script: FILENAME
#exclude-path: PATHLIST

Also there is nothing strange in the logfile which is saved together with the backup file:
Code:
Jun 27 22:00:02 INFO: Starting Backup of VM 100 (qemu)
Jun 27 22:00:02 INFO: status = running
Jun 27 22:00:02 INFO: backup mode: suspend
Jun 27 22:00:02 INFO: ionice priority: 7
Jun 27 22:00:02 INFO: suspend vm
Jun 27 22:00:03 INFO: creating archive '/mnt/pve/px2-dmz-backup/dump/vzdump-qemu-100-2012_06_27-22_00_02.tar.gz'
Jun 27 22:00:03 INFO: adding '/mnt/pve/px2-dmz-backup/dump/vzdump-qemu-100-2012_06_27-22_00_02.tmp/qemu-server.conf' to archive ('qemu-server.conf')
Jun 27 22:00:03 INFO: adding '/var/lib/vz/images/100/vm-100-disk-1.raw' to archive ('vm-disk-ide0.raw')
Jun 27 23:36:50 INFO: Total bytes written: 85899348480 (14.11 MiB/s)
Jun 27 23:36:50 INFO: archive file size: 21.02GB
Jun 27 23:36:52 INFO: resume vm
Jun 27 23:36:53 INFO: vm is online again after 5811 seconds
Jun 27 23:36:53 INFO: Finished Backup of VM 100 (01:36:51)

Thank you for any help.
 
Last edited by a moderator:
what do you get here:


Code:
ls -alh /mnt/pve/px2-dmz-backup/dump/
 
what do you get here:


Code:
ls -alh /mnt/pve/px2-dmz-backup/dump/

Code:
root@px4:~# ls -alh /mnt/pve/px2-dmz-backup/dump/
total 22G
drwxr-xr-x 2 root root 4.0K Jun 28 15:10 .
drwxr-xr-x 3 root root 4.0K May 31 18:41 ..
-rw-r--r-- 1 root root  846 Jun 27 23:36 vzdump-qemu-100-2012_06_27-22_00_02.log
-rw-r--r-- 1 root root  22G Jun 27 23:36 vzdump-qemu-100-2012_06_27-22_00_02.tar.gz
 
Maybe old '--remove' setting in /etc/cron.d/vzdump?

Actually it is not there:

Code:
root@px4:~# cat /etc/cron.d/vzdump 
# cluster wide vzdump cron schedule
# Atomatically generated file - do not edit

PATH="/usr/sbin:/usr/bin:/sbin:/bin"

0 22 * * 1,2,3,4     root vzdump 100 --quiet 1 --mode suspend --mailto adm@xxx.cz --node px4 --compress gzip --storage px2-dmz-backup
 
Code:
root@px4:~# ls -alh /mnt/pve/px2-dmz-backup/dump/
total 22G
drwxr-xr-x 2 root root 4.0K Jun 28 15:10 .
drwxr-xr-x 3 root root 4.0K May 31 18:41 ..
-rw-r--r-- 1 root root  846 Jun 27 23:36 vzdump-qemu-100-2012_06_27-22_00_02.log
-rw-r--r-- 1 root root  22G Jun 27 23:36 vzdump-qemu-100-2012_06_27-22_00_02.tar.gz

I see one backup here, so why do you think old backups are not removed? after the next backup this old one should be removed as you specified maxfiles=1
 
And what is the storage configuration?

# cat /etc/pve/storage.cfg

Code:
root@xx:~# cat /etc/pve/storage.cfg 
dir: local
    path /var/lib/vz
    content images,iso,vztmpl,rootdir
    maxfiles 0

nfs: px2-dmz-backup
    path /mnt/pve/px2-dmz-backup
    server 172.22.1.8
    export /backup/px4
    options vers=3
    content backup
    [B]maxfiles 7[/B]

Should I just try to change the number in the maxfiles line to something smaller or should I change to 0 so the maxfiles parameter from /etc/vzdump.conf wil take effect ?
 
Last edited by a moderator:
I see one backup here, so why do you think old backups are not removed? after the next backup this old one should be removed as you specified maxfiles=1

You see only one backup because I've deleted other files manually.
 
Found the option in the GUI. Datacenter -> Storage -> select the storage -> Edit -> and modify Max Backups


Thank you for your help