SSH backup does not delete old backups

Hi everybody,

I set up a SSH backup from one server to another. Everything works fine, except that the old backups (older than 10 days in this case) are not deleted.

Any idea why? Virtualmin shows no error, the end of the backup output goes like this:

139 servers backed up successfully, 0 had errors.
8 Virtualmin configuration settings backed up successfully.
Deleting backups from virtualmin_%Y_%m_%d on SSH server 12.34.56.78 older than 10 days …

Deleting file /virtualmin_2017_11_14 via SSH, which is 14 days old ..
.. deleted 24 kB.

Deleting file /virtualmin_2017_11_15 via SSH, which is 13 days old ..
.. deleted 24 kB.

Deleting file /virtualmin_2017_11_16 via SSH, which is 12 days old ..
.. deleted 24 kB.

Deleting file /virtualmin_2017_11_17 via SSH, which is 11 days old ..
.. deleted 24 kB.

… deleted 4 old backups, and skipped 11 that were not old enough

Your log above says it deleted stuff 11,12,13,14 days old. Looks to be working perfectly?

Nope, unfortunatly not. It SAYS things are deleted … but they are not. That is the whole point: there is not error message, but it nevertheless do not work.
(“deleted 24 kB” is by the way pretty suspicious since every complete backup make several Go).

–n

Have you checked the actual file system on the backup to see if 11+ day old folders/files are still there?

Checked my logs. I have the same domains being backed up to local drive and to ssh location. The local drive backups state things like 6.5 gig deleted when old enough. But the ssh offsite backups say something like 4k deleted. But on the offsite file system, they are actually deleted, all 6.5 gigs. The ssh size is referring to the directory size I guess, which is not the contents size. Bet if you look at the backups via file manager, it will show each dir as 24k in size. As long as the aged dir’s are gone, I think you have nothing to worry about.

I understand your point about the displayed size of the folders (thank you for pointing this out) … but the initial problem remains: old backups are not deleted, NEITHER the folders, NOR their contents (it’s by the way the first thing I checked :wink:
So Virtualmin tells me the backups are deleted … wheras they are actually untouched.

Any thoughts? Anyone ?

One last up, you never know… :slight_smile: