Package: backupninja
Version: 1.0.1-1
Severity: normal

Hello,

It seems currently impossible to have the duplicity's Ubuntu One backend
working, because the credentials (OAuth token) have to be given to
duplicity through the FTP_PASSWORD environment variable. Exporting the
variable prior running backupninja is useless (see attached
backupninja--run.log).

Interestingly, looking at the code in
/usr/lib/python2.7/dist-packages/duplicity/backends/u1backend.py, Python
seems to get an empty variable from the environment (line 153), which
prevents it from asking a new token. Instead, the else part is executed
(line 164), and fails on the split (line 165). Removing this line and
setting manually the variables consumer, consumer_secret, token and
token_secret with my OAuth credentials makes it work just fine, except
of course that I can't use several Ubuntu One accounts configured on the
same machine (and that my tokens are now in a publicly-readable file).

I am also joining the file 40-ubuntuone.dup, which is similar to my
configuration.

Cheers,

  Matteo

-- System Information:
Debian Release: 7.0
  APT prefers unstable
  APT policy: (900, 'unstable'), (200, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages backupninja depends on:
ii  bash               4.2+dfsg-0.1
ii  bsd-mailx [mailx]  8.1.2-0.20111106cvs-1
ii  dialog             1.1-20120215-3
ii  gawk               1:4.0.1+dfsg-2
ii  mawk               1.3.3-17

backupninja recommends no packages.

Versions of packages backupninja suggests:
ii  bzip2          1.0.6-4
pn  debconf-utils  <none>
ii  duplicity      0.6.20-3
ii  genisoimage    9:1.1.11-2
pn  hwinfo         <none>
pn  mdadm          <none>
ii  rdiff-backup   1.2.8-7
ii  rsync          3.0.9-4
ii  subversion     1.7.5-1
pn  trickle        <none>
ii  wodim          9:1.1.11-2

-- Configuration Files:
/etc/backupninja.conf changed [not included]

-- no debconf information
nicelevel = 19
testconnect = no

[gpg]
sign = yes
encryptkey = MYGPGKEY
signkey = 
password = my_passphrase

[source]
include = /etc/vim

[dest]
incremental = yes
increments = 60
keep = 120
desturl = 'u1+http://Ubuntu%20One'
# export FTP_PASSWORD="my_consumer,my_consumer_secret,my_token,my_token_secret"

# backupninja --run 40-ubuntuone.dup
Debug: check_perms 40-ubuntuone.dup
Debug: perms: -rw-------
Debug: gperm: ---
Debug: wperm: ---
Debug: check_perms 40-ubuntuone.dup
Debug: perms: -rw-------
Debug: gperm: ---
Debug: wperm: ---
Info: >>>> starting action 40-ubuntuone.dup (because of --now)
Debug: yes
Debug: executing handler in locked section controlled by 
/var/lock/backupninja/40-ubuntuone.dup
Debug: Data will be encrypted with the GnuPG key MYGPGKEY.
Debug: Data will be signed will the GnuPG key MYGPGKEY.
Debug:  duplicity cleanup --force  --no-print-statistics --ssh-options '' 
--encrypt-key MYGPGKEY --sign-key MYGPGKEY --full-if-older-than 60D 
--extra-clean --archive-dir /var/cache/backupninja/duplicity 
'u1+http://Ubuntu%20One'
Debug: Traceback (most recent call last): File "/usr/bin/duplicity", line 1409, 
in <module> with_tempdir(main) File "/usr/bin/duplicity", line 1402, in 
with_tempdir fn() File "/usr/bin/duplicity", line 1253, in main action = 
commandline.ProcessCommandLine(sys.argv[1:]) File 
"/usr/lib/python2.7/dist-packages/duplicity/commandline.py", line 994, in 
ProcessCommandLine globals.backend = backend.get_backend(args[0]) File 
"/usr/lib/python2.7/dist-packages/duplicity/backend.py", line 161, in 
get_backend return _backends[pu.scheme](pu) File 
"/usr/lib/python2.7/dist-packages/duplicity/backends/u1backend.py", line 165, 
in __init__ (consumer,consumer_secret,token,token_secret) = 
os.environ['FTP_PASSWORD'].split(':') ValueError: need more than 1 value to 
unpack
Warning: Duplicity cleanup failed.
Debug:  duplicity remove-older-than 120D --force  --no-print-statistics 
--ssh-options '' --encrypt-key MYGPGKEY --sign-key MYGPGKEY 
--full-if-older-than 60D --extra-clean --archive-dir 
/var/cache/backupninja/duplicity 'u1+http://Ubuntu%20One'
Debug: Traceback (most recent call last): File "/usr/bin/duplicity", line 1409, 
in <module> with_tempdir(main) File "/usr/bin/duplicity", line 1402, in 
with_tempdir fn() File "/usr/bin/duplicity", line 1253, in main action = 
commandline.ProcessCommandLine(sys.argv[1:]) File 
"/usr/lib/python2.7/dist-packages/duplicity/commandline.py", line 994, in 
ProcessCommandLine globals.backend = backend.get_backend(args[0]) File 
"/usr/lib/python2.7/dist-packages/duplicity/backend.py", line 161, in 
get_backend return _backends[pu.scheme](pu) File 
"/usr/lib/python2.7/dist-packages/duplicity/backends/u1backend.py", line 165, 
in __init__ (consumer,consumer_secret,token,token_secret) = 
os.environ['FTP_PASSWORD'].split(':') ValueError: need more than 1 value to 
unpack
Warning: Duplicity remove-older-than failed.
Debug:  duplicity   --no-print-statistics --ssh-options '' --encrypt-key 
MYGPGKEY --sign-key MYGPGKEY --full-if-older-than 60D --extra-clean 
--archive-dir /var/cache/backupninja/duplicity  --include '/etc/vim' --exclude 
'**' / 'u1+http://Ubuntu%20One'
Error: Traceback (most recent call last):
Error: File "/usr/bin/duplicity", line 1409, in <module>
Error: with_tempdir(main)
Error: File "/usr/bin/duplicity", line 1402, in with_tempdir
Error: fn()
Error: File "/usr/bin/duplicity", line 1253, in main
Error: action = commandline.ProcessCommandLine(sys.argv[1:])
Error: File "/usr/lib/python2.7/dist-packages/duplicity/commandline.py", line 
1002, in ProcessCommandLine
Error: backup, local_pathname = set_backend(args[0], args[1])
Error: File "/usr/lib/python2.7/dist-packages/duplicity/commandline.py", line 
895, in set_backend
Error: globals.backend = backend.get_backend(bend)
Error: File "/usr/lib/python2.7/dist-packages/duplicity/backend.py", line 161, 
in get_backend
Error: return _backends[pu.scheme](pu)
Error: File "/usr/lib/python2.7/dist-packages/duplicity/backends/u1backend.py", 
line 165, in __init__
Error: (consumer,consumer_secret,token,token_secret) = 
os.environ['FTP_PASSWORD'].split(':')
Error: ValueError: need more than 1 value to unpack
Fatal: Duplicity failed.
Fatal: <<<< finished action 40-ubuntuone.dup: FAILED
Debug: send report to root
Info: FINISHED: 1 actions run. 1 fatal. 16 error. 2 warning.

Reply via email to