How does the purge feature work?

Asked by max

Firstly, just to say I think sbackup is fantastic. I hope it gets included with Ubuntu by default at some point - it's really really excellent. So thank you!

I was just wondering though what the purge configuration does? I've read the documentation but couldn't find any details. I'm basically concerned that if I enable it, I might lose full backups I made and be left with only more recent incremental backups, and therefore lose files. So how does it work exactly?

Question information

Language:
English Edit question
Status:
Solved
For:
sbackup Edit question
Assignee:
No assignee Edit question
Solved by:
max
Solved:
Last query:
Last reply:
Revision history for this message
Jean-Peer Lorenz (peer.loz) said :
#1

Thank you for using SBackup. It is included in Ubuntu by default. You can install version 0.10.x from universe repository in Ubuntu Lucid and version 0.11.x in Ubuntu Maverick and newer.

Revision history for this message
max (maxozilla) said :
#2

Many thanks for your reply, but what I meant was it isn't installed by default on a new Ubuntu install, ie. it has to be installed by the user with apt-get. How does the purge feature work?

Revision history for this message
Jean-Peer Lorenz (peer.loz) said :
#3

>it isn't installed by default on a new Ubuntu
Yes, that's right. And I don't know who decides this (I guess Canonical Ltd.).

>How does the purge feature work?
Basically, there are 2 distinct modes of 'Purge':
1. delete backups older than a specified number of days (cut-off)
2. progressive purge. It keeps progressively less backups into the past:
Keep all backups from yesterday
Keep one backup per day from last week
Keep one backup per week from last month
Keep one backup per month from last year
Keep one backup per quarter from 2nd last year
Keep one backup per year further into past.

In general, only standalone snapshots are removed, i.e. snapshots that build the base of subsequent (incremental) snapshots are not removed. This means your backups will always be complete, even with activated purging.

Feel free to ask for more details.
Best regards - Jean-Peer.

Revision history for this message
Jean-Peer Lorenz (peer.loz) said :
#4

Some more details on progressive purge in sbackup 0.11.x:

* snapshot are not being 're-based' or modified.
* after some time (depending on your backup settings) only full backups will remain while (intermediate) incremental snapshot have been deleted.

Revision history for this message
Jean-Peer Lorenz (peer.loz) said :
#5

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 former releases (nssbackup before 0.2.0, sbackup before 0.11) 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'.

Example: 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.

Revision history for this message
Jean-Peer Lorenz (peer.loz) said :
#6

Jean-Peer Lorenz suggests this article as an answer to your question:
FAQ #1428: “How does the purge feature work?”.

Revision history for this message
max (maxozilla) said :
#7

Dear Jean-Peer,

Many thanks for your answer and creating the FAQ, that's excellent, it all makes sense now.

Thanks again :-)