How does the purge feature work?

Created by Jean-Peer Lorenz on on 2011-01-03

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?

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.

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.

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.