Pruning old backups
Closed this issue · 4 comments
Since the upgrade to 0.6 or 0.7 old backups aren't pruned. I assume this is related to the backup naming scheme which now includes the timestamp. It seems old backups, using the old scheme are simply not detected.
Unfortunately this prevented backups since the disk went full. I now manually deleted old backups and I'm in the green again.
I assume you mean 6.0 or 7.0. Backups are normally pruned by a timestamp, not filename, so this is a bit surprising. At any rate:
- What prune policy are you using?
- Please could you run
sqlite3 /var/log/backup/backups.db
and paste in the output ofselect host,volume,device,id,time,pruned,rc,status from backup order by time;
so I can see what backups rsbackup thinks exists. (Adust the sqlite3 command depending on where your backups.db is if necessary.)
What prune policy are you using?
prune-age (60 for the root filesystem and 240 for /home)
sqlite> select host,volume,device,id,time,pruned,rc,status from backup order by time;
local|home|backup1|2020-08-21T21:31:15|1598045475|0|0|2
local|rootfs|backup1|2020-08-22T01:12:41|1598058761|0|0|2
local|home|backup1|2020-08-24T08:00:02|1598256002|0|0|2
local|rootfs|backup1|2020-08-24T08:18:47|1598257127|0|0|2
local|home|backup1|2020-08-25T08:00:08|1598342408|0|0|2
local|rootfs|backup1|2020-08-25T10:06:30|1598349990|0|0|2
local|home|backup1|2020-08-26T08:00:01|1598428801|0|0|2
local|rootfs|backup1|2020-08-26T09:50:48|1598435448|0|0|2
sqlite>
In fact, these are the ones that have the timestamp in the folder name. The most recent backup before is 2020-06-04
. You notice that it didn't backup for 2,5 month because of the new requirement that the backup store must be a mount point; I didn't realize that until recently so my cronjob was silently failing for that time (I now added --no-mounted
to the store directive).
Here's an excerpt of my backup tree:
2020-06-03
2020-06-04
2020-08-21T21:31:15
2020-08-24T08:00:02
2020-08-25T08:00:08
2020-08-26T08:00:01
2020-06-03
and 2020-06-04
aren't in the database, so they'll never be pruned.
Is it possible that backups.db
was deleted when you did the upgrade?
Hm, actually now that you mention this, this didn't came to my mind yet. I think that might have happened. I did a fresh install of Ubuntu 20.04 and copied /etc/rsbackup over. I didn't realize the backup.db is in /var/log.
Sorry for the noise.