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

Improvement/backup routine #286

Merged
merged 4 commits into from
May 3, 2024
Merged

Improvement/backup routine #286

merged 4 commits into from
May 3, 2024

Conversation

jsmatias
Copy link
Member

Hotfix: The flag --users ensures that the users details are also included in the exported realm file.

@jsmatias jsmatias self-assigned this Mar 15, 2024
@jsmatias jsmatias requested a review from PGijsbers April 18, 2024 14:35
Copy link
Collaborator

@PGijsbers PGijsbers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See remark. I don't need a change, but I want motivation for the choice before accepting.

@@ -9,7 +9,7 @@ source .env
DATA_PATH=$(realpath "$DATA_PATH")
LOCAL_BACKUP_PATH="$DATA_PATH"/keycloak_realm

docker exec -i keycloak /bin/bash -c "/opt/keycloak/bin/kc.sh export --file /tmp/aiod.json --realm aiod"
docker exec -i keycloak /bin/bash -c "/opt/keycloak/bin/kc.sh export --file /tmp/aiod.json --realm aiod --users realm_file"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you choose the realm_file option? I am not that familiar to keycloak yet, but to me it seems that separate file(s) for users through same_file or different_files to save users independently from configuration is very useful. You can easily share/back-up configurations without sharing users. You can also rollback one without rolling back the other. For simplicity, same_file is probably fine.

c.f. https://www.keycloak.org/server/importExport

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes sense, but the only reason why I used the realm_file option is that after some search I couldn't find any simple way of importing users to Keycloak on start up when they are in a separate file.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created #304 so we can merge this now.

Copy link
Collaborator

@PGijsbers PGijsbers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, created #304 as follow up.

@PGijsbers PGijsbers merged commit bfd88eb into develop May 3, 2024
1 check passed
@PGijsbers PGijsbers deleted the improvement/backup-routine branch May 3, 2024 07:50
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.

2 participants