Cheatsheet#rclone
Rclone
rclone syncs files to over 40 cloud storage providers (S3, Google Drive, Backblaze B2, Dropbox, OneDrive).
Basic Configuration & Listing
# Interactive setup for cloud storage remotes
rclone config
# List files in remote bucket/drive
rclone ls remote_gdrive:backup_folder
# List directories only
rclone lsd remote_gdrive:
# Show total size and file count
rclone size remote_gdrive:backup_folderCopy & Sync Operations
# Copy files (only adds/updates, does not delete files in remote)
rclone copy /var/backups remote_gdrive:server_backups --progress
# Mirror sync (WARNING: Deletes files in remote if deleted locally)
rclone sync /var/www remote_s3:mybucket/www --progress --interactive
# Sync with bandwidth limiting (e.g., max 5 Megabytes per second)
rclone sync /src remote:dst --bwlimit 5M
# Sync with limited parallel transfers (good for slow APIs/CPUs)
rclone sync /src remote:dst --transfers 4 --checkers 8Mounting Cloud Storage
You can mount any cloud storage bucket as a local disk folder.
# Mount cloud storage locally as a filesystem
rclone mount remote_gdrive: /mnt/gdrive \
--vfs-cache-mode full \
--daemon \
--allow-other
# Unmount the drive
fusermount -u /mnt/gdriveRclone Crypt (On-the-fly Encryption)
If you don't trust the cloud provider, you can encrypt filenames and contents before they leave your server.
- Run
rclone config - Create a new remote of type
crypt - Point the crypt remote to an existing subfolder in a real remote (e.g.,
remote_gdrive:secret_backups) - Set a strong password.
# Sync files to the encrypted remote
rclone sync /local/secret/files secure_remote:
# Files stored in Google Drive will appear as garbled names and encrypted bytes,
# but locally via rclone they decrypt transparently.