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:

  1. Go to https://rclone.org/downloads/ and download AMD-64 bit rpm file
  2. Install with "sudo yum localinstall rclone-v1.51.0-linux-amd64.rpm"
  3. 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
  4. 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
  5. 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
  6. rclone lsd saurabh_gdrive:
  7. rclone ls saurabh_gdrive:
    Do only if there are very less files on your google drive
  8. Sync documents (Very similar to rsync) from local folder to google drive using:
    rclone sync /mnt/data1/personal/ saurabh_gdrive:mnt/data1/personal/
  9. Go to @gmail.com Google Drive account via nautilus (Gnome online accounts) and validate that files are getting uploaded.
  10. Also do "sudo rclone config" and perform exactly same steps. This way 'saurabh_gdrive' remote can be used as root user also.
  11. Sync documents to google drive as root user
    sudo rclone sync /mnt/data1/plain_folders/ saurabh_gdrive:mnt/data1/plain_folders/

Refer:



Home > CentOS > CentOS 8.x > CentOS 8.x Backup tools > CentOS 8.x rclone > CentOS 8.x rclone for syncing documents to google drive