Virtualmin don't delete old backups

|SYSTEM INFORMATION||
|CentOS Linux 7.9.2009|
|||
|CentOS Linux 7.9.2009|REQUIRED|
|Webmin version 1.981:|REQUIRED|
|Virtualmin version:6.16|REQUIRED|
|Related products version:|RECOMMENDED|

Hi guys, Someone can Hel me? This is the end log of last backup where I’ve got 5 folder with the backupped files with different dates.

In my server
“30 servers were backed up successfully, 0 encountered errors.
8 Backup the Virtualmin configuration settings.
Deleting backups from / SERVER-1 /% Y-% m-% d on FTP server ************.com older than 4 days …
… no saves to delete were found”

The log would appear to read 8 folders but does not recognize the folder names and therefore the dates

Run ls -l on your backup (sub)directory, and look at the timestamps, because those are what Virtualmin looks at to determine if the backup is old enough to be deleted.

Hi Nico Thanks for your help.
Here there is the response of the command:
drwxrwxrwx 2 UsFTP everyone 4096 2021-12-19 02:11 2021-12-18/

drwxrwxrwx 2 UsFTP everyone 4096 2021-12-20 02:21 2021-12-19/

drwxrwxrwx 2 UsFTP everyone 4096 2021-12-21 02:32 2021-12-20/

drwxrwxrwx 2 UsFTP everyone 4096 2021-12-21 13:36 2021-12-21/

for testing I’ve modified the number of backup to save to 2. but its write file like a charme.

Hi please, someone can help me with the issue?

Hi,

Is this still an issue with Virtualmin 6.17?

Hi Ilia Thanks for help. My release is 6.16 and I don’t see any updates available

You you really have spaces in here – /% Y-% m-% d? If so that wouldn’t work, it has to be written as:

/%Y-%m-%d

My last 8 backups log says:

Il backup di 30 server è stato eseguito correttamente, 0 ha riscontrato errori. 8 Backup delle impostazioni di configurazione di Virtualmin. Eliminazione di backup da /SERVER-1/%Y-%m-%d su server FTP acwildnas.myqnapcloud.com precedenti a 4 giorni … … nessun salvataggio da cancellare è stato trovato

Without spaces!

I’ve previously had issues with backups when using a forwardslash in the path.

Changing to hyphens fixed the issues I was having. e.g.:

hostname/%Y-%m-%d

to

hostname-%Y-%m-%d

Of course you end up with all backups in a single folder rather than in separate folders, but that was fine for my setup.

Thanks, I will try

Perhaps you have old repos setup. To fix the repos setup download latest install.sh script and run it with the --setup flag to fix repos and exit.

sh install.sh --setup

Hi Wheeler,
When I try to configure your syntax virtualmin replies that it cannot read the expiration date so it does not allow it

Hi Ilia, I wrote you that I was able to update virtualmin and that the problem continues to exist anyway. Thanks if you or anyone can help me to solve this problem that is very important for me!

this is the end of my last backup log with my ftp server obscured for security reasons and attached screenshot of my ftp folder for this backup:

30 servers were backed up successfully, 0 encountered errors.
8 Backup the Virtualmin configuration settings.
Deleting backups from / SERVER-1 /% Y-% m-% d on FTP server ************.com older than 4 days …
… no saves to delete were found

As you can see I have 6 folders on my ftp server but the script says: “no saves to delete were found”

Because I bet it’s looking for files, something that ends in a backup file extension, rather than looking for just folders. That’s why it doesn’t see any backups.

Thanks for your help, How you think I Can solve?

The solution would be simple - put it all under SERVER-1/Backups/ and store files as backup-file-name-%Y-%m-%d (or whatever name is more comfortable for you).

@Jamie, do you think we could add an option to delete folders too?

If you setup the backup to write to a folder and save one file per domain, those same folders should also be deleted with purging old backups.