How to Verify Backup Files With rclone check
In this article
You verify backup files with rclone by running rclone check between your source and your backup destination, which compares every file and reports any that are missing, differ in size, or fail a hash comparison. The shortest working command is rclone check source:path dest:path, and adding --checksum forces a cryptographic hash comparison rather than relying on size and modification time alone. rclone is a free command-line tool that talks to dozens of storage backends, so the same check works whether your backup lives on a local drive, an external USB disk, a NAS over SFTP, or cloud storage such as S3, Backblaze B2, Google Drive or OneDrive.
This guide assumes rclone is already installed and that at least one remote is configured. If you have not set up a remote yet, run rclone config first and follow the prompts for your storage provider. Menu names and prompts can differ slightly between rclone versions and between providers, but the check command itself is stable.
What You'll Need
- rclone installed on the machine you will run the check from. Download it from the official rclone website or install it through your package manager (for example
brew install rcloneon macOS,apt install rcloneon Debian or Ubuntu, or the official Windows zip). - At least one configured remote, or a local path if both source and backup are on disks attached to the same machine.
- Read access to both the source and the backup destination, plus permission to list files in both.
- Enough time and bandwidth to read both sides. A checksum check reads every file in full, so a 1 TB backup means roughly 1 TB of reads from each side.
- A terminal or command prompt. On Windows, PowerShell or Command Prompt both work; if a path contains spaces, wrap it in quotes.
Step-by-Step
- Confirm rclone sees your remotes. Run
rclone listremotes. You should see each configured remote name ending in a colon, such asgdrive:orbackup-s3:. If a remote is missing, runrclone configand add it before continuing. - Check the paths exist and look right. Run
rclone lsd remote:pathto list directories, orrclone ls remote:path | headto peek at files. Doing this on both sides catches typos in the path before you start a long comparison. - Run a size-only check first. Start with
rclone check source:path dest:path --size-only. This compares file names and sizes without reading file contents, so it finishes quickly and is a good smoke test that the paths and permissions are correct. - Run the full checksum check. Now run
rclone check source:path dest:path --checksum. rclone compares each file by hash where the backend supports it. Files that match are counted silently; mismatches and missing files are listed as they are found. - Save the output to a file. Add
--log-file check.log --log-level INFOso you have a record. On a long run you can watch progress in another window, or add-vfor more detail in the console. - Read the summary. At the end rclone prints a count of files checked, files that matched, files that differed, and files that were missing on one side or the other. A clean backup shows zero differences and zero errors.
- Investigate anything flagged. For each reported file, run
rclone lsjson remote:path/filenameon both sides to compare size, modification time and hash. Then decide whether to re-copy the file, delete the stray copy, or re-run the backup job. - Re-run after fixing. After re-uploading or removing problem files, repeat the checksum check until the summary is clean. Only then treat the backup as verified.
Common Mistakes
Forgetting the trailing colon on a remote. gdrive is treated as a local folder named gdrive; gdrive: is the remote. This is the single most common cause of a check that reports everything as missing.
Comparing the wrong direction or the wrong subfolder. rclone check is symmetric in what it reports, but pointing at dest:backup/2024 when the source is source:photos will produce a wall of missing files that mean nothing.
Assuming a size-only check proves integrity. It does not. A file can be truncated and re-uploaded to the same size, or corrupted in transit while keeping its length. Use --checksum for a real verification.
Expecting hashes on backends that do not provide them. Some storage systems do not expose a usable hash. In that case rclone falls back to size comparison and tells you so; the check is weaker and you should treat it as such.
Ignoring the exit code. rclone check exits non-zero when differences are found, which is exactly what you want in a scheduled script, but it also means a cron job will email you on every mismatch. Handle the exit code deliberately.
Running a checksum check over a slow link without planning. It reads every byte on both sides. On a metered connection or a slow NAS this can take hours and cost money in egress fees.
Tips
Use --one-way when you only care that every source file exists and matches on the destination, and do not mind extra files sitting in the backup. Without it, rclone reports files present on only one side in either direction.
Add --max-age 30d or a similar filter to check only recently changed files on a routine basis, and run a full check less often. rclone's filtering flags work the same way across commands.
Combine --checksum with --differ, --missing-on-dst and --error to write lists of problem files to separate text files, which makes follow-up scripting straightforward.
Run the check from the machine closest to the data. Checking a cloud remote from a laptop on hotel Wi-Fi will be painfully slow compared with running it on the server that holds the backup.
Schedule checks rather than doing them by hand. A weekly size-only check plus a monthly checksum check catches most silent failures without hammering your bandwidth.
Troubleshooting
"Directory not found" or an empty listing. The path is wrong, the remote is not configured, or your credentials have expired. Re-run rclone lsd on the exact path and re-authenticate the remote with rclone config reconnect remote: if the provider supports token refresh.
Permission denied errors. The account or API key lacks read or list rights on one side. Check the bucket policy, share permissions or service account roles, then retry.
The check is extremely slow. Reduce scope with a subfolder or a filter, or switch to --size-only for routine runs. Also check whether your provider throttles many small requests; adding --transfers or --checkers tuning can help, but do not raise them blindly.
Hashes are reported as unsupported. The backend does not supply a comparable hash, so rclone compares size instead. If integrity matters, consider a backend that supports hashes, or verify with a separate checksum manifest you generate yourself.
Everything shows as different. Usually a path mismatch, a case-sensitivity issue, or a backend that rewrites file names. Compare a single file with rclone lsjson on both sides to see what is actually being compared.
The command exits non-zero but you see no problems. Check the log file; errors such as transient network failures also produce a non-zero exit. Re-run to see whether the error is persistent.
Frequently Asked Questions
Does rclone check modify or delete any files?
No. rclone check is read-only. It lists differences and exits; it never copies, moves or deletes anything. Use rclone sync or rclone copy to act on the results.
What is the difference between rclone check and rclone cryptcheck?
cryptcheck is for encrypted remotes created with rclone's crypt backend. It decrypts on the fly and compares hashes of the plaintext, which is what you want when the destination is an encrypted remote.
Can I check a backup without reading every file?
Yes, with --size-only, which compares names and sizes only. It is fast but weaker, since it cannot detect same-size corruption. Use it as a quick sanity check and reserve --checksum for real verification.
Will a checksum check work with cloud storage?
It depends on the provider. Many major object stores and consumer cloud drives expose a hash rclone can use. Where they do not, rclone falls back to size comparison and reports that hashes were not available.
How often should I verify a backup?
A common pattern is a quick size-only check after every backup run and a full checksum check at a longer interval, such as monthly. The right frequency depends on how often your data changes and how much bandwidth you can spare.
Can I automate rclone check?
Yes. Run it from cron, Task Scheduler or a systemd timer and use the exit code to trigger an alert. Redirect output to a log file so you can review what changed when an alert fires.