forked from baron/baron-sso
Add personnel dataset backup filtering
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
BACKUP_SUPPORTED_SERVICES="postgres ory-postgres clickhouse ory-clickhouse config"
|
||||
BACKUP_SUPPORTED_DATASETS="full personnel"
|
||||
|
||||
backup_repo_root() {
|
||||
if [[ -n "${BACKUP_REPO_ROOT:-}" ]]; then
|
||||
@@ -65,6 +66,18 @@ normalize_service_filter() {
|
||||
printf '%s\n' "$normalized"
|
||||
}
|
||||
|
||||
normalize_dataset_profile() {
|
||||
local raw="${1:-full}"
|
||||
|
||||
[[ -n "$raw" ]] || raw="full"
|
||||
if ! grep -qw -- "$raw" <<<"$BACKUP_SUPPORTED_DATASETS"; then
|
||||
backup_die "unknown backup dataset: $raw"
|
||||
return 1
|
||||
fi
|
||||
|
||||
printf '%s\n' "$raw"
|
||||
}
|
||||
|
||||
service_enabled() {
|
||||
local service="$1"
|
||||
local services="$2"
|
||||
|
||||
Reference in New Issue
Block a user