In the example below, I am copying files from my local machine to a remote server with the IP address –10.42.1.5. So as to only sync new files on the local machine, that do not exist on the remote machine, we can include the--ignore-existingoption: rsync -av --ignore-existing Docu...
--owner, -o preserve owner (super-user only) --group, -g preserve group --devices preserve device files (super-user only) --copy-devices copy device contents as a regular file --write-devices write to devices as files (implies --inplace) --specials preserve special files -D same as ...
-o, --owner preserve owner (super-user only) -g, --group preserve group --devices preserve device files (super-user only) --copy-devices copy device contents as regular file --specials preserve special files -D same as --devices --specials -t, --times preserve modification times -O, ...
The--max-size=add_sizeflag sets the maximum size of the file to be transferred. This option allows users to avoid large file transfers and conserve resources. For example, the following command instructsrsyncto only transfer files that are smaller than 500KB: rsync -av --max-size=500k /ho...
read only :yes为只允许下载,no为可以下载和上传文件到服务器 exclude:用来指定多个由空格隔开的多个文件或目录(相对路径),将其添加到exclude列表中。这等同于在客户端命令中使用—exclude或---filter来指定某些文件或目录不下载或上传(既不可访问) exclude from:指定一个包含exclude模式的定义的文件名,服务器从该文...
-D 保持设备文件和特殊文件 (super-user only) -z, ––compress 在传输文件时进行压缩处理 ––exclude=PATTERN 指定排除一个不需要传输的文件匹配模式 ––exclude-from=FILE 从 FILE 中读取排除规则 ––include=PATTERN 指定需要传输的文件匹配模式
dirs when talking to old rsync--mkpath create the destination's path component--links,-l copy symlinksassymlinks--copy-links,-Ltransform symlink into referent file/dir--copy-unsafe-links only"unsafe"symlinks are transformed--safe-links ignore symlinks that point outside the tree--munge-links ...
time-size-only skip files that match in size-modify-window=NUM compare mod-times with reduced accuracy-T, -temp-dir=DIR create temporary files in directory DIR-y, -fuzzy find similar file for basis if no dest file-compare-dest=DIR also compare destination files relative to DIR-copy-dest=...
--size-only 当决定是否要备份文件时,仅仅察看文件大小而不考虑文件时间--modify-window=NUM 决定文件是否时间相同时使用的时间戳窗口,默认为0-T --temp-dir=DIR 在DIR中创建临时文件--compare-dest=DIR 同样比较DIR中的文件来决定是否需要备份-P 等同于 --partial--progress 显示备份过程-z, --compress 对...
write only=no #表示可以push hosts allow=192.168.133.130#只允许得ip地址连接 hosts deny=*#拒绝得ip地址连接 list=falseuid=rsync #获取文件的身份 gid=rsync auth users=rsyncuser #客户端获取文件的身份 此用户并不是本机中确实存在的用户 secrets file=/etc/rsyncd.passwd #用来认证客户端的秘钥文件 格式US...