Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Keycloak
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ansible
Roles
Keycloak
Commits
da6efe34
Commit
da6efe34
authored
5 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
Add daily db backup
parent
f2776c25
No related branches found
Branches containing commit
Tags
v2.5.4
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tasks/keycloak.yml
+11
-0
11 additions, 0 deletions
tasks/keycloak.yml
templates/docker-compose.yml
+1
-0
1 addition, 0 deletions
templates/docker-compose.yml
with
12 additions
and
0 deletions
tasks/keycloak.yml
+
11
−
0
View file @
da6efe34
...
...
@@ -32,3 +32,14 @@
src
:
vhost.conf
dest
:
/etc/apache2/sites-available/{{ item.id }}.conf
with_items
:
'
{{
keycloak_settings
}}'
-
name
:
Setup crontab for backups
cron
:
name
:
Backup Keycloak DB {{ item.id }}
hour
:
3
minute
:
35
job
:
docker exec -it keycloak_postgres_1 /usr/lib/postgresql/11/bin/pg_dump --file=/tmp/backups/dump_$(date +"%m_%d_%Y").sql --username=keycloak > /dev/null 2>&1
disabled
:
'
{{
crons_disabled|default(false)
}}'
with_items
:
'
{{
keycloak_settings
}}'
tags
:
-
cron
This diff is collapsed.
Click to expand it.
templates/docker-compose.yml
+
1
−
0
View file @
da6efe34
...
...
@@ -9,6 +9,7 @@ services:
image
:
postgres
volumes
:
-
postgres_data:/var/lib/postgresql/data
-
/var/backups/keycloak/{{ item.id }}:/tmp/backups
environment
:
POSTGRES_DB
:
keycloak
POSTGRES_USER
:
keycloak
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment