acd_cli backend: Name collision with non-cached file
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Duplicity |
New
|
Undecided
|
Unassigned |
Bug Description
Hi,
I have frequent errors uploading using the acd_cli backend. It seems that after a connection error like "Read timed out", the next tries fail with "Name collision with non-cached file. If you want to overwrite, please sync and try again."
I guess that the backend should do a "acd_cli sync" before any subsequent tries to avoid this?
I'm using Fedora 25 x86_64, with these packages:
duplicity-
python-
-------
This is a snip of the error:
A mnt/btrfs/
AsyncScheduler: running task synchronously (asynchronicity disabled)
Writing duplicity-
Reading results of 'acd_cli upload --force --overwrite '/tmp/duplicity
Backtrace of previous error: Traceback (innermost last):
File "/usr/lib64/
return fn(self, *args)
File "/usr/lib64/
self.
File "/usr/lib64/
self.
File "/usr/lib64/
l = self.subprocess
File "/usr/lib64/
(private, result, stdout + '\n' + stderr))
BackendException: Error running 'acd_cli upload --force --overwrite '/tmp/duplicity
[ ] 0.0% of 200MiB 0/1 -70.1MB/s 0s
1 file(s) failed.
16-11-08 14:32:50.630 [ERROR] [acd_cli] - Uploading "duplicity-
(read timeout=60).
Attempt 1 failed. BackendException: Error running 'acd_cli upload --force --overwrite '/tmp/duplicity
put:
[ ] 0.0% of 200MiB 0/1 -70.1MB/s 0s
1 file(s) failed.
16-11-08 14:32:50.630 [ERROR] [acd_cli] - Uploading "duplicity-
(read timeout=60).
Writing duplicity-
Reading results of 'acd_cli upload --force --overwrite '/tmp/duplicity
Backtrace of previous error: Traceback (innermost last):
File "/usr/lib64/
return fn(self, *args)
File "/usr/lib64/
self.
File "/usr/lib64/
self.
File "/usr/lib64/
l = self.subprocess
File "/usr/lib64/
(private, result, stdout + '\n' + stderr))
BackendException: Error running 'acd_cli upload --force --overwrite '/tmp/duplicity
[######
1 file(s) failed.
16-11-08 14:33:36.932 [ERROR] [acd_cli] - Uploading "duplicity-
16-11-08 14:33:36.988 [WARNING] [acd_cli] - Return value error code: 256.
Attempt 2 failed. BackendException: Error running 'acd_cli upload --force --overwrite '/tmp/duplicity
put:
[######
1 file(s) failed.
-------
I launch duplicity with duply, this is the beginning of the run:
Start duply v1.11.3, time is 2016-11-08 11:25:04.
Using profile '/etc/duply/acd'.
Using installed duplicity version 0.7.10, python 2.7.12, gpg 1.4.21 (Home: ~/.gnupg), awk 'GNU Awk 4.1.3, API: 1.1 (GNU MPFR 3.1.5, GNU MP 6.1.1)', grep 'grep (GNU grep) 2.26', bash '4.3.43(1)-release (x86_64-
Autoset found secret key of first GPG_KEY entry '<removed>' for signing.
Checking TEMP_DIR '/tmp' is a folder and writable (OK)
Test - Encrypt to <removed> & Sign with <removed> (OK)
Test - Decrypt (OK)
Test - Compare (OK)
Cleanup - Delete '/tmp/duply.
--- Start running command PRE at 11:25:05.164 ---
Running '/etc/duply/
Output: Create a readonly snapshot of '/mnt/btrfs/
Create a readonly snapshot of '/mnt/btrfs/
Getting changes..
Inserting nodes.
--- Finished state OK at 11:25:13.306 - Runtime 00:00:08.141 ---
--- Start running command BKP at 11:25:13.314 ---
Using archive dir: /root/backups/
Using backup name: duply_acd
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Reading results of 'acd_cli sync'
Reading results of 'acd_cli ls '/Backups/
Reading globbing filelist /etc/duply/
Main action: inc
=======
duplicity 0.7.10 (August 20, 2016)
Args: /usr/bin/duplicity --archive-dir /root/backups/
Linux xenon 4.8.6-300.
/usr/bin/python2 2.7.12 (default, Sep 29 2016, 12:52:02)
[GCC 6.2.1 20160916 (Red Hat 6.2.1-2)]
=======
Using temporary directory /tmp/duplicity-
Registering (mkstemp) temporary file /tmp/duplicity-
Temp has 8326713344 available, backup will use approx 272629760.
Reading results of 'acd_cli ls '/Backups/
Local and Remote metadata are synchronized, no sync needed.
Reading results of 'acd_cli ls '/Backups/
6416 files exist on backend
10 files exist in cache
Extracting backup chains from list of files: [<removed>]
File duplicity-
Ignoring file (rejected by backup set) 'duplicity-
File duplicity-
Processing local manifest /root/backups/
Found manifest volume 1
Found manifest volume 2
Found manifest volume 3
[...]
-------
And the las 200 lines:
juan@juan-
Selection: examining path /mnt/btrfs/
Selection: result: None from function: Command-line exclude glob: /root/.cache/**
Selection: result: None from function: Command-line exclude glob: /root/.ccache/**
Selection: result: None from function: Command-line exclude glob: /home/*
Selection: result: None from function: Command-line exclude glob: /home/*
Selection: result: None from function: Command-line exclude glob: /home/*/.cache/**
Selection: result: None from function: Command-line exclude glob: /home/*/.ccache/**
Selection: result: None from function: Command-line exclude glob: /mnt/backups/
Selection: result: None from function: Command-line include glob: /etc/**
Selection: result: None from function: Command-line include glob: /root/**
Selection: result: None from function: Command-line include glob: /var/spool/cron/**
Selection: result: None from function: Command-line include glob: /home/**
Selection: result: None from function: Command-line include glob: /opt/**
Selection: result: None from function: Command-line include glob: /usr/local/**
Selection: result: None from function: Command-line include glob: /mnt/backups/**
Selection: result: None from function: Command-line include glob: /mnt/btrfs/
Selection: result: 1 from function: Command-line include glob: /mnt/btrfs/
Selection: + including file
Selecting /mnt/btrfs/
Comparing mnt/btrfs/
Getting delta of (mnt/btrfs/
A mnt/btrfs/
Selection: examining path /mnt/btrfs/
Selection: result: None from function: Command-line exclude glob: /root/.cache/**
Selection: result: None from function: Command-line exclude glob: /root/.ccache/**
Selection: result: None from function: Command-line exclude glob: /home/*
Selection: result: None from function: Command-line exclude glob: /home/*
Selection: result: None from function: Command-line exclude glob: /home/*/.cache/**
Selection: result: None from function: Command-line exclude glob: /home/*/.ccache/**
Selection: result: None from function: Command-line exclude glob: /mnt/backups/
Selection: result: None from function: Command-line include glob: /etc/**
Selection: result: None from function: Command-line include glob: /root/**
Selection: result: None from function: Command-line include glob: /var/spool/cron/**
Selection: result: None from function: Command-line include glob: /home/**
Selection: result: None from function: Command-line include glob: /opt/**
Selection: result: None from function: Command-line include glob: /usr/local/**
Selection: result: None from function: Command-line include glob: /mnt/backups/**
Selection: result: None from function: Command-line include glob: /mnt/btrfs/
Selection: result: 1 from function: Command-line include glob: /mnt/btrfs/
Selection: + including file
Selecting /mnt/btrfs/
Comparing mnt/btrfs/
Getting delta of (mnt/btrfs/
A mnt/btrfs/
AsyncScheduler: running task synchronously (asynchronicity disabled)
Writing duplicity-
Reading results of 'acd_cli upload --force --overwrite '/tmp/duplicity
Backtrace of previous error: Traceback (innermost last):
File "/usr/lib64/
return fn(self, *args)
File "/usr/lib64/
self.
File "/usr/lib64/
self.
File "/usr/lib64/
l = self.subprocess
File "/usr/lib64/
(private, result, stdout + '\n' + stderr))
BackendException: Error running 'acd_cli upload --force --overwrite '/tmp/duplicity
[ ] 0.0% of 200MiB 0/1 -70.1MB/s 0s
1 file(s) failed.
16-11-08 14:32:50.630 [ERROR] [acd_cli] - Uploading "duplicity-
Attempt 1 failed. BackendException: Error running 'acd_cli upload --force --overwrite '/tmp/duplicity
[ ] 0.0% of 200MiB 0/1 -70.1MB/s 0s
1 file(s) failed.
16-11-08 14:32:50.630 [ERROR] [acd_cli] - Uploading "duplicity-
Writing duplicity-
Reading results of 'acd_cli upload --force --overwrite '/tmp/duplicity
Backtrace of previous error: Traceback (innermost last):
File "/usr/lib64/
return fn(self, *args)
File "/usr/lib64/
self.
File "/usr/lib64/
self.
File "/usr/lib64/
l = self.subprocess
File "/usr/lib64/
(private, result, stdout + '\n' + stderr))
BackendException: Error running 'acd_cli upload --force --overwrite '/tmp/duplicity
[######
1 file(s) failed.
16-11-08 14:33:36.932 [ERROR] [acd_cli] - Uploading "duplicity-
16-11-08 14:33:36.988 [WARNING] [acd_cli] - Return value error code: 256.
Attempt 2 failed. BackendException: Error running 'acd_cli upload --force --overwrite '/tmp/duplicity
[######
1 file(s) failed.
16-11-08 14:33:36.932 [ERROR] [acd_cli] - Uploading "duplicity-
16-11-08 14:33:36.988 [WARNING] [acd_cli] - Return value error code: 256.
Writing duplicity-
Reading results of 'acd_cli upload --force --overwrite '/tmp/duplicity
Backtrace of previous error: Traceback (innermost last):
File "/usr/lib64/
return fn(self, *args)
File "/usr/lib64/
self.
File "/usr/lib64/
self.
File "/usr/lib64/
l = self.subprocess
File "/usr/lib64/
(private, result, stdout + '\n' + stderr))
BackendException: Error running 'acd_cli upload --force --overwrite '/tmp/duplicity
[######
1 file(s) failed.
16-11-08 14:34:24.131 [ERROR] [acd_cli] - Uploading "duplicity-
16-11-08 14:34:24.281 [WARNING] [acd_cli] - Return value error code: 256.
Attempt 3 failed. BackendException: Error running 'acd_cli upload --force --overwrite '/tmp/duplicity
[######
1 file(s) failed.
16-11-08 14:34:24.131 [ERROR] [acd_cli] - Uploading "duplicity-
16-11-08 14:34:24.281 [WARNING] [acd_cli] - Return value error code: 256.
Writing duplicity-
Reading results of 'acd_cli upload --force --overwrite '/tmp/duplicity
Backtrace of previous error: Traceback (innermost last):
File "/usr/lib64/
return fn(self, *args)
File "/usr/lib64/
self.
File "/usr/lib64/
self.
File "/usr/lib64/
l = self.subprocess
File "/usr/lib64/
(private, result, stdout + '\n' + stderr))
BackendException: Error running 'acd_cli upload --force --overwrite '/tmp/duplicity
[######
1 file(s) failed.
16-11-08 14:35:17.100 [ERROR] [acd_cli] - Uploading "duplicity-
16-11-08 14:35:17.363 [WARNING] [acd_cli] - Return value error code: 256.
Attempt 4 failed. BackendException: Error running 'acd_cli upload --force --overwrite '/tmp/duplicity
[######
1 file(s) failed.
16-11-08 14:35:17.100 [ERROR] [acd_cli] - Uploading "duplicity-
16-11-08 14:35:17.363 [WARNING] [acd_cli] - Return value error code: 256.
Writing duplicity-
Reading results of 'acd_cli upload --force --overwrite '/tmp/duplicity
Backtrace of previous error: Traceback (innermost last):
File "/usr/lib64/
return fn(self, *args)
File "/usr/lib64/
self.
File "/usr/lib64/
self.
File "/usr/lib64/
l = self.subprocess
File "/usr/lib64/
(private, result, stdout + '\n' + stderr))
BackendException: Error running 'acd_cli upload --force --overwrite '/tmp/duplicity
[######
1 file(s) failed.
16-11-08 14:36:07.875 [ERROR] [acd_cli] - Uploading "duplicity-
16-11-08 14:36:07.967 [WARNING] [acd_cli] - Return value error code: 256.
Giving up after 5 attempts. BackendException: Error running 'acd_cli upload --force --overwrite '/tmp/duplicity
[######
1 file(s) failed.
16-11-08 14:36:07.875 [ERROR] [acd_cli] - Uploading "duplicity-
16-11-08 14:36:07.967 [WARNING] [acd_cli] - Return value error code: 256.
Releasing lockfile /root/backups/
Removing still remembered temporary file /tmp/duplicity-
Removing still remembered temporary file /tmp/duplicity-
14:36:08.210 Task 'BKP' failed with exit code '50'.
--- Finished state FAILED 'code 50' at 14:36:08.210 - Runtime 03:10:54.896 ---
--- Start running command POST at 14:36:08.233 ---
Running '/etc/duply/
Output: Delete subvolume (commit): '/mnt/btrfs/
Delete subvolume (commit): '/mnt/btrfs/
--- Finished state OK at 14:36:10.059 - Runtime 00:00:01.825 ---
After more testing, it looks like the failed upload is creating the file in ACD, so subsequent retries fail because of name collisions.
If I manually trash the file, the backup can continue.
I guess the right fix would be for acd_cli to update its file cache if the file has been created, but could you add in the duplicity backend an "acd_cli trash <file>" as a workaround?
Kind regards.