Emudevs - MMORPG Development

Immerse yourself in a world of limitless possibilities and open the gateway to mmo emulation.

Backup Manager Bot: Streamline Your Database Backups with Discord Integration | Self-Hosted Solution

PrivateDonut pepeD

Content Creator
Mythical

1

100%

Status

Posts

542

Likes

261

Rep

4

11

Months of Service

Early Supporter

LEVEL 21
240 XP

Introduction:​

The Database Management Discord Bot, developed in Python, offers a robust solution for managing MySQL database backups directly within Discord. Users can initiate manual backups, set up automated routines, and handle both the export and import of backups through an intuitive interface. This seamless integration ensures efficient database management and enhances data portability, all from the convenience of your Discord server.

Commands:​

Manual Commands:
  1. database_list {database name}
    • List the last two backups available for the selected database
    • Example: /database_list website
  2. database_backup {database name}
    • Select the database you wish to backup.
    • Example: /database_backup website
  3. database_restore {databasename} {backup_name}
    • Restore a local backed up database.
    • The backup name has to include the full name from the backup folder + the .sql extension
    • Example: /database_restore website website_20231020112604.sql
Automated Commands
  1. backup_auto_start
    • Enable automated backups for your MySQL Databases.
  2. backup_auto_stop
    • Disable automated backups for your MySQL Databases.
  3. backup_auto_list_db
    • Lists all databases that are setup that backs up automatically.
  4. backup_auto_add_db {database name}
    • Add a database you wish to be backed up automatically(default every 12 hours)
    • Example: /backup_auto_add_db website
  5. backup_auto_remove_db {database name}
    • Remove a database you wish to no longer take automatic backups from.
    • Example: /backup_auto_remove_db website

Screenshots:​

1697819341169-png.3830

1697819354135-png.3831

1697819366319-png.3832

1697819406149-png.3833

1697819418528-png.3834

1697819431072-png.3835

1697819440701-png.3836

1698909045327

Download:​

GitHub Repository

How To Setup:​

- Setup Discord Bot Application
- Windows Setup Guide
- Linux tutorial coming soon...

Future Enhancements:
I am actively considering adding a remote backup option to provide more flexibility in data management. Stay tuned for updates!

Feedback and Support:
Your feedback on how I can enhance the bot is greatly appreciated. If you have any questions or need assistance, please don't hesitate to reach out.

Thank you for choosing my Discord bot, and I hope you find it invaluable!
 
Last edited:
Reactions:
Liked by 3 members:

splicho

キューティー ( ✿ •̀ ‸ •́ ✿ )
Administrator

1

100%

Status

Offline

Posts

813

Likes

535

Rep

6

Bits

5,038

1

Years of Service

LEVEL 31
565 XP
Oh wow, nice release! I think I have never seen a bot like this before. Hmm what about you host the bot and let other people invite the bot to their servers 🤔 Would that work ?

Or add the bot to Top.gg
 
Reactions:
Liked by 1 member:

PrivateDonut pepeD

Content Creator
Mythical

1

100%

Status

Posts

542

Likes

261

Rep

4

11

Months of Service

Early Supporter

LEVEL 21
240 XP
Oh wow, nice release! I think I have never seen a bot like this before. Hmm what about you host the bot and let other people invite the bot to their servers 🤔 Would that work ?

Or add the bot to Top.gg

Thank you! I'm unsure if there are any other bots similar to this one; I haven't checked personally, but probably so. :pikaOMG:

Interestingly, during my discussions with @JadaDev while I was developing this bot, we discussed a similar concept. The idea involved hosting the bot and managing databases for users, all while employing encryption to ensure that only the end user possesses the decryption key for backups in case they ever need to restore or retrieve them.

I'm well aware of the concerns that arise when entrusting data to a third party, which is why I decided to take a different route. I've chosen to release the source code for the bot, enabling users to host it themselves and maintain control over their data's security.

In the coming days and weeks, I'll be dedicating some extra time to enhancing the bot's security, alongside working on a few other projects that I plan to release soon :pogU:

If anyone has any ideas for a nice discord bot they might like to see, let me know :pepeJAM:
 
Reactions:
Liked by 2 members:

Allelujah Ghost V2

Azayaka
Administrator

0

0%

Status

Offline

Posts

241

Likes

95

Rep

4

Bits

8,905

8

Months of Service

LEVEL 21
535 XP
This is a pretty neat idea. Is there a reason someone would go this route instead of creating procedures?

Even if this is self-hosted, there would be the risk that if somehow the bot found its way into someone else's server.. or if permissions were incorrectly set up, the database could become vulnerable to outside attacks.

I know that you're working on security in the following weeks, but do you have any plans or ideas of how you'll secure this bot and its commands? I would also encourage you to NOT host this bot. Let it be self-hosted, if anything. The last thing you want is to become a target and have someone attack you to gain access to the users and passwords of many databases. That's how I'm believing this would work if you were to host for other people. You'd need to have the bot store a username/password and share an IP address to be approved for remote logins. So sanitizing all inputs would be necessary.

I think there's a better approach to this that doesn't include Discord. This is a cool idea nonetheless.
 
Reactions:
Liked by 1 member:

MuDZaHeDiN

Mythical
Mythical

0

0%

Status

Posts

82

Likes

44

Rep

1

11

Months of Service

LEVEL 8
11 XP
Cool project, I've been working on something similar. My project's goal was that you don't need a website anymore and everything can be queried via Discord and even the registration runs via the Discord ID etc.. However, due to time constraints I have cancelled the project for the time being.
 
Reactions:
Liked by 1 member:

PrivateDonut pepeD

Content Creator
Mythical

1

100%

Status

Posts

542

Likes

261

Rep

4

11

Months of Service

Early Supporter

LEVEL 21
240 XP
This is a pretty neat idea. Is there a reason someone would go this route instead of creating procedures?

Even if this is self-hosted, there would be the risk that if somehow the bot found its way into someone else's server.. or if permissions were incorrectly set up, the database could become vulnerable to outside attacks.

I know that you're working on security in the following weeks, but do you have any plans or ideas of how you'll secure this bot and its commands? I would also encourage you to NOT host this bot. Let it be self-hosted, if anything. The last thing you want is to become a target and have someone attack you to gain access to the users and passwords of many databases. That's how I'm believing this would work if you were to host for other people. You'd need to have the bot store a username/password and share an IP address to be approved for remote logins. So sanitizing all inputs would be necessary.

I think there's a better approach to this that doesn't include Discord. This is a cool idea nonetheless.

I pursued this project out of personal interest rather than for any specific functional advantage. The bot is designed to be entirely self-hosted, and I don't intend to provide a version where I oversee the backups for each server it operates on. This decision is rooted in both security considerations and a lack of interest in managing external server data. So I made a few easy-to-follow tutorials so users can set the bot up themselves.

The current configuration of the bot requires it to operate within a designated server and channel, as determined by the server and channel IDs provided by the user in the env file. This ensures the bot functions exclusively in the specified locations. In an upcoming update, I'm introducing two additional features for enhanced access control. The first feature will allow the host to limit the bot's interaction to a single user, identified by their user ID. The second feature will enable restriction of command usage to users with a specific role ID. These enhancements aim to alleviate concerns about potential misconfigurations of the channel settings.

Cool project, I've been working on something similar. My project's goal was that you don't need a website anymore and everything can be queried via Discord and even the registration runs via the Discord ID etc.. However, due to time constraints I have cancelled the project for the time being.

Thank you! I was actually working on a similar project using both soap and queries to manage a lot of things directly from discord without the need of having a website. But I haven't worked on it lately, as I have been busy at work and other side projects. :D
 
Reactions:
Liked by 3 members:

splicho

キューティー ( ✿ •̀ ‸ •́ ✿ )
Administrator

1

100%

Status

Offline

Posts

813

Likes

535

Rep

6

Bits

5,038

1

Years of Service

LEVEL 31
565 XP
I pursued this project out of personal interest rather than for any specific functional advantage. The bot is designed to be entirely self-hosted, and I don't intend to provide a version where I oversee the backups for each server it operates on. This decision is rooted in both security considerations and a lack of interest in managing external server data. So I made a few easy-to-follow tutorials so users can set the bot up themselves.

The current configuration of the bot requires it to operate within a designated server and channel, as determined by the server and channel IDs provided by the user in the env file. This ensures the bot functions exclusively in the specified locations. In an upcoming update, I'm introducing two additional features for enhanced access control. The first feature will allow the host to limit the bot's interaction to a single user, identified by their user ID. The second feature will enable restriction of command usage to users with a specific role ID. These enhancements aim to alleviate concerns about potential misconfigurations of the channel settings.



Thank you! I was actually working on a similar project using both soap and queries to manage a lot of things directly from discord without the need of having a website. But I haven't worked on it lately, as I have been busy at work and other side projects. :D
So everyone is responsible for their own security, which is not your job when you release it as self-hosted.
 

PrivateDonut pepeD

Content Creator
Mythical

1

100%

Status

Posts

542

Likes

261

Rep

4

11

Months of Service

Early Supporter

LEVEL 21
240 XP
So everyone is responsible for their own security, which is not your job when you release it as self-hosted.

Extactly, I am offering a few options to help restrict it but its up to the end user to configure it correctly on there side. :D
 
Reactions:
Liked by 1 member:

Allelujah Ghost V2

Azayaka
Administrator

0

0%

Status

Offline

Posts

241

Likes

95

Rep

4

Bits

8,905

8

Months of Service

LEVEL 21
535 XP
I pursued this project out of personal interest rather than for any specific functional advantage. The bot is designed to be entirely self-hosted, and I don't intend to provide a version where I oversee the backups for each server it operates on. This decision is rooted in both security considerations and a lack of interest in managing external server data. So I made a few easy-to-follow tutorials so users can set the bot up themselves.

The current configuration of the bot requires it to operate within a designated server and channel, as determined by the server and channel IDs provided by the user in the env file. This ensures the bot functions exclusively in the specified locations. In an upcoming update, I'm introducing two additional features for enhanced access control. The first feature will allow the host to limit the bot's interaction to a single user, identified by their user ID. The second feature will enable restriction of command usage to users with a specific role ID. These enhancements aim to alleviate concerns about potential misconfigurations of the channel settings.



Thank you! I was actually working on a similar project using both soap and queries to manage a lot of things directly from discord without the need of having a website. But I haven't worked on it lately, as I have been busy at work and other side projects. :D

Much better solution.

Back when I worked on a discord Bot, we had a file where you'd identify the owner via .env file. You would take your discord ID and put it in the OWNER variable. It doesn't work that way anymore, but you could research some ideas here: https://github.com/mishalhossin/Discord-AI-Chatbot if you don't already know what solution you're going to do.
 

1,814

Members

1,014

Threads

8,446

Posts
Newest Member
Top