Skip to main content

Rclone Exit Codes in Automation

Exit codes are the contract between rclone and your orchestrator. Clear non-zero handling is critical for trustworthy automation.

Pattern​

rclone sync /srv/data remote:backup/data
status=$?
test "$status" -eq 0 || exit "$status"

Examples with Output​

1. Example 1​

Input command:

rclone sync /srv/data remote:backup/data; echo $?

Expected output:

NOTICE: profile applied (example 1)
Would transfer 50 files

2. Example 2​

Input command:

rclone sync /srv/data remote:backup/data; echo $?

Expected output:

NOTICE: profile applied (example 2)
Would transfer 55 files

3. Example 3​

Input command:

rclone sync /srv/data remote:backup/data; echo $?

Expected output:

NOTICE: profile applied (example 3)
Would transfer 60 files

4. Example 4​

Input command:

rclone sync /srv/data remote:backup/data; echo $?

Expected output:

NOTICE: profile applied (example 4)
Would transfer 65 files

5. Example 5​

Input command:

rclone sync /srv/data remote:backup/data; echo $?

Expected output:

NOTICE: profile applied (example 5)
Would transfer 70 files

6. Example 6​

Input command:

rclone sync /srv/data remote:backup/data; echo $?

Expected output:

NOTICE: profile applied (example 6)
Would transfer 75 files

7. Example 7​

Input command:

rclone sync /srv/data remote:backup/data; echo $?

Expected output:

NOTICE: profile applied (example 7)
Would transfer 80 files

8. Example 8​

Input command:

rclone sync /srv/data remote:backup/data; echo $?

Expected output:

NOTICE: profile applied (example 8)
Would transfer 85 files

9. Example 9​

Input command:

rclone sync /srv/data remote:backup/data; echo $?

Expected output:

NOTICE: profile applied (example 9)
Would transfer 90 files

10. Example 10​

Input command:

rclone sync /srv/data remote:backup/data; echo $?

Expected output:

NOTICE: profile applied (example 10)
Would transfer 95 files

11. Example 11​

Input command:

rclone sync /srv/data remote:backup/data; echo $?

Expected output:

NOTICE: profile applied (example 11)
Would transfer 100 files

12. Example 12​

Input command:

rclone sync /srv/data remote:backup/data; echo $?

Expected output:

NOTICE: profile applied (example 12)
Would transfer 105 files

13. Example 13​

Input command:

rclone sync /srv/data remote:backup/data; echo $?

Expected output:

NOTICE: profile applied (example 13)
Would transfer 110 files

14. Example 14​

Input command:

rclone sync /srv/data remote:backup/data; echo $?

Expected output:

NOTICE: profile applied (example 14)
Would transfer 115 files

15. Example 15​

Input command:

rclone sync /srv/data remote:backup/data; echo $?

Expected output:

NOTICE: profile applied (example 15)
Would transfer 120 files