Giter Club home page Giter Club logo

dropbox-tools's Introduction

Dropbox Recovery Tools

http://movieos.org/code/dropbox-tools/

A collection of little utilities I'm building as and when I need them to fix things that are wrong with my Dropbox. Dropbox is great and I could not live without it, but this is the Real World and things break.

Just to be clear - you should NOT use these tools without reading and understanding them. They're 30 lines of code each, and full of comments, but they perform potentially destructive changes to your Dropbox folder.

tools

zero_length.py

Recover truncated files.

Usage:

$ python zero_length.py <Dropbox folder>

Something weird happened to a shared dropbox I'm part of, and lots of files became replaced by zero-length versions of themselves. Clearly this is annoying. This script walks through the Dropbox folder, finds zero-length files, and recovers them to the first state in their history where they were not zero length.

bulk_undelete.py

Bulk-undelete files

Usage:

zero_length.py <recovery folder> [<root path>]

eg:

$ python zero_length.py ~/DropboxRecovery/ /SharedThings/

This was my first tool. I managed to delete 18,000 files from the shared work Dropbox folder. Although in theory Dropbox lets you undelete files, in practice you need to do this one at a time. Not going to happen. This script will walk the remote Dropbox repository, and download the most recent version of any file that was deleted in the last 5 days into the recovery folder. If the file already exists in the target folder, it won't be overwritten, so the script will only create new files.

I suggest you recover into a new, empty folder, then copy the files back into dropbox once you're happy that it worked.

instructions

Install requirements.

$ pip install -r requrements.txt

Run script.

# python zero_length.py ~/Dropbox

Eat bacon.

dropbox-tools's People

Contributors

tominsam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dropbox-tools's Issues

Dropbox app in "development mode"?

I don't know how Dropbox OAuth app registration works, but when I try to authorize the script, Dropbox gives me a failure message:

Only a limited set of users can receive access tokens while this app is in development mode

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.