section.
Note that the --keep‐dirlinks option does not effect symlinks in the
transfer but instead affects how rsync treats a symlink to a directory
that already exists on the receiving side. See that option’s section
for a warning.
DIAGNOSTICS
Rsync occasionally produces error messages that may seem a little cryp‐
tic. The one that seems to cause the most confusion is "protocol ver‐
sion mismatch -- is your shell clean?".
This message is usually caused by your startup scripts or remote shell
facility producing unwanted garbage on the stream that rsync is using
for its transport. The way to diagnose this problem is to run your re‐
mote shell like this:
ssh remotehost /bin/true > out.dat
then look at out.dat. If everything is working correctly then out.dat
should be a zero length file. If you are getting the above error from
rsync then you will probably find that out.dat contains some text or
data. Look at the contents and try to work out what is producing it.
The most common cause is incorrectly configured shell startup scripts
(such as .cshrc or .profile) that contain output statements for non‐in‐
teractive logins.
If you are having trouble debugging filter patterns, then try specifying
the -vv option. At this level of verbosity rsync will show why each in‐
dividual file is included or excluded.
EXIT VALUES
o 0 - Success
o 1 - Syntax or usage error
o 2 - Protocol incompatibility
o 3 - Errors selecting input/output files, dirs
o
o 4 - Requested action not supported. Either:
an attempt was made to manipulate 64‐bit files on a plat‐
form that cannot support them
o an option was specified that is supported by the client
and not by the server
o 5 - Error starting client‐server protocol
o 6 - Daemon unable to append to log‐file
o 10 - Error in socket I/O
o 11 - Error in file I/O
o 12 - Error in rsync protocol data stream
o 13 - Errors with program diagnostics
o 14 - Error in IPC code
o 20 - Received SIGUSR1 or SIGINT
o 21 - Some error returned by waitpid()
o 22 - Error allocating core memory buffers
o 23 - Partial transfer due to error
o 24 - Partial transfer due to vanished source files
o 25 - The --max‐delete limit stopped deletions
o 30 - Timeout in data send/receive
o 35 - Timeout waiting for daemon connection
ENVIRONMENT VARIABLES
CVSIGNORE
The CVSIGNORE environment variable supplements any ignore pat‐
terns in .cvsignore files. See the --cvs‐exclude option for more
details.
RSYNC_ICONV
Specify a default --iconv setting using this environment vari‐
able. First supported in 3.0.0.
RSYNC_OLD_ARGS
Specify a "1" if you want the --old‐args option to be enabled by
default, a "2" (or more) if you want it to be enabled in the re‐
peated‐option state, or a "0" to make sure that it is disabled by
default. When this environment variable is set to a non‐zero
value, it supersedes the RSYNC_PROTECT_ARGS variable.
This variable is ignored if --old‐args, --no‐old‐args, or --se‐
cluded‐args is specified on the command line.
First supported in 3.2.4.
RSYNC_PROTECT_ARGS
Specify a non‐zero numeric value if you want the --secluded‐args
option to be enabled by default, or a zero value to make sure
that it is disabled by