Giter VIP home page Giter VIP logo

google-drive-backup's Introduction

google-drive-backup

A one-way backup of local folders onto your Google Drive

Installation

  1. Copy/clone this repository into a folder on your device.
  2. If you don't have Python 3, download and install it (https://www.python.org/downloads/)
  3. Setup the Python modules:
  • On Mac
    1. pip install --upgrade pip
    2. pip install --upgrade google-api-python-client
  • On Windows:
    1. reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v Path /t REG_SZ /d "%path%;c:\python2.7"
    2. python -m pip install --upgrade pip
    3. python -m pip install --upgrade google-api-python-client
  1. Setup the Google Drive API
  2. Go to https://console.developers.google.com
  3. Create a new project and give it a name.
  4. Use Google APIs -> Drive API -> Enable API
  5. Credentials -> New Credentials -> OAuth Client ID -> Configure Consent Screen
  6. Fill out the form -> Other -> Save the client secret for later
  7. On the far right, download to client_secret.json in your google-drive-backup folder.
  8. python backup.py <local folder> <drive folder>
  9. A browser window will open asking for your client secret that you saved from before. Enter it.
  10. You're done!

Syntax

python backup.py -l <local folder> -d <drive folder> [--delete-only]

  • <local folder> The folder path that you would like backed up. It can be absolute or relative to the google-drive-backup folder.
  • <drive folder> The folder path on your Google Drive that you want to store your backed up folder. If it doesn't exist, it will be created. It uses forward slashes as the folder separator.
  • [no-increase] If the phrase "no-increase" is used, there will be no new folders or files created, and only files that are a smaller size than the drive version will be uploaded. This is useful for when you need to run delete before adding more files becuase of the Google Drive size limit.

google-drive-backup's People

Contributors

fiddleplum avatar

Watchers

 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.