修改/etc/default/rsync
rsync_enable=true
rsync_opts='--address=10.192.0.5'
rsync_nice=''
# sample rsyncd.conf configuration file
# global options
#motd file=/etc/motd
uid = nobody
gid = nogroup
use chroot = no
max connections = 10
strict modes = yes
log file=/var/log/rsyncd.log
# for pid file, do not use /var/run/rsync.pid if
# you are going to run rsync out of the init.d script.
# pid file=/var/run/rsyncd.pid
#syslog facility=daemon
#socket options=
# module options
[cashare]
comment = ca-share
path = /home/cashare
uid = root
gid = root
read only = yes
hosts allow = 10.192.0.0/24
list = false
ignore erros
auth users = backup
secrets file = /etc/rsync.pass
transfer logging = yes
log format = %t: host %h (%a) %o %f (%l bytes). total %b bytes.
基本上配置還是比較好理解的了。
建立/etc/rsync.pass
chmod 600 /etc/rsync.pass
echo 『backup:backup』 > /etc/rsync.pass
命令格式:
/usr/bin/rsync -vzrtopg --delete --progress [email protected]::cashare /backup-10.192.0.5 --password-file=/etc/rsync.pass
寫入到crontab
cat /etc/rsync.pass
backup
rsync: failed to connect to 192.168.1.106: connection refused (111)
rsync error: error in socket io (code 10) at clientserver.c(124) [receiver=3.0.6]
應該和下面原因相同
root@innerserver3:/etc# rsync -vzrtopg --delete --progress [email protected]:gitlab /backup-10.192.0.5/
[email protected]'s password:
permission denied, please try again
ip之後應該是::而不是:,疏忽啊
@error: auth failed on module gitlab
rsync error: error starting client-server protocol (code 5) at main.c(1534) [receiver=3.0.8]
在client的密碼檔案中,只儲存密碼。
設定錯誤日誌
1.前台報錯關閉 在php.ini中display error off 2.日誌開啟記錄功能開啟 在php.ini中log errors on 3.如果想單獨記錄可以建立乙個檔案,修改php.ini中error log c wamp logs php error.log 獨立的日誌比apache日誌...
centos上設定網絡卡錯誤
今天把以前硬碟裡存的centos放到公司的vmware上執行,發現網路起不來,提示錯誤是這樣的 device eth2 does not seem to be present,delaying initialization 然後我看了 def localhost cat etc sysconfig ...
php錯誤日誌記錄設定
對於php開發者來說,一旦某個產品投入使用,應該立即將 display errors選項關閉,以免因為這些錯誤所透露的路徑 資料庫連線 資料表等資訊而遭到黑客攻擊。但是,任何乙個產品在投入使用後,都難 免會有錯誤出現,那麼如何記錄一些對開發者有用的錯誤報告呢?我們可以在單獨的文字檔案中將錯誤報告作為...