최근에 Discourse 서버를 설정했습니다. 그 전에 trydiscourse.com에서 며칠 동안 시험 기간을 거쳤습니다. 서버를 설정할 때 trydiscourse.com에서 시험 기간 데이터를 백업하여 다운로드했고, 이 데이터를 자체 호스팅 Discourse에 성공적으로 복원했습니다.
약 일주일 후, 시험 기간이 끝나갈 무렵 trydiscourse.com에서 다시 백업을 다운로드하여 복원을 시도했습니다. 이번에는 복원이 실패했습니다. 로그는 다음과 같습니다:
[2022-03-05 01:31:08] [STARTED]
[2022-03-05 01:31:08] 'Joaquin' has started the restore!
[2022-03-05 01:31:08] Marking restore as running...
[2022-03-05 01:31:08] Making sure /var/www/discourse/tmp/restores/default/2022-03-05-013108 exists...
[2022-03-05 01:31:08] Copying archive to tmp directory...
[2022-03-05 01:31:08] Unzipping archive, this may take a while...
[2022-03-05 01:31:08] Extracting dump file...
[2022-03-05 01:31:08] Validating metadata...
[2022-03-05 01:31:08] Current version: 20220220234155
[2022-03-05 01:31:08] Restored version: 20220223161000
[2022-03-05 01:31:08] EXCEPTION: You're trying to restore a more recent version of the schema. You should migrate first!
[2022-03-05 01:31:08] /var/www/discourse/lib/backup_restore/meta_data_handler.rb:31:in `validate'
/var/www/discourse/lib/backup_restore/restorer.rb:112:in `validate_backup_metadata'
/var/www/discourse/lib/backup_restore/restorer.rb:43:in `run'
/var/www/discourse/script/spawn_backup_restore.rb:23:in `restore'
/var/www/discourse/script/spawn_backup_restore.rb:36:in `block in <main>'
/var/www/discourse/script/spawn_backup_restore.rb:4:in `fork'
/var/www/discourse/script/spawn_backup_restore.rb:4:in `<main>'
[2022-03-05 01:31:08] Trying to rollback...
[2022-03-05 01:31:08] There was no need to rollback
[2022-03-05 01:31:08] Cleaning stuff up...
[2022-03-05 01:31:08] Removing tmp '/var/www/discourse/tmp/restores/default/2022-03-05-013108' directory...
[2022-03-05 01:31:08] Marking restore as finished...
[2022-03-05 01:31:08] Notifying 'Joaquin' of the end of the restore...
지금까지 조사한 결과에 따르면, 예외 메시지에서 "먼저 마이그레이션해야 합니다!"라고 언급된 "스키마(schema)"는 Discourse가 사용하는 데이터베이스와 관련이 있는 것 같습니다.
Discourse Meta를 찾아보았지만 이 문제에 대해 논의하는 사람을 찾지 못했습니다. 또한 Discourse를 최신 버전으로 업데이트한 후 다시 복원을 시도해 보았지만, 결과는 동일했습니다. 도움이 될 만한 관련 도구가 있는지 Discourse 파일들을 살펴봤지만, 유망한 것은 찾지 못했습니다.
현재 제 추측은, 자체 호스팅 Discourse를 설정한 후 일주일 동안 trydiscourse.com의 시험 기간 포럼에서 어떤 변경 사항이 있었을 것이라는 것입니다.
질문은 다음과 같습니다:
- 오류 메시지가 제안하는 마이그레이션을 어떻게 수행할 수 있나요?
- 이 복원 실패의 정확한 원인은 무엇인가요? 이는 일반적으로(시험 기간에서 자체 호스팅으로의 전환 중이 아닌 경우) 발생할 수 있는 일인가요?
도움 주시면 감사하겠습니다! ![]()