#!/bin/sh

set -eo pipefail

PGPASSWORD='{{ taiga_db_pass }}' /usr/pgsql-15/bin/pg_dump \
  --clean \
  --create \
  --username={{ taiga_db_user | quote }} \
  --host={{ taiga_db_server | quote }} \
  --port={{ taiga_db_port }} \
  {{ taiga_db_name | quote }} | \
  zstd -c > {{ taiga_root_dir }}/backup/{{ taiga_db_name | quote }}.sql.zst

