rsync - 翻译 - 相关问题 - --delete

rsync - 翻译 - 相关问题 - --delete

# rsync - 翻译 - 相关问题 - --delete
# --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选项或标记规则仅在发送端匹配(参见过滤规则部分的包含/排除 修饰符)。
#
# Prior to rsync 2.6.7, this option would have no effect unless --recursive was enabled. Beginning with 2.6.7, deletions will also occur when --dirs (-d) is enabled, but only for directories whose contents are being copied.
# 在rsync 2.6.7版本之前,该选项仅在--recursive有效时起作用。从2.6.7版本开始,当--dirs(-d)有效时也将发生删除,但仅在内容被复制的文件夹。
#
# This option can be dangerous if used incorrectly! It is a very good idea to first try a run using the --dry-run option (-n) to see what files are going to be deleted.
# 该选项在事用不当时可能造成危害,一个好主意是在第一次尝试运行时使用--dry-run选项(-n)看看哪些文件将被删除。
#
# If the sending side detects any I/O errors, then the deletion of any files at the destination will be automatically disabled. This is to prevent temporary filesystem failures (such as NFS errors) on the sending side causing a massive deletion of files on the destination. You can override this with the --ignore-errors option.
# 当发送方检测到任何输入/输出错误时,目标将自动取消删除任何文件。这用于避免在发送端临时文件系统故障(例如NFS错误)导致在目标端大量删除文件。可以使用--ignore-errors选项替换。
#
# The --delete option may be combined with one of the --delete-WHEN options without conflict, as well as --delete-excluded. However, if none of the --delete-WHEN options are specified, rsync will choose the --delete-during algorithm when talking to rsync 3.0.0 or newer, and the --delete-before algorithm when talking to an older rsync. See also --delete-delay and --delete-after.
# --delete选项可以和某个--delete-WHEN选项同时使用而不会造成冲突,类似于--delete-excluded。如果没有指定任何 --delete-WHEN选项,rsync和rsync 3.0.0或更新版通讯时选择--delete-during算法,和旧版本rsync通讯时选择--delete-before算法。参见 --delete-delay和--delete-after。

[rsync - 官方网站]

http://rsync.samba.org/

[rsync - 关键词]

rsync
rsyncd

[rsyncd.conf - 官方文档]

http://samba.org/ftp/rsync/rsyncd.conf.html

[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参数

--backup-dir 使用示例

hosts allow

hosts deny

gid

synopsis提要

翻译 - daemon options summary守护进程选项概述

--log-file

翻译 --delete

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值