Can I delete incremental backups made with Déjà Dup?
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?
Solution 1:
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 is very informative, take a look.
Solution 2:
Thanks @Flimm : https://askubuntu.com/a/246694/676490
For users like me that tried ~/deja-dup
instead of file:///home/flimm/deja-dup
here a example for a username flimm
duplicity remove-older-than 1M file:///home/flimm/deja-dup