Hi! I’m clsung

Hi! I’m clsung

clsung’s blog site, or you can call me AlanSung

Hi! I’m clsung RSS Feed
 
 
 
 

[doc] rsync 備份 (with ssh)

其實只有一行指令:

rsync -atvcz /path/to/your/backup/directory/ clsung@backup.target.site:./backup_directory/

記得 ssh 要設定好,如果要放在 crontab 跑,記得要設成不問密碼的哦。
ps.

  • -a 是 archive 模式,要備份的話,這個 option 是一定要的啦
  • -t 是保留檔案時間
  • -c 是做 checksum 的動作
  • -v 是 verbose ,也就是輸出詳細的 log
  • -z 是壓縮檔案再傳送出去
Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • funp
  • Haohao
  • Hemidemi
  • Live
  • MisterWong
  • TwitThis
  • udn

Leave a Reply

噗浪:

  • clsung 問 今天有要訂便當嗎? 50 mins 前
  • clsung 說 來睡,這裡果然溫暖好多 11 hours 前
  • clsung 說 冷 15 hours 前

分類

Flickr

    clsung. Get yours at bighugelabs.com/flickr

Blogroll

    馬的警總回來了
Creative Commons Attribution-NonCommercial-ShareAlike 2.5 Taiwan
Creative Commons Attribution-NonCommercial-ShareAlike 2.5 Taiwan