As indicated in title, I have a little issue with the automated backup feature of Virtualmin. I have setup it to delete backups after 16 days but it doesn’t delete them right now.I guess it’s based on file date and not date encoded in the filename of backup no ? (I had to move backup files from an S3 bucket to an other one and so filedates have been resetted).
I would guess that was the mistake - though I do not use S3 buckets and would not transfer them to a different one just for that reason if nothing else.
deleting by file date seems far more logical (to me) than by something in the file name.
I assume you have control over the bucket - so deletion should not be a great problem.
I’d say one of the improvements they can look into, backups are on the short list they are looking into I think, is automatically adding the date codes. Yeah, technically you have a file creation time but that is not what they use. I had to do a little digging when I set up mine.
From their point of view I guess what you include in the date depends on backup frequency. If you back up more than once a day you need to add hour to that. Not sure I need year, but…
Well here I had as trying to debug a problem on the S3 storage system of my supplier where large size files deletion were timing out
Here are how my backups right now on the new S3 storage:
Backup cron is setup to delete full backups after 16 days but once it runned the last full upgrade on the 22th it should have deleted the one done on 1st of month but it stated in logs of backup that nothing was too old to be deleted so it clearly works on filedates and not on date encoded in filenames
nope it is what they are using and not date encoded in files names which is more logical (although not helping for my tests
Funny thing: I had not noticed that the rclone copy from the old storage system to the new one kept files date but not folders date (it’s a limit of S3).
So virtualmin uses the folder date to decide if he has to delete individual archives in the folder and not date of individual archives file (my backups are setup to generate one archive per virtual server) but in the backup logs it list number of individual files not enough old to be deleted
I found the backup delete functionality at least poorly documented and I didn’t want to guess what it does. So I took a little time and implemented my own solution.
Hopefully, Virtualmin gets improvements here, by either better documentation or better UI.
Yeah there is still something strange here as it looks like it’s only the directory containing backups that have date encoded in the directory name and not backups themselves. Here is how I’m setup for full backup: