This is a simple console line interface, which can backup a folder(which doesn't contain any subfolder) to dropbox "securely" and it also can restore the directory. This tool has a lot of limitation, so it's mostly just another example how you can use the dropbox api with python.
- backup:
- Makes a configuration file, which contains the paths for every file and also store every file's uuid.
- Encrypt every file in the folder.
- Archives the encrypted files.
- Uploads to dropbox.
- restore:
- Download archive and unpack it.
- Decrypt every archived file.
- Restore the files based on the file paths inside the configuration file. File's uuid is used to identify every file in the archived file.
- listing backups: simply use a dropbox api call.
Get a token key from dropbox by registering a dropbox app and insert the token in the dropboxbackend.py file.
$ git clone https://github.com/StrykerKKD/dropbox-backup.git
$ cd dropbox-backup
$ source activate [your_virtualenviroment_name]
$ pip install -e .
$ dropboxbackup
I avoided using OOP and tried to write the code in a functional way. The code also has typing information for almost every function.