# Backups schlagen bei Postgres 16 Datenbank (und allen PG&gt;13) fehl

**URL:** <https://meta.discourse.org/t/backups-fail-with-postgres-16-database-and-all-pg-13/343432>\
**Category:** Product Support\
**Created:** [19. Dezember 2024 um 17:58 UTC](https://meta.discourse.org/t/backups-fail-with-postgres-16-database-and-all-pg-13/343432 "2024-12-19T17:58:38Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [19. Dezember 2024 um 17:58 UTC](https://meta.discourse.org/t/backups-fail-with-postgres-16-database-and-all-pg-13/343432/1 "2024-12-19T17:58:38Z")

</div>

Backups funktionieren nicht mehr für eine PostgreSQL 16-Datenbank aufgrund von [diesem Commit](https://github.com/discourse/discourse_docker/commit/a0be7c92cee8087c2107b73610d13c85a6bab914#diff-cfbd0f106ae1a179fe1703cb50774d39c71660059b945cd93c551388a49b20bbR56), der `postgresql-client-${PG_MAJOR}` anstelle von `postgresql-client` installiert.

Löst dies ein Problem? Hatte der vom Betriebssystem bereitgestellte psql-Client nicht mit allen PostgreSQL-Versionen einwandfrei funktioniert?

Ich war überrascht, dass dieser Client PG16 auf einer Digital Ocean-Datenbank verwendete, aber ich dachte, ich wüsste, dass einige CDCK-Hosting jetzt PG15 verwenden.

Gibt es eine bessere Möglichkeit, ein funktionierendes Backup zu erhalten als etwas wie dieses:

```plaintext
run:
  - exec:
      cd: /var/www/discourse
      cmd:
        - apt-get update && apt-get remove -y postgresql-client-13 && apt-get install -y postgresql-client-16

```

Vielleicht kann ich PG\_MAJOR in einer ENV-Variable setzen?

---

_[View the full topic](https://meta.discourse.org/t/backups-fail-with-postgres-16-database-and-all-pg-13/343432)._
