Skip to main content
Petto Vault is a private place to protect the configuration of your server. A backup is a snapshot of the structure of the server: roles, channels, permissions, emojis, stickers, AutoMod rules and the main server settings. It never stores messages, a member list, tokens or passwords.
Backups can be put under maintenance by the Petto team. While they are, !backup, its menu and the dashboard’s Backups page say so, and the scheduled backups are not taken. The backups you already have and your schedule are kept as they are.
Automatic backups are off until an admin turns them on. Every backup can be deleted at any time, and the backups of a server Petto has left are deleted 30 days after the last one.
kira types !backup and Petto answers that backups are under maintenance and the saved ones are kept

In Discord: while backups are under maintenance, !backup says so and does nothing else.

The Backups page covered by the notice Backups are under maintenance

Dashboard → Backups: the same notice on the dashboard.

What a backup keeps

  • Roles: name, color, icon, permissions, position, and whether they are shown separately or can be mentioned.
  • Channels and categories: names, order, topics, slowmode, voice settings, forum tags and defaults, and the permissions of each one.
  • Emojis and stickers (the animated Lottie stickers cannot be uploaded again, so a restore skips them).
  • AutoMod rules of Discord, with their exceptions and actions.
  • Server settings: name, icon and banner, description, language, verification level, notifications, system channel options and the special channels (rules, updates, AFK, safety alerts).
The only people in a backup are the ones named in the permissions of a channel (their ID), which is what a restore needs to put those permissions back.

Commands

Open the menu

The menu lets you create, list, export, restore, delete and schedule backups, and review the activity, from a list of choices. It is what opens if you type just !backup (!backups and !serverbackup work too).
The Petto Vault panel with three recent backups, a schedule every 24 hours keeping 7, and the menu to create, list, export, restore, delete and schedule

In Discord: the Backup Center of !backup panel.

The Backup Center with its menu open: create, list, export the latest, restore, delete, schedule and the activity

In Discord: the menu of !backup panel, open.

Create, list and export

liam creates a backup named Before changing roles and Petto says backup 8 was saved with 14 roles, 25 channels and 3 emojis

In Discord: !backup create with a name: the number and what was captured.

Petto lists backups 7, 6 and 5 with their names and how long ago they were made

In Discord: !backup list: number, name, automatic or manual, and when.

Petto says backup 6 is ready and attaches the file petto-backup-1290000000000000001-6.json

In Discord: !backup export: the backup as a JSON file.

export gives you a JSON file with the captured configuration.

Restore a backup

Only Administrators can restore. Nothing changes until you confirm, and a restore goes through steps:
shi runs !backup restore 6 and Petto answers in red that only Administrators can restore

In Discord: a member without Administrator cannot restore.

  1. Preview. Petto shows how many roles, channels and emojis it would create or update and, in replace mode, the names of the channels and roles it would delete.
  2. Human check. A picture with letters, like the one of the verification. Type the letters to continue.
  3. Safety backup. Petto saves the server as it is right now, so you can go back. Its number is shown at the end.
  4. Live progress. One message shows the phase and how far it is, with a Stop restore button. Only one restore runs at a time in a server.
Petto shows the plan of restoring backup 6 in merge mode, with Continue and Cancel

In Discord: the preview of a merge: what would be created and updated, nothing deleted.

Petto warns in red that replace would delete the channels spam-zone and old-events and the role Temp

In Discord: in replace mode the preview names what would be deleted.

The card asks to type the letters of the picture, shows K7M2Q, and has the buttons to type them, get a new picture or cancel

In Discord: after Continue: the picture with letters.

The Human check box with K7M2Q typed in

In Discord: the box where the letters are typed.

Petto's card restoring backup 6 at 45%, step 19 of 42, restoring channels, with a red Stop restore button

In Discord: one message shows the phase, how far it is and Stop restore.

Petto says backup 6 was restored in merge mode, that the safety backup is 8, and what was created and updated

In Discord: the end of the restore, with the number of the safety backup.

The mode can be:
  • merge (the safe one): creates what is missing and updates what exists. It deletes nothing.
  • replace: also deletes the channels and roles that are not in the backup.
A stopped restore keeps what it already did and deletes nothing more. replace deletes nothing at all if a role or channel could not be created, and it never deletes the channel you started from or the rules, system, updates and AFK channels.

Turn on automatic backups

Petto confirms automatic backups every 24h, keeping the latest 7, and when the next one runs

In Discord: !backup schedule 24 7: every 24 hours, keeping 7.

hours goes from 1 to 168 and keep from 1 to 30 (7 when you leave it out). Example: !backup schedule 24 7 takes a backup every 24 hours and keeps the last 7 automatic ones. To turn them off:
Petto confirms that automatic backups are disabled

In Discord: !backup unschedule.

Delete backups

Only Administrators can delete, and Petto asks you to confirm first. Deleting all backups also turns off the automatic ones. In the menu it is Delete backups (type a number, or ALL).
liam runs !backup delete 5 and Petto asks in red whether to delete backup 5, with Delete and Cancel

In Discord: Petto asks before deleting a backup.

The question changes to Backup 5 deleted

In Discord: after Delete.

Petto asks in red whether to delete all 3 backups and turn off the automatic backups

In Discord: deleting every backup also turns off the automatic ones.

The Delete backups box with 5 typed in the Backup number, or ALL field

In Discord: in the menu, Delete backups asks for a number or ALL.

Review the activity

Shows who created, exported, restored or deleted backups and who changed the schedule: the last 10 entries, or up to 20 with limit.
Petto lists the activity: an export by liam, a scheduled backup made by Petto, a backup by liam and a schedule change

In Discord: !backup audit: who did what, and when.

Use it from the dashboard

Dashboard → Backups does the same: create, export, schedule, review the activity and delete. Restore opens a dialog with the same steps (mode, what to bring back, preview, human check) and then shows live progress with a Stop restore button.
The Backups page with Create a backup, Automatic backups every 24 hours keeping 7, three saved backups, the Your data card and the activity history

Dashboard → Backups: create, schedule, the saved backups with Export, Restore and delete, Your data and the activity.

The restore dialog with the contents of backup 6, roles, channels and emojis to create and update, and in red the 2 channels and 1 role it would delete

Dashboard → Backups → Restore: what the backup holds, what would be created and updated, and what replace would delete.

The check step with the picture K7M2Q, the answer typed and the Start restore button

Dashboard → Backups → Restore: type the letters of the picture, then Start restore.

Restoring backup 6 at 45%, step 19 of 42, restoring channels, with the Stop restore button

Dashboard → Backups → Restore: the progress of the restore, with Stop restore.

Restore finished, with the number created, updated and deleted and the note that safety backup 8 has the server as it was

Dashboard → Backups → Restore: the end, with what changed and the safety backup.

The Delete a backup dialog asking whether to delete backup 5, with Cancel and Delete

Dashboard → Backups: deleting one backup asks first.

Restore only some parts

In the dashboard you can choose what to bring back. Untick what should stay as it is now:
  • Roles
  • Channels, categories and permissions
  • Server settings
  • Emojis
  • Stickers
  • AutoMod rules
The first step of the restore dialog: Merge or Replace, and the six parts to bring back, all ticked

Dashboard → Backups → Restore: the mode and What to bring back.

replace only deletes inside the parts you bring back, so restoring only the channels never deletes a role. The preview also says what the backup holds: roles, categories, channels, permission overwrites, emojis, stickers and AutoMod rules.
Restoring only some parts is a dashboard option. !backup restore always brings back every part.
The Your data card says what is kept and lets you turn off the automatic backups or delete everything. The dashboard never talks to the database directly. The actions go through the bot, which checks in Discord that you have Manage Server or Administrator in that server (restoring and deleting need Administrator).

Dedicated database

Vault uses its own PostgreSQL connection through PETTO_VAULT_DATABASE_URL. Set the password as a private variable on the host and never publish it in the repository. The bot and the dashboard share a private secret: