Authelia: add backup for storage database
This commit is contained in:
10
files/authelia/backup.template.sh
Normal file
10
files/authelia/backup.template.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eu
|
||||
set -o pipefail
|
||||
|
||||
echo "{{ app_name }}: backup data with gobackups"
|
||||
|
||||
(cd "{{ base_dir }}" && gobackup perform --config "{{ gobackup_config }}")
|
||||
|
||||
echo "{{ app_name }}: done."
|
||||
@@ -1026,7 +1026,7 @@ storage:
|
||||
##
|
||||
local:
|
||||
## Path to the SQLite3 Database.
|
||||
path: '/config/authelia_storage.sqlite3'
|
||||
path: '/data/authelia_storage.sqlite3'
|
||||
|
||||
##
|
||||
## MySQL / MariaDB (Storage Provider)
|
||||
|
||||
@@ -10,6 +10,7 @@ services:
|
||||
- "monitoring_network"
|
||||
volumes:
|
||||
- "{{ config_dir }}:/config"
|
||||
- "{{ data_dir }}:/data"
|
||||
|
||||
authelia_redis:
|
||||
image: valkey/valkey:9.0-alpine
|
||||
|
||||
16
files/authelia/gobackup.template.yml
Normal file
16
files/authelia/gobackup.template.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
# https://gobackup.github.io/configuration
|
||||
|
||||
models:
|
||||
|
||||
authelia:
|
||||
compress_with:
|
||||
type: 'tgz'
|
||||
storages:
|
||||
local:
|
||||
type: 'local'
|
||||
path: '{{ backups_dir }}'
|
||||
keep: 3
|
||||
databases:
|
||||
users:
|
||||
type: sqlite
|
||||
path: "{{ (data_dir, 'authelia_storage.sqlite3') | path_join }}"
|
||||
Reference in New Issue
Block a user