A advanced Discord.js bot that lets you backup, restore, and wipe Discord server configurations using slash commands.
Useful for testing servers, cloning setups, or keeping a safe copy of your server structure.
- Backup Server
- Saves server structure (channels, roles, permissions, etc.)
- Restore Backup
- Restore a saved backup to a server
- Wipe Server
- Clear server structure before restoring
- Permission Checks
- Only authorized users can run commands
- Local Backup Storage
- Backups saved inside
/backupsfolder
- Backups saved inside
backup-tool/
├── backups/ # Saved backups
├── src/
│ ├── commands/ # Slash commands
│ │ ├── backup.js
│ │ ├── restore.js
│ │ └── wipe.js
│ ├── services/ # Backup logic
│ │ ├── backupService.js
│ │ ├── restoreService.js
│ │ └── wipeService.js
│ ├── clearCommands.js
│ └── index.js # Bot entry point
├── utils/
│ └── permissionUtils.js
├── .env
└── package.json
- Node.js v18+
- Discord Bot Token
- Discord Application + Guild ID
-
Clone or download the project
git clone https://github.com/ryukadll/backup-tool.git cd backup-tool -
Install dependencies
npm install
-
Configure environment variables
Edit
.env:DISCORD_TOKEN=your_bot_token CLIENT_ID=your_application_id GUILD_ID=your_test_server_id
-
Run the bot
npm start
Once the bot is running, slash commands will register automatically.
Creates a backup of the current server structure.
Restores a previously saved backup.
Deletes channels/roles to prepare for restoring a backup.
Backups are stored locally in:
/backups
You can move or rename files manually if needed.
Make sure the bot has permissions to:
- Manage Channels
- Manage Roles
- View Channels
- Read Message History
And only trusted users should have access to backup/restore commands.
Restoring or wiping a server cannot be undone.
Always:
- Test on a separate server first
- Keep multiple backups
Run bot in dev mode:
node src/index.jsEdit commands inside:
src/commands/
Logic is inside:
src/services/
MIT License — free to use and modify.
Pull requests and improvements are welcome!
If you find a bug or want a feature, open an issue.
- Backup messages
- Cloud storage support
- Web dashboard
- Scheduled backups
Enjoy safe Discord server backups!
