sbackup does not purge old backups logarithmically

Bug #126278 reported by Francesco Potortì
14
Affects Status Importance Assigned to Milestone
sbackup (Ubuntu)
Confirmed
Medium
Unassigned
Nominated for Hardy by omeseth
Nominated for Intrepid by omeseth

Bug Description

Binary package hint: sbackup

I started using sbackup on February, and configured it to logarithmically purge backups. Now we are in July and I discover that old backups are not purged. More precisely, it appears as if some old backups were purged and some did not: for example all full backups but one have been deleted from February, March, April and May. But incremental backups from the same months were not deleted, so some of them are based on a full backup that was purged.
This happens with the standard Feisty version. Just before reporting this I upgraded to the 0.10.4 Gutsy version and made a backup, but the old incremental backups are still there.
I append my configuration and a list of all the backups in my backup directory with "based on" dependencies.

Revision history for this message
Francesco Potortì (pot) wrote :
Revision history for this message
Francesco Potortì (pot) wrote :
Changed in sbackup:
importance: Undecided → Medium
Revision history for this message
Norbert Hartl (norbert-hartl) wrote :

I can confirm that it's not working. Every backup which was created is still there. No removal at all. Here is my set of files:

2007-10-03_19.14.54.803053.neoflux.ful
2007-10-03_22.21.57.524624.neoflux.inc
2007-10-04_08.08.54.273768.neoflux.inc
2007-10-06_12.41.39.728544.neoflux.inc
2007-10-06_15.59.56.673150.neoflux.inc
2007-10-07_10.36.23.894480.neoflux.inc
2007-10-07_10.45.34.369115.neoflux.inc
2007-10-08_08.27.11.565008.neoflux.inc
2007-10-10_23.54.05.316264.neoflux.inc
2007-10-15_20.08.36.940569.neoflux.inc
2007-10-15_20.32.12.574427.neoflux.inc
2007-10-19_09.46.54.925943.neoflux.inc
2007-10-19_09.57.28.937613.neoflux.inc
2007-10-20_11.25.56.281253.neoflux.inc

Revision history for this message
Norbert Hartl (norbert-hartl) wrote :

I can confirm that it's not working. Every backup which was created is still there. No removal at all. I'm using Gutsy Gibbon.

Here is my set of files:

2007-10-03_19.14.54.803053.neoflux.ful
2007-10-03_22.21.57.524624.neoflux.inc
2007-10-04_08.08.54.273768.neoflux.inc
2007-10-06_12.41.39.728544.neoflux.inc
2007-10-06_15.59.56.673150.neoflux.inc
2007-10-07_10.36.23.894480.neoflux.inc
2007-10-07_10.45.34.369115.neoflux.inc
2007-10-08_08.27.11.565008.neoflux.inc
2007-10-10_23.54.05.316264.neoflux.inc
2007-10-15_20.08.36.940569.neoflux.inc
2007-10-15_20.32.12.574427.neoflux.inc
2007-10-19_09.46.54.925943.neoflux.inc
2007-10-19_09.57.28.937613.neoflux.inc
2007-10-20_11.25.56.281253.neoflux.inc

Changed in sbackup:
status: New → Confirmed
Revision history for this message
Christopher Barrington-Leigh (cpbl) wrote :

Still the case for me in the latest Gutsy. Nothing at all has been deleted in >6 months for me, in logarithmic mode. I am not sure that anyone is maintaining this software, though. It might need someone to step forward and dig into code ...

I'm using an ssh target. Are you others, too?

Revision history for this message
Francesco Potortì (pot) wrote : Re: [Bug 126278] Re: sbackup does not purge old backups logarithmically

>I'm using an ssh target. Are you others, too?

No. I am using a local disk.

Revision history for this message
Norbert Hartl (norbert-hartl) wrote :

I'm using an external USB drive

Revision history for this message
MatatTHC (matatthc) wrote :

Hi,

I had the same problem and some time. I think I found the/a bug.

In line 189 of the file upgrade_backups.py:
seenfull = 0
for e in listing:
    if seenfull < 1 and e.endswith( ".ful" ):
 seenfull += 1
    elif seenfull > 1 and e.endswith( ".inc" ):
 topurge.append( e )
This code should (as far as I see it) append all incremental backups to the list topurge which are older than the newest full backup. This does not work. The comparison operator in the elif branch has to be ">=" then it works.

If this works. Somebody should forward this to the sbackup guys. But I have no idea where.

Cheers.

Revision history for this message
ingo (ingo-steiner) wrote :

Hi MatatTHC,

your proposed patch really works. All incremental backups are erased as soon as a newer full backup becomes available.
I now observed since beginning of April and today also the oldest full backup from April was erased, only 2 from April remaining now!

This is exactly how it schould work!

Many thanks,
Ingo

Revision history for this message
Aigars Mahinovs (aigarius) wrote :

I am very grateful for tracing this bug down. I had handed over development of SBackup to another person when I had little time to contribute, but apparently that did not work as well as I hoped.

I will verify this bug fix myself and if it work, I will make a small update with this bug fix and a couple other small simple bugs that ave been reported over last few months. Thank you very much for the fix, again!

Revision history for this message
josh_rosenbluh (rosenbluh) wrote :

MatatTHC's fix posted on 2008-03-03 solves the problem for me. It purges all incremental backups that are older than the most recent full backup. Ideally, incremental backups should be purged according to the logarithmic schedule (or if the backup they are based on isn't present).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.