Auto backup Web Server to Google Drive


Rclone is a command line program to sync files and directories to and from:

  • Amazon Drive
  • Amazon S3
  • DigitalOcean Spaces
  • Dropbox
  • Google Cloud Storage
  • Google Drive
  • Mega
  • Microsoft Azure Blob Storage
  • Microsoft OneDrive
  • And more here 

Install Rclone

Check rclone:

Create connection from server to Google Cloud

At the command line still, type:

No remotes found – make a new one type n -> Enter

name> connection name: upload_google_drive -> Enter

Choose a number from below, or type in your own value
<Danh sách Cloud Server>
Storage>  type 11 -> Enter

client_id =  -> Enter
client_secret =  -> Enter

Scope that rclone should use when requesting access from drive. type 1 – Full access all files… -> Enter

root_folder_id = -> Enter
service_account_file = -> Enter

Use auto config? type n -> Enter

If your browser doesn’t open automatically go to the following link:

Open above link by browser, then login to google drive -> Choose Allow. Copy Code.

Enter verification code> Paste Code -> Enter

Configure this as a team drive? type n -> Enter

type y to accept and q to exit.

Check connection:

Script auto backup and upload to google drive


Script Contents:

Make backup crond


Let’s enjoy!