Postgres 문제 (아마도)

여기서 discourse 설정 스크립트를 가져왔습니다.
GitHub - discourse/discourse_docker: A Docker image for Discourse · GitHub /var/discourse

새로운 discourse 인스턴스를 생성할 때는 잘 실행됩니다.

하지만 기존 discourse 데이터를 사용하여 앱을 다시 구축하려고 할 때 문제가 발생합니다.

로그의 일부는 다음과 같습니다:

**syncing data to disk ... ok**

**Success. You can now start the database server using:**

**    pg_ctlcluster 10 main start**

**Warning: The selected stats_temp_directory /var/run/postgresql/10-main.pg_stat_tmp**
**postgresql.conf.**
**is not writable for the cluster owner. Not adding this setting in**
**Ver Cluster Port Status Owner    Data directory              Log file**
**10  main    5433 down   postgres /var/lib/postgresql/10/main /var/log/postgresql/postgresql-10-main.log**
**update-alternatives: warning: forcing reinstallation of alternative /usr/share/postgresql/12/man/man1/postmaster.1.gz because link group postmaster.1.gz is broken**
**invoke-rc.d: could not determine current runlevel**
**invoke-rc.d: policy-rc.d denied execution of start.**
**Processing triggers for postgresql-common (215.pgdg100+1) ...**
**Building PostgreSQL dictionaries from installed myspell/hunspell packages...**
**Removing obsolete dictionary files:**
**Stopping PostgreSQL 10 database server: main.**
**Stopping PostgreSQL 12 database server: main.**
**Performing Consistency Checks**
**-----------------------------**
**Checking cluster versions                                   ok**

**The source cluster was not shut down cleanly.**
**Failure, exiting**
**-------------------------------------------------------------------------------------**
**UPGRADE OF POSTGRES FAILED**

**Please visit https://meta.discourse.org/t/postgresql-12-update/151236 for support**

**You can run ./launcher start app to restart your app in the meanwhile**




**FAILED**
**--------------------**
**Pups::ExecError: /root/upgrade_postgres failed with return #<Process::Status: pid 47 exit 1>**
**Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'**
**exec failed with the params "/root/upgrade_postgres"**
**43aeccc15b54cbb03c8d665c755aa666012088aaeb8bbd7437faf68d70c28634**
**** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.**
**./discourse-doctor may help diagnose the problem.**

권한 문제인 것 같습니다.

해당 토픽을 확인해 보셨나요?

다른 서버에서 이동한 데이터인가요? 해당 서버는 정상적으로 작동하나요? 백업을 가져와서 새 서버에 복원해 볼 수 있을까요?

링크된 토픽에 이 문제에 대한 FAQ 항목이 있습니다. 아래 지시를 따르세요:

그 주제에서 단서를 찾아보셨나요?
네, 하지만 지금까지는 아무것도 도움이 되지 않았습니다.

다른 서버에서 옮긴 데이터인가요?
네.

그 서버는 정상적으로 작동하고 있나요?
아니요.

백업을 받아 새 서버에 복원할 수 있나요?
아니요, /var/discourse 폴더 전체를 복사해서 데이터를 가져올 수 있을 뿐입니다.

지침을 따라 봤는데도 문제가 여전히 남아 있어요.

데이터베이스가 실행 중인 상태에서 서버 간에 데이터를 복사해서 그대로 작동하기를 기대할 수 없습니다.

서버 간 마이그레이션을 수행하려면 백업 기능을 사용하고 Discourse 인스턴스를 다른 서버로 이동하기 문서를 따르세요.