Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User Migration : Migrate users with roles to another CH #1536

Open
akshayparseja opened this issue Oct 16, 2024 · 3 comments
Open

User Migration : Migrate users with roles to another CH #1536

akshayparseja opened this issue Oct 16, 2024 · 3 comments

Comments

@akshayparseja
Copy link

Hi, we plan on selfhosting another CH for scale-test purpose and want to migrate all users to the new CH aswell, we have been using api calls to create users which do not add into the config maps , hence passwords for users are not available.
Is there a way to migrate all users using a query to another CH with the roles they have.

@alex-zaitsev
Copy link
Member

@akshayparseja , yes, you can do it with https://github.com/Altinity/clickhouse-backup/, see --rbac-only option.

If you are using operator, you need to deploy clickhouse-backup as a sidecar. See podTemplate example here: https://github.com/Altinity/clickhouse-operator/blob/master/tests/e2e/manifests/chit/tpl-clickhouse-backups.yaml

@akshayparseja
Copy link
Author

akshayparseja commented Oct 17, 2024

Hi, thanks for your reply, i already have a clickhouse backup running, i am skipping tables like system and information, if i want to perform the users migration , i shall back those aswell right?
or a DB backup includes user roles and credentials to migrate

@alex-zaitsev
Copy link
Member

Users are not stored in system tables. System tables are more like 'views'. Users can be stored in configuration (in this case it is a part of CHI spec), local storage or replicated storage (Zoo)Keeper.

In latter cases DB backup includes all RBAC data, including users and roles. And you can backup only RBAC (no data), using --rbac-only flag.

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

No branches or pull requests

2 participants