
rsync 守護(hù)進(jìn)程配置步驟
服務(wù)端:
? 01: 安裝軟件程序
? 02: 編寫(xiě)配置文件
? 03: 創(chuàng)建虛擬用戶(hù)
? 04: 創(chuàng)建密碼文件(600權(quán)限)
? 05: 創(chuàng)建備份目錄(屬主屬組虛擬用戶(hù))
? 06: 啟動(dòng)服務(wù)程序
? ? ? 客戶(hù)端:
? ? ? 01: 檢查確認(rèn)工作
? ? ? 02: 實(shí)現(xiàn)免交互傳輸數(shù)據(jù)
? ? ? ? ? 創(chuàng)建密碼文件(密碼信息 600)
rsync參數(shù)說(shuō)明
-a, --archive archive mode; equals -rlptgoD (no -H,-A,-X)
? ? ? ? ? ? ? ? ? ? ? ? 歸檔模式; 等于 使用了 -rlptgoD參數(shù)
-r, --recursive? ? ? ? ? ? recurse into directories
? ? ? ? ? ? ? ? ? ? ? ? ? ? 傳輸目錄信息, 進(jìn)行遞歸傳輸備份
-l, --links? ? ? ? ? ? ? ? copy symlinks as symlinks? ? (雞肋)
? ? ? ? ? ? ? ? ? ? ? ? ? ? 可以將鏈接文件進(jìn)行傳輸備份
? ? -L, --copy-links ***? ? ? ? transform symlink into referent file/dir
? ? ? ? ? ? ? ? ? ? ? ? ? ? 將鏈接文件備份, 并且將鏈接文件所指向的源文件數(shù)據(jù)也進(jìn)行備份
-p, --perms? ? ? ? ? ? ? ? preserve permissions
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 保持文件的權(quán)限不變 644 --- 644
-o, --owner? ? ? ? ? ? ? ? preserve owner (super-user only)
? ? ? ? ? ? ? ? ? ? ? ? ? ? 保持用戶(hù)屬主信息不變(超級(jí)用戶(hù))
-g. --group? ? ? ? ? ? ? ? preserve group
? ? ? ? ? ? ? ? ? ? ? ? ? ? 保持用戶(hù)屬組信息不變
-t, --times? ? ? ? ? ? ? ? preserve modification times
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 保持文件修改時(shí)間不變
-D preserve device files (super-user only)
? ? ? ? ? ? ? ? ? ? ? ? ? ? 可以傳輸設(shè)備文件信息
-P(大寫(xiě))? ? ? ? ? ? ? ? ? ? 顯示數(shù)據(jù)傳輸進(jìn)度信息
-v? ? ? ? ? ? ? ? ? ? ? ? ? 顯示傳輸過(guò)程信息
-z? ? ? ? ? ? ? ? ? ? ? ? ? 傳輸數(shù)據(jù)信息時(shí),是否將數(shù)據(jù)進(jìn)行壓縮傳輸
--delete? ? ? ? ? ? ? ? ? ? 無(wú)差異同步數(shù)據(jù)信息 (慎用)
? ? ? ? ? ? ? ? ? ? ? ? ? ? A主機(jī)(操作) 擁有的數(shù)據(jù)? backup 也必須有相同的數(shù)據(jù)
A主機(jī)(操作) 沒(méi)有的數(shù)據(jù)? backup 有的數(shù)據(jù)必須刪