quote(rsync *.c foo:src/)
-this would transfer all files matching the pattern *.c from the
+This would transfer all files matching the pattern *.c from the
current directory to the directory src on the machine foo. If any of
the files already exist on the remote system then the rsync
remote-update protocol is used to update the file by sending only the
quote(rsync -avz foo:src/bar /data/tmp)
-this would recursively transfer all files from the directory src/bar on the
+This would recursively transfer all files from the directory src/bar on the
machine foo into the /data/tmp/bar directory on the local machine. The
files are transferred in "archive" mode, which ensures that symbolic
links, devices, attributes, permissions, ownerships etc are preserved
quote(rsync -avz foo:src/bar/ /data/tmp)
-a trailing slash on the source changes this behavior to transfer
-all files from the directory src/bar on the machine foo into the
-/data/tmp/. A trailing / on a source name means "copy the
-contents of this directory". Without a trailing slash it means "copy
-the directory". This difference becomes particularly important when
-using the --delete option.
+A trailing slash on the source changes this behavior to avoid creating an
+additional directory level at the destination. You can think of a trailing
+/ on a source as meaning "copy the contents of this directory" as opposed
+to "copy the directory by name", but in both cases the attributes of the
+containing directory are transferred to the containing directory on the
+destination. In other words, each of the following commands copies the
+files in the same way, including their setting of the attributes of
+/dest/foo:
+
+quote(rsync -avz /src/foo /dest)
+quote(rsync -avz /src/foo/ /dest/foo)
You can also use rsync in local-only mode, where both the source and
destination don't have a ':' in the name. In this case it behaves like
quote(rsync somehost.mydomain.com::)
-this would list all the anonymous rsync modules available on the host
+This would list all the anonymous rsync modules available on the host
somehost.mydomain.com. (See the following section for more details.)
configure inetd or the services map to include the rsync server port
if you run an rsync server only via a remote shell program.
-To run an rsync server out of a single-use ssh key, use the
-"command=em(COMMAND)" syntax in the remote user's
-authorized_keys entry, where command would be
-
-quote(rsync --server --daemon .)
-
-NOTE: rsync's argument parsing expects the trailing ".", so make sure
-that it's there. If you want to use a rsyncd.conf(5)-style
-configuration file other than the default, you can added a
---config option to the em(command):
-
-quote(rsync --server --daemon --config=em(file) .)
+To run an rsync server out of a single-use ssh key, see this section
+in the rsyncd.conf(5) man page.
manpagesection(EXAMPLES)
dit(bf(--progress)) This option tells rsync to print information
showing the progress of the transfer. This gives a bored user
something to watch.
-
-This option is normally combined with -v. Using this option without
-the -v option will produce weird results on your display.
+Implies --verbose without incrementing verbosity.
dit(bf(-P)) The -P option is equivalent to --partial --progress. I
found myself typing that combination quite often so I created an
Example:
verb(
-$ rsync --write_batch=pfx -a /source/dir/ /adest/dir/
+$ rsync --write-batch=pfx -a /source/dir/ /adest/dir/
$ rcp pfx.rsync_* remote:
-$ rsh remote rsync --read_batch=pfx -a /bdest/dir/
+$ rsh remote rsync --read-batch=pfx -a /bdest/dir/
# or alternatively
$ rsh remote ./pfx.rsync_argvs /bdest/dir/
)
manpagesection(EXIT VALUES)
startdit()
-dit(bf(RERR_SYNTAX 1)) Syntax or usage error
-dit(bf(RERR_PROTOCOL 2)) Protocol incompatibility
-dit(bf(RERR_FILESELECT 3)) Errors selecting input/output files, dirs
-
-dit(bf(RERR_UNSUPPORTED 4)) Requested action not supported: an attempt
+dit(bf(0)) Success
+dit(bf(1)) Syntax or usage error
+dit(bf(2)) Protocol incompatibility
+dit(bf(3)) Errors selecting input/output files, dirs
+dit(bf(4)) Requested action not supported: an attempt
was made to manipulate 64-bit files on a platform that cannot support
them; or an option was speciifed that is supported by the client and
not by the server.
-
-dit(bf(RERR_SOCKETIO 10)) Error in socket IO
-dit(bf(RERR_FILEIO 11)) Error in file IO
-dit(bf(RERR_STREAMIO 12)) Error in rsync protocol data stream
-dit(bf(RERR_MESSAGEIO 13)) Errors with program diagnostics
-dit(bf(RERR_IPC 14)) Error in IPC code
-dit(bf(RERR_SIGNAL 20)) Received SIGUSR1 or SIGINT
-dit(bf(RERR_WAITCHILD 21)) Some error returned by waitpid()
-dit(bf(RERR_MALLOC 22)) Error allocating core memory buffers
-dit(bf(RERR_TIMEOUT 30)) Timeout in data send/receive
+dit(bf(5)) Error starting client-server protocol
+dit(bf(10)) Error in socket IO
+dit(bf(11)) Error in file IO
+dit(bf(12)) Error in rsync protocol data stream
+dit(bf(13)) Errors with program diagnostics
+dit(bf(14)) Error in IPC code
+dit(bf(20)) Received SIGUSR1 or SIGINT
+dit(bf(21)) Some error returned by waitpid()
+dit(bf(22)) Error allocating core memory buffers
+dit(bf(23)) Partial transfer due to error
+dit(bf(24)) Partial transfer due to vanished source files
+dit(bf(30)) Timeout in data send/receive
enddit()
manpagesection(ENVIRONMENT VARIABLES)