25

I have instructed DejaDup to keep one-week of backup files. Now it is passed more than a month and my backup storage is fed up with old backups. Is there a way to instruct DejaDup to delete old backups without reaching the storage limit? Can I detele them manually?

Jorge Castro
  • 71,754
Fabio
  • 582

4 Answers4

15

Additionally you can prune the backup yourself. What I did is to use:

duplicity remove-all-but-n-full 1 --force scp://mylogin@myserver/path_to_backup

from command line. Just use the information you used to create your backups from the Ubuntu GUI.

  • 1
    One caveat is the path_to_backup is relative to mylogin home directory. I tried sftp://mylogin@myserver/usr/home/mylogin/backup and it created new folder /usr/home/mylogin/usr/home/mylogin/backup which of course is empty and it say that it cannot find any backups here. :) – Ruslan Stelmachenko May 27 '16 at 16:35
  • /usr/home ? Is't that a typo by any chance? Usually home folders are in /home on root. – Jozef Legény May 27 '16 at 16:45
  • No. In FreeBSD home folder at /usr/home and /home is just a symlink. – Ruslan Stelmachenko May 27 '16 at 22:40
  • In this case I think that the path is always relative to your home and you should use sftp://mylogin@myserver/backup – Jozef Legény May 28 '16 at 07:26
  • Hm... That is what i said in my first comment. :)

    But it was surprise to me because all other utils that I used before (git for example) use absolute paths in their urls, regardless of what login is part of the url.

    – Ruslan Stelmachenko May 28 '16 at 17:23
8

You can use the Dconf app from Ubuntu Store to modify setting at path org.gnome.DejaDup, key name delete-after. It's set to the number of days to keep backup files on backup location.

Or from terminal. For example, to set it to 60 days from the command line, run:

gsettings set org.gnome.DejaDup delete-after 60
BaronBaleron
  • 1,086
  • 1
    This is correct. However, opening the "Backups" GUI will sometimes cause this setting to revert to "At least 6 months" when the app is closed again. – DavidO Mar 09 '15 at 23:03
  • 1
    I really like this approach. Thanks man! – neun24 Apr 20 '22 at 10:26
6

The answer of https://askubuntu.com/a/94288/676490 for a local backup:

duplicity remove-all-but-n-full 1 --force file:///home/username/deja-dup
JoKalliauer
  • 1,575
  • 2
  • 17
  • 26
4

Deja-dup does not yet supply a way of removing old backups, you should also not delete some of the files, that will leave probably your backups without a start file and renders them invalid. Remove them all and start over is an option but thats not what you want I think.

Deja-dup keeps backups for the specified time or until the backup space is full, it will them manage your backups accordingly, a solution for your problem might just be enable quotas for the backup drive and don't let it take all the space available or change the backup frequency, once a week if you edit many files or are always copying / moving files will leave you with a very large backup image.

Bruno Pereira
  • 73,643
  • Thnaks for the answer Bruno. I am backing up over ssh into a folder on a remote server. I don't want the backup growing until the server is full! And I don't have access to set up a disk quota. This is very bad. I will change the backup system... – Fabio Oct 28 '11 at 16:19
  • 1
    You can use the backend from deja-up duplicity to do exactly the same duplicity does but with more options, to understand what is happening in a terminal type deja-dup --backup and check the messages one of those is your actual duplicity backup command and it can be customized. – Bruno Pereira Oct 28 '11 at 16:51
  • 2
    The customization you are looking for it the "keep x rev from the files" where x will be the number of copies available to restore, you can set that for example 30, so more then 30 rev of a file and duplicity deletes the backup itself. Look also man duplicity for all the options. – Bruno Pereira Oct 28 '11 at 16:53
  • 1
    Bruno you are right, the switch I am looking for that. Is it available only from terminal, no GUI option for it? – Fabio Nov 06 '11 at 08:55