您的位置:首页 > 其它

rsync使用方法总结

2015-04-14 20:48 134 查看
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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: