Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NotImplementedError using duplicity backend #123

Open
georg90 opened this issue Aug 28, 2016 · 11 comments
Open

NotImplementedError using duplicity backend #123

georg90 opened this issue Aug 28, 2016 · 11 comments
Labels

Comments

@georg90
Copy link

georg90 commented Aug 28, 2016

I recently moved my server to a new machine. While the backup on my old system is running just fine (jottalib 0.4.2.1, duplicity 7.06, ubuntu14.04) on the new server with jottalib 0.5.1 and duplicity 7.06 (ubuntu 16.04) I'm getting NotImplementedErrors when starting a backup.

I compiled duplicity by myself using the backend.py from here https://raw.githubusercontent.com/havardgulldahl/jottalib/master/src/duplicity-backen5d.py

Any ideas why it's not working? Any good log files I can check?

As I was reading here this problem occurs using the 0.5.1 version, but why? Isn't this a jottalib issue if it's working fine with the older version?

How can install an older jottalib version - I keep gettig this error:

root@aries:/tmp/duplicity-0.7.06# pip install 'jottalib==0.4.2.post1'
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 209, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 328, in run
    wb.build(autobuilding=True)
  File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 748, in build
    self.requirement_set.prepare_files(self.finder)
  File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 360, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 448, in _prepare_file
    req_to_install, finder)
  File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 387, in _check_skip_installed
    req_to_install.check_if_exists()
  File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 1011, in check_if_exists
    self.req.project_name
AttributeError: 'Requirement' object has no attribute 'project_name'
@havardgulldahl
Copy link
Owner

Hey @georg90, are you able to show us some logs of the error? Is there a backtrace?

@georg90
Copy link
Author

georg90 commented Aug 28, 2016

If you can tell me where the log files go? There is no output in syslog..

@havardgulldahl
Copy link
Owner

We need to see what error message duplicity spits out. Take a screen shot of your terminal with the duplicity message, for instance.

@havardgulldahl
Copy link
Owner

And run duplicity with the option -v4 to get more info. If that is not enough to show the cause of the NotImplementedError error message use -v9 to get everything from the debug log.

see http://duplicity.nongnu.org/duplicity.1.html

@georg90
Copy link
Author

georg90 commented Aug 30, 2016

[...]
Import von duplicity.backends.jottabackend Succeeded
[...]
Traceback (innermost last):
  File "/usr/local/lib/python2.7/dist-packages/duplicity/backend.py", line 369, in inner_retry
    return fn(self, *args)
  File "/usr/local/lib/python2.7/dist-packages/duplicity/backend.py", line 573, in list
    raise NotImplementedError()
 NotImplementedError

@georg90
Copy link
Author

georg90 commented Sep 3, 2016

I copied my /usr/local/lib/python2.7/dist-packages/duplicity/ folder from my old machine and now it's syncing.

But this isn't a fix..

@havardgulldahl
Copy link
Owner

havardgulldahl commented Sep 3, 2016

OK. That explains it pretty well. Please upload your old files that work,
along with the version of duplicity that you are running.

Pastebin and gist are good options for where to put the files

Edit: I see you've already told us your duplicity version. I guess duplicty plugins changed their format some time, and we need to write a plugin that works across all duplicity versions.

@havardgulldahl
Copy link
Owner

Can you please try with the amended
https://raw.githubusercontent.com/havardgulldahl/jottalib/master/src/duplicity-backend.py

Thanks!

@georg90
Copy link
Author

georg90 commented Nov 9, 2016

Hi!
For a couple days now Jottalib + Duplicity doesn't work anymore. I get an

--- Start running command BKP at 09:46:40.218 ---
UnsupportedBackendScheme: scheme not supported in url: jottacloud://owncloud_backup
09:46:40.609 Task 'BKP' failed with exit code '23'.

I used the file you provided above, doesn't change. Still using the same versions of duplicity & duply + ubuntu 16.04

@georg90
Copy link
Author

georg90 commented Nov 19, 2016

Error rising when using the backend:

Temporäres Verzeichnis /tmp/duplicity-KER6Wd-tempdir wird benutzt
Benutzerfehlerdetail: Traceback (most recent call last):
  File "/usr/local/bin/duplicity", line 1546, in <module>
    with_tempdir(main)
  File "/usr/local/bin/duplicity", line 1540, in with_tempdir
    fn()
  File "/usr/local/bin/duplicity", line 1375, in main
    action = commandline.ProcessCommandLine(sys.argv[1:])
  File "/usr/lib/python2.7/dist-packages/duplicity/commandline.py", line 1116, in ProcessCommandLine
    backup, local_pathname = set_backend(args[0], args[1])
  File "/usr/lib/python2.7/dist-packages/duplicity/commandline.py", line 1005, in set_backend
    globals.backend = backend.get_backend(bend)
  File "/usr/lib/python2.7/dist-packages/duplicity/backend.py", line 223, in get_backend
    obj = get_backend_object(url_string)
  File "/usr/lib/python2.7/dist-packages/duplicity/backend.py", line 204, in get_backend_object
    raise UnsupportedBackendScheme(url_string)
UnsupportedBackendScheme: scheme not supported in url: jottacloud://Test_Folder

UnsupportedBackendScheme: scheme not supported in url: jottacloud://Test_Folder

@georg90
Copy link
Author

georg90 commented Nov 19, 2016

Found the issue:

Duplicity is looking in the /usr/lib path, but if you compile duplicity manually, it adds the compiled files to /usr/local/lib..

A simple

ln -s /usr/local/lib/python2.7/dist-packages/duplicity/backends/jottabackend.py /usr/lib/python2.7/dist-packages/duplicity/backends/jottabackend.py

ln -s /usr/local/lib/python2.7/dist-packages/duplicity/backends/jottabackend.pyc /usr/lib/python2.7/dist-packages/duplicity/backends/jottabackend.pyc

fixes this.

How can this be avoided?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants