For transferring data into S3 object storage, rclone is the gold standard. But one single word in your CLI command makes the difference between a safe incremental backup and a catastrophic data loss event.
rclone copy is additive: it copies new and updated files from source to destination, never deleting anything on the destination. rclone sync makes the destination an exact mirror of the source, which means it will delete any destination file that no longer exists on the source.
To demonstrate the exact operational differences, we created a test fixture of 1,000 files in a local directory, uploaded it to an S3 bucket, and simulated real-world maintenance actions: deleting 100 local files, renaming 50 files, and modifying 50 files.
The 1,000-file test run: what each command changed
| Simulated Action on Source | Count | Behavior with rclone copy | Behavior with rclone sync |
|---|---|---|---|
| New files created locally | 50 files | Uploaded to bucket | Uploaded to bucket |
| Existing files modified locally | 50 files | Overwritten in bucket | Overwritten in bucket |
| Files deleted locally | 100 files | Preserved in bucket (untouched) | Deleted from bucket (wiped) |
| Files renamed locally | 50 files | New name uploaded, old name preserved | New name uploaded, old name deleted |
| Accidental empty source path | 0 files | Nothing touched (0 files deleted) | Entire bucket wiped clean! |
| Final destination object count | — | 1,100 objects (0 deleted) | 950 objects (150 deleted) |
| Total S3 DELETE requests sent | — | 0 DELETEs | 150 DELETEs |
The accidental empty path disaster
The most dangerous pitfall with <code>rclone sync</code> occurs when a shell script points to a source directory that failed to mount or was accidentally misspelled:
Because <code>/mnt/data</code> contains 0 files, <code>rclone sync</code> will systematically issue S3 <code>DeleteObject</code> calls for every single file inside <code>s3:my-bucket/backups/</code>. Within seconds, your backup bucket is wiped clean. If you had run <code>rclone copy</code> instead, rclone would have seen 0 files to copy and exited without deleting a single byte.
Safety flags you should always use with sync
If you genuinely want an exact mirror and need <code>rclone sync</code>, protect yourself with these three defensive flags:
- 1. Always test with
--dry-runfirst: Prints every action rclone plans to take without executing any network modifications. Look specifically for lines starting withNOTICE: ... Deleted. - 2. Protect deletes with
--backup-dir: Instead of permanently deleting files from the destination bucket, rclone moves deleted and overwritten files into an archive prefix (e.g.s3:my-bucket/trash/2026-11-10/). - 3. Set a circuit breaker with
--max-delete: If a sudden bug or mount failure attempts to delete more than N files (e.g.--max-delete 20), rclone aborts immediately with an exit code rather than wiping the bucket.
Production-ready command templates
For more rclone best practices, see our tested runbook on backing up a website to object storage with rclone, or learn how to verify bucket copies with size, ETag, MD5 and full reads.