# Discourse 및 Discourse restore 실패로 인한 정지

**URL:** https://meta.discourse.org/t/hangs-discourse-and-discourse-restore-failed/161248
**Category:** Self-hosting
**Created:** [8월 18, 2020, 8:57오전 UTC](https://meta.discourse.org/t/hangs-discourse-and-discourse-restore-failed/161248 "2020-08-18T08:57:03Z")
**Posts on this page:** 5
**Page:** 2

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [8월 24, 2020, 2:42오후 UTC](https://meta.discourse.org/t/hangs-discourse-and-discourse-restore-failed/161248/21 "2020-08-24T14:42:21Z")

</div>

백업에 동일한 이메일을 가진 두 명의 사용자가 있는 것 같습니다. 해당 사용자 중 한 명을 삭제하시거나, 이메일 주소를 변경한 뒤 새 백업을 생성하시겠습니까?

---

<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: [8월 24, 2020, 4:43오후 UTC](https://meta.discourse.org/t/hangs-discourse-and-discourse-restore-failed/161248/22 "2020-08-24T16:43:41Z")

</div>

손상된 인덱스가 있습니다. 비슷한 문제를 겪은 적이 있었는데(다른 테이블과 인덱스였던 것 같습니다), 해결 과정을 [Can't restore due to corrupt indexes (with some clues on how to deal with corrupt indexes)](https://meta.discourse.org/t/cant-restore-due-to-corrupt-indexes-with-some-clues-on-how-to-deal-with-corrupt-indexes/137400) 에 설명해 두었습니다. 사용자의 해결 방법은 다를 수 있지만, 거기에 설명한 내용이 문제를 해결하는 데 도움이 될 수 있습니다.

---

<div class="post-metadata">

### Author: ![neounix](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neounix/32/215617_2.png) [@neounix](https://meta.discourse.org/u/neounix)
#### Post date: [8월 25, 2020, 4:32오전 UTC](https://meta.discourse.org/t/hangs-discourse-and-discourse-restore-failed/161248/23 "2020-08-25T04:32:03Z")

</div>

> [@Dev\_Work](#):
>
> 기존 사이트의 컨테이너에 진입할 수 있습니다 (손상된 인덱스를 확인하는 방법은 무엇인가요?)

@Dev_Work 님, 안녕하세요.

좋은 소식입니다.

여러 가지 옵션이 있습니다. 바로 떠오르는 것 중 두 가지만 소개해 드리겠습니다:

> 사용자 테이블을 분석하고 재인덱싱합니다:

```plaintext
VACUUM ANALYZE users;

```

그 다음 다음을 실행할 수 있습니다:

```plaintext
REINDEX VERBOSE TABLE users

```

이렇게 하면 “테이블별” 기준으로 분석 및 재인덱싱이 수행됩니다(위 예시에서는 “users”).

> 또한 데이터베이스 전체에 대해 동일한 작업을 수행할 수도 있습니다.

```plaintext
VACUUM;
REINDEX DATABASE discourse;

```

어떤 방법을 사용하든, "기존 DB"에 대해 REINDEX를 수행한 후 새로운 백업을 생성하고, 이를 "새로운 DB"로 복원했을 때 어떻게 되는지 확인해 볼 수 있습니다.

도움이 되길 바랍니다.

참고:

[https://medium.com/@andreigridnev/db-maintenance-commands-in-postgresql-analyze-reindex-vacuum-4a14d75bee6c](https://medium.com/@andreigridnev/db-maintenance-commands-in-postgresql-analyze-reindex-vacuum-4a14d75bee6c)

---

<div class="post-metadata">

### Author: ![Dev\_Work](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dev_work/32/124200_2.png) [@Dev\_Work](https://meta.discourse.org/u/Dev_Work)
#### Post date: [8월 26, 2020, 8:13오전 UTC](https://meta.discourse.org/t/hangs-discourse-and-discourse-restore-failed/161248/24 "2020-08-26T08:13:43Z")

</div>

이 오류가 발생하는 이유는 무엇인가요?

```plaintext
[STARTED]
'system' has started the restore!
Marking restore as running...
Making sure /var/www/discourse/tmp/restores/default/2020-08-26-075829 exists...
Copying archive to tmp directory...
Unzipping archive, this may take a while...
Extracting dump file...
EXCEPTION: No space left on device @ io_write - /shared/tmp/restores/default/2020-08-26-075829/dump.sql
/var/www/discourse/lib/compression/gzip.rb:50:in `write'
/var/www/discourse/lib/compression/gzip.rb:50:in `<<'
/var/www/discourse/lib/compression/gzip.rb:50:in `block in extract_file'
/var/www/discourse/lib/compression/gzip.rb:45:in `open'
/var/www/discourse/lib/compression/gzip.rb:45:in `extract_file'
/var/www/discourse/lib/compression/strategy.rb:26:in `block (2 levels) in decompress'
/var/www/discourse/lib/compression/strategy.rb:18:in `each'
/var/www/discourse/lib/compression/strategy.rb:18:in `block in decompress'
/var/www/discourse/lib/compression/gzip.rb:30:in `get_compressed_file_stream'
/var/www/discourse/lib/compression/strategy.rb:15:in `decompress'
/var/www/discourse/lib/backup_restore/backup_file_handler.rb:86:in `extract_db_dump'
/var/www/discourse/lib/backup_restore/backup_file_handler.rb:23:in `decompress'
/var/www/discourse/lib/backup_restore/restorer.rb:42:in `run'
script/discourse:143:in `restore'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/thor-1.0.1/lib/thor/base.rb:485:in `start'
script/discourse:284:in `<top (required)>'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `load'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `kernel_load'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:28:in `run'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/cli.rb:476:in `exec'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor.rb:399:in `dispatch'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/cli.rb:30:in `dispatch'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/base.rb:476:in `start'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/cli.rb:24:in `start'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/exe/bundle:46:in `block in <top (required)>'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/friendly_errors.rb:123:in `with_friendly_errors'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/exe/bundle:34:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
Trying to rollback...
There was no need to rollback
Cleaning stuff up...
Removing tmp '/var/www/discourse/tmp/restores/default/2020-08-26-075829' directory...
Unpausing sidekiq...
Marking restore as finished...
Notifying 'system' of the end of the restore...
Finished!
[FAILED]
Restore done.

```

---

<div class="post-metadata">

### Author: ![Benjamin\_D](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/benjamin_d/32/277831_2.png) [@Benjamin\_D](https://meta.discourse.org/u/Benjamin_D)
#### Post date: [8월 26, 2020, 8:40오전 UTC](https://meta.discourse.org/t/hangs-discourse-and-discourse-restore-failed/161248/25 "2020-08-26T08:40:39Z")

</div>

솔직히, 아마도

> [@Dev\_Work](#):
>
> `No space left on device`

:question:

[Previous page](https://meta.discourse.org/t/hangs-discourse-and-discourse-restore-failed/161248.md?page=1)
