Gozargah / Marzban-node

Proxy Node for Marzban
GNU Affero General Public License v3.0
153 stars 70 forks source link

Migration from MySQL to SQLite #50

Open Ashaxer opened 3 months ago

Ashaxer commented 3 months ago

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.

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 commented 3 months ago

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 commented 3 months ago

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