Undescriptive duplicity/collection-status error when the backup directory contains two volumes with different file names and same volume number in the same backup set
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Duplicity |
Confirmed
|
Medium
|
Unassigned | ||
duplicity (Ubuntu) |
Confirmed
|
High
|
Unassigned |
Bug Description
[System]
Ubuntu 16.04
deja-dup 34.2-0ubuntu1.1
duplicity 0.7.06-2ubuntu2
[Symptoms]
When the backup location unfortunately contains two backup volumes with different file names and same volume number in the same backup set, for instance:
duplicity-
duplicity-
this confuses duplicity collection-status, which ends up returning an undescriptive Python assertion error, as seen in this Déjà-Dup log file:
DUPLICITY: INFO 1
DUPLICITY: . Args: /usr/bin/duplicity collection-status [...]
[...]
DUPLICITY: DEBUG 1
DUPLICITY: . 12 files exist on backend
DUPLICITY: DEBUG 1
DUPLICITY: . Extracting backup chains from list of files:
[u'duplicity
u'duplicity
u'duplicity
u'duplicity
u'duplicity
[...]
DUPLICITY: DEBUG 1
DUPLICITY: . File duplicity-
part of a known set; creating new set
DUPLICITY: DEBUG 1
DUPLICITY: . File duplicity-
known set
DUPLICITY: ERROR 30 AssertionError
[...]
DUPLICITY: . File "/usr/lib/
py", line 105, in add_filename(
DUPLICITY: . AssertionError:
({1: 'duplicity-
'duplicity-
What happens is that duplicity collection-status takes the uncompressed duplicity-
Note that a similar issue may also happen for file signatures instead of backup volumes, e.g.:
duplicity-
duplicity-
but backup volumes appear to be tripped on first, perhaps because of alphabetic order.
Note also that under normal operation, the backup location isn't supposed to contain a mixed of compressed and uncompressed files (or encrypted and unencrypted files), but this situation was still reported by the bug reporter in the original bug report.
[Test case]
See comment 19, written for Déjà-Dup, but easily adaptable to pure duplicity I think.
[Ideas for fixing]
Duplicity already has checks to avoid considering files whose names don't look like they could be part of a backup set (see comment 19, point 4). Perhaps this filename filter could be improved on so that duplicity doesn't burp so hard when a backup volume is present in both compressed and uncompressed forms? Perhaps it could have duplicity prefer a particular filename when there are two volumes with the same number in the same backup set? But then which one and on what grounds?
Please also see comment 23.
[Easier fix]
Worst case, if this situation can't be handled automatically and the situation requires a human to examine the contents of the backup repository to take adequate action, then it would be helpful that duplicity return a more descriptive message than the current terse assertion error.
summary: |
- duja-dup AssertionError: ({1: 'duplicity- - full.20161129T015237Z.vol1.difftar'} + Undescriptive duplicity/collection-status error when the backup + directory contains two volumes with different file names and same volume + number in the same backup set |
Changed in deja-dup (Ubuntu): | |
status: | Incomplete → New |
Changed in deja-dup (Ubuntu): | |
importance: | Undecided → High |
Changed in duplicity: | |
status: | New → Confirmed |
Changed in duplicity (Ubuntu): | |
status: | New → Confirmed |
tags: | added: xenial |
Changed in duplicity (Ubuntu): | |
importance: | Undecided → High |
no longer affects: | deja-dup |
no longer affects: | deja-dup (Ubuntu) |
Hello David,
can you provide us with the following informations please:
The file /tmp/deja- dup.gsettings after running the following line (you may want to scrub the file of any incriminating file names or details): dup.gsettings
gsettings list-recursively org.gnome.DejaDup > /tmp/deja-
The file /tmp/deja-dup.log after running the appropriate line below and replicating the problem (you may want to scrub the log of any incriminating file names or details):
* If you're having problems backing up: DUP_DEBUG= 1 deja-dup --backup | tail -n 1000 > /tmp/deja-dup.log
DEJA_
After that you can set the "Status" back to "New".
Thanking you in anticipation
Vej