# Postgres 16 데이터베이스(및 PG\>13 전체)에서 백업 실패

**URL:** https://meta.discourse.org/t/backups-fail-with-postgres-16-database-and-all-pg-13/343432
**Category:** Support
**Created:** [12월 19, 2024, 5: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:** 6

<div class="post-metadata">

### Author: ![wilson29thid](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wilson29thid/32/173700_2.png) [@wilson29thid](https://meta.discourse.org/u/wilson29thid)
#### Post date: [6월 14, 2025, 9:28오후 UTC](https://meta.discourse.org/t/backups-fail-with-postgres-16-database-and-all-pg-13/343432/6 "2025-06-14T21:28:56Z")

</div>

여러분 안녕하세요, 오늘 이 문제를 겪었습니다. 증상이 대략 6일 동안 백업 실패에 대한 알림을 계속 받았다는 것이었고, 주요 로그 줄은 다음과 같았습니다:

```plaintext
[2025-06-14 03:30:20] pg_dump: error: aborting because of server version mismatch
[2025-06-14 03:30:20] pg_dump: detail: server version: 16.9; pg_dump version: 15.12 (Debian 15.12-1.pgdg120+1)

```

저는 Digital Ocean 드롭렛에서 실행되는 Ubuntu 환경에서 권장 설치 가이드를 사용하여 Discourse를 운영합니다. 다만 postgres 컨테이너 대신 Digital Ocean의 관리형 Postgres 데이터베이스를 사용하고 있습니다. 제 데이터베이스를 확인해 보니 pg 16이 실행 중입니다. 최근에 업그레이드된 것 같지는 않고(어쨌든 주요 버전 업그레이드가 자동으로 이루어질 것 같지도 않지만), 확인을 위해 지원팀에 이메일을 보냈습니다.

어쨌든, 제 조사 결과 이 페이지로 이어졌습니다. @pfaffman 님이 게시한 YAML을 어디에 배치해야 할지 확신이 서지 않아서 명령어를 수동으로 실행했고, 이 문제를 마주치는 다른 분들을 위해 공유하고자 합니다:

- `cd /var/discourse`
- `launcher enter app`
- `apt list --installed | grep postgres` # 현재 설치된 버전이 15임을 확인하기 위함
- `apt-get update`
- `apt-get remove postgresql-client-15`
- `apt-get install postgresql-client-16`

그 후 [관리자 백업 페이지](https://forums.29th.org/admin/backups/logs)에서 수동 백업을 트리거했습니다.

이것이 문제를 일시적으로 해결한 것 같지만, @pfaffman 님이 지적했듯이 다음에 Discourse를 업그레이드할 때 다시 `postgresql-client-15`로 되돌아갈 것이며, 백업이 다시 작동하지 않아 위의 수동 개입이 필요할 것으로 예상됩니다.

Discourse를 업그레이드할 때마다 이 단계를 반복해야 하는 것을 제외하고 이 문제에 대한 해결책이 있을까요?

---

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