rsyn同步软链接保持不变

 

#!/bin/bash

rsync --port=873 -vzrtopgLK --progress --delete --password-file=/tuandai/rsync/rsync.password --exclude-from=/tuandai/rsync/exclude_list_haproxy tbhaha@myhome.paiconf.com::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     将接收文件这端的软件链接目录当作目录

-l  链接保持为链接,报错:symlink has no referent或skipping non-regular file的解决方法

posted on 2018-04-21 18:59  林肯公园  阅读(1550)  评论(0)    收藏  举报

导航