Resticも使ってみた。

投稿者: | 10月 6, 2022

食わず嫌いもなんなので、ファイルサーバーのバックアップ用途でResticも使ってみた。Ubuntuだと簡単に導入ができた。

 

環境

Ubuntu Server 20.04.5 amd64

 

インストール

apt -y install restic

 

Repositoryの設定

Repositoryは、オレオレ証明書のMinioを利用。証明書のベリファイを無効にできないので、root証明書をあらかじめ用意しておく必要がある。

export AWS_ACCESS_KEY_ID=<ACCESSKEY>
export AWS_SECRET_ACCESS_KEY=<SECRETKEY>
restic -r s3:192.168.11.5:9000/restictest --cacert rootCA.pem init

Kopia同様パスワードを設定する必要がある。

 

バックアップの実行

環境変数で、Repositoryとそのパスワードをしてからバックアップ

export RESTIC_REPOSITORY=s3:192.168.11.5:9000/restictest
export RESTIC_PASSWORD="<Repositoryのパスワード>"
restic backup /data --cacert=rootCA.pem

以下の結果が得られた。

repository b53deecc opened successfully, password is correct
created new cache in /root/.cache/restic

Files: 10503 new, 0 changed, 0 unmodified
Dirs: 0 new, 0 changed, 0 unmodified
Added to the repo: 1001.347 KiB

processed 10503 files, 499.025 MiB in 0:17
snapshot ce50b1b1 saved

500MBのバックアップで17秒だった。

ちなみにkopiaでのバックアップは、

Snapshotting root@ent1-kopia-test1:/data …
* 0 hashing, 10503 hashed (523.3 MB), 0 cached (0 B), uploaded 200 B, estimated 523.3 MB (100.0%) 0s left
Created snapshot with root k9064be20a6e552a19e834d7790fd2d7c and ID 4e69956fb3eb0776d922a7cabc5dc7b0 in 9s
Running full maintenance…
Looking for active contents…
Looking for unreferenced contents…
GC found 0 unused contents (0 B)
GC found 0 unused contents that are too recent to delete (0 B)
GC found 5 in-use contents (1 MiB)
GC found 2 in-use system-contents (1.1 KiB)
Rewriting contents from short packs…
Not enough time has passed since previous successful Snapshot GC. Will try again next time.
Skipping blob deletion because not enough time has passed yet (59m59s left).
Cleaned up 0 logs.
Cleaning up old index blobs which have already been compacted…
Finished full maintenance.

523MB(なぜ多い?)で9秒だった。

 

ストレージの消費容量

重複排除がかなり効くバックアップデータを利用。

Resticの場合は4.6MB

UntitledImage

kopiaの場合は、1.1MBだった。かなり重複排除が効いている。

UntitledImage

オレオレ証明書環境での使いやすさやパフォーマンス、ストレージ効率ともにkopiaの方が良さそう。

コメントを残す