Skip to content

feat: chunker polynomial and copy-chunker-params-from for init - #1954

Draft
AlphaJack wants to merge 1 commit into
rustic-rs:mainfrom
AlphaJack:feat/init-chunker-params
Draft

AlphaJack wants to merge 1 commit into
rustic-rs:mainfrom
AlphaJack:feat/init-chunker-params

Conversation

@AlphaJack

Copy link
Copy Markdown

Fixes #1900
Follow-up to #1907 and rustic-rs/rustic_core#604

Draft until rustic-rs/rustic_core#604 is merged, as until then CI fails to compile.

  • set-chunker-polynomial (from rustic_core) works in [init], init, backup --init and config.
  • copy-chunker-params-from ([init], init, backup --init) opens the repository of the given profile and takes its chunker, polynomial and chunk sizes, overriding the other chunker options. This is the equivalent of restic's init --from-repo … --copy-chunker-params; the repository is referenced by profile, like copy targets.
  • [init] is now InitOptions (the new option plus the flattened ConfigOptions); unknown keys are still rejected.
  • RusticConfig::from_profile replaces the profile loading in copy.

Tests: tests/init.rs.

`set-chunker-polynomial` comes from rustic_core. `copy-chunker-params-from`
takes the chunker parameters of the repository of another profile, like
restic's `init --from-repo ... --copy-chunker-params`. Both work in
`[init]`, `init` and `backup --init`.

Requires rustic_core with `set_chunker_polynomial`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: set init options (chunker, pack sizes) in the config profile

1 participant