Duplicity and Mega backend

Asked by Jorman Franzini on 2017-01-22

Hi, there's any eta about the full working backend with mega?
Is been a while that mega don't works anymore.

Now when I try to use mega I got this error:
  File "/opt/bin/duplicity", line 1546, in <module>
    with_tempdir(main)
  File "/opt/bin/duplicity", line 1540, in with_tempdir
    fn()
  File "/opt/bin/duplicity", line 1375, in main
    action = commandline.ProcessCommandLine(sys.argv[1:])
  File "/opt/lib/python2.7/site-packages/duplicity/commandline.py", line 1126, in ProcessCommandLine
    backup, local_pathname = set_backend(args[0], args[1])
  File "/opt/lib/python2.7/site-packages/duplicity/commandline.py", line 1015, in set_backend
    globals.backend = backend.get_backend(bend)
  File "/opt/lib/python2.7/site-packages/duplicity/backend.py", line 223, in get_backend
    obj = get_backend_object(url_string)
  File "/opt/lib/python2.7/site-packages/duplicity/backend.py", line 209, in get_backend_object
    return factory(pu)
  File "/opt/lib/python2.7/site-packages/duplicity/backends/megabackend.py", line 36, in __init__
    from mega import Mega
  File "/opt/lib/python2.7/site-packages/mega/__init__.py", line 1, in <module>
    from .mega import Mega
  File "/opt/lib/python2.7/site-packages/mega/mega.py", line 18
    self.schema = 'https'

Any idea?

Question information

Language:
English Edit question
Status:
Answered
For:
Duplicity Edit question
Assignee:
No assignee Edit question
Last query:
2017-01-22
Last reply:
2017-01-23
edso (ed.so) said : #1

On 22.01.2017 20:43, Jorman Franzini wrote:
> New question #445667 on Duplicity:
> https://answers.launchpad.net/duplicity/+question/445667
>
> Hi, there's any eta about the full working backend with mega?
> Is been a while that mega don't works anymore.
>
> Now when I try to use mega I got this error:
> File "/opt/bin/duplicity", line 1546, in <module>
> with_tempdir(main)
> File "/opt/bin/duplicity", line 1540, in with_tempdir
> fn()
> File "/opt/bin/duplicity", line 1375, in main
> action = commandline.ProcessCommandLine(sys.argv[1:])
> File "/opt/lib/python2.7/site-packages/duplicity/commandline.py", line 1126, in ProcessCommandLine
> backup, local_pathname = set_backend(args[0], args[1])
> File "/opt/lib/python2.7/site-packages/duplicity/commandline.py", line 1015, in set_backend
> globals.backend = backend.get_backend(bend)
> File "/opt/lib/python2.7/site-packages/duplicity/backend.py", line 223, in get_backend
> obj = get_backend_object(url_string)
> File "/opt/lib/python2.7/site-packages/duplicity/backend.py", line 209, in get_backend_object
> return factory(pu)
> File "/opt/lib/python2.7/site-packages/duplicity/backends/megabackend.py", line 36, in __init__
> from mega import Mega
> File "/opt/lib/python2.7/site-packages/mega/__init__.py", line 1, in <module>
> from .mega import Mega
> File "/opt/lib/python2.7/site-packages/mega/mega.py", line 18
> self.schema = 'https'
>
> Any idea?
>

1.
the stack is incomplete. the actual error is missing.. please repost.

2.
what's your duplicity version?

3.
which is the last that works for you?

..ede/duply.net

Hi, here the full log

24-01-2017_03:00:01: Backup for local filesystem started
24-01-2017_03:00:01: Backup for local filesystem started
Start duply v2.0.1, time is 2017-01-24 03:00:02.
Start duply v2.0.1, time is 2017-01-24 03:00:02.
Using profile '/share/CACHEDEV1_DATA/scripts/configurazioni/duply/Qnap_Backup'.
Using profile '/share/CACHEDEV1_DATA/scripts/configurazioni/duply/Qnap_Backup'.
Using installed duplicity version 0.7.11, python 2.7.12, gpg 1.4.7 (Home: ~/.gnupg), awk 'awk: warning: option -W is ignored', grep 'BusyBox v1.25.1 () multi-call binary.', bash '4.3.42(1)-release (x86_64-openwrt-linux-gnu)'.
Using installed duplicity version 0.7.11, python 2.7.12, gpg 1.4.7 (Home: ~/.gnupg), awk 'awk: warning: option -W is ignored', grep 'BusyBox v1.25.1 () multi-call binary.', bash '4.3.42(1)-release (x86_64-openwrt-linux-gnu)'.
Autoset found secret key of first GPG_KEY entry '0045788B' for signing.
Autoset found secret key of first GPG_KEY entry '0045788B' for signing.
Checking TEMP_DIR '/share/CACHEDEV1_DATA/homes/tmp' is a folder and writableChecking TEMP_DIR '/share/CACHEDEV1_DATA/homes/tmp' is a folder and writable (OK)
 (OK)
Test - Encrypt to '0045788B' & Sign with '0045788B'Test - Encrypt to '0045788B' & Sign with '0045788B' (OK)
 (OK)
Test - DecryptTest - Decrypt (OK)
Test - Compare (OK)
Test - Compare (OK)
Cleanup - Delete '/share/CACHEDEV1_DATA/homes/tmp/duply.13772.1485223208_*'(OK)
 (OK)
Cleanup - Delete '/share/CACHEDEV1_DATA/homes/tmp/duply.13771.1485223208_*'(OK)

--- Start running command PRE at 03:00:10.400 ---
Skipping n/a script '/share/CACHEDEV1_DATA/scripts/configurazioni/duply/Qnap_Backup/pre'.
--- Finished state OK at 03:00:10.442 - Runtime 00:00:00.042 ---

--- Start running command BKP at 03:00:10.482 ---
--- Start running command PRE at 03:00:10.490 ---
Skipping n/a script '/share/CACHEDEV1_DATA/scripts/configurazioni/duply/Qnap_Backup/pre'.
--- Finished state OK at 03:00:10.549 - Runtime 00:00:00.059 ---

--- Start running command BKP at 03:00:10.595 ---
Traceback (most recent call last):
  File "/opt/bin/duplicity", line 1546, in <module>
    with_tempdir(main)
  File "/opt/bin/duplicity", line 1540, in with_tempdir
    fn()
  File "/opt/bin/duplicity", line 1375, in main
    action = commandline.ProcessCommandLine(sys.argv[1:])
  File "/opt/lib/python2.7/site-packages/duplicity/commandline.py", line 1126, in ProcessCommandLine
    backup, local_pathname = set_backend(args[0], args[1])
  File "/opt/lib/python2.7/site-packages/duplicity/commandline.py", line 1015, in set_backend
    globals.backend = backend.get_backend(bend)
  File "/opt/lib/python2.7/site-packages/duplicity/backend.py", line 223, in get_backend
    obj = get_backend_object(url_string)
  File "/opt/lib/python2.7/site-packages/duplicity/backend.py", line 209, in get_backend_object
    return factory(pu)
  File "/opt/lib/python2.7/site-packages/duplicity/backends/megabackend.py", line 36, in __init__
    from mega import Mega
  File "/opt/lib/python2.7/site-packages/mega/__init__.py", line 1, in <module>
    from .mega import Mega
  File "/opt/lib/python2.7/site-packages/mega/mega.py", line 18
    self.schema = 'http'
       ^
IndentationError: expected an indented block

Traceback (most recent call last):
  File "/opt/bin/duplicity", line 1546, in <module>
    with_tempdir(main)
  File "/opt/bin/duplicity", line 1540, in with_tempdir
    fn()
  File "/opt/bin/duplicity", line 1375, in main
    action = commandline.ProcessCommandLine(sys.argv[1:])
  File "/opt/lib/python2.7/site-packages/duplicity/commandline.py", line 1126, in ProcessCommandLine
    backup, local_pathname = set_backend(args[0], args[1])
  File "/opt/lib/python2.7/site-packages/duplicity/commandline.py", line 1015, in set_backend
    globals.backend = backend.get_backend(bend)
  File "/opt/lib/python2.7/site-packages/duplicity/backend.py", line 223, in get_backend
    obj = get_backend_object(url_string)
  File "/opt/lib/python2.7/site-packages/duplicity/backend.py", line 209, in get_backend_object
    return factory(pu)
  File "/opt/lib/python2.7/site-packages/duplicity/backends/megabackend.py", line 36, in __init__
    from mega import Mega
  File "/opt/lib/python2.7/site-packages/mega/__init__.py", line 1, in <module>
    from .mega import Mega
  File "/opt/lib/python2.7/site-packages/mega/mega.py", line 18
    self.schema = 'http'
       ^
IndentationError: expected an indented block

03:00:28.590 Task 'BKP' failed with exit code '30'.
03:00:28.590 Task 'BKP' failed with exit code '30'.
--- Finished state FAILED 'code 30' at 03:00:28.590 - Runtime 00:00:17.994 ---
--- Finished state FAILED 'code 30' at 03:00:28.590 - Runtime 00:00:18.107 ---

--- Start running command POST at 03:00:28.701 ---
--- Start running command POST at 03:00:28.704 ---
Skipping n/a script '/share/CACHEDEV1_DATA/scripts/configurazioni/duply/Qnap_Backup/post'.
Skipping n/a script '/share/CACHEDEV1_DATA/scripts/configurazioni/duply/Qnap_Backup/post'.
--- Finished state OK at 03:00:28.755 - Runtime 00:00:00.054 ---
--- Finished state OK at 03:00:28.755 - Runtime 00:00:00.050 ---

--- Start running command PURGE at 03:00:28.803 ---
--- Start running command PURGE at 03:00:28.797 ---
Traceback (most recent call last):
  File "/opt/bin/duplicity", line 1546, in <module>
    with_tempdir(main)
  File "/opt/bin/duplicity", line 1540, in with_tempdir
    fn()
  File "/opt/bin/duplicity", line 1375, in main
    action = commandline.ProcessCommandLine(sys.argv[1:])
  File "/opt/lib/python2.7/site-packages/duplicity/commandline.py", line 1118, in ProcessCommandLine
    globals.backend = backend.get_backend(args[0])
  File "/opt/lib/python2.7/site-packages/duplicity/backend.py", line 223, in get_backend
    obj = get_backend_object(url_string)
  File "/opt/lib/python2.7/site-packages/duplicity/backend.py", line 209, in get_backend_object
    return factory(pu)
  File "/opt/lib/python2.7/site-packages/duplicity/backends/megabackend.py", line 36, in __init__
    from mega import Mega
  File "/opt/lib/python2.7/site-packages/mega/__init__.py", line 1, in <module>
    from .mega import Mega
  File "/opt/lib/python2.7/site-packages/mega/mega.py", line 18
    self.schema = 'http'
       ^
IndentationError: expected an indented block

Traceback (most recent call last):
  File "/opt/bin/duplicity", line 1546, in <module>
    with_tempdir(main)
  File "/opt/bin/duplicity", line 1540, in with_tempdir
    fn()
  File "/opt/bin/duplicity", line 1375, in main
    action = commandline.ProcessCommandLine(sys.argv[1:])
  File "/opt/lib/python2.7/site-packages/duplicity/commandline.py", line 1118, in ProcessCommandLine
    globals.backend = backend.get_backend(args[0])
  File "/opt/lib/python2.7/site-packages/duplicity/backend.py", line 223, in get_backend
    obj = get_backend_object(url_string)
  File "/opt/lib/python2.7/site-packages/duplicity/backend.py", line 209, in get_backend_object
    return factory(pu)
  File "/opt/lib/python2.7/site-packages/duplicity/backends/megabackend.py", line 36, in __init__
    from mega import Mega
  File "/opt/lib/python2.7/site-packages/mega/__init__.py", line 1, in <module>
    from .mega import Mega
  File "/opt/lib/python2.7/site-packages/mega/mega.py", line 18
    self.schema = 'http'
       ^
IndentationError: expected an indented block

03:00:38.429 Task 'PURGE' failed with exit code '30'.
--- Finished state FAILED 'code 30' at 03:00:38.429 - Runtime 00:00:09.631 ---
03:00:38.539 Task 'PURGE' failed with exit code '30'.
--- Finished state FAILED 'code 30' at 03:00:38.539 - Runtime 00:00:09.735 ---
24-01-2017_03:00:38: Backup for local filesystem complete
24-01-2017_03:00:38: Backup for local filesystem complete
24-01-2017_03:00:38: ------------------------------------
24-01-2017_03:00:38: ------------------------------------

I actually use the 0.7.11 but I don't remember when mega stop working on duplicity history. I've to manually test every duplicicy since 0.6 version to see when.

J

Can you help with this problem?

Provide an answer of your own, or ask Jorman Franzini for more information if necessary.

To post a message you must log in.