> For the complete documentation index, see [llms.txt](https://docs.securitybot.gg/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.securitybot.gg/settings/recovery.md). Agents can also search and read this documentation through its [MCP server](https://docs.securitybot.gg/~gitbook/mcp).

# Recovery

Back up your server layout and put it back after a nuke or a mistake.

{% hint style="warning" %}
**Premium.** Recovery runs on the Premium Bot. It stays off until you turn it on.
{% endhint %}

Recovery keeps two things:

* **Backups:** snapshots of your roles, channels, categories, permissions, emojis and server settings. Optionally, who had which roles.
* **Recently deleted:** every deleted role, channel, category and emoji, with who deleted it. Kept for 90 days.

<figure><img src="https://3518259152-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MQwAXme9ouKllbB2Vwt%2Fuploads%2Fgit-blob-a706addab901621b241b863e1e8a4391f8341530%2Frecovery.png?alt=media" alt="Recovery page with backups and recently deleted items"><figcaption></figcaption></figure>

## Turn it on

{% tabs %}
{% tab title="Dashboard" %}

1. Open your server on [securitybot.gg](https://securitybot.gg) and go to **Recovery**.
2. Switch on **Recovery enabled**.
3. Under **Settings**, choose how often to back up and how many backups to keep.
4. Click **Save changes**.
   {% endtab %}

{% tab title="Commands" %}

```
/recovery enable
/recovery backup name:Before the event
/recovery status
```

{% endtab %}
{% endtabs %}

## Restore a backup

1. Under **Backups**, click **Restore** on a backup.
2. Pick what to restore. Security Bot shows every change before it runs.
3. Click **Restore**. Progress shows at the top, and you can cancel at any time.

In Discord, `/recovery restore [backup]` shows the plan with a confirm button. Without a number, it picks the newest backup from before a recent Anti-Nuke incident.

| Restore option                | Default |
| ----------------------------- | ------- |
| Missing roles                 | On      |
| Missing channels              | On      |
| Member roles                  | On      |
| Order                         | On      |
| Emojis                        | On      |
| Safety backup first           | On      |
| Server settings               | Off     |
| Undo changes                  | Off     |
| Delete new channels and roles | Off     |

## Restore deleted items

Under **Recently deleted**, select items and click **Restore selected**. Missing categories and roles they need come back too.

In Discord, find the IDs with `/recovery view`, then run `/recovery role`, `text`, `voice`, `category` or `emoji` with those IDs.

## After an attack

When Anti-Nuke or Beast Mode punishes someone, Recovery:

* keeps the newest backup from before the attack;
* pauses automatic backups for 2 hours, so a damaged layout doesn't replace good backups;
* with **Restore automatically after anti-nuke** on, restores everything that member deleted in the last 30 minutes.

## Settings

| Setting                               | Choices                                                    |
| ------------------------------------- | ---------------------------------------------------------- |
| Automatic backups                     | Every 6 or 12 hours, every day, every 2 days or every week |
| Automatic backups to keep             | 1 to 14, default 7                                         |
| Save member roles                     | Up to 50,000 members                                       |
| Restore automatically after anti-nuke | On or off                                                  |
| Ignored categories                    | Channels in these categories aren't backed up              |

## Limits

* 25 backups per server, 10 of them manual.
* 1,000 recently deleted items, kept 90 days.
* Security Bot needs **Administrator**. It can't change roles above its own.
* The server description isn't restored.
