#!/bin/sh

set -eo pipefail

PGPASSWORD='{{ n8n_db_pass }}' /usr/pgsql-16/bin/pg_dump \
  --format=custom \
  --clean \
  --create \
  --username={{ n8n_db_user | quote }} \
  --host={{ n8n_db_server | quote }} \
  {{ n8n_db_name | quote }} \
  -f {{ n8n_root_dir }}/backup/{{ n8n_db_name | quote }}.sqlc

