2011年11月1日火曜日

rsync実行中にエラー(ネットワークがダウンなど)が発生すると途中までの処理結果が反映されてしまう

rsync を使う場合、大量のファイルの同期を取ることが多い。
では、 rsync を実行している最中にネットワークが切れるなどした場合、途中まで転送されたファイルがどうなるのかを検証した。

2011/11/01 --temp-dir と --compare-dest についての追加検証を追記しました。

実行環境

まず、実行環境は以下の通り。

転送元マシン
OS:Ubuntu10(VMWare上の仮想マシン)
IP:192.168.119.144

転送先マシン
OS:CentOS6(VMWare上の仮想マシン)

転送対象ファイル
Java6のJavadoc(http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u25-doc-download-355137.html
サイズは 264MB ある

rsync実行時のコマンド
rsync -av --delete --progress -e ssh --bwlimit=128 --timeout=30 ./javadoc/ username@192.168.119.144:/home/username/to_dir/lowspeed
※普通に実行すると高速過ぎるので --bwlimit で転送速度を低くし、なおかつタイムアウトを30秒に設定

ネットワークエラーの発生方法

ネットワークエラーは通常では起き得ないため以下の方法で人為的に発生させた。

転送元マシンにログインし、以下のコマンドを実行(root)

service network stop

こうすることにより転送元と転送先の間のネットワークがダウンしたことになる。

検証結果

新規ファイル転送の場合

rsync の出力は以下の通り。「docs/api/index-files/index-4.html」の転送に失敗して終了している。

~$ rsync -av --delete --progress -e ssh --bwlimit=128 --timeout=30 ./javadoc/ username@192.168.119.144:/home/username/to_dir/lowspeed
username@192.168.119.144's password: 
sending incremental file list
./
docs/
docs/index.html
       39679 100%   53.99kB/s    0:00:00 (xfer#1, to-check=1022/1025)
docs/api/
docs/api/allclasses-frame.html
      503784 100%  122.02kB/s    0:00:04 (xfer#2, to-check=1052/1063)
docs/api/allclasses-noframe.html
      427924 100%  100.29kB/s    0:00:04 (xfer#3, to-check=1051/1063)
docs/api/constant-values.html
     1267915 100%  118.30kB/s    0:00:10 (xfer#4, to-check=1050/1063)
docs/api/deprecated-list.html
      167204 100%  117.90kB/s    0:00:01 (xfer#5, to-check=1049/1063)
docs/api/help-doc.html
       10463 100%   27.10kB/s    0:00:00 (xfer#6, to-check=1048/1063)
docs/api/index.html
        1399 100%    3.62kB/s    0:00:00 (xfer#7, to-check=1047/1063)
docs/api/overview-frame.html
       28532 100%   44.30kB/s    0:00:00 (xfer#8, to-check=1046/1063)
docs/api/overview-summary.html
       60507 100%   52.15kB/s    0:00:01 (xfer#9, to-check=1045/1063)
docs/api/overview-tree.html
     1114950 100%  127.05kB/s    0:00:08 (xfer#10, to-check=1044/1063)
docs/api/package-list
        4115 100%    7.99kB/s    0:00:00 (xfer#11, to-check=1043/1063)
docs/api/serialized-form.html
     1499294 100%  120.73kB/s    0:00:12 (xfer#12, to-check=1042/1063)
docs/api/stylesheet.css
        1391 100%    1.33MB/s    0:00:00 (xfer#13, to-check=1041/1063)
docs/api/index-files/
docs/api/index-files/index-1.html
      749599 100%  126.32kB/s    0:00:05 (xfer#14, to-check=1035/1063)
docs/api/index-files/index-10.html
      258969 100%   95.51kB/s    0:00:02 (xfer#15, to-check=1034/1063)
docs/api/index-files/index-11.html
       84952 100%   73.22kB/s    0:00:01 (xfer#16, to-check=1033/1063)
docs/api/index-files/index-12.html
      269850 100%  130.59kB/s    0:00:02 (xfer#17, to-check=1032/1063)
docs/api/index-files/index-13.html
      462569 100%  127.97kB/s    0:00:03 (xfer#18, to-check=1031/1063)
docs/api/index-files/index-14.html
      338993 100%  105.03kB/s    0:00:03 (xfer#19, to-check=1030/1063)
docs/api/index-files/index-15.html
      186915 100%  120.41kB/s    0:00:01 (xfer#20, to-check=1029/1063)
docs/api/index-files/index-16.html
      773522 100%  117.32kB/s    0:00:06 (xfer#21, to-check=1028/1063)
docs/api/index-files/index-17.html
       25326 100%   97.37kB/s    0:00:00 (xfer#22, to-check=1027/1063)
docs/api/index-files/index-18.html
      815983 100%  121.62kB/s    0:00:06 (xfer#23, to-check=1026/1063)
docs/api/index-files/index-19.html
     1853449 100%  122.58kB/s    0:00:14 (xfer#24, to-check=1025/1063)
docs/api/index-files/index-2.html
      361451 100%  103.73kB/s    0:00:03 (xfer#25, to-check=1024/1063)
docs/api/index-files/index-20.html
      588362 100%  119.90kB/s    0:00:04 (xfer#26, to-check=1023/1063)
docs/api/index-files/index-21.html
      345112 100%   99.04kB/s    0:00:03 (xfer#27, to-check=1022/1063)
docs/api/index-files/index-22.html
      289076 100%  117.77kB/s    0:00:02 (xfer#28, to-check=1021/1063)
docs/api/index-files/index-23.html
      309110 100%  109.21kB/s    0:00:02 (xfer#29, to-check=1020/1063)
docs/api/index-files/index-24.html
       90439 100%   64.00kB/s    0:00:01 (xfer#30, to-check=1019/1063)
docs/api/index-files/index-25.html
       22429 100%   58.25kB/s    0:00:00 (xfer#31, to-check=1018/1063)
docs/api/index-files/index-26.html
       13692 100%   26.64kB/s    0:00:00 (xfer#32, to-check=1017/1063)
docs/api/index-files/index-27.html
      147169 100%   88.06kB/s    0:00:01 (xfer#33, to-check=1016/1063)
docs/api/index-files/index-3.html
     1135603 100%  119.21kB/s    0:00:09 (xfer#34, to-check=1015/1063)
docs/api/index-files/index-4.html
       32768   6%   84.66kB/s    0:00:05  
[sender] io timeout after 30 seconds -- exiting
rsync error: timeout in data send/receive (code 30) at io.c(140) [sender=3.0.8]

そして、転送先のディレクトリを見ると、

$ pwd
/home/username/to_dir/lowspeed/docs/api/index-files
$ ls | more
index-1.html
index-10.html
index-11.html
index-12.html
index-13.html
index-14.html
index-15.html
index-16.html
index-17.html
index-18.html
index-19.html
index-2.html
index-20.html
index-21.html

rsync のログでは index-3.html までが 100% となっているが、実際には index-21.html までしか転送されていない

更新の場合

次に既にファイルが存在している状態で、rsync で更新した場合はどうなるかを見る。

エラー発生時付近のrsync のログは以下の通り。

docs/api/java/awt/Scrollbar.html
       98791 100%  421.29kB/s    0:00:00 (xfer#191, to-check=1115/1334)
docs/api/java/awt/Shape.html
       35590 100%  151.77kB/s    0:00:00 (xfer#192, to-check=1114/1334)
docs/api/java/awt/SplashScreen.html
       24392 100%  100.09kB/s    0:00:00 (xfer#193, to-check=1113/1334)
docs/api/java/awt/Stroke.html
       11295 100%   46.35kB/s    0:00:00 (xfer#194, to-check=1112/1334)
docs/api/java/awt/SystemColor.html
       70817 100%  289.36kB/s    0:00:00 (xfer#195, to-check=1111/1334)
docs/api/java/awt/SystemTray.html
       33103 100%  134.70kB/s    0:00:00 (xfer#196, to-check=1110/1334)
docs/api/java/awt/TextArea.AccessibleAWTTextArea.html
       29641 100%  120.11kB/s    0:00:00 (xfer#197, to-check=1109/1334)
docs/api/java/awt/TextArea.html
       78476 100%  316.68kB/s    0:00:00 (xfer#198, to-check=1108/1334)
docs/api/java/awt/TextComponent.AccessibleAWTTextComponent.html
       47309 100%  184.80kB/s    0:00:00 (xfer#199, to-check=1107/1334)
docs/api/java/awt/TextComponent.html
       76140 100%  296.24kB/s    0:00:00 (xfer#200, to-check=1106/1334)
docs/api/java/awt/TextField.AccessibleAWTTextField.html
       29680 100%  115.02kB/s    0:00:00 (xfer#201, to-check=1105/1334)
docs/api/java/awt/TextField.html
       79300 100%  306.09kB/s    0:00:00 (xfer#202, to-check=1104/1334)
docs/api/java/awt/TexturePaint.html
       20813 100%   80.34kB/s    0:00:00 (xfer#203, to-check=1103/1334)
docs/api/java/awt/Toolkit.html
      171298 100%  658.60kB/s    0:00:00 (xfer#204, to-check=1102/1334)
docs/api/java/awt/Transparency.html
       13861 100%   53.08kB/s    0:00:00 (xfer#205, to-check=1101/1334)
docs/api/java/awt/TrayIcon.MessageType.html
       17184 100%   65.81kB/s    0:00:00 (xfer#206, to-check=1100/1334)
docs/api/java/awt/TrayIcon.html
       54942 100%  209.59kB/s    0:00:00 (xfer#207, to-check=1099/1334)
docs/api/java/awt/Window.AccessibleAWTWindow.html
       29854 100%  113.88kB/s    0:00:00 (xfer#208, to-check=1098/1334)
[sender] io timeout after 30 seconds -- exiting
rsync error: timeout in data send/receive (code 30) at io.c(140) [sender=3.0.8]


そして転送先のファイルは以下の通り。

11月  1 03:34 2011 SystemTray.html
11月  1 03:34 2011 TextArea.AccessibleAWTTextArea.html
11月  1 03:34 2011 TextArea.html
11月  1 03:34 2011 TextComponent.AccessibleAWTTextComponent.html
11月  1 03:34 2011 TextComponent.html
11月  1 03:34 2011 TextField.AccessibleAWTTextField.html
11月  1 03:34 2011 TextField.html
11月  1 03:34 2011 TexturePaint.html
11月  1 03:34 2011 Toolkit.html
11月  1 03:34 2011 Transparency.html
11月  1 03:34 2011 TrayIcon.MessageType.html
11月  1 03:34 2011 TrayIcon.html
11月  1 03:34 2011 Window.AccessibleAWTWindow.html
11月  1 03:21 2011 Window.html
11月  1 03:21 2011 package-frame.html
11月  1 03:21 2011 package-summary.html
11月  1 03:21 2011 package-tree.html
11月  1 03:21 2011 package-use.html

更新においてはWindow.AccessibleAWTWindow.htmlの後で処理がエラーとなったため、それ以降のファイルに日付は古いまま(未更新)となっている。


削除の場合

削除の場合も本来は検証すべきだが、眠くて限界なのでおそらく同じ挙動であることが予想されるため省略。


まとめ

rsync を使ってファイル同期を実施した場合、以下のことが発生する可能性がゼロでない。

  1. 処理途中でネットワーク障害が発生した場合はそこまでの新規作成、更新、削除が反映された状態となる
  2. 同期対象のファイルが大量であったり、サイズが大きかったりする場合は、エラーが発生していない状態であっても、転送中にアクセスされた場合は全体として見た場合に中途半端となる可能性がある(例えばリンク元だけ更新されてリンク先は未更新でリンク切れとなる)
  3. コミット単位はファイルである(これは予想)
つまり、何かの運用で使用しようとするのであれば、上記が発生する可能性があることを考慮する必要がある。

はー、すっきりした。

追加検証

--temp-dir と --compare-dest というオプションが存在するという情報を得たので再度検証。
それぞれの説明はこちらを参照。

なお、転送先にはファイルがない状態、つまり全て追加となるモードで実施した。

まず、準備として転送先にテンポラリー用のディレクトリとして以下を作成

/home/username/to_dir/tmp

--temp-dir を使用した場合

rsync実行時のログは以下の通り。

$ rsync -av --delete --progress -e ssh --bwlimit=128 --timeout=30 --temp-dir=/home/username/to_dir/tmp ./javadoc/ username@192.168.119.144:/home/username/to_dir/lowspeed
username@192.168.119.144's password:
sending incremental file list
./
docs/
docs/index.html
       39679 100%    6.59MB/s    0:00:00 (xfer#1, to-check=1022/1025)
docs/api/
docs/api/allclasses-frame.html
      503784 100%  125.76kB/s    0:00:03 (xfer#2, to-check=1052/1063)
docs/api/allclasses-noframe.html
      427924 100%  103.57kB/s    0:00:04 (xfer#3, to-check=1051/1063)
docs/api/constant-values.html
     1267915 100%  116.98kB/s    0:00:10 (xfer#4, to-check=1050/1063)
docs/api/deprecated-list.html
      167204 100%  117.64kB/s    0:00:01 (xfer#5, to-check=1049/1063)
docs/api/help-doc.html
       10463 100%   27.10kB/s    0:00:00 (xfer#6, to-check=1048/1063)
docs/api/index.html
        1399 100%    3.62kB/s    0:00:00 (xfer#7, to-check=1047/1063)
docs/api/overview-frame.html
       28532 100%   44.30kB/s    0:00:00 (xfer#8, to-check=1046/1063)
docs/api/overview-summary.html
       60507 100%   58.62kB/s    0:00:01 (xfer#9, to-check=1045/1063)
docs/api/overview-tree.html
     1114950 100%  127.12kB/s    0:00:08 (xfer#10, to-check=1044/1063)
docs/api/package-list
        4115 100%    6.38kB/s    0:00:00 (xfer#11, to-check=1043/1063)
docs/api/serialized-form.html
     1499294 100%  121.01kB/s    0:00:12 (xfer#12, to-check=1042/1063)
docs/api/stylesheet.css
        1391 100%    1.37kB/s    0:00:00 (xfer#13, to-check=1041/1063)
docs/api/index-files/
docs/api/index-files/index-1.html
      749599 100%  108.13kB/s    0:00:06 (xfer#14, to-check=1035/1063)
docs/api/index-files/index-10.html
      258969 100%  117.85kB/s    0:00:02 (xfer#15, to-check=1034/1063)
docs/api/index-files/index-11.html
       84952 100%   94.06kB/s    0:00:00 (xfer#16, to-check=1033/1063)
docs/api/index-files/index-12.html
      269850 100%   90.84kB/s    0:00:02 (xfer#17, to-check=1032/1063)
docs/api/index-files/index-13.html
      462569 100%  112.04kB/s    0:00:04 (xfer#18, to-check=1031/1063)
docs/api/index-files/index-14.html
      338993 100%  125.16kB/s    0:00:02 (xfer#19, to-check=1030/1063)
docs/api/index-files/index-15.html
      186915 100%   90.54kB/s    0:00:02 (xfer#20, to-check=1029/1063)
docs/api/index-files/index-16.html
      773522 100%  109.00kB/s    0:00:06 (xfer#21, to-check=1028/1063)
docs/api/index-files/index-17.html
       25326 100%   49.17kB/s    0:00:00 (xfer#22, to-check=1027/1063)
docs/api/index-files/index-18.html
      815983 100%  117.36kB/s    0:00:06 (xfer#23, to-check=1026/1063)
docs/api/index-files/index-19.html
      589824  31%  127.05kB/s    0:00:09 
[sender] io timeout after 30 seconds -- exiting
rsync error: timeout in data send/receive (code 30) at io.c(140) [sender=3.0.8]

転送先のディレクトリを見ると以下のようになっている。

$ pwd
/home/username/to_dir/lowspeed/docs/api/index-files
$ ls | more
index-1.html
index-10.html
index-11.html
index-12.html
index-13.html
index-14.html
index-15.html

と、結果はオプションをつける前と変わらなかった。

ただし、実行中にテンポラリーディレクトリの中身を見たところ以下のように表示された。

$ pwd
/home/username/to_dir/tmp
$ ls -a | more
.
..
.serialized-form.html.ly3MAT
$ ls -a | more
.
..
.index-1.html.qXT1Ll
$ ls -a | more
.
..
.index-10.html.ZddjTQ

転送対象のファイルのテンポラリーが作成されていることがわかった。
だが、一度に作成されるテンポラリーファイルは上記の通り1つのみであり、
やはりファイル単位でのテンポラリー作成→本来のファイルに置き換えとなっているようだ。


--compare-dest を使用した場合

rsync実行時のログは以下の通り。
$ rsync -avI --delete --progress -e ssh --bwlimit=128 --timeout=30 --compare-dest=/home/username/to_dir/tmp ./javadoc/ username@192.168.119.144:/home/username/to_dir/lowspeed
username@192.168.119.144's password: 
sending incremental file list
./
docs/
docs/index.html
       39679 100%    6.59MB/s    0:00:00 (xfer#1, to-check=1022/1025)
docs/api/
docs/api/allclasses-frame.html
      503784 100%  125.18kB/s    0:00:03 (xfer#2, to-check=1052/1063)
docs/api/allclasses-noframe.html
      427924 100%  103.39kB/s    0:00:04 (xfer#3, to-check=1051/1063)
docs/api/constant-values.html
     1267915 100%  116.80kB/s    0:00:10 (xfer#4, to-check=1050/1063)
docs/api/deprecated-list.html
      167204 100%  117.73kB/s    0:00:01 (xfer#5, to-check=1049/1063)
docs/api/help-doc.html
       10463 100%   27.03kB/s    0:00:00 (xfer#6, to-check=1048/1063)
docs/api/index.html
        1399 100%    3.61kB/s    0:00:00 (xfer#7, to-check=1047/1063)
docs/api/overview-frame.html
       28532 100%   44.16kB/s    0:00:00 (xfer#8, to-check=1046/1063)
docs/api/overview-summary.html
       60507 100%   58.39kB/s    0:00:01 (xfer#9, to-check=1045/1063)
docs/api/overview-tree.html
     1114950 100%  126.99kB/s    0:00:08 (xfer#10, to-check=1044/1063)
docs/api/package-list
        4115 100%    6.38kB/s    0:00:00 (xfer#11, to-check=1043/1063)
docs/api/serialized-form.html
     1499294 100%  120.94kB/s    0:00:12 (xfer#12, to-check=1042/1063)
docs/api/stylesheet.css
        1391 100%    1.37kB/s    0:00:00 (xfer#13, to-check=1041/1063)
docs/api/index-files/
docs/api/index-files/index-1.html
      749599 100%  107.95kB/s    0:00:06 (xfer#14, to-check=1035/1063)
docs/api/index-files/index-10.html
      258969 100%  117.85kB/s    0:00:02 (xfer#15, to-check=1034/1063)
docs/api/index-files/index-11.html
       84952 100%   94.06kB/s    0:00:00 (xfer#16, to-check=1033/1063)
docs/api/index-files/index-12.html
      269850 100%   90.75kB/s    0:00:02 (xfer#17, to-check=1032/1063)
docs/api/index-files/index-13.html
      462569 100%  111.90kB/s    0:00:04 (xfer#18, to-check=1031/1063)
docs/api/index-files/index-14.html
      338993 100%  125.02kB/s    0:00:02 (xfer#19, to-check=1030/1063)
docs/api/index-files/index-15.html
      186915 100%   90.54kB/s    0:00:02 (xfer#20, to-check=1029/1063)
docs/api/index-files/index-16.html
      773522 100%  108.94kB/s    0:00:06 (xfer#21, to-check=1028/1063)
docs/api/index-files/index-17.html
       25326 100%   48.88kB/s    0:00:00 (xfer#22, to-check=1027/1063)
docs/api/index-files/index-18.html
      815983 100%  117.10kB/s    0:00:06 (xfer#23, to-check=1026/1063)
docs/api/index-files/index-19.html
     1853449 100%  120.97kB/s    0:00:14 (xfer#24, to-check=1025/1063)
docs/api/index-files/index-2.html
      361451 100%  103.79kB/s    0:00:03 (xfer#25, to-check=1024/1063)
docs/api/index-files/index-20.html
       98304  16%   95.33kB/s    0:00:05  
[sender] io timeout after 30 seconds -- exiting
rsync error: timeout in data send/receive (code 30) at io.c(140) [sender=3.0.8]

転送先のディレクトリを見ると以下のようになっている。

$ pwd
/home/username/to_dir/lowspeed/docs/api/index-files
$ ls | more
index-1.html
index-10.html
index-11.html
index-12.html
index-13.html
index-14.html
index-15.html
index-16.html
index-17.html
index-18.html

と、結果はオプションをつける前と変わらなかった。

また、実行中にテンポラリーディレクトリの中身を見たが何も存在していなかった

なお、テンポラリーではなく転送先ディレクトリの中身を監視したところ、転送先ディレクトリの中にテンポラリーファイルが作成されていた。

$ pwd
/home/username/to_dir/lowspeed/docs/api/index-files
$ ls -a | more
.
..
$ ls -a | more
.
..
.index-1.html.EMGxLc
$ ls -a | more
.
..
.index-10.html.rJKakp
index-1.html
$ ls -a | more
.
..
.index-12.html.x5E9O1
index-1.html
index-10.html
index-11.html

ということでこのオプションを使っても動きは何も変わらなかった

--temp-dir と --compare-dest の両方を使用した場合

rsync実行時のログは以下の通り。

$ rsync -avI --delete --progress -e ssh --bwlimit=128 --timeout=30 --temp-dir=/home/username/to_dir/tmp --compare-dest=/home/username/to_dir/tmp ./javadoc/ username@192.168.119.144:/home/username/to_dir/lowspeed
username@192.168.119.144's password: 
sending incremental file list
./
docs/
docs/index.html
       39679 100%    6.59MB/s    0:00:00 (xfer#1, to-check=1022/1025)
docs/api/
docs/api/allclasses-frame.html
      503784 100%  125.54kB/s    0:00:03 (xfer#2, to-check=1052/1063)
docs/api/allclasses-noframe.html
      427924 100%  103.41kB/s    0:00:04 (xfer#3, to-check=1051/1063)
docs/api/constant-values.html
     1267915 100%  116.77kB/s    0:00:10 (xfer#4, to-check=1050/1063)
docs/api/deprecated-list.html
      167204 100%  117.73kB/s    0:00:01 (xfer#5, to-check=1049/1063)
docs/api/help-doc.html
       10463 100%   26.89kB/s    0:00:00 (xfer#6, to-check=1048/1063)
docs/api/index.html
        1399 100%    3.60kB/s    0:00:00 (xfer#7, to-check=1047/1063)
docs/api/overview-frame.html
       28532 100%   44.09kB/s    0:00:00 (xfer#8, to-check=1046/1063)
docs/api/overview-summary.html
       60507 100%   58.45kB/s    0:00:01 (xfer#9, to-check=1045/1063)
docs/api/overview-tree.html
     1114950 100%  127.01kB/s    0:00:08 (xfer#10, to-check=1044/1063)
docs/api/package-list
        4115 100%    6.39kB/s    0:00:00 (xfer#11, to-check=1043/1063)
docs/api/serialized-form.html
     1499294 100%  121.04kB/s    0:00:12 (xfer#12, to-check=1042/1063)
docs/api/stylesheet.css
        1391 100%    1.37kB/s    0:00:00 (xfer#13, to-check=1041/1063)
docs/api/index-files/
docs/api/index-files/index-1.html
      749599 100%  108.19kB/s    0:00:06 (xfer#14, to-check=1035/1063)
docs/api/index-files/index-10.html
      258969 100%  118.01kB/s    0:00:02 (xfer#15, to-check=1034/1063)
docs/api/index-files/index-11.html
       84952 100%   94.17kB/s    0:00:00 (xfer#16, to-check=1033/1063)
docs/api/index-files/index-12.html
      269850 100%   90.59kB/s    0:00:02 (xfer#17, to-check=1032/1063)
docs/api/index-files/index-13.html
      462569 100%  112.04kB/s    0:00:04 (xfer#18, to-check=1031/1063)
docs/api/index-files/index-14.html
      338993 100%  125.11kB/s    0:00:02 (xfer#19, to-check=1030/1063)
docs/api/index-files/index-15.html
      186915 100%   90.63kB/s    0:00:02 (xfer#20, to-check=1029/1063)
docs/api/index-files/index-16.html
      773522 100%  109.05kB/s    0:00:06 (xfer#21, to-check=1028/1063)
docs/api/index-files/index-17.html
       25326 100%   49.17kB/s    0:00:00 (xfer#22, to-check=1027/1063)
docs/api/index-files/index-18.html
      815983 100%  117.48kB/s    0:00:06 (xfer#23, to-check=1026/1063)
docs/api/index-files/index-19.html
      720896  38%  126.92kB/s    0:00:08  
[sender] io timeout after 30 seconds -- exiting
rsync error: timeout in data send/receive (code 31) at io.c(140) [sender=3.0.8]

転送先のディレクトリを見ると以下のようになっている。

$ pwd
/home/username/to_dir/lowspeed/docs/api/index-files
$ ls  | more
index-1.html
index-10.html
index-11.html
index-12.html
index-13.html
index-14.html
index-15.html

と、結果はこれまでとと変わらなかった。

また、実行中のテンポラリーディレクトリの中身については --temp-dir 指定時と同様であった。

ということで --temp-dir と --comp-dest オプションを使っても動きは何も変わらなかった

ただ、なんとなく指定方法が間違っている、オプションが不足しているということがありそうな気がしてならない。



今回参考にさせていただいたサイト

xargsで全ファイルを touch する際に使い方を参考にさせていただいた
http://x68000.q-e-d.net/~68user/unix/pickup?xargs

CentOSでコマンドラインでネットワーク設定を変更したり起動停止したりする方法
http://d.hatena.ne.jp/bojovs/20081020/1224429418

rsync でのファイル操作についての情報
http://blog.livedoor.jp/sasata299/archives/51293802.html

--temp-dir と --comp-dest オプションについての説明
http://www.infoscience.co.jp/technical/rsync/rsync.html

0 件のコメント:

コメントを投稿