๐Ÿง Rclone Command Guide (Linux Cloud Sync & Backup)

๐Ÿง Rclone Command Guide (Linux Cloud Sync & Backup)
Operating System(s)

rclone is a powerful command-line tool that lets you sync files between your system and cloud services like Google Drive, Dropbox, S3, and more.

๐Ÿ“ฆ Install Rclone

Ubuntu / Debian

 

sudo apt update
sudo apt install rclone

 

Fedora

 

sudo dnf install rclone

 

Arch Linux

 

sudo pacman -S rclone

 

โš™๏ธ Initial Setup

Run the config wizard:

 

rclone config

 

  • Choose n (new remote)
  • Name it (e.g., mydrive)
  • Select storage (Google Drive, S3, etc.)
  • Follow authentication steps

๐Ÿ“‚ Basic Commands

List remotes

 

rclone listremotes

 

List files in remote

 

rclone ls mydrive:

 

Copy files (one-way)

 

rclone copy /home/user/files mydrive:backup

 

Sync (mirror source โ†’ destination)

 

rclone sync /home/user/files mydrive:backup

 

โš ๏ธ sync deletes extra files in destination!

๐Ÿ”„ Common Examples

Download from cloud

 

rclone copy mydrive:backup /home/user/files

 

Sync two folders

 

rclone sync /local/folder remote:folder

 

Show progress

 

rclone copy /data remote:backup -P

 

๐Ÿ” Mount Cloud Storage

 

rclone mount mydrive: /mnt/mydrive --daemon

 

โœ” Access cloud like a local drive

โšก Useful Flags

  • -P โ†’ Show progress
  • --dry-run โ†’ Preview changes
  • --delete-excluded โ†’ Clean destination
  • --bwlimit 1M โ†’ Limit bandwidth

โฑ๏ธ Automate with Cron

Schedule backups:

 

crontab -e

 

Example (daily backup at 2 AM):

 

0 2 * * * rclone sync /home/user/data mydrive:backup

 

โš ๏ธ Common Issues

Authentication fails

  • Re-run:

 

rclone config

 

Slow transfers

  • Use:

 

--transfers=8 --checkers=8

 

Permission errors

  • Check folder ownership and access

๐Ÿง  When to Use Rclone

  • Cloud backups
  • Server-to-cloud sync
  • Migrating data between providers
  • Automated offsite storage

๐Ÿ’ก Pro Tip

Start with a dry run before syncing:

 

rclone sync /data remote:backup --dry-run

 

โœ” Prevents accidental data loss

Force Cache (Faster Mirror)

Linux Commands

Files

tar ยท pv ยท cat ยท tac ยท chmod ยท grep ยท  diff ยท sed ยท ar ยท man ยท pushd ยท popd ยท fsck ยท testdisk ยท seq ยท fd ยท pandoc ยท cd ยท $PATH ยท awk ยท join ยท jq ยท fold ยท uniq ยท journalctl ยท tail ยท stat ยท ls ยท fstab ยท echo ยท less ยท chgrp ยท chown ยท rev ยท look ยท strings ยท type ยท rename ยท zip ยท unzip ยท mount ยท umount ยท install ยท fdisk ยท mkfs ยท rm ยท rmdir ยท rsync ยท df ยท gpg ยท vi ยท nano ยท mkdir ยท du ยท ln ยท patch ยท convert ยท rclone ยท shred ยท srm ยท scp ยท gzip ยท chattr ยท cut ยท find ยท umask ยท wc ยท tr ยท hash  ยท compgen

Processes

alias ยท screen ยท top ยท nice ยท renice ยท progress ยท strace ยท systemd ยท tmux ยท chsh ยท history ยท at ยท batch ยท free ยท which ยท dmesg ยท chfn ยท usermod ยท ps ยท chroot ยท xargs ยท tty ยท pinky ยท lsof ยท vmstat ยท timeout ยท wall ยท yes ยท kill ยท sleep ยท sudo ยท su ยท time ยท groupadd ยท usermod ยท groups ยท lshw ยท shutdown ยท reboot ยท halt ยท poweroff ยท passwd ยท lscpu ยท crontab ยท date ยท bg ยท fg ยท pidof ยท nohup ยท pmap

Networking

netstat ยท ping ยท traceroute ยท ip ยท ss ยท whois ยท fail2ban ยท bmon ยท dig ยท finger ยท nmap ยท ftp ยท curl ยท wget ยท who ยท whoami ยทยท iptables ยท ssh-keygen ยท ufw ยท arping ยท firewalld