Old backups are not deleted (log purge)

Bug #71698 reported by Albrecht Mühlenschulte
50
This bug affects 5 people
Affects Status Importance Assigned to Milestone
sbackup
Status tracked in Trunk
0.10
Won't Fix
Undecided
Unassigned
0.11
Invalid
Undecided
Unassigned
Trunk
Invalid
Undecided
Unassigned
sbackup (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I am saving my files to an ssh-target - backup works fine, but old files are not deleted, eventhough logarithmic behavior is activated.

description: updated
Revision history for this message
Lionel Le Folgoc (mrpouit) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering is this still an issue for you? Thanks in advance.

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

No, the problem is still present! This bug is a duplicate of 126278:
https://bugs.launchpad.net/ubuntu/+source/sbackup/+bug/126278

Revision history for this message
Christopher Barrington-Leigh (cpbl) wrote :

Sorry.. I commented that this was a duplicate of 126278, but is the other way around.

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

I made the change you, MatatTHC, suggested (see the duplicate to this bug) and it still did not delete old inc backups. Have you tested it?
(Is there a verbose output option?)

Revision history for this message
Christopher Barrington-Leigh (cpbl) wrote :

Sorry, my claim of no change is not true. It seems that it has now deleted all incremental backups before the last full one. It has also deleted all the full's, except for one per month in the last year. My backups only went as far back as September. But according to what it promises it will do (logarithmic mode), it should have left one backup per week from last month. Instead, it deleted all but one of them!

Also, I think it has been doing something strange. If I look at a snapshot from two weeks ago, the full's are deleted but th incrementals are still there. So it seems sbackup has done things in stages in a strange way.

Revision history for this message
Heiko (heiko-dudzus) wrote :

I see MatatTHC's change made it into 0.10.5. I have the same problem with it like Christopher has: The incremental backups from last week also get purged. The following change makes sbackup to purge logarithmically as expected:

In upgrade_backups.py, line 189 ff.:

seenfull = 0
for e in listing:
    e.endswith( ".ful" ):
 seenfull += 1
    elif seenfull > 1 and e.endswith( ".inc" ):
 topurge.append( e )

The seenfull counter should be incremented on every '.ful'. After seeing the _second_ full backup in the directory listing, following .inc's are to purge (two weeks old). Incrementals from last week are held. I patched the version 0.10.4 that way and all worked as expected.

Revision history for this message
Christopher Barrington-Leigh (cpbl) wrote :

Hi Heiko. Our offline conversation should probably go back onto
launchpad...

As far as I know, you've done perfectly in terms of where to post.

Yes, sbackup advertises its own logarithmic feature as:

keep yesterday
once per day fro last week
once per week from last month
once per month from last year
once per year before that.

Uhh.. looking at my own current backup list I'm not 100% certain whether
or not its doing the "one full per week for last month" either.
Let's keep watching.

On Fri, 11 Jul 2008, Heiko Dudzus wrote:

> Hello Chris,
>
> By the way, I'm sorry, I think I misunderstood your comment. Now I see,
> you spoke about sbackup not keeping one full backup per week in the
> recent month, if I understood correctly. I'll have to wait a little bit
> to see if I can reproduce that problem. The code for it looked ok at
> first sight, though, but I will take a deeper look at the purging of
> full backups, too.
>
> I am new to Launchpad. Was it the right place to let the maintainer of
> sbackup know? Is it the maintainer of the Ubuntu package or the
> maintainer of sbackup?
>
> Have a nice weekend,
> Heiko

summary: - Old backups are not deleted when using ssh-target
+ Old backups are not deleted (log purge)
Revision history for this message
Jean-Peer Lorenz (peer.loz) wrote :

Please test latest release of SBackup from our PPA (https://edge.launchpad.net/~nssbackup-team/+archive/ppa) and report whether this issue is still present. Thanks.

Changed in sbackup:
status: New → Incomplete
Revision history for this message
DiQ (dik23) wrote :

I have just come over from nssbackup and am using the nss ppa for sbackup.

I have 26 inc daily snapshots (full are only done once a month). The final of the 26 was done using sbackup today.

Surely I should have "once per week from last month" and the majority of the 26 should have been purged.

Revision history for this message
Anton (feenstra) wrote : Re: [Nssbackup-team] [Bug 71698] Re: Old backups are not deleted (log purge)

On 15/09/10 19:01, dik23 wrote:
> I have just come over from nssbackup and am using the nss ppa for
> sbackup.
>
> I have 26 inc daily snapshots (full are only done once a month). The
> final of the 26 was done using sbackup today.
>
> Surely I should have "once per week from last month" and the majority of
> the 26 should have been purged.

(ns)sbackup does not purge incremental backups (in the latest version).
It does not make much sense for storage space, since incrementals
typically are quite small. But more importantly, you lose consistency;
if you purge several incremental backups and leave later ones you cannot
restore files that were only in the purged backups and not the later
ones. So, incrementals are only purged if the latest full backup before
them gets purged.

Hope this clarifies things.

Anton.

Revision history for this message
DiQ (dik23) wrote :

Ok, thanks

Revision history for this message
Jean-Peer Lorenz (peer.loz) wrote :

> (ns)sbackup does not purge incremental backups (in the latest version)

is not totally right: logarithmic purge works in SBackup 0.11+, however the fix is not yet ported to nssbackup 0.3 (and I'm not sure it ever will). See bug https://bugs.launchpad.net/nssbackup/+bug/587911 to track progress made on this.

The rest said by Anton is basically right: snapshots get only purged (logarithmic plan or simple cut-off) in the case they are _standalone_ (i.e. other snapshots do not depend on them). Purpose is to keep incremental and full snapshots consistent. Rebasing of incremental snapshots as in nssbackup before 0.2.0 is completely dropped since it is a severe risk to the backuped data.

Version SBackup 0.11 introduced a slight modification of the logarithmic purge plan:
* keep all from yesterday
* keep one per day from last week
* keep one per week from last month
* keep one per month from last year
* keep one per quarter from 2nd last year
* keep one per year further into past

Read 'keep one' as 'keep at least one'.

@dik23: making a full backup every 30 days means purging of snapshots will be possible not before 30 days after the first snapshot because every snapshot in your archive relies on the other (except the latest but this one is also kept because it's the latest ;-) until you create another full snapshot.

HTH.

Revision history for this message
Jean-Peer Lorenz (peer.loz) wrote :

I'm closing this bug because there has been no activity for long time now. This issue may exist in sbackup 0.10.x however this series won't receive any more patches than serious security fixes. Please use the latest version of sbackup. Thanks.

Changed in sbackup (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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