Rsync exit codes

List of standard rsync exit codes

This is a list of rsync exit codes (rsync status codes / rsync error codes / rsync exit values).  

rsync is a utility that allows you to synchronize files and directories between two locations. It can be used to transfer files between local systems or to transfer files between a local system and a remote system. Here is a list of standard rsync exit codes and their meanings:

  • 0: Success. The rsync command completed successfully without any errors.
  • 1: Syntax or usage error. There was a problem with the syntax of the rsync command or with the options specified.
  • 2: Protocol incompatibility. There was a problem with the protocol version or negotiation between the rsync client and server.
  • 3: Errors selecting input/output files, dirs. There was a problem with the source or destination file or directory specified in the rsync command.
  • 4: Requested action not supported: An attempt was made to use an unsupported action or option.
  • 5: Error starting client-server protocol. There was an error starting the client-server protocol.
  • 6: Daemon unable to append to log-file. The rsync daemon was unable to write to its log file.
  • 10: Error in socket I/O. There was an error with the socket input/output.
  • 11: Error in file I/O. There was an error reading or writing to a file.
  • 12: Error in rsync protocol data stream. There was an error in the rsync protocol data stream.
  • 13: Errors with program diagnostics. There was an error generating program diagnostics.
  • 14: Error in IPC code. There was an error in the inter-process communication (IPC) code.
  • 20: Received SIGUSR1 or SIGINT. The rsync process was interrupted by a signal.
  • 21: Some error returned by waitpid(). An error occurred while waiting for a child process to complete.
  • 22: Error allocating core memory buffers. There was an error allocating memory buffers.
  • 23: Partial transfer due to error. The rsync command completed with an error, but some files may have been transferred successfully.
  • 24: Partial transfer due to vanished source files. Some source files disappeared before they could be transferred.

I hope this information is helpful! Let me know if you have any other questions.

Exit code 127

If you're seeing exit code 127 after running rsync (i.e. in a script), it can mean you don't even have rsync binary installed on your system.

Exit code 255

If you're seeing exit code 255 after running rsync, it can mean rsync just passed exit code from a command it used to connect - typically SSH.

This would be essentially the same failure as SSH connecting:

Exit code on Linux / UNIX

To check rsync exit code on Linux / UNIX (or in fact, any other command), run this one just after rsync command:

Exit code on Windows

  • to check rsync exit code on Windows, run this one just after rsync command:
  • NB: The IF ERRORLEVEL n test succeeds if the error level is n or more. So - to capture just exit code 1:
  • in PowerShell, you can also use:

Error code 11 on Windows

Error code 11 can be confusing when rsync is started as a service on a Windows platform. It can mean that the pid file for rsync already exists in the C:\Program Files\cwRsyncServer folder (or ony other directory where rsync is installed) - although no other info will be given in Windows Event Log. It will become more apparent only if rsync is started as a service from the command line.

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.