rClone Cheat Sheet
rClone Cheat Sheet
rclone is a versatile command-line program to manage files on cloud storage. This cheat sheet covers essential commands for common tasks.
Configuration
- Configure rclone:
1
rclone config
- List configured remotes:
1
rclone listremotes
Basic File Operations
- Copy files:
1
rclone copy source:path/to/source destination:path/to/destination
- Copies files from
source
todestination
.
- Copies files from
- Move files:
1
rclone move source:path/to/source destination:path/to/destination
- Moves files from
source
todestination
(deletes source files after successful transfer).
- Moves files from
- Sync directories:
1
rclone sync source:path/to/source destination:path/to/destination
- Makes
destination
identical tosource
, deleting extra files indestination
.
- Makes
- Delete files:
1
rclone delete remote:path/to/file
- Deletes a single file.
- Purge directory:
1
rclone purge remote:path/to/directory
- Deletes a directory and all its contents. Use with caution!
- Check for differences:
1
rclone check source:path/to/source destination:path/to/destination
- Checks if source and destination are identical.
Listing and Information
- List files and directories:
1
rclone ls remote:path/to/directory
- List files with size and modification time:
1
rclone lsl remote:path/to/directory
- List directories only:
1
rclone lsd remote:path/to/directory
- Display directory tree:
1
rclone tree remote:path/to/directory
- Show remote usage statistics:
1
rclone about remote:
Filtering and Options
- Include files:
1
rclone copy source: destination: --include "*.txt"
- Exclude files:
1
rclone copy source: destination: --exclude "*.tmp"
- Verbose output:
1
rclone copy source: destination: -v
- Progress display:
1
rclone copy source: destination: --progress
- Dry run (no actual transfer):
1
rclone copy source: destination: --dry-run
- Transfers number:
1
rclone copy source: destination: --transfers 8
- Increase number of transfers for faster copies.
- Check sums:
1
rclone copy source: destination: --checksum
- Check sums after transfer.
- Max age:
1
rclone copy source: destination: --max-age 7d
- Only copy files newer than 7 days.
- Min age:
1
rclone copy source: destination: --min-age 30d
- Only copy files older than 30 days.
Encryption (rclone crypt)
- Create encrypted remote:
1
rclone config create encrypted crypt remote=remote:
- Follow prompts to set encryption passwords.
- Copy encrypted files:
1
rclone copy source: destination_encrypted:
- Decrypt files:
1
rclone copy destination_encrypted: destination_decrypted:
- Check encryption setup:
1
rclone cryptcheck source: destination_encrypted:
Remote-to-Remote Transfers
- Copy between remotes:
1
rclone copy remote1:path/to/source remote2:path/to/destination
- Sync between remotes:
1
rclone sync remote1:path/to/source remote2:path/to/destination
Mounting Remotes
- Mount remote as a local directory:
1
rclone mount remote:path/to/directory /path/to/local/mount
- Unmount remote:
1
fusermount -u /path/to/local/mount
Useful Tips
Example: Backing up a local directory to Google Drive (encrypted)
1
rclone sync /path/to/local/directory gdrive_encrypted:backup/ --progress
Example: Restoring from Google Drive (encrypted)
1
rclone sync gdrive_encrypted:backup/ /path/to/restore/ --progress
Remember to replace placeholders like source:
, destination:
, remote:
, and paths with your actual values. This cheat sheet provides a solid foundation for using rclone. Experiment with different commands and options to find the best workflow for your needs.
This post is licensed under CC BY 4.0 by the author.