restic: pass RESTIC_FEATURES from the repository Secret to the mover

オープン 初心者向け
#2,233 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
69/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go, kubernetes

調査の方向性

restic mover がリポジトリの Secret から RESTIC_COMPRESSION と RESTIC_PACK_SIZE を受け取る箇所を見つけ、その経路を mover の環境までたどってください。RESTIC_FEATURES キーも同じ経路で渡してください。リポジトリの Secret の値が mover の環境に存在すれば完了です。issue ではテストが指定されていないため、関連する mover 設定テストを特定するか、この動作をカバーするテストを追加してください。

索引モデルが issue の本文から書いたものです。

説明

Missing restic feature flags on the mover: backups from copyMethod: Clone rewrite every directory's metadata on nearly every sync, and the restic flag that prevents it cannot be set.

Describe the feature you'd like to have.
Pass RESTIC_FEATURES from the repository Secret to the restic mover, the way RESTIC_COMPRESSION and RESTIC_PACK_SIZE are passed today.

What is the value to the end user? (why is it a priority?)
restic stores the device ID of every file and directory. Each sync's Clone is a new volume and usually gets a different device ID, so restic treats every directory as changed and writes all of its tree metadata again, even though the files are unchanged.

On a volume of 77k files in 58k directories, a nightly sync that added 108 files reported this in restic snapshots --json:

files_new: 108   files_unmodified: 77234
dirs_changed: 58141   dirs_unmodified: 0   tree_blobs: 56153

14 of 15 nightly syncs looked like that. The whole tree is stored again in the repository and in the cache volume each time.

restic's device-id-for-hardlinks feature flag avoids it. Two clones of one volume (8,000 files in 421 directories), backed up one after the other with the restic in the v0.17.0 image:

second backup dirs changed tree blobs written
default 421 422
RESTIC_FEATURES=device-id-for-hardlinks=true 0 0

How will we know we have a good solution? (acceptance criteria)
A RESTIC_FEATURES key in the repository Secret is set in the mover's environment.

Additional context
VolSync v0.17.0 (restic 0.19.1), OpenEBS Local PV ZFS. restic lists the flag as alpha: "store deviceID only for hardlinks to reduce metadata changes for example when using btrfs subvolumes. Will be removed in a future restic version after repository format 3 is available".

主要言語
Go
スター
1.1k
フォーク
105
平均マージ
3日 17時間
マージ済み PR(30日)
11

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

backube/volsync のほかの issue

backube/volsync の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。