2009年4月22日 星期三

rsync

http://phorum.study-area.org/index.php/topic,15553.html
http://www.ntu.beautifulworldco.com/weblog/?p=385

rsync server

/etc/xinetd.d/rsync

# default: off
# description: The rsync server is a good addition to am ftp server, as it \
#       allows crc checksumming etc.

service rsync
{
        disable = no
        socket_type     = stream
        wait            = no
        user            = root
        server          = /usr/bin/rsync
        server_args     = --daemon
#        log_on_failure  += USERID
}

/etc/rsyncd.conf

[VT250]
path = /media/disk-4/BACKUP
auth users = gigijoe
uid = root
gid = root
secrets file = /etc/rsyncd.secrets
read only = no

[VT300]
path = /media/disk-4/BACKUP
auth users = gigijoe
uid = root
gid = root
secrets file = /etc/rsyncd.secrets
read only = no

/etc/rsyncd.secrets

gigijoe:xxxxxxxx

rsync client

sudo /usr/bin/rsync -vzrtopgl --progress --delete /home/gigijoe/VT250 gigijoe@127.0.0.1::VT250

sudo /usr/bin/rsync -vzrtopgl --progress --delete /home/gigijoe/VT300 gigijoe@127.0.0.1::VT300

-a, --archive 權限保存模式
-H, --hard-links 保留硬式連結
-D, --devices 保留device資訊(root only)
-S, --sparse 嘗試去處理稀疏的檔案,讓這些檔案在目的端佔去較少的磁碟空間.
-t, --times 保留時間點
-v , --verbose 複雜的輸出訊息,若要在背景執行請拿掉此參數


 參數詳細說明
http://yes.dyndns.tv:84/dom/blog/rsync.htm


沒有留言:

張貼留言