Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration from MySQL to SQLite #50

Open
Ashaxer opened this issue Jul 21, 2024 · 2 comments
Open

Migration from MySQL to SQLite #50

Ashaxer opened this issue Jul 21, 2024 · 2 comments

Comments

@Ashaxer
Copy link

Ashaxer commented Jul 21, 2024

I know everyone is saying that MySQL is better than SQLite but I do not use its options like writing queries, etc...
Because of the large number of users in my panel and multiple node statics, I'm facing some annoying issues because of my database type.

  • The backup file is getting big and generating a huge load of logs. Because of the limitation of telegram uploads via bot API, I cannot upload my database to the telegram for backing-up purposes.
  • I'm facing issues trying to restore my backup. The backup script excludes unnecessary log files from being archived. Because of the issue in restoring the database, I have to include all of the files including the mentioned log files into my custom archive to restore the database successfully. Note that the mentioned archive size is something around 1.2 GB
  • using much more amount of memory and space storage and being slower than SQLite

P.S. All of the problems mentioned are only specific for MySQL database type. None of them happened when my database was SQLite type
Therefore I need help to convert my database back to sqlite3 format.

@SaintShit
Copy link
Contributor

Hi @Ashaxer, I think you should have opened this issue on Marzban's repository. but anyway, you can enhance your MySQL performance with some modifications. like you said, the logs are unnecessary, so you can disable them. (--disable-log-bin)
For taking backup, it might be better to use mysqldump and upload the dump file to Telegram?
However, if you're eager to get back to SQLite, you still can dump mysql data and import it to SQLite. the process is somehow straightforward, and online guides are provided.

@SaintShit
Copy link
Contributor

Limiting the logs of docker containers could also be a good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants