/backup-google-drive

Simple backup data and database to cloud (google drive)

Primary LanguageJavaScript

Backup to Google Drive

Simple backup data and database to Cloud (Google Drive) service account and share to personal Google drive account

Planning Project

  • Backup MySQL Database ✅
  • Backup compressed data (like as images, video etc) (coming soon)

Installation

  • Make sure your machine has installed NodeJS
  • Clone this project and run
    npm install // or
    yarn install
    

Configuration

  • Open file .env on the root project for setup configuration and fill configuration MySQL credentials and other filled what you want
  • Create google service account on this tutorial and enable Google Drive API on Google Console
  • Download Service Account JSON Client file and put to gdrive/account/ rename with service-account.json
  • Open index.js set interval backup what you want, for this example run backup every 6 hours, see interval documentation on this
    interval: '6 hours'
    

Run

node index.js

Optional

If you run on the server and want to autorun at startup, you can follow this