Skip to the content.

Discord Backup Bot

🚀 A Discord bot to automatically back up your server messages data1

Supported Python versions PEP8 Discord.py GitHub License

Docker Build Docker Hub

Discord

Commands

!backup all

a. The channel ID:

!backup 992974919547756566

b. or the channel mention:

!backup #general

Required Permissions

Bot

Read Messages, Send Messages, Embed Links, Attach Files, Read Message History.

User

Only members with Administrator permission can use the bot.


Self-Hosting & Development

Requirements

⬇️ Installation

git clone https://github.com/Alyetama/auto-discord-server-backup.git
cd auto-discord-server-backup
pip install -r requirements.txt && rm -rf src

⌨️ Usage

python bot.py

🐳 Docker

docker run -d -e BOT_TOKEN="xxxxxxxxxxxxx" alyetama/discord-backup-bot:latest

🔧 Advanced (Docker-Compose)

Optional: You can use the Docker-Compose file to host the bot, a self-hosted S3-compatible Object Storage to upload the backup data (MinIO), and a URL shortner to shorten the presigned URLs (Polr).
First, uncomment and set the optional environment variables in the .env file, Then, run:

docker-compose up -d
  1. ⚠️ The backup files are meant for archival purposes. You cannot restore your server using the backup files.