前回: マイクラデータ・バックアップスクリプト( UNCパス→一時的なネットワークドライブ化対応) - 標準愚痴出力
どうも10 ギガを越えるサイズのバックアップデータのフルチェック(restic check --read-data
)をすると、ネットワーク関連(ftpd や Windows のファイル共有) が不具合を起こしてしまうケースが多い。
そこで restic のサーバーを試してみた。
手順
(1) rest-server をダウンロードする
restic/rest-server のリリースページ から、最新バージョンの rest-server_*_windows_amd64.tar.gz
というファイルをダウンロードする。
v0.13.0 でよいなら、以下でもよし
curl -O https://github.com/restic/rest-server/releases/download/v0.13.0/rest-server_0.13.0_windows_amd64.tar.gz
(2) サーバー側で restic-server を起動する
$ cd /D (レポジトリのディレクトリ) $ rest-server.exe --path . --no-auth Data directory: . Authentication disabled Private repositories disabled start server on [::]:8000
(3) クライアント側でサーバの URL をレポジトリ指定する
restic -r rest:http://(サーバーとなるPC名):8000/ check
$ restic -r rest:http://DESKTOP-XXXXXXX:8000/ check --read-data using temporary cache in C:\Users\xxxxxx\AppData\Local\Temp\restic-check-cache-1743458212 create exclusive lock for repository repository 4b90f469 opened (version 2, compression level auto) created new cache in C:\Users\xxxxxx\AppData\Local\Temp\restic-check-cache-1743458212 load indexes [0:01] 100.00% 4 / 4 index files loaded check all packs check snapshots, trees and blobs [0:02] 100.00% 4 / 4 snapshots read all data [1:13:07] 100.00% 673 / 673 packs no errors were found
結果
- 10GB超のデータでも、エラーは起きない
- 速度は別に早くない
スタンドアローンで実行すると数分で終わるので、rest-server 経由なら同じ程度を期待したが、実際は Windows のファイル共有と同じ程度の時間だった。
どうもやってることは ftpd と対して変わらなく、ネットワーク上を全データが飛ばして、ロジックはクライアント側で動かしているということか。とはいえ、さすが 64bit プロセスだけあって、エラーがまったく起きない。
さて、選択肢としてどうしたもんか
- ssh で
restic check --read-data
をサーバー側で直接キックする rest-server
を利用する- 信頼性は大丈夫だが、時間がかかる
- ファイル共有で利用するが
--read-data
オプション無しでチェックする- 全データチェックをしているわけではないので、信頼性に少し不安がある (考えすぎというのも否定できない)
追記
restic-server 、 Ctrl-C で中断した時 shutdown cleanly
とちゃんと表示してくれるところが嬉しい。行儀のよいソフトウェアだ。