For some years, I have successfully backed up my local files to one mega.co.nz cloud drive account using duplicity.
Some weeks ago, I created a second MEGA account and wanted to backup more data onto that one. But here, the login always fails with a RequestError -8 (detailed error log: see below). Even though the duplicity commands I use are identical (apart from the login name), and the account configurations are equal, too, as far as I can see.
Only difference I noticed: My old account has 50 GB quota, the new one only 15 GB.
Is it possible that the duplicity MEGA backend works for older MEGA accounts, but not for newer ones? It is the only explanation I have at the moment, because exactly the same duplicity test command works on the old one, but I reproducibly get the RequestError -8 if I try the same command on the new one!
I am sure I am using the correct password. I verified it by logging into the account using my web browser. Furthermore, if the credentials are wrong, it will throw a RequestError -9, not -8, I tested that as well with my old account.
Can someone please help me? Is it a bug in duplicity's backend which becomes effective only with newer MEGA accounts? Or am I doing something wrong!?
Here are the commands which I use to test both accounts (real login names replaced by "nemax"): Old/successful one first:
nemax@debian:~$ rm -r .cache/
nemax@debian:~$ duplicity collection-status mega://mega.20.nemax@spamgourmet.com@mega.co.nz/
Password for 'mega.20.nemax@spamgourmet.com@mega.co.nz':
Local and Remote metadata are synchronized, no sync needed.
Last full backup date: none
Collection Status
-----------------
Connecting with backend: BackendWrapper
Archive dir: /home/nemax/.cache/duplicity/8120d3794544470f8308d730c26f0d8e
Found 0 secondary backup chains.
No backup chains with active signatures found
No orphaned or incomplete backup sets found.
And here the new/unsuccessful one:
nemax@debian:~$ rm -r .cache/
nemax@debian:~$ duplicity collection-status mega://agem.20.nemax@spamgourmet.com@mega.co.nz/
Password for 'agem.20.nemax@spamgourmet.com@mega.co.nz':
Traceback (most recent call last):
File "/usr/bin/duplicity", line 1553, in <module>
with_tempdir(main)
File "/usr/bin/duplicity", line 1547, in with_tempdir
fn()
File "/usr/bin/duplicity", line 1382, in main
action = commandline.ProcessCommandLine(sys.argv[1:])
File "/usr/lib/python2.7/dist-packages/duplicity/commandline.py", line 1118, in ProcessCommandLine
globals.backend = backend.get_backend(args[0])
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 209, in get_backend_object
return factory(pu)
File "/usr/lib/python2.7/dist-packages/duplicity/backends/megabackend.py", line 44, in __init__
self.__authorize(parsed_url.username, self.get_password())
File "/usr/lib/python2.7/dist-packages/duplicity/backends/megabackend.py", line 104, in __authorize
self.client.login(email, password)
File "/usr/local/lib/python2.7/dist-packages/mega/mega.py", line 31, in login
self._login_user(email, password)
File "/usr/local/lib/python2.7/dist-packages/mega/mega.py", line 42, in _login_user
raise RequestError(resp)
RequestError: -8
Thank you so much @paf.goncalves, the solution provided in your link https://github.com/megous/megatools/issues/411 works!
Obviously, if I create a mega.nz account using the regular web interface, it creates some new kind of account, which is not reachable for the duplicity mega:// backend.
But if I create it with the command line tool "megareg" using the "megatools" package for Debian 9, it works perfectly fine!