Tips & Tricks

Use Dry Run

How to safely test rclone commands before running them for real

Always Use Dry Run First

Think of --dry-run as rclone’s preview mode. It's non-destructive and shows you what would happen without actually doing it.

Reach for --dry-run whenever you’re not 100% sure of the outcome. That means the very first time you try a new command, right after you tweak an include/exclude rule, and definitely before any sync or delete (since both can remove files).

It’s also worth a dry-run when you’re experimenting with complex filter patterns or letting a script loose on your files.

Imagine running this command:

rclone sync /home/photos remote:backup

Now flip the paths by mistake:

rclone sync remote:backup /home/photos  # This deletes your local photos!

With dry run, you'd see the disaster before it happens:

rclone sync remote:backup /home/photos --dry-run
# Shows: Would delete 10,000 files from /home/photos
# Phew! Crisis averted!

Usage

Simple

# Add --dry-run to ANY rclone command
rclone copy /source remote:dest --dry-run
rclone sync /source remote:dest --dry-run
rclone move /source remote:dest --dry-run
rclone delete remote:path --dry-run

Detailed

# Combine with -v (verbose) for more info
rclone sync /source remote:dest --dry-run -v

# Even more detail with -vv
rclone sync /source remote:dest --dry-run -vv

Logging

# Save dry run output for review
rclone sync /source remote:dest \
  --dry-run \
  -vv \
  --log-file dry-run-$(date +%Y%m%d).log

# Review the log
grep "ERROR" dry-run-*.log
grep "Would delete" dry-run-*.log

Output

--dry-run's output varies depending on the command. Below are some examples.

Copy

rclone copy /local remote: --dry-run -v

# Output shows:
# - Files that would be copied
# - Total size to transfer
# - Number of files
# - Any errors that would occur

Sync

rclone sync /local remote: --dry-run -v

# Shows:
# - Files to be copied
# - FILES TO BE DELETED (sync deletes files that are not in the source)
# - Files to be updated
# - Summary statistics

Delete

rclone delete remote:path --include "*.tmp" --dry-run

# Shows exactly what files would be deleted
# Always check this list carefully!

Quick reference

# The magic flag
--dry-run

# With details
--dry-run -v

# With lots of details
--dry-run -vv

# Save to file
--dry-run -v --log-file test.log

# Count operations
--dry-run | grep -c "^Transferred"

Remember: Most storage providers don't have an undo button, but --dry-run is the next best thing!

How is this guide?