vzdump deleted *all* my backups! :(

monster

Member
Oct 23, 2010
30
0
6
Hi!

Normally, I have the following run once a day as a cron job:

Code:
vzdump --snapshot --size 16384 --compress --maxfiles 7 --all
But today I wanted an extra backup, in addition to the 7 old ones, so I ran manually:

Code:
vzdump --snapshot --size 16384 --compress --all
and it made the new backup, but erased all the others!

So what is the syntax for "make a new backup, and don't touch the old ones" ???

To quote "Pete Doherty", which my wife forces me to hear, "that makes perfect nonsense to me" ...
 
If you don't specify maxfiles, vzdump assumes you are using the default value, that is 1, so erases all the "unwanted" copies it finds in the destination directory.
You have some ways:
a) specify maxfiles: 7 in P { margin-bottom: 0cm; }/etc/vzdump.conf configuration file (if it does not exists, create it as root)
b) always provide the parameter --maxfiles 7
c) save the backup in a different directory (where there are NOT your previous 7 sets). Use --dumpdir, i.e. like vzdump --snapshot --size 16384 --dumpdir /srv/myaddbackup --compress --all
Best regards