Backing Up Data to Google Drive with Rclone
A. Preparation
-
Install Rclone
Since I am using Manjaro, which is Arch-based, to install Rclone:
sudo pacman -S rclone -
Create a Folder for Mounting the Drive
Here, I create a folder in my home directory named
mydrive:mkdir ~/mydriveThus, the directory will be
~/mydrive.
B. Configuring Rclone
- Open Terminal and Type:
rclone config - Type ‘n’ for New Remote.
n/s/q> n - Type the Remote Name. Here, I will use the name
ITK_drive.name> ITK_driveA list of drives supported by Rclone will appear.
- Since I will use Google Drive, type 15 or select ‘drive’.
Storage> 15 - Leave the following command lines blank or press Enter:
client_id> client_secret> - Choose 1 for Full access to all files, excluding Application Data Folder.
scope> 1 - Leave the following command lines blank or press Enter:
root_folder_id> - Leave the following command lines blank or press Enter:
service_account_file> - Choose ‘n’ or press Enter for Edit advanced config?
y/n> n - Choose ‘y’ or press Enter to Use auto config?
y/n> y - An authentication window will appear in your browser. Choose Allow, and you will see:
'Success! All done. Please go back to rclone. - Return to the terminal. Choose ‘n’ or press Enter for Configure this as a Shared Drive (Team Drive)?
y/n> n - The overall configuration will appear. Choose ‘y’.
y/e/d> y - Then exit the Rclone configuration by choosing ‘q’.
e/n/d/r/c/s/q> q
Now, the Rclone configuration is complete. Next is how to use it.
C. Using Rclone
- If you forget the name of the remote you created earlier, run:
rclone listremotesA list of the remotes you have created will appear:
> rclone listremotes ITK_drive: - Mount the remote to the folder created earlier.
rclone mount ITK_drive: ~/mydrive -
Open a new terminal/tab to perform the data backup.
- The backup command I will use is rsync:
rsync -Pruv /folder/yang/akan/dibackup ~/mydrive/folder/tujuan
Enjoy Reading This Article?
Here are some more articles you might like to read next: