rsync使用方法总结

来源:互联网 发布:英语六级哪个软件好 编辑:程序博客网 时间:2024/05/21 11:28


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

 

0 0
原创粉丝点击