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

Make the script work again with the new Dropbox API. CAVEAT: the feat… #48

Closed
wants to merge 1 commit into from

Conversation

lmanul
Copy link

@lmanul lmanul commented Jul 5, 2017

…ure where a file that didn't exist at that point in time would get deleted hasn't been restored yet. But given that the old Dropbox API isn't functional anymore, this makes the script work again for the most part.

…ure where a file that didn't exist at that point in time would get deleted hasn't been restored yet. But given that the old Dropbox API isn't functional anymore, this makes the script work again for the most part.
@lmanul lmanul mentioned this pull request Jul 5, 2017
@clark800
Copy link
Owner

clark800 commented Jul 7, 2017

Thanks! Is it harder to do deletions now? I'm worried that the script could be confusing without that functionality.

@lmanul
Copy link
Author

lmanul commented Jul 7, 2017

I don't think it's harder, I just thought I would fix the "most urgent", since the script is basically useless as it is with the new API so this is better than the current state :-)

@clark800
Copy link
Owner

clark800 commented Jul 7, 2017

Ok, I'll leave this up until myself or someone has time to finish it up.

@lmanul
Copy link
Author

lmanul commented Jul 7, 2017

Okay, no worries. I can try to do the deletion part too, shouldn't be much more work. I'll keep you posted. But anyone else reading this feel free ^^

@itsbrex
Copy link

itsbrex commented Oct 2, 2017

How would one restore the main Dropbox folder - simply the whole thing? I keep getting this when I try to restore with this updated version of the script:

briansmac:New Folder With Items anodigital$ python2.7 restore.py /home/user/dropbox 2017-09-26
Restoring folder: /home/user/dropbox
ApiError('2b9d7e9004a02812897eeeeb54a65e08', ListFolderError(u'path', LookupError(u'not_found', None)))
Note: You must specify the path starting with "/", where "/" is the root
of your dropbox folder. So if your dropbox directory is at "/home/user/dropbox"
and you want to restore "/home/user/dropbox/folder", the ROOTPATH is "/folder".

briansmac:New Folder With Items anodigital$

I should point out that i've tried python2.7 restore.py /home/user/dropbox 2017-09-26 as well as python2.7 restore.py /home/user/dropbox/ 2017-09-26 and also python2.7 restore.py / 2017-09-26 but no luck.

@lmanul
Copy link
Author

lmanul commented Oct 3, 2017

Did you read the error message? :-)


You must specify the path starting with "/", where "/" is the root
of your dropbox folder. So if your dropbox directory is at "/home/user/dropbox"
and you want to restore "/home/user/dropbox/folder", the ROOTPATH is "/folder".

So to restore the whole thing, I assume you need "/"

@itsbrex
Copy link

itsbrex commented Nov 1, 2017

@imanul - yeah, I did try that. In the bottom of my original post I wrote all the variations that I had tried and still received the same error message. :/

@mgenet
Copy link

mgenet commented Feb 13, 2018

You guys saved my evening!

@lmanul
Copy link
Author

lmanul commented Feb 13, 2018

Glad to help :-)

@carltonmatthew
Copy link

Didn't work for me;
python2.7 restore.py /Treasurer/SRPCDB 2018-08-22
/usr/local/lib/python2.7/dist-packages/requests/init.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
warnings.warn(warning, RequestsDependencyWarning)
Traceback (most recent call last):
File "restore.py", line 113, in
main()
File "restore.py", line 108, in main
client = login('token.dat')
File "restore.py", line 41, in login
access_token = authorize()
File "restore.py", line 22, in authorize
flow = dropbox.client.DropboxOAuth2FlowNoRedirect(APP_KEY, APP_SECRET)
AttributeError: 'module' object has no attribute 'client'
carlton@Dragon3Mint /mnt/FastData/DOWNLOADS/dropbox-restor

@lmanul lmanul closed this Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants