templates/usr/local/bin/authentik-backup.sh.j2 aktualisiert

Storing idea about having nice backup script
This commit is contained in:
Lars Hahn 2024-07-24 13:47:46 +02:00
parent 7ca52f7374
commit 7bc0a29fa0

View File

@ -29,3 +29,29 @@ docker exec -i $POSTGRES_DOCKER_ID /usr/local/bin/createdb --username {{ authent
docker exec -i $POSTGRES_DOCKER_ID /usr/local/bin/psql --username {{ authentik_db.user }} -d {{ authentik_db.name }} < $TARGETFOLDER/authentik-postgres-backup.sql docker exec -i $POSTGRES_DOCKER_ID /usr/local/bin/psql --username {{ authentik_db.user }} -d {{ authentik_db.name }} < $TARGETFOLDER/authentik-postgres-backup.sql
docker-compose down docker-compose down
docker-compose up -d docker-compose up -d
(
flock -n 9 || {
echo "PERFORMANCE TEST ABORTED! ALREADY RUNNING!";
exit 1;
}
if [[ $(id -u) != 0 ]]; then
echo "Performance test aborted; please become root in order to run a performance test.";
exit 1;
fi
case $tooling in
"atlassian")
echo "blah";
;;
*)
# I know this looks stupid, only one case, but in future we want to use TaaS/TReX aswell...
# So let's make it future safe!
echo -e "Invalid tooling '$tooling'.Please check help for correct list."
exit 1
;;
esac
echo ""
) 9>/var/run/lock/devstack-loadtest.lock;