CentOS 8.x rclone for syncing documents to google drive
From Notes_Wiki
Home > CentOS > CentOS 8.x > CentOS 8.x Backup tools > CentOS 8.x rclone > CentOS 8.x rclone for syncing documents to google drive
rclone can be used to sync / copy / backup documents to a number of remote locations such as S3, Ceph, Dropbox, Owncloud, etc. To sync documents to google drive for backup purposes use:
- Go to https://rclone.org/downloads/ and download AMD-64 bit rpm file
- Install with "sudo yum localinstall rclone-v1.51.0-linux-amd64.rpm"
- Run "rclone config" as normal non-root user (eg saurabh)
- n -> new config
- saurabh_gdrive -> name
- 13 -> / Google Drive \ "drive"
- client_id and client_secret obtained using https://rclone.org/drive/#making-your-own-client-id
- Here dont type anything after arrow (->). Arrow(->) and later parts are for reference / explanation only
- At https://rclone.org/drive/#making-your-own-client-id use following to generate client ID and client secret
- Generated with @gmail.com ID
- Project - Saurabh-rclone
- Screen product name - Saurabh-rclone
- Client Name - Saurabh-rclone
- Further inputs are:
- 1 -> scope as full access
- -> root_folder_id
- -> service_account_file
- n -> edit advanced config
- y -> use auto config
- --- Perform necessary steps in browser including giving full access to saurabh_gbb_rishivalley-clone app to your google drive
- --- It should end with success message
- n -> team drive
- y -> yes this is ok
- q -> quit config
- Here dont type anything after arrow (->). Arrow(->) and later parts are for reference / explanation only
- rclone lsd saurabh_gdrive:
- rclone ls saurabh_gdrive:
- Do only if there are very less files on your google drive
- Sync documents (Very similar to rsync) from local folder to google drive using:
- rclone sync /mnt/data1/personal/ saurabh_gdrive:mnt/data1/personal/
- Go to @gmail.com Google Drive account via nautilus (Gnome online accounts) and validate that files are getting uploaded.
- Also do "sudo rclone config" and perform exactly same steps. This way 'saurabh_gdrive' remote can be used as root user also.
- Sync documents to google drive as root user
- sudo rclone sync /mnt/data1/plain_folders/ saurabh_gdrive:mnt/data1/plain_folders/
Refer:
- https://rclone.org/drive/
- https://rclone.org/commands/rclone_sync/
- https://rclone.org/docs/
- https://www.ubuntupit.com/top-12-best-google-drive-linux-client-software/
Too see how much space is used for which Google application in your Google account refer Figuring out where space is utilized in google account
Home > CentOS > CentOS 8.x > CentOS 8.x Backup tools > CentOS 8.x rclone > CentOS 8.x rclone for syncing documents to google drive