Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

After using Déjà Dup for a while, I keep getting this error after every attempt at a backup:

Backup location is too small. Try using one with more space.

Could I delete some backups made of certain dates only? For example, could I delete all backups older than a month?

My backup folder contains 372 files, with names like:

duplicity-full.20121122T124053Z.manifest.gpg
duplicity-full.20121122T124053Z.vol100.difftar.gpg
duplicity-full-signatures.20121122T124053Z.sigtar.gpg
duplicity-inc.20121122T124053Z.to.20121129T151249Z.manifest.gpg
duplicity-inc.20121122T124053Z.to.20121129T151249Z.vol1.difftar.gpg
duplicity-new-signatures.20121122T124053Z.to.20121129T151249Z.sigtar.gpg

Can I delete some of these files safely?

share|improve this question
add comment

1 Answer

up vote 10 down vote accepted

Files associated with full and incremental backups:

A full backup contains all the data of that backup, and it does not depend on any other backups. It consists of at least three files:

  • duplicity-full.DATE.manifest (just one)
  • duplicity-full.DATE.volYYY.difftar (one or more)
  • duplicity-full-signatures.DATE.sigtar (just one)

If the backup is encrypted, these filenames will have a .gpg suffix.

An incremental backup only contains the differences between a previous backup and itself, it depends on the previous backup, and of its previous backups, all the way until the chain reaches a full backup. It consists of three files:

  • duplicity-inc.DATE.to.DATE.manifest (just one)
  • duplicity-inc.DATE.to.DATE.volX.difftar (one or more)
  • duplicity-new-signatures.DATE.to.DATE.sigtar (just one)

To delete a backup, you can just delete the set of corresponding files. Remember that all subsequent dependent incremental backups will become invalid. You can do this manually, or you can use the duplicity command.

Command overview of duplicity:

Here's how to view a set of backups using the duplicity command:

$ duplicity collection-status file:///path/to/backup
# output truncated for brevity

Found 0 secondary backup chains.

Found primary backup chain with matching signature chain:
-------------------------
Chain start time: Thu Nov 22 12:40:53 2012
Chain end time: Thu Jan 10 14:17:35 2013
Number of contained backup sets: 7
Total number of contained volumes: 358
 Type of backup set:                            Time:   Number of volumes:
                Full         Thu Nov 22 12:40:53 2012               162
         Incremental         Thu Nov 29 15:12:49 2012                 4
         Incremental         Thu Dec 13 09:05:17 2012                10
         Incremental         Thu Dec 20 11:09:12 2012                 9
         Incremental         Thu Dec 27 00:05:55 2012                83
         Incremental         Thu Jan  3 11:07:31 2013                79
         Incremental         Thu Jan 10 14:17:35 2013                11
-------------------------
No orphaned or incomplete backup sets found.

Here's how to remove backups older than one month, keeping any backups that are required for incremental backups in the last month:

duplicity remove-older-than 1M file:///path/to/backup

Here's how to remove all backups except the last full backup set, and its incremental backups:

duplicity remove-all-but-n-full 1 file:///path/to/backup

Here's how to remove all incremental backups except the last full backup set, and its incremental backups:

duplicity remove-all-inc-of-but-n-full 1 file:///path/to/backup

The manpage for the duplicity command Manpage icon is very informative, take a look.

share|improve this answer
    
Hi, I was reading through the manpage and was hoping to find some mode details regarding the incremental backups. My situation is as follows - according to duplicity collection-status I have 2 secondary and 1 primary backup chain. I could not find details about the difference of the primary and secondary backup chains. In addition to this I'm still not confident I can delete all the incremental backup files listed under each backup chain. –  seb Jul 22 '13 at 12:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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