I want to use the following command to do a remote backup of /home:

duplicity full /home sftp://user@hostname.com/home/user/backup

When the command is run I get the following output:

Local and Remote metadata are synchronized, no sync needed.
Last full backup date: none
GnuPG passphrase: 
Retype passphrase to confirm: 
--------------[ Backup Statistics ]--------------
StartTime 1465578990.15 (Fri Jun 10 19:16:30 2016)
EndTime 1465578990.22 (Fri Jun 10 19:16:30 2016)
ElapsedTime 0.07 (0.07 seconds)
SourceFiles 75
SourceFileSize 118644 (116 KB)
NewFiles 75
NewFileSize 118644 (116 KB)
DeletedFiles 0
ChangedFiles 0
ChangedFileSize 0 (0 bytes)
ChangedDeltaSize 0 (0 bytes)
DeltaEntries 75
RawDeltaSize 110452 (108 KB)
TotalDestinationSizeChange 35295 (34.5 KB)
Errors 0

But no files are stored on the remote host. If I change the destination sftp://user@hostname.com/home/user/backups in the command above to for example file:///home/user/backup the backup files are stored locally as expected, and I get the same terminal output as above.

What puzzles me more is that if I change the destination to some url that is definitely not writable on the remote host, I still get the message above saying Errors 0, but of course no files are transferred to the remote host.

What am I doing wrong? Why can I do a local backup but not a remote one, and why are there no error message when the files are not transferred to the remote host?

Additional info:

Tried to run the command with the --verbosity 9 switch and a directory that doesn't exist on the remote host set as the destination dir:

AsyncScheduler: running task synchronously (asynchronicity disabled)
ssh: [chan 1] open('/var/httpd.www/home/notExistingDir/duplicity-full.20160610T173142Z.vol1.difftar.gpg', 'wb')
ssh: [chan 1] open('/var/httpd.www/home/notExistingDir/duplicity-full.20160610T173142Z.vol1.difftar.gpg', 'wb') -> 00000000
ssh: [chan 1] close(00000000)
ssh: [chan 1] stat('/var/httpd.www/home/notExistingDir/duplicity-full.20160610T173142Z.vol1.difftar.gpg')
Deleting /tmp/duplicity-gYlv_8-tempdir/mktemp-MOjDuP-2
Forgetting temporary file /tmp/duplicity-gYlv_8-tempdir/mktemp-MOjDuP-2
AsyncScheduler: task completed successfully
Processed volume 1

looks like you backed up to ~user/home/user/backup on the target machine.

try (notice the extra slash signalling an absolute path)

duplicity full /home sftp://user@hostname.com//home/user/backup

or alternatively

duplicity full /home sftp://user@hostname.com/backup




You need to include a : to separate the hostname from the path on the host

duplicity full /home sftp://user@hostname.com:/home/user/backup

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.