Backup and restore does not work on SCP backend

Bug #1859304 reported by Arduous
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fix Released

Bug Description

I was able to get restore operation to succeed. I had to make 2 changes. Patch is attached.

(duplicitytempo) samuel@bioman2:~/dev/backup/duplicitytempo/duplicity-0.8.09$ python --version
Python 3.7.5
(duplicitytempo) samuel@bioman2:~/dev/backup/duplicitytempo/duplicity-0.8.09$ pip3 list
Package Version
------------ -------
bcrypt 3.1.7
cffi 1.13.2
cryptography 2.8
duplicity 0.8.9
fasteners 0.15
future 0.18.2
monotonic 1.5
paramiko 2.7.1
pip 19.3.1
pycparser 2.19
PyNaCl 1.3.0
setuptools 44.0.0
six 1.13.0
wheel 0.33.6
(duplicitytempo) samuel@bioman2:~/dev/backup/duplicitytempo/duplicity-0.8.09$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 19.10
Release: 19.10
Codename: eoan

ssh: [chan 3] Max packet in: 32768 bytes
ssh: [chan 3] Max packet out: 32768 bytes
ssh: Secsh channel 3 opened.
ssh: [chan 3] Sesch channel 3 request ok
ssh: [chan 3] EOF received (3)
ssh: [chan 3] EOF sent (3)
Trace inverse de l'erreur précédente : Traceback (innermost last):
  File "/home/samuel/dev/backup/duplicitytempo/lib/python3.7/site-packages/duplicity/", line 374, in inner_retry
    return fn(self, *args)
  File "/home/samuel/dev/backup/duplicitytempo/lib/python3.7/site-packages/duplicity/", line 557, in get
    self.backend._get(remote_filename, local_path)
  File "/home/samuel/dev/backup/duplicitytempo/lib/python3.7/site-packages/duplicity/backends/", line 346, in _get
    (remote_filename, msg))
 duplicity.errors.BackendException: scp get b'duplicity-full.20181003T214702Z.vol34.difftar.gpg' failed: incorrect response 'scp: /mnt/backup/backup/duplicity/bduplicity-full.20181003T214702Z.vol34.difftar.gpg: No such file or directory'

Revision history for this message
Arduous (samuel-progin) wrote :
Arduous (samuel-progin)
summary: - Restore does not work on SCP backend
+ Backup and restore does not work on SCP backend
Revision history for this message
Arduous (samuel-progin) wrote :

In fact, both backup and restore operations are affected. It is due to type confusion between between unicode and bytes. The attached patch restores both functionalities, but may not be elegant or complete.

Changed in duplicity:
importance: Undecided → Medium
milestone: none → 0.8.10
status: New → Fix Committed
Revision history for this message
Tamás Kálmán (taskalman) wrote :

I have also stumbled on this issue and applying the patch has solved by problem, thank you Arduous!

The symptoms are slightly different when starting a new backup, the SCP transfer times out after the SSH channel is established. An exception is thrown from here:

When attempting an incremental backup or restore, I get the same exception as reported by Arduous.

Applying the patch share on top of 0.8.9 solves all the scenarios, that I have tried.

Changed in duplicity:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers