Package: duplicity Version: 0.6.24-1 Severity: normal Tags: patch
Hello, I'm using duplicity with the remove-all-inc-of-but-n-full option. The old full backups are badly detected as "to delete", even if there is nothing to do. It is not dangerous (the full backup is not deleted), but can be confusing for user. Output example in my case: $ duplicity remove-all-inc-of-but-n-full 20 --force $URL [...] Deleting backup chains at times: Mon Apr 6 21:53:43 2015 Sun Apr 12 03:05:03 2015 Sat Apr 18 03:05:03 2015 Sat Apr 25 03:05:04 2015 [...] Deleting incremental signature chain Sat Apr 25 03:05:04 2015 Deleting incremental signature chain Sat Apr 25 03:05:04 2015 Deleting incremental signature chain Sat Apr 18 03:05:03 2015 Deleting incremental signature chain Sat Apr 18 03:05:03 2015 Deleting incremental signature chain Sun Apr 12 03:05:03 2015 Deleting incremental signature chain Sun Apr 12 03:05:03 2015 Deleting incremental signature chain Mon Apr 6 21:53:43 2015 Deleting incremental signature chain Mon Apr 6 21:53:43 2015 [...] Deleting incremental backup chain Sat Apr 25 03:05:04 2015 Deleting incremental backup chain Sat Apr 18 03:05:03 2015 Deleting incremental backup chain Sun Apr 12 03:05:03 2015 Deleting incremental backup chain Mon Apr 6 21:53:43 2015 With the collection status: Found 27 secondary backup chains. Secondary chain 1 of 27: ------------------------- Chain start time: Mon Apr 6 21:53:43 2015 Chain end time: Mon Apr 6 21:53:43 2015 Number of contained backup sets: 1 Total number of contained volumes: 2 Type of backup set: Time: Num volumes: Full Mon Apr 6 21:53:43 2015 2 ------------------------- Secondary chain 2 of 27: ------------------------- Chain start time: Sun Apr 12 03:05:03 2015 Chain end time: Sun Apr 12 03:05:03 2015 Number of contained backup sets: 1 Total number of contained volumes: 2 Type of backup set: Time: Num volumes: Full Sun Apr 12 03:05:03 2015 2 ------------------------- [...] The attached patch fix this issue, by adding a rule to not consider chains with only full backups when remove_all_inc_of_but_n_full_mode is enabled. Best regards, Florent Fourcot. -- System Information: Debian Release: 8.2 APT prefers stable APT policy: (990, 'stable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores) Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages duplicity depends on: ii libc6 2.19-18+deb8u1 ii librsync1 0.9.7-10 ii python 2.7.9-1 ii python-lockfile 1:0.8-2 Versions of packages duplicity recommends: pn python-oauthlib <none> pn python-paramiko <none> ii python-urllib3 1.9.1-3 ii rsync 3.1.1-3 Versions of packages duplicity suggests: ii lftp 4.6.0-1+deb8u1 pn ncftp <none> pn python-boto <none> pn python-cloudfiles <none> ii python-gdata 2.0.18+dfsg1-2 pn python-swiftclient <none> pn tahoe-lafs <none> -- no debconf information
--- duplicity 2014-06-10 13:24:51.000000000 +0200 +++ duplicity.now 2015-10-18 17:57:14.912781530 +0200 @@ -938,6 +938,8 @@ "manually purge the repository.")) chainlist = col_stats.get_chains_older_than(globals.remove_time) + if globals.remove_all_inc_of_but_n_full_mode: + chainlist = [e for e in chainlist if len(e.incset_list) > 0] if not chainlist: log.Notice(_("No old backup sets found, nothing deleted.")) return