rsync

差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

兩邊的前次修訂版 前次修改
下次修改
前次修改
rsync [2016/08/18 18:37] jzrsync [2024/03/17 00:58] (目前版本) jz
行 1: 行 1:
 +====== 複製資料 ======
 +<code>
 +rsync -avhW --no-compress --info=progress2 src/ dst/
 +</code>
 +
 +
 +
 +
 rsyncd 設定檔 (server) rsyncd 設定檔 (server)
  
行 54: 行 62:
   * -a :相當於 -rlptgoD ,所以這個 -a 是最常用的參數了!   * -a :相當於 -rlptgoD ,所以這個 -a 是最常用的參數了!
  
-不錯的參考來源 +Rsync over SSH 範例 
-http://newsletter.ascc.sinica.edu.tw/news/read_news.php?nid=1742 + 
-http://blog.xuite.net/pippeng/blog/23403776+<code> 
 +rsync -a --progress --delete -e "ssh -i /home/user/.ssh/id_rsa" /home/CSNA2016/backup [email protected]:/home/user 
 +</code> 
 + 
 +====== 標題 ====== 
 +<code> 
 +rsync -a --exclude 'file.txt' src_directory/ dst_directory/ 
 +rsync -a --exclude 'dir1' src_directory/ dst_directory/ 
 +rsync -a --exclude 'dir1/*' src_directory/ dst_directory/ 
 +rsync -a --exclude 'file1.txt' --exclude 'dir1/*' --exclude 'dir2' src_directory/ dst_directory/ 
 +rsync -a --exclude={'file1.txt','dir1/*','dir2'} src_directory/ dst_directory/ 
 +rsync -a --exclude-from='exclude-file.txt' src_directory/ dst_directory/ 
 +rsync -a --exclude '*.jpg*' src_directory/ dst_directory/ 
 +rsync -a -m --include='*.jpg' --include='*/' --exclude='*' src_directory/ dst_directory/ 
 +find src_directory/ -name "*.jpg" -printf %P\\0\\n | rsync -a --files-from=- src_directory/ dst_directory/ 
 +</code> 
 + 
 +參考 
 +  http://newsletter.ascc.sinica.edu.tw/news/read_news.php?nid=1742 
 +  http://blog.xuite.net/pippeng/blog/23403776 
 +  * https://www.myfreax.com/how-to-exclude-files-and-directories-with-rsync/
  • rsync.1471516665.txt.gz
  • 上一次變更: 2016/08/18 18:37
  • jz