mattermost/backup-postgres.sh
2025-04-09 15:13:16 -04:00

15 lines
266 B
Bash

if [ "$1" == "pre-backup" ]; then
exit
fi
if [ "$1" == "post-backup" ]; then
exit
fi
if [ "$1" == "pre-restore" ]; then
exit
fi
if [ "$1" == "post-restore" ]; then
pg_restore -U $POSTGRES_USER -d $POSTGRES_DB -c /var/lib/postgresql/data/postgres-backup
fi