8000 Add rbac/config/named_collections_restore_always options by Slach · Pull Request #1598 · Altinity/clickhouse-backup · GitHub
[go: up one dir, main page]

Skip to content

Add rbac/config/named_collections_restore_always options - #1598

Merged
Slach merged 1 commit into
masterfrom
restore_always_options
Oct 6, 2026
Merged

Slach merged 1 commit into
masterfrom
restore_always_options

Conversation

@Slach
@Slach Slach commented Oct 5, 2026
Copy link
Copy Markdown
Collaborator

Summary

  • New general options rbac_restore_always, config_restore_always, named_collections_restore_always (env RBAC_RESTORE_ALWAYS, CONFIG_RESTORE_ALWAYS, NAMED_COLLECTIONS_RESTORE_ALWAYS), restore-side counterparts of *_backup_always.
  • When enabled they act like --rbac / --configs / --named-collections for restore and restore_remote (including --streaming). A CLI flag can't be switched off by config.
  • All default to false, because these restores are destructive:
    • RBAC / configs restore overwrite existing objects/files and run restart_command;
    • named collections restore runs DROP NAMED COLLECTION IF EXISTS + CREATE for every collection in backup, and fails if the same name is defined in XML config on the target server.
  • Applied before the embedded ON CLUSTER worker reset (only the initiator restores them) and after cloud layout detection (so restore_remote -> restore_cloud isn't rejected).
  • Flag help, Manual.md and ReadMe.md regenerated via generate_manual.sh; testflows default_config snapshot updated.

Test plan

  • TestApplyRestoreAlways unit test
  • go test ./...
  • default-config / print-config with env overrides show the new keys in snapshot order
  • CI integration / testflows

🤖 Generated with Claude Code

restore and restore_remote restore RBAC, configs and named collections
only when --rbac/--configs/--named-collections is passed, there was no
config counterpart of *_backup_always for restore. The new
general->*_restore_always options enable the same flags from config.

All three default to false: RBAC and configs restore overwrite existing
objects/files and restart clickhouse-server, named collections restore
drops and re-creates same-named SQL collections and fails when the name
is defined in XML on the target server.

Options are applied before embedded ON CLUSTER worker reset (initiator
only restores them) and after cloud layout detection (restore_cloud
doesn't support these flags).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Slach
Slach merged commit b62b6c4 into master Oct 6, 2026
30 checks passed
@Slach Slach modified the milestones: 2.8.3, 2.8.2 Oct 6, 2026
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.

1 participant

0