restic: pass RESTIC_FEATURES from the repository Secret to the mover

Aperta Adatta ai principianti
#2,233 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
69/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
go, kubernetes

Direzione di ricerca

Individua dove il mover restic riceve RESTIC_COMPRESSION e RESTIC_PACK_SIZE dal Secret del repository, poi segui quel percorso fino all’ambiente del mover. Fai passare la chiave RESTIC_FEATURES attraverso lo stesso percorso. Il risultato è raggiunto quando il valore del Secret del repository è presente nell’ambiente del mover; l’issue non indica un test, quindi individua il test pertinente per la configurazione del mover oppure aggiungi una copertura per questo comportamento.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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".

Lingua principale
Go
Stelle
1.1k
Fork
105
Merge medio
3g 17h
PR unite (30g)
11

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di backube/volsync

Tutte le issue di backube/volsync

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.