Package: duplicity
Version: 0.6.22-1
Severity: important
Hello,
This bug is about the behavior of the --extra-clean option.
The man page speaks about deleting extraneous files and cleaning failed session.
$ man duplicity
cleanup [--force] [--extra-clean] <url>
Delete the extraneous duplicity files on the given backend.
Non-duplicity files, or files in complete data sets will not be
deleted.
This should only be necessary after a duplicity
session fails or is aborted prematurely.
The bug appends in case of usual successful backup.
Commands used
=============
My daily backup is like this :
# target_url=rsync://root@remoteserver//path/to/storage/
[1] (root)# duplicity incr --full-if-older-than 30D /path/to/data/ $target_url
[2] (root)# duplicity collection-status $target_url
[3] (root)# duplicity remove-all-but-n-full 2 --force $target_url
[4] (root)# duplicity cleanup --extra-clean --force $target_url
[5] (root)# duplicity collection-status $target_url
I.e.: I do daily incremental backups, with 1 full backup per month.
And keep 2 months of backup.
Duplicity version
=================
The bug was found on debian/wheezy(stable) with duplicity version
0.6.18-3(wheezy)
Also reproduced with lastest duplicity version 0.6.22-1(sid)
The issue
=========
Everything seems fine.
If you list available backup data (with collection-status) the last 2 months
will be shown.
It's ok when you :
- restore the lastest backup
- restore data in the last backup chain (the last full backup)
It fail when you try to :
- restore data outside the current backup chain (before the last full backup)
the restore command fallbacks to the last chain :
No signature chain for the requested time. Using oldest available
chain, starting at time Fri Sep 13 04:32:24 2013.
even older valid data are still available :
Found 1 secondary backup chain.
Secondary chain 1 of 1:
-------------------------
Chain start time: Tue Aug 13 04:46:55 2013
Chain end time: Thu Sep 12 04:40:35 2013
Origin of the issue
===================
I supposed the "cleanup --extra-clean" will remove valid signature,
and broke the capacity to restore valid backup data (with the duplicity restore
command)
Ugly workaround
===============
The previous backup chains data still exist. But the restore command refuses to
use them.
If you manually remove all duplicity files that are the last backup chain,
duplicity restore uses the latest chain available (with warning about signature)
and you will be able to restore your backuped data.
Technical detail
================
(root)# duplicity collection-status --archive-dir=/storage/duplicity/cache
--tempdir=/storage/duplicity/tmp rsync://root@remoteserver//path/to/storage/
Import of duplicity.backends.dpbxbackend Failed: No module named dropbox
Local and Remote metadata are synchronized, no sync needed.
Last full backup date: Fri Sep 13 04:32:24 2013
Collection Status
-----------------
Connecting with backend: RsyncBackend
Archive dir: /storage/duplicity/cache/cf22c23cd06daa15a89f41bccac023a1
Found 1 secondary backup chain.
Secondary chain 1 of 1:
-------------------------
Chain start time: Tue Aug 13 04:46:55 2013
Chain end time: Thu Sep 12 04:40:35 2013
Number of contained backup sets: 19
Total number of contained volumes: 63
Type of backup set: Time: Num volumes:
Full Tue Aug 13 04:46:55 2013 41
Incremental Wed Aug 14 04:21:50 2013 1
Incremental Thu Aug 15 04:13:58 2013 1
Incremental Fri Aug 16 04:04:48 2013 1
Incremental Tue Aug 20 04:38:38 2013 2
Incremental Wed Aug 21 04:17:51 2013 1
Incremental Thu Aug 22 04:20:40 2013 1
Incremental Fri Aug 23 04:21:09 2013 1
Incremental Tue Aug 27 04:49:50 2013 2
Incremental Wed Aug 28 04:56:03 2013 1
Incremental Thu Aug 29 04:49:49 2013 1
Incremental Fri Aug 30 04:49:00 2013 1
Incremental Tue Sep 3 04:43:44 2013 2
Incremental Wed Sep 4 04:25:59 2013 1
Incremental Thu Sep 5 04:16:19 2013 1
Incremental Fri Sep 6 04:27:29 2013 1
Incremental Tue Sep 10 05:15:30 2013 2
Incremental Wed Sep 11 04:31:22 2013 1
Incremental Thu Sep 12 04:40:35 2013 1
-------------------------
Found primary backup chain with matching signature chain:
-------------------------
Chain start time: Fri Sep 13 04:32:24 2013
Chain end time: Fri Sep 20 04:27:20 2013
Number of contained backup sets: 5
Total number of contained volumes: 45
Type of backup set: Time: Num volumes:
Full Fri Sep 13 04:32:24 2013 40
Incremental Tue Sep 17 04:35:46 2013 2
Incremental Wed Sep 18 04:34:42 2013 1
Incremental Thu Sep 19 04:36:15 2013 1
Incremental Fri Sep 20 04:27:20 2013 1
-------------------------
No orphaned or incomplete backup sets found.
(root)# duplicity list-current-files --archive-dir=/storage/duplicity/cache
--tempdir=/storage/duplicity/tmp -t 2013/08/14
rsync://root@remoteserver//path/to/storage/
Import of duplicity.backends.dpbxbackend Failed: No module named dropbox
Local and Remote metadata are synchronized, no sync needed.
Last full backup date: Fri Sep 13 04:32:24 2013
No signature chain for the requested time. Using oldest available chain,
starting at time Fri Sep 13 04:32:24 2013.
Thu Sep 12 22:00:34 2013 .
Wed Apr 17 10:41:23 2013 data
[...]
--- System Information:
Debian Release: 7.1
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages duplicity depends on:
ii libc6 2.13-38
ii librsync1 0.9.7-9
ii python 2.7.3-4
Versions of packages duplicity recommends:
ii python-oauthlib 0.5.1-1
pn python-paramiko <none>
ii python-urllib3 1.6-2
ii rsync 3.0.9-4
Versions of packages duplicity suggests:
pn lftp <none>
pn ncftp <none>
pn python-boto <none>
pn python-cloudfiles <none>
pn python-gdata <none>
ii python-pexpect 2.4-1
pn tahoe-lafs <none>
-- no debconf information
- System Information:
Debian Release: 7.1
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages duplicity depends on:
ii libc6 2.13-38
ii librsync1 0.9.7-9
ii python 2.7.3-4
Versions of packages duplicity recommends:
ii python-oauthlib 0.5.1-1
pn python-paramiko <none>
ii python-urllib3 1.6-2
ii rsync 3.0.9-4
Versions of packages duplicity suggests:
pn lftp <none>
pn ncftp <none>
pn python-boto <none>
pn python-cloudfiles <none>
pn python-gdata <none>
ii python-pexpect 2.4-1
pn tahoe-lafs <none>
-- no debconf information
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]