时间:2021-07-01 10:21:17 帮助过:47人阅读
配置 文件/etc/rsyncd.conf 由模块和参数组成.模块由包括在方括号中的模块名开始,直到下一模块的开始为结束.模块的参数格式为 " name = value " 在参数中,只有第一个等号是最主要的. 以#开头的行,被忽略掉. daemon必需有root权限,绑定端口在1024以下(默认是8
exclude from
include from
incoming chmod 指定传入文件的权限
outgoing chmod
auth users
* %a the remote IP address
* %b the number of bytes actually transferred
* %B the permission bits of the file (e.g. rwxrwxrwt)
* %c the total size of the block checksums received for the basis file (only
when sending)
* %f the filename (long form on sender; no trailing "/")
* %G the gid of the file (decimal) or "DEFAULT"
* %h the remote host name
* %i an itemized list of what is being updated
* %l the length of the file in bytes
* %L the string " -> SYMLINK", " => HARDLINK", or "" (where SYMLINK or
HARDLINK is a filename)
* %m the module name
* %M the last-modified time of the file
* %n the filename (short form; trailing "/" on dir)
* %o the operation, which is "send", "recv", or "del." (the latter includes
the trailing period)
* %p the process ID of this rsync session
* %P the module path
* %t the current date time
* %u the authenticated username or an empty string
* %U the uid of the file (decimal)
timeout
* RSYNC_MODULE_NAME: The name of the module being accessed.
* RSYNC_MODULE_PATH: The path configured for the module.
* RSYNC_HOST_ADDR: The accessing host's IP address.
* RSYNC_HOST_NAME: The accessing host's name.
* RSYNC_USER_NAME: The accessing user's name (empty if no user).
* RSYNC_PID: A unique number for this transfer.
* RSYNC_REQUEST: (pre-xfer only) The module/path info specified by the user
(note that the user can specify multiple source files, so the request can be
something like "mod/path1 mod/path2", etc.).
* RSYNC_ARG#: (pre-xfer only) The pre-request arguments are set in these
numbered values. RSYNC_ARG0 is always "rsyncd", and the last value contains
a single period.
* RSYNC_EXIT_STATUS: (post-xfer only) the server side's exit value. This will
be 0 for a successful run, a positive value for an error that the server
generated, or a -1 if rsync failed to exit properly. Note that an error that
occurs on the client side does not currently get sent to the server side, so
this is not the final exit status for the whole transfer.
* RSYNC_RAW_STATUS: (post-xfer only) the raw exit value from waitpid() .