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