absolute path doesn't work for FTP

Bug #1313964 reported by longer on 2014-04-28
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Duplicity
Medium
Unassigned

Bug Description

Hi,
I am using:
duplicity 0.6.23
python 2.7.3.-4
Debian weezy 2.6.32-5-amd64

I am having an issue with absolute path when backing up to FTP. It seems to me that duplicity ignores double slash before target path because it doesn't show in ncftp error message. I tried to override it with "%2F" and it started working and made full backup without problems but I have no luck with following backups which needs to download manifest from FTP to local filesystem. It allways ends with ncftp command without leading "/" in source address no matter what i enter as target URL. I guess there are two functions generating URL for ncftp which differs for ncftpget and ncftpput a bit but I am no programmer to figure it out. So I wanted to ask you for help.

Command:
duplicity full --no-encryption --full-if-older-than 7D /raid/documents ftp://backup@192.168.10.234/%2Fbackup/documents

Answer with verbosity 9:
Using archive dir: /root/.cache/duplicity/d36bbdbf56ef57733a75d81751cd79c4
Using backup name: d36bbdbf56ef57733a75d81751cd79c4
Import of duplicity.backends.sshbackend Succeeded
Import of duplicity.backends.ftpbackend Succeeded
Import of duplicity.backends.ftpsbackend Succeeded
Import of duplicity.backends.megabackend Succeeded
Import of duplicity.backends.botobackend Succeeded
Import of duplicity.backends.gdocsbackend Succeeded
Import of duplicity.backends.dpbxbackend Succeeded
Import of duplicity.backends.cfbackend Succeeded
Import of duplicity.backends.hsibackend Succeeded
Import of duplicity.backends.u1backend Succeeded
Import of duplicity.backends.imapbackend Succeeded
Import of duplicity.backends.webdavbackend Succeeded
Import of duplicity.backends.rsyncbackend Succeeded
Import of duplicity.backends.localbackend Succeeded
Import of duplicity.backends.swiftbackend Succeeded
Import of duplicity.backends.tahoebackend Succeeded
NcFTP version is 3.2.4
Using temporary directory /tmp/duplicity-GCep5l-tempdir
Registering (mkstemp) temporary file /tmp/duplicity-GCep5l-tempdir/mkstemp-O9_IzH-1
Main action: full
================================================================================
duplicity 0.6.23 ($reldate)
Args: /usr/bin/duplicity full --verbosity 9 --no-encryption --full-if-older-than 7D /raid/documents ftp://backup@192.168.10.234///%2Fbackup/documents
Linux home.longer.cz 2.6.32-5-amd64 #1 SMP Wed Apr 9 19:24:34 UTC 2014 x86_64
/usr/bin/python2.7 2.7.3 (default, Mar 13 2014, 11:03:55)
[GCC 4.7.2]
================================================================================
Registering (mkstemp) temporary file /tmp/duplicity-GCep5l-tempdir/mkstemp-lLlynx-2
Temp has 651453284352 available, backup will use approx 34078720.
Reading results of 'ncftpls -f /tmp/duplicity-GCep5l-tempdir/mkstemp-O9_IzH-1 -F -t 30 -o useCLNT=0,useHELP_SITE=0 -l 'ftp://192.168.10.234///%2Fbackup/documents/''
Synchronizing remote metadata to local cache...
Copying duplicity-full-signatures.20140428T123533Z.sigtar.gz to local cache.
Registering (mktemp) temporary file /tmp/duplicity-GCep5l-tempdir/mktemp-0cVYbi-3
Reading results of 'ncftpget -f /tmp/duplicity-GCep5l-tempdir/mkstemp-O9_IzH-1 -F -t 30 -o useCLNT=0,useHELP_SITE=0 -V -C '192.168.10.234' 'backup/documents/duplicity-full-signatures.20140428T123533Z.sigtar.gz' '/tmp/duplicity-GCep5l-tempdir/mktemp-0cVYbi-3''
Running 'ncftpget -f /tmp/duplicity-GCep5l-tempdir/mkstemp-O9_IzH-1 -F -t 30 -o useCLNT=0,useHELP_SITE=0 -V -C '192.168.10.234' 'backup/documents/duplicity-full-signatures.20140428T123533Z.sigtar.gz' '/tmp/duplicity-GCep5l-tempdir/mktemp-0cVYbi-3'' failed with code 3 (attempt #1)
Error is:
Remote host has closed the connection.

Reading results of 'ncftpget -f /tmp/duplicity-GCep5l-tempdir/mkstemp-O9_IzH-1 -F -t 30 -o useCLNT=0,useHELP_SITE=0 -V -C '192.168.10.234' 'backup/documents/duplicity-full-signatures.20140428T123533Z.sigtar.gz' '/tmp/duplicity-GCep5l-tempdir/mktemp-0cVYbi-3''
Running 'ncftpget -f /tmp/duplicity-GCep5l-tempdir/mkstemp-O9_IzH-1 -F -t 30 -o useCLNT=0,useHELP_SITE=0 -V -C '192.168.10.234' 'backup/documents/duplicity-full-signatures.20140428T123533Z.sigtar.gz' '/tmp/duplicity-GCep5l-tempdir/mktemp-0cVYbi-3'' failed with code 3 (attempt #2)
Reading results of 'ncftpget -f /tmp/duplicity-GCep5l-tempdir/mkstemp-O9_IzH-1 -F -t 30 -o useCLNT=0,useHELP_SITE=0 -V -C '192.168.10.234' 'backup/documents/duplicity-full-signatures.20140428T123533Z.sigtar.gz' '/tmp/duplicity-GCep5l-tempdir/mktemp-0cVYbi-3''
Running 'ncftpget -f /tmp/duplicity-GCep5l-tempdir/mkstemp-O9_IzH-1 -F -t 30 -o useCLNT=0,useHELP_SITE=0 -V -C '192.168.10.234' 'backup/documents/duplicity-full-signatures.20140428T123533Z.sigtar.gz' '/tmp/duplicity-GCep5l-tempdir/mktemp-0cVYbi-3'' failed with code 3 (attempt #3)
Reading results of 'ncftpget -f /tmp/duplicity-GCep5l-tempdir/mkstemp-O9_IzH-1 -F -t 30 -o useCLNT=0,useHELP_SITE=0 -V -C '192.168.10.234' 'backup/documents/duplicity-full-signatures.20140428T123533Z.sigtar.gz' '/tmp/duplicity-GCep5l-tempdir/mktemp-0cVYbi-3''
Running 'ncftpget -f /tmp/duplicity-GCep5l-tempdir/mkstemp-O9_IzH-1 -F -t 30 -o useCLNT=0,useHELP_SITE=0 -V -C '192.168.10.234' 'backup/documents/duplicity-full-signatures.20140428T123533Z.sigtar.gz' '/tmp/duplicity-GCep5l-tempdir/mktemp-0cVYbi-3'' failed with code 3 (attempt #4)
Reading results of 'ncftpget -f /tmp/duplicity-GCep5l-tempdir/mkstemp-O9_IzH-1 -F -t 30 -o useCLNT=0,useHELP_SITE=0 -V -C '192.168.10.234' 'backup/documents/duplicity-full-signatures.20140428T123533Z.sigtar.gz' '/tmp/duplicity-GCep5l-tempdir/mktemp-0cVYbi-3''
Running 'ncftpget -f /tmp/duplicity-GCep5l-tempdir/mkstemp-O9_IzH-1 -F -t 30 -o useCLNT=0,useHELP_SITE=0 -V -C '192.168.10.234' 'backup/documents/duplicity-full-signatures.20140428T123533Z.sigtar.gz' '/tmp/duplicity-GCep5l-tempdir/mktemp-0cVYbi-3'' failed with code 3 (attempt #5)
Giving up trying to execute 'ncftpget -f /tmp/duplicity-GCep5l-tempdir/mkstemp-O9_IzH-1 -F -t 30 -o useCLNT=0,useHELP_SITE=0 -V -C '192.168.10.234' 'backup/documents/duplicity-full-signatures.20140428T123533Z.sigtar.gz' '/tmp/duplicity-GCep5l-tempdir/mktemp-0cVYbi-3'' after 5 attempts
Releasing lockfile <lockfile.LinkFileLock instance at 0x202f830>
Removing still remembered temporary file /tmp/duplicity-GCep5l-tempdir/mkstemp-lLlynx-2
Removing still remembered temporary file /tmp/duplicity-GCep5l-tempdir/mkstemp-O9_IzH-1
Removing still remembered temporary file /tmp/duplicity-GCep5l-tempdir/mktemp-0cVYbi-3
Backend error detail: Traceback (most recent call last):
  File "/usr/bin/duplicity", line 1489, in <module>
    with_tempdir(main)
  File "/usr/bin/duplicity", line 1483, in with_tempdir
    fn()
  File "/usr/bin/duplicity", line 1332, in main
    do_backup(action)
  File "/usr/bin/duplicity", line 1361, in do_backup
    sync_archive(decrypt)
  File "/usr/bin/duplicity", line 1142, in sync_archive
    copy_to_local(fn)
  File "/usr/bin/duplicity", line 1083, in copy_to_local
    fileobj = globals.backend.get_fileobj_read(fn)
  File "/usr/lib/python2.7/dist-packages/duplicity/backend.py", line 607, in get_fileobj_read
    self.get(filename, tdp)
  File "/usr/lib/python2.7/dist-packages/duplicity/backends/ftpbackend.py", line 105, in get
    self.run_command_persist(commandline)
  File "/usr/lib/python2.7/dist-packages/duplicity/backend.py", line 513, in run_command_persist
    return self.subprocess_popen_persist(commandline)
  File "/usr/lib/python2.7/dist-packages/duplicity/backend.py", line 594, in subprocess_popen_persist
    raise BackendException("Error running '%s'" % private)
BackendException: Error running 'ncftpget -f /tmp/duplicity-GCep5l-tempdir/mkstemp-O9_IzH-1 -F -t 30 -o useCLNT=0,useHELP_SITE=0 -V -C '192.168.10.234' 'backup/documents/duplicity-full-signatures.20140428T123533Z.sigtar.gz' '/tmp/duplicity-GCep5l-tempdir/mktemp-0cVYbi-3''

BackendException: Error running 'ncftpget -f /tmp/duplicity-GCep5l-tempdir/mkstemp-O9_IzH-1 -F -t 30 -o useCLNT=0,useHELP_SITE=0 -V -C '192.168.10.234' 'backup/documents/duplicity-full-signatures.20140428T123533Z.sigtar.gz' '/tmp/duplicity-GCep5l-tempdir/mktemp-0cVYbi-3''

mchip (mifchip) wrote :

I have solved this issue, this is ncftp backend error. Will push update with fix.

Changed in duplicity:
importance: Undecided → Medium
milestone: none → 0.7.07
status: New → Fix Committed
Changed in duplicity:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers