vi /etc/xinetd.d/rsync disable = no 重新啟動xinetd
設定檔 (其中指定為 UTF-8) /etc/rsyncd.conf
[sy3es-dns] path = /opt/backup_data/dns_backup auth users = dns_backup uid = root gid = root secrets file = /etc/rsyncd.secrets read only = no charset=utf-8
密碼記錄檔:(權限 600)
vi /etc/rsyncd.secrets dns_backup_user:sy3es_dns_backup_password chmod 600 /etc/rsyncd.secrets
/root/rsyncd.secrets
sy3es_dns_backup_password
/usr/bin/rsync -rvlHpogDtS --delete --password-file=/root/rsyncd.secrets /home dns_backup_user@w3.sy3es.tnc.edu.tw::sy3es-dns
rsync -rvlHpogDtS --iconv=BIG5,UTF-8 --delete --password-file=/root/rsyncd.secrets /home sy3es-server1@w3.sy3es.tnc.edu.tw::sy3es-server1
DeltaCopy
backup_local.sh
#!/bin/bash PATH=/bin:/usr/bin:/sbin:/usr/sbin; export PATH export LANG=C #cd /btrfs_data/ #rsync -ap upload_share /bk/local/. cd /btrfs_opt rsync -rvlHpogDtS --delete f3_class f4_class office_share stud_data tmp_data winscore /data/bk/local/.
vim /etc/lftp.conf (不使用 ssh 方式連線及下載,指定為 utf8)這部份應該不需設定
set ssl:verify-certificate no set ftp:charset utf-8 set ftp:ssl-allow false
ftp.backup (範例)
open ftp.dcs.tn.edu.tw user my_user my_passwd cd /site/wwwroot/tmp lcd /home/user/tmp mirror --delete -n exit
crontab -u root -e
/usr/bin/lftp -f /root/ftp.backup