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