I’m having troubles with the setup I’ve created on a Virtualmin scheduled backup. It doesn’t seem to be removing the backup directories of old backups I inform it to remove after X number of days. The email report states -
“Deleting backups older than 1 days …
… no backups to delete were found”
Yet there’s directories spanning many days there. If I set the scheduled backup to “Single archive file” with strftime on it removes those compressed files. But sadly it doesn’t remove directories for some strange reason. I wish to use the newer “One file per server” backup format. The backups are being stored on the server itself for testing purposes until I can get it working.
The current setup I have is the following -
Local file or directory - /root/backup/%d-%m-%Y This names a newly created directory with the current date, several compressed files inside for each domain named “site1.tar.gz”, “site2.tar.gz” for example.
Use strftime = yes
Transfer files after they’ve backed up = yes
Backup format - One file per server
Create destination directory = yes
Delete old backups after 1 day.
Any assistance in getting the system to remove old backup directories will be greatly appreciated.
Virtualmin will delete old backup directories, but only if the dates on them are at least 1 day old. Note that it determines this by checking the actual last-modification times as shown by ls -l /root/backup, rather than the filenames.
If you list the /root/backup directory, do the dates on the sub-directories match up with their names? If not, perhaps something else is modifying them every day, and thus keeping Virtualmin from seeing them as old…
drwxr-xr-x 2 bk bk 4096 Sep 9 00:52 09-09-2009
drwxr-xr-x 2 bk bk 4096 Sep 10 00:55 10-09-2009
drwxr-xr-x 2 bk bk 4096 Sep 11 00:48 11-09-2009
drwxr-xr-x 2 bk bk 4096 Sep 12 00:51 12-09-2009
drwxr-xr-x 2 bk bk 4096 Sep 13 00:39 13-09-2009
The dates on the directories look proper… Mine is set to 3 days… But it never seems to check it properly. It’s becoming a problem as I’m having to manually clear it up or deal with exploded disks syndrome. EDS.
I am having the same problem - Virtualmin will not delete any backups for me either. My setup is the same, down to the day - I have instructed Virtualmin to delete backups older than one day, and it is not. I am using “Delete backups older than 1 day” as well.
Eric, the OP said his backups are currently being stored locally on his server (as are mine):
The backups are being stored on the server itself for testing purposes until I can get it working.
Jamie, ls -l shows the correct dates on my backup directories as well.
I am backing it up remotely to an FTP site. user/password/chmod all allow deletion, and when I FTP in with the same user/pass I can delete with no problems whatsoever.
first I have to say, that vmin and wmin are a great work! Thanks for it. I love to use it since years . . .
I have the same problem backing up vservers in single files. After the correct time to delete the old backup folders, I get an error-mail which says, that the directories to delete haven’t been empty.
That is -in fact- correct, because the directories contain several (vserver-)tars.
What do I have to do, that the ftp-client allows the deletion of (not empty) directories?
They reside on a nas-system (D-LINK 323 aka conceptronics CHSNAS3) with built-in linux ftp-server. I fear, that I will not be able to configure its behavior.
It took me a little bit to figure this out, but this can be caused by the Directory Listing Style being set to MS-DOS style in Information Internet Services (assuming you are using IIS for your FTP server). You have to change it to UNIX style for Virtualmin to read the dates properly.
P.S. Sorry for bumping an old thread, but it looks like it was never answered and this was the first page I found when searching.
I am having the same problem. Remote backup via SSH - It all use to work fine, deleting old backups - and now for the last week it has stopped working? What could be causing this?
If you have a post-backup command to immediately un-mount the backup filesystem, purging of old backups won’t work as it is done after the post-backup command is run…