How to Install and Sync Google Drive Client RCLONE on Ubuntu 21.04 or Debian 11 Bullseye

How to Install and Sync Google Drive Client RCLONE on Ubuntu 21.04 or Debian 11 Bullseye

The main reason I use rclone is, it is lightweight, free, and of course open source

first install RCLONE via terminal

apt install rclone
ands then run command (non root)
rclone config 
NOTICE: Config file “/root/.config/rclone/rclone.conf” not found – using defaults
No remotes found – make a new one
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n
type n and fill in the name (for example here gdrive)
name> gdrive
Type of storage to configure.
for Google Drive Client type drive
Storage> drive
client_id> press ENTER
client_secret> press ENTER
scope> drive
root_folder_id> press ENTER
service_account_file> press ENTER
Edit advanced config? (y/n)
y) Yes
n) No (default)
y/n> press ENTER
Remote config
Use auto config?
* Say Y if not sure
* Say N if you are working on a remote or headless machine
y) Yes (default)
n) No
y/n> press ENTER
then you are directed to your browser to login
Configure this as a team drive?
y) Yes
n) No (default)
y/n>  press ENTER
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d> press ENTER
Final Step Sync Them
sync all contents of gdrive to home local (Download)
WARNING This command will delete all files in the folder /home/yourdirectory
so make sure before sync there are no important files on /home/yourdirectory
rclone sync -P gdrive:/ /home/yourdirectory
sync all contents of home local to gdrive (Upload)
WARNING This command will delete all files in your google drive cloud
so make sure before sync there are no important files on google drive cloud
rclone sync -P  /home/yourdirectory gdrive:/

Leave a Comment

Your email address will not be published. Required fields are marked *