1

I'm using duplicity with the --full-if-older-than <time> option to make a new full backup now and then.

The problem is that I can hold only two full backups at my destination. This means that whenever a new full backup needs to be done, I first need to have a call to remove-all-but-n-full 1.

Is there an easy way of achieving that with duplicity command's line tool or I need to do the scheduling logic by myself ? I just need to know if the original duplicity call will lead to a full backup. Or is there an option to automatically prune backups once the destination is full ?

1

You could use the --dry-run option to find out. Scripting might be a chore, as you would have to parse out the phrase "Last full backup is too old, forcing full backup" from the log... but doable.

1
  • Consider using backticks with options so that they are more readable. E.g., --dry-run
    – HalosGhost
    May 29 '14 at 19:34
0

What can be done is to check the exit status of duplicity for 53 (backend_no_space, see the list of error return codes) and remove full backups as needed in that case.

Note that you'll have to keep two full backups if the full backup started when the error is reported otherwise it will keep only the full incomplete backup that it started.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.