#author("2019-06-29T03:38:48+00:00","default:yusami","yusami") #author("2021-04-05T22:05:47+00:00","default:hotate","hotate") #contents &tag(OSX, rsync, コマンド); &tag(macOS,rsync,コマンド); * 情報 [#e099d824] - [[Command Technica:はじめてrsyncを使う方が知っておきたい6つのルール (1/2) - ITmedia エンタープライズ>http://www.itmedia.co.jp/enterprise/articles/0804/21/news013.html]] そのディレクトリも含めてコピーしたい場合:「/」なし そのディレクトリ以下のツリーをコピーしたい場合:「/」あり - [[rsync with retries>https://gist.github.com/iangreenleaf/279849]] rsync with retries - [[【 rsync 】コマンド(その1)――ファイルやディレクトリを同期する:Linux基本コマンドTips(82) - @IT>http://www.atmarkit.co.jp/ait/articles/1702/02/news031.html]] 異なるホスト間でディレクトリを同期する場合は、同期元や同期先を「ホスト:パス」または「ユーザー名@ホスト:パス」のように指定します。 - [[linux - Resume rsync over SSH after broken connection? - Super User>https://superuser.com/questions/302842/resume-rsync-over-ssh-after-broken-connection]] #!/bin/bash while [ 1 ] do rsync -avz --partial source dest if [ "$?" = "0" ] ; then echo "rsync completed normally" exit else echo "Rsync failure. Backing off and retrying..." sleep 180 fi done