Verify an rclone automation exit status
Capture rclone’s immediate process status, preserve its final errors and compare destination bytes before automation records a transfer as successful.
Last reviewed
Capture rclone’s status immediately after the command, before another shell command overwrites it. Exit 0 means that run reports no remaining errors; it can also mean nothing needed transferring and is not content proof.

Steps
- Run the scheduled or manual copy with a durable log and statistics, keeping source and destination explicit.
- In POSIX shells assign
status=$?on the next line; in PowerShell assign$status = $LASTEXITCODEbefore listing or checking anything else. - Preserve the final transfer summary and every preceding error. A multi-file failure can leave earlier files successfully stored.
- If
statusis nonzero, mark the job failed and inspect the destination before retrying. Do not erase the log or replay the whole batch automatically. - When the copy status is zero, run a separate read-only comparison such as
rclone check SOURCE DESTINATION --download; capture that command’s status independently. - Report success only when both statuses are zero and representative destination bytes match. Store the run time, paths, rclone version and counts with the receipt.
For Dosya WebDAV, a successful same-name PUT creates a new file version. A later error does not roll that version back. Likewise, a copy leaves destination-only files in place; their presence is not evidence that this run processed the source.

Expected result
Automation records success only after the transfer process and independent comparison both exit cleanly, with logs that identify the exact run. Any nonzero status retains its evidence and blocks downstream success actions.
A shell pipeline can hide rclone’s code behind another process unless its status is captured correctly. Test the wrapper with an intentional missing source before trusting alerts, then remove that test path.
Related guides
Was this helpful?
Loading helpfulness results…
Voting saves a necessary ballot cookie for up to 180 days so you can change your answer.
Questions and replies
Ask about the steps in this guide. Questions are reviewed before publication.
Keep account details, credentials and private files out of public questions. Use private support for those.
Loading questions…
Sign in to your Dosya account to ask a question.