unix:postgres

Postgres container backup

/usr/bin/podman exec db pg_dumpall -U postgres -c | zstdmt > /var/backup/db/manual/$(hostname -f)_$(date +%F)_$(date +%s).sql.zst

Postgres container restore

 zstdcat /var/backup/db/manual/dump.sql.zst | /usr/bin/podman exec -i db psql -U postgres --
  • unix/postgres.txt
  • Last modified: 2020-12-21T17:43:28+0100
  • by Wolfgang