Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord Server Backup Bot

A simple Python Discord bot for creating and restoring server structure backups.

Features

  • /backup create — create a backup
  • /backup list — list backups
  • /backup restore — restore a backup
  • /backup delete — delete a backup
  • Backs up roles, permissions and positions
  • Backs up categories and channels
  • Backs up channel permission overwrites
  • Backs up text, announcement, voice, stage and forum channel settings where supported
  • Backs up custom emojis and downloads their assets
  • Saves backups as readable JSON files
  • Restore is additive by default and does not delete existing channels or roles

Important limitations

Discord does not provide a normal bot API for restoring old message history, so messages are not included.

Server ownership and other Discord-managed resources cannot be recreated by a bot. Managed/integration roles are skipped.

The bot needs enough permissions to create/edit the resources it is restoring. Administrator is recommended for a simple setup.

Setup

1. Install Python

Python 3.10 or newer is recommended.

2. Install dependencies

pip install -r requirements.txt

3. Create your Discord bot

Create an application in the Discord Developer Portal, create a bot, and copy its token.

Invite it to your server with the permissions it needs. Administrator is the simplest option for testing.

4. Configure .env

Copy .env.example to .env:

DISCORD_TOKEN=your_token
GUILD_ID=your_server_id
BACKUP_DIR=./backups

Never upload .env to GitHub.

5. Run

python bot/main.py

The bot registers the /backup command to the configured GUILD_ID.

Commands

/backup create
/backup create name:my-backup
/backup list
/backup restore name:my-backup
/backup delete name:my-backup

Only members with Administrator permission can use these commands.

Backup format

Each backup is stored as JSON in backups/. Downloaded emoji assets are stored in a matching *-assets folder.

Made By @jveu

About

Simple Python Discord bot that backups you're server and you can restore anytime!

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages