Git Product home page Git Product logo

backup2gdrive's Introduction

backup2gdrive

Encrypted backups to Google Drive

A simple script to backup and restore encrypted files in a Google Drive folder.
The files are encrypted with AES CBC using the SHA256 of the password, and authenticated with HMAC-SHA256
Filenames are not encrypted, all other metadata is lost.

This script is restricted to Python 2, because google's drive api still uses Python 2.

Usage:

backup2gdrive.py [-h, --help] [-c, --clear-auth] [-b, --backup ] [-r, --restore ]

Options: -h, --help: Show usage -c, --clear-auth: Removes our local credentials, you will need to grant permissions again -b, --backup : Encrypts and upload to Google Drive. Can be a file or folder. -r, --restore : Downloads and decrypts from Google Drive. Can be a file or folder.

Boring details
Uploaded files are stored in a folder called "backup" in Google Drive, and will overwrite any previous files with the same name so don't use this script if you already have a folder called "backup" with important things inside... Restored files are downloaded to "./restored/", and will also overwrite any previous files with the same name. You will need to grant full Google Drive permissions to the script on first run on the target account, this requires a web browser. The credentials are stored encrypted on disk after first use, with the same encryption used for the files. I totally just uploaded my google client secret and id with the script to make it simpler. This comes with no warranty of any kind, especially not fitness for any particular purpose. Slippery when wet.

backup2gdrive's People

Contributors

tux3 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

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.