#!/bin/sh

set -eo pipefail

PGPASSWORD={{ odoo_db_pass | quote }} /usr/pgsql-16/bin/pg_dump \
  --format=custom \
  --clean \
  --username={{ odoo_db_user }} \
  --host={{ odoo_db_server }} \
  --file={{ odoo_root_dir }}/backup/{{ odoo_db_name }}.sqlc \
  {{ odoo_db_name }}
