Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

This article is a Private article. Only a writer and users who know the URL can access it.
Please change open range to public in publish setting if you want to share this article with other users.

More than 5 years have passed since last update.

繋がっていたインスタンスのDBが消えた場合、行うこと[WIP]

Last updated at Posted at 2018-04-18

繋がっていたインスタンスの管理者がオペミスでDBを消してしまったらしく、色々と問題が生じるといったことがありました。

その問題を解決した手順をまとめます。

手順

1. 繋がっていたインスタンスをドメインブロック&ブロック解除

まずドメインブロックをして一括ブロック&解除します。

これについては、もっといい方法があるかもしれません。

2. リモートアカウントをパージするrakeタスクの実行

これを実行します。

既知のリモートユーザをすべて確認し、存在しないアカウントを削除するタスクです。

-fオプションを与えると確認メッセージなしで実行できます。

Docker

sudo docekr-compose run --rm web rails mastodon:maintenance:purge_removed_accounts

非Docker

$ RAILS_ENV=production bundle exec rails mastodon:maintenance:purge_removed_accounts

参考記事

Mastodon 保守メモ - Qiita

documentation/List-of-Rake-tasks.md

0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?