Certainly! Here are some Rclone cheatsheets to help you with common commands and configurations.
Rclone Basics
General Syntax
rclone [command] source:path dest:path [options]
Common Commands
- Copy files from source to destination:
rclone copy source:path dest:path
- Sync files from source to destination:
rclone sync source:path dest:path
- Move files from source to destination:
rclone move source:path dest:path
- Check for differences between source and destination:
rclone check source:path dest:path
- List files in a remote path:
rclone ls remote:path
Configuration
- Add a new remote:
rclone config
Remote Storage Setup
Google Drive
- Run the configuration command:
rclone config
- Choose
n
for a new remote. - Name the remote (e.g.,
mydrive
). - Select
drive
for Google Drive. - Follow the prompts to authorize Rclone with your Google account.
Amazon S3
- Run the configuration command:
rclone config
- Choose
n
for a new remote. - Name the remote (e.g.,
mys3
). - Select
s3
for Amazon S3. - Enter your AWS credentials when prompted.
Common Options
- Verbose output:
rclone copy source:path dest:path -v
- Progress bar:
rclone copy source:path dest:path --progress
- Delete files on destination that aren’t on source (used with
sync
):
rclone sync source:path dest:path --delete-during
- Dry run (test the command without making changes):
rclone copy source:path dest:path --dry-run
Filters and Exclusions
- Exclude files matching a pattern:
rclone copy source:path dest:path --exclude "*.jpg"
- Include only files matching a pattern:
rclone copy source:path dest:path --include "*.txt"
Scheduling with Cron
To schedule a sync task using cron
, edit your crontab:
crontab -e
Add a cron job, e.g., to sync every day at 2 AM:
0 2 * * * rclone sync source:path dest:path >> /path/to/logfile.log 2>&1
Example Commands
- Copy all files from local to Google Drive:
rclone copy /local/path mydrive:remote/path
- Sync files from Google Drive to local:
rclone sync mydrive:remote/path /local/path
- List all files on Amazon S3 bucket:
rclone ls mys3:bucketname
- Move files from one Google Drive account to another:
rclone move mydrive1:remote/path mydrive2:remote/path
Troubleshooting
- List detailed info on commands:
rclone help
- Check configuration:
rclone config show
- Debug mode (for more verbose logging):
rclone copy source:path dest:path -vv
Advanced Configuration
Encrypt Remote Storage
- Configure a remote:
rclone config
- Choose
n
for a new remote. - Name it (e.g.,
secure
). - Choose
crypt
and follow the prompts to set up encryption on an existing remote.
Bandwidth Limiting
- Limit bandwidth usage:
rclone copy source:path dest:path --bwlimit 10M
This should cover most of the common tasks you’ll need to perform with Rclone. For more detailed information, refer to the official Rclone documentation.