rsyn同步软链接保持不变

#!/bin/bash

rsync --port=873 -vzrtopgLK --progress --delete --password-file=/tuandai/rsync/rsync.password --exclude-from=/tuandai/rsync/exclude_list_haproxy [email protected]::mycode/haproxy/haproxy_bugu/haproxy /etc

-L, --copy-links              transform symlink into referent file/dir    将软链接当文件或目录处理

-K, --keep-dirlinks         treat symlinked dir on receiver as dir     将接收文件这端的软件链接目录当作目录

猜你喜欢

转载自www.cnblogs.com/linkenpark/p/8903051.html