rsync - 客户端其他参数

本文详细介绍了 rsync 客户端的高级参数配置,包括如何使用 --delete 参数进行文件同步时的多余文件清理操作,以及如何通过 --password-file 选项安全地提供密码以访问 rsync 服务。

rsync - 客户端其他参数

# --delete
# This tells rsync to delete extraneous files from the receiving side (ones that aren't on the sending side), but only for the directories that are being synchronized. You must have asked rsync to send the whole directory (e.g. "dir" or "dir/") without using a wildcard for the directory's contents (e.g. "dir/*") since the wildcard is expanded by the shell and rsync thus gets a request to transfer individual files, not the files' parent directory. Files that are excluded from the transfer are also excluded from being deleted unless you use the --delete-excluded option or mark the rules as only matching on the sending side (see the include/exclude modifiers in the FILTER RULES section).
# 该选项通知rsync从接收端删除额外的文件(在发送端没有的文件)。但是仅限于被同步的文件夹。由于通配符由shell扩展而且rsync将请求传输独 立的文档而不是文件的父文件夹因此要求rsync发送完整的文件夹(例如“dir”或“dir/”)而不是通过通配符获取文件夹的内容(例如“dir /*”)。在传输入被排除的文件也被排除删除,除非使用--delete-excluded选项或标记规则仅在发送端匹配(参见过滤规则部分的包含/排除 修饰符)。
# --password-file
# This option allows you to provide a password in a file for accessing an rsync daemon. The file must not be world readable. It should contain just the password as a single line.
# 该选项允许在一个文件中提供一个密码来访问一个rsync守护进程,该文件必须禁止所有用户可读。应该仅包含一行密码。

[rsync - 官方网站]

http://rsync.samba.org/

[rsync - 关键词]

rsync
rsyncd

[rsync - 相关问题]

全局部分中常用全局参数配置说明

全局部分中常用模块参数配置说明

模块常用配置说明

认证相关参数配置说明

客户端常用参数

客户端其他参数

for Windows (cygwin)

远程shell模式和rsync守护进程模式

22.6. File Synchronization. Building Internet Firewalls, 2nd Edition

Hack 92 Mirroring Web Sites with wget and rsync. Spidering Hacks

Linux Security Cookbook - Recipe 1.16 Integrity Checking with rsync

Linux Security Cookbook - Recipe 1.6 Remote Integrity Checking

Linux Security Cookbook - Recipe 6.3 Copying Files Remotely

正确设置gid参数

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值