# What to backup and when to do it
# (can be overridden in the per-PC config.pl)
###########################################################################
#
# Minimum period in days between full backups. A full dump will only be
# done if at least this much time has elapsed since the last full dump,
# and at least $Conf{IncrPeriod} days has elapsed since the last
# successful dump.
#
# Typically this is set slightly less than an integer number of days. The
# time taken for the backup, plus the granularity of $Conf{WakeupSchedule}
# will make the actual backup interval a bit longer.
#
$Conf{FullPeriod} = 6.97;
#
# Minimum period in days between incremental backups (a user requested
# incremental backup will be done anytime on demand).
#
# Typically this is set slightly less than an integer number of days. The
# time taken for the backup, plus the granularity of $Conf{WakeupSchedule}
# will make the actual backup interval a bit longer.
#
$Conf{IncrPeriod} = 0.97;
#
# Number of full backups to keep. Must be >= 1.
#
# In the steady state, each time a full backup completes successfully
# the oldest one is removed. If this number is decreased, the
# extra old backups will be removed.
#
# If filling of incremental dumps is off the oldest backup always
# has to be a full (ie: filled) dump. This might mean one or two
# extra full dumps are kept until the oldest incremental backups expire.
#
# Exponential backup expiry is also supported. This allows you to specify:
#
# - num fulls to keep at intervals of 1 * $Conf{FullPeriod}, followed by
# - num fulls to keep at intervals of 2 * $Conf{FullPeriod},
# - num fulls to keep at intervals of 4 * $Conf{FullPeriod},
# - num fulls to keep at intervals of 8 * $Conf{FullPeriod},
# - num fulls to keep at intervals of 16 * $Conf{FullPeriod},
#
# and so on. This works by deleting every other full as each expiry
# boundary is crossed.
#
# Exponential expiry is specified using an array for $Conf{FullKeepCnt}:
#
# $Conf{FullKeepCnt} = [4, 2, 3];
#
# Entry #n specifies how many fulls to keep at an interval of
# 2^n * $Conf{FullPeriod} (ie: 1, 2, 4, 8, 16, 32, ...).
#
# The example above specifies keeping 4 of the most recent full backups
# (1 week interval) two full backups at 2 week intervals, and 3 full
# backups at 4 week intervals, eg:
#
# full 0 19 weeks old \
# full 1 15 weeks old >--- 3 backups at 4 * $Conf{FullPeriod}
# full 2 11 weeks old /
# full 3 7 weeks old \____ 2 backups at 2 * $Conf{FullPeriod}
# full 4 5 weeks old /
# full 5 3 weeks old \
# full 6 2 weeks old \___ 4 backups at 1 * $Conf{FullPeriod}
# full 7 1 week old /
# full 8 current /
#
# On a given week the spacing might be less than shown as each backup
# ages through each expiry period. For example, one week later, a
# new full is completed and the oldest is deleted, giving:
#
# full 0 16 weeks old \
# full 1 12 weeks old >--- 3 backups at 4 * $Conf{FullPeriod}
# full 2 8 weeks old /
# full 3 6 weeks old \____ 2 backups at 2 * $Conf{FullPeriod}
# full 4 4 weeks old /
# full 5 3 weeks old \
# full 6 2 weeks old \___ 4 backups at 1 * $Conf{FullPeriod}
# full 7 1 week old /
# full 8 current /
#
# You can specify 0 as a count (except in the first entry), and the
# array can be as long as you wish. For example:
#
# $Conf{FullKeepCnt} = [4, 0, 4, 0, 0, 2];
#
# This will keep 10 full dumps, 4 most recent at 1 * $Conf{FullPeriod},
# followed by 4 at an interval of 4 * $Conf{FullPeriod} (approx 1 month
# apart), and then 2 at an interval of 32 * $Conf{FullPeriod} (approx
# 7-8 months apart).
#
# Example: these two settings are equivalent and both keep just
# the four most recent full dumps:
#
# $Conf{FullKeepCnt} = 4;
# $Conf{FullKeepCnt} = [4];
#
$Conf{FullKeepCnt} = 1;
#
# Very old full backups are removed after $Conf{FullAgeMax} days. However,
# we keep at least $Conf{FullKeepCntMin} full backups no matter how old
# they are.
#
# Note that $Conf{FullAgeMax} will be increased to $Conf{FullKeepCnt}
# times $Conf{FullPeriod} if $Conf{FullKeepCnt} specifies enough
# full backups to exceed $Conf{FullAgeMax}.
#
$Conf{FullKeepCntMin} = 1;
$Conf{FullAgeMax} = 90;
#
# Number of incremental backups to keep. Must be >= 1.
#
# In the steady state, each time an incr backup completes successfully
# the oldest one is removed. If this number is decreased, the
# extra old backups will be removed.
#
$Conf{IncrKeepCnt} = 6;
#
# Very old incremental backups are removed after $Conf{IncrAgeMax} days.
# However, we keep at least $Conf{IncrKeepCntMin} incremental backups no
# matter how old they are.
#
$Conf{IncrKeepCntMin} = 1;
$Conf{IncrAgeMax} = 30;
#
# Level of each incremental. "Level" follows the terminology
# of dump(1). A full backup has level 0. A new incremental
# of level N will backup all files that have changed since
# the most recent backup of a lower level.
#
# The entries of $Conf{IncrLevels} apply in order to each
# incremental after each full backup. It wraps around until
# the next full backup. For example, these two settings
# have the same effect:
#
# $Conf{IncrLevels} = [1, 2, 3];
# $Conf{IncrLevels} = [1, 2, 3, 1, 2, 3];
#
# This means the 1st and 4th incrementals (level 1) go all
# the way back to the full. The 2nd and 3rd (and 5th and
# 6th) backups just go back to the immediate preceeding
# incremental.
#
# Specifying a sequence of multi-level incrementals will
# usually mean more than $Conf{IncrKeepCnt} incrementals will
# need to be kept, since lower level incrementals are needed
# to merge a complete view of a backup. For example, with
#
# $Conf{FullPeriod} = 7;
# $Conf{IncrPeriod} = 1;
# $Conf{IncrKeepCnt} = 6;
# $Conf{IncrLevels} = [1, 2, 3, 4, 5, 6];
#
# there will be up to 11 incrementals in this case:
#
# backup #0 (full, level 0, oldest)
# backup #1 (incr, level 1)
# backup #2 (incr, level 2)
# backup #3 (incr, level 3)
# backup #4 (incr, level 4)
# backup #5 (incr, level 5)
# backup #6 (incr, level 6)
# backup #7 (full, level 0)
# backup #8 (incr, level 1)
# backup #9 (incr, level 2)
# backup #10 (incr, level 3)
# backup #11 (incr, level 4)
# backup #12 (incr, level 5, newest)
#
# Backup #1 (the oldest level 1 incremental) can't be deleted
# since backups 2..6 depend on it. Those 6 incrementals can't
# all be deleted since that would only leave 5 (#8..12).
# When the next incremental happens (level 6), the complete
# set of 6 older incrementals (#1..6) will be deleted, since
# that maintains the required number ($Conf{IncrKeepCnt})
# of incrementals. This situation is reduced if you set
# shorter chains of multi-level incrementals, eg:
#
# $Conf{IncrLevels} = [1, 2, 3];
#
# would only have up to 2 extra incremenals before all 3
# are deleted.
#
# BackupPC as usual merges the full and the sequence
# of incrementals together so each incremental can be
# browsed and restored as though it is a complete backup.
# If you specify a long chain of incrementals then more
# backups need to be merged when browsing, restoring,
# or getting the starting point for rsync backups.
# In the example above (levels 1..6), browing backup
# #6 requires 7 different backups (#0..6) to be merged.
#
# Because of this merging and the additional incrementals
# that need to be kept, it is recommended that some
# level 1 incrementals be included in $Conf{IncrLevels}.
#
# Prior to version 3.0 incrementals were always level 1,
# meaning each incremental backed up all the files that
# changed since the last full.
#
$Conf{IncrLevels} = [1];