rsync使用方法总结


rsync配置:/etc/rsyncd.conf

uid = osd
gid = osd
log file = /var/log/rsyncd.log
pid file = /var/run/rsyncd.pid

[account]
max connections = 2
path = /srv/account
read only = false
lock file = /var/lock/account.lock

[container]
max connections = 4
path = /srv/container
read only = false
lock file = /var/lock/container.lock

[object]
max connections = 8
path = /srv/object
read only = false
lock file = /var/lock/object.lock


第一种方式“:”
osd@OSD-146:~$ rsync -avzH osd@109.105.112.147:/data /tmp
osd@109.105.112.147's password:
receiving incremental file list
rsync: link_stat "/data" failed: No such file or directory (2)

sent 8 bytes  received 74 bytes  23.43 bytes/sec
total size is 0  speedup is 0.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1655) [Receiver=3.1.0]
rsync: [Receiver] write error: Broken pipe (32)

第二种方式:"::"
osd@OSD-146:~$ rsync -avzH -r ./test 109.105.112.147::object
sending incremental file list
test/
test/a
test/b
test/c
test/write.log

sent 7,066 bytes  received 96 bytes  14,324.00 bytes/sec
total size is 317,795  speedup is 44.37


osd@OSD-147:/srv/object/test$ ll
total 332
drwxrwxr-x 2 osd osd   4096  4月 14 19:50 ./
drwxr-xr-x 7 osd osd   4096  4月 14 20:43 ../
-rw-rw-r-- 1 osd osd      7  4月 14 17:48 a
-rw-rw-r-- 1 osd osd      7  4月 14 17:48 b
-rw-rw-r-- 1 osd osd      7  4月 14 17:48 c
-rw-rw-r-- 1 osd osd 317774  4月 14 19:50 write.log


osd@OSD-146:~$ rsync -avzH -r ./test 109.105.112.147::object/node1
sending incremental file list
test/
test/a
test/b
test/c
test/write.log

sent 7,066 bytes  received 96 bytes  14,324.00 bytes/sec
total size is 317,795  speedup is 44.37


 

rsync:http://man.he.net/man1/rsync

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值