Rsync ,從linux 遠程備份到 windows 筆記

來源:互聯網
上載者:User

測試centos5.2內建的rsync無法讀取.conf設定檔,後來放棄內建的rsync,在以下地址下載源碼編譯安裝

:http://mattmccutchen.net/rsync/packages.html ,目前最新版是3.04

 

解壓編譯
./configure --prefix=/usr/local/rsync
make
make install

建立一個rsyncd.conf設定檔
[root@localhost bin]# vi rsyncd.conf

nimal configuration file for rsync daemon
# See rsync(1) and rsyncd.conf(5) man pages for help

# This line is required by the /etc/init.d/rsyncd script
pid file = /var/run/rsyncd.pid
port = 873
address = 192.168.139.77
#uid = nobody
#gid = nobody
uid = root
gid = root

use chroot = no
read only = yes

#limit access to private LANs
hosts allow=192.168.139.66
hosts deny=*

max connections = 5
motd file = /etc/rsyncd/rsyncd.motd

#This will give you a separate log file
#log file = /var/log/rsync.log

#This will log every file transferred - up to 85,000+ per user, per sync
#transfer logging = yes

log format = %t %a %m %f %b
syslog facility = local3
timeout = 300

[usr]
path = /usr
list=no
ignore errors
comment = usr
auth users = root
secrets file = /etc/rsyncd/rsyncd.secrets #注意這個檔案只能設為600許可權

再像這樣啟動rsync
[root@localhost bin]# rsync --daemon  --config=/usr/local/rsyncd/bin/rsyncd.conf

windows備份機上安裝cwRsync
:http://www.softpedia.com/progDownload/cwRsync-Download-45383.html
安裝好之後這樣串連到linux擷取檔案,如果沒有問題應該看到Password:字樣的提示,
D:\Program Files\cwRsync\bin>rsync -vzrtopg --progress --delete root@192.168.139.77::usr  .\temp\

其中 temp 我是建在bin下,現在還不知道用什麼方法把備份目錄建到別的盤

參考:http://www.linuxsir.org/main/?q=node/256

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.