YunoHost-Apps / mastodon_ynh

Free, open-source social network for YunoHost
https://joinmastodon.org/
GNU Affero General Public License v3.0
84 stars 34 forks source link

Adverstive the tootctl self-destruct command #340

Open Tagadda opened 1 year ago

Tagadda commented 1 year ago

Describe the bug

When you want to delete your instance from the federation, you need to run tootctl self-destruct

Erase this server from the federation by broadcasting account Delete activities to all known other servers. This allows a “clean exit” from running a Mastodon server, as it leaves next to no cache behind on other servers. This command is always interactive and requires confirmation twice.

No local data is actually deleted, because emptying the database or deleting the entire VPS is faster. If you run this command then continue to operate the instance anyway, then there will be a state mismatch that might lead to glitches and issues with federation.

https://docs.joinmastodon.org/admin/tootctl/#self-destruct

Expected behavior

TBD

:warning: We don't want to run this command when the package is removed automagically during a failure.

lapineige commented 1 year ago

Could that be a config panel option ? Or a remove script prompt that would ask you to use a special argument to either remove it after failure/for migration stuff, or remove it from federation.

Tagadda commented 9 months ago

We can't use the remove script to run the self-destruct command.

A running Sidekiq process is required, so do not shut down the server until the queues are fully cleared. https://docs.joinmastodon.org/admin/tootctl/#self-destruct

We should advertise this command somewhere in the documentation.