-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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 SQLite to MySQL/MariaDB #5280
Comments
Please see https://github.com/louislam/uptime-kuma/wiki/Migration-From-v1-To-v2
TL;DR: Not having this be part of the process is likely fine. v1 is quite limited in its scalablity (see #4500) anyways. |
It would at least be good to have a guide on how to export, convert and import from sqlite to MySQL/MariaDB. I tried this manually myself yesterday and couldn't get it to work. |
It is possible to migrate, I did it manually and by manual I mean:
I'm running MariaDB now and haven't noticed any problems so far. |
@monster010 nice !! It will be interesting to note this in Wiki migrate v1 SQLite to v2 Mariadb. |
Sorry, but as stated above: If you/somebody else creates a gist with an update script, that is fine for us though, we can link that. |
If someone, even if unofficially, can shed some light into the steps required, or perhaps prepared a script in order to automate this - please share. |
no success while importing converted db to mariadb
i will try to play with python sqlite3mysql |
Hello, i have have successfully migrate from SQlite3 to Mariadb in this way on V2 beta 1. Than you need to shutdown uptime-kuma container to get the sqlite3 database in a concice state (kuma.db) Then modify your docker compose to add mariadb in the game, here is the example of mine that i use in a swarm docker environnement
Thus update the db config file in uptime db-config.json to point to mariadb Spinup Uptime-Kuma container thus it will populate the MariadB database schema for Uptime. In the way you want, the idea is to use a tool called sqlite3mysql to import kuma.db to your mariadb, here is how i've done: i have copy from the docker host the file kuma.db inside uptime-kuma container data directory to the data directory of mariadb (corresponding inside the container to /var/lib/mysql), then while the mariadb container is running, i enter inside and do this:
you will get a screen like that while migrating, it can take a while Start your uptime-kuma container and you should retrive your data on screen coming from mariadb! |
@cmbcbe Thanks a lot! Works as a charm! |
π I have found these related issues/pull requests
Related to #5274, wanting to migrate to MySQL.
π·οΈ Feature Request Type
Deployment
π Feature description
With a correct db-config.json file pointing to the MySQL instance, the tables are created but it is treated as a new installation. No tables are migrated.
Tested this with a copy of the database and a separate container.
βοΈ Solution
In my case I would like to migrate my current installation on the latest version of v1 to v2, but directly migrating/importing in MySQL instead of sqlite3.
β Alternatives
No response
π Additional Context
No response
The text was updated successfully, but these errors were encountered: