This script is using google_drive gem. Please firstly install it:
gem install google_drive
Change config.yml file for your use!
To use this backup script, follow these steps:
- Go to google_drive gem's authorization README page and create a new application by following the steps in guide.
- Go to Google's Drive API Developer Console page and authorise your application.
- Edit the config.json file with the information you get from Google Developer Console.
- Run the script with ruby:
ruby backup.rbIn first time you run, it will give error, no problem, visit the URL in error message. - In that page, going to grant permission, Allow it, and copy the key and paste to your terminal.