← Back to team overview

duplicity-team team mailing list archive

Re: [Question #263472]: taking multiple full backups

 

Question #263472 on Duplicity changed:
https://answers.launchpad.net/duplicity/+question/263472

    Status: Open => Answered

Aaron Whitehouse proposed the following answer:
Hi Satish,

Yes, that sounds like the file you would be editing.

So the first point is that you can manually make it do a full backup by typing "duply test full", but to make it a bit more automatic going forward, perhaps try adding the below to your conf file (you will likely find the below parts in your conf file, but commented out, so you can just remove the "#" to make them active) - obviously you should adjust the 13, 2 and 6 as necessary:
"
# Time frame for old backups to keep, Used for the "purge" command.  
# see duplicity man page, chapter TIME_FORMATS)
# defaults to 1M, if not set
MAX_AGE=13M

# Number of full backups to keep. Used for the "purge-full" command. 
# See duplicity man page, action "remove-all-but-n-full".
# defaults to 1, if not set 
MAX_FULL_BACKUPS=2

# activates duplicity --full-if-older-than option (since duplicity v0.4.4.RC3) 
# forces a full backup if last full backup reaches a specified age, for the 
# format of MAX_FULLBKP_AGE see duplicity man page, chapter TIME_FORMATS
# Uncomment the following two lines to enable this setting.
MAX_FULLBKP_AGE=6M
DUPL_PARAMS="$DUPL_PARAMS --full-if-older-than $MAX_FULLBKP_AGE " 
"

This setup will automatically create a new full backup if it has been more than 6 months since your last backup, so if you run:
duply test backup
it will normally do an incremental backup, unless it is more than 6 months since your last backup, in which case it will do a full backup. Note that the command above will not delete old backups. To do that, add "purge" and "purge-full" to your commandline. So, with the above setup:
duply test backup_purge_purge-full --force
would do an incremental if there had been a recent full backup, a full if it had been more than six months since the last full backup, would delete any old backups that were older than 13 months and would delete the oldest full backups if you had more than two.  This is the command that I run in my cron jobs. 

If you choose a relatively long period in between backups, you will also want to run:
duply test verify
manually every so often, to check that the chain of backups is able to restore as expected - note that this will require downloading backup files off the remote server. 

Hope that helps.

-- 
You received this question notification because you are a member of
duplicity-team, which is an answer contact for Duplicity.