-
-
Notifications
You must be signed in to change notification settings - Fork 274
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
Unable to upgrade from 2.10.2 > 3.0.0 #1373
Comments
Thanks for reporting. The structure of the generated configuration has drastically changed from previous version, so I guess I might have missed some combination when migrating the old structure. I'll try to investigate. |
Thanks! Let me know if you'd like me to test anything or provide any other reports. |
I found the root cause. I'll release a fix between tomorrow afternoon and the weekend. |
I have just released Shlink 3.0.2. You should be able to update from 2.10.x directly to it and it should properly migrate the database config when using SQLite. https://github.com/shlinkio/shlink/releases/tag/v3.0.2 |
Alright, so am I doing something wrong here, @acelaya? It's still not migrating. Here is my command
|
Hmm, that is weird. It should not be asking you that. I'll check tomorrow again. I'm not sure what I might have missed this time. |
Would you mind sharing your existing generated config here? It's the |
I have been doing some tests, and I cannot reproduce it anymore with Shlink 3.0.2 I have followed these steps:
The only option I can think of is that there's some config combination I might be missing, that's why i was asking about your config. |
Here is my config file.
|
So, I wasn't looking very carefully at the single command I use to download, move and update shlink each new version. It appears I didn't update it to reflect
So, I redid each command individually this time. And it migrated....HOWEVER...I'm still running into a critical error.
|
Could it be that in this last try, when you did the database backup (I see the I'm asking because I just repeated the whole process once again, even using your config, and everything worked: https://youtu.be/Yvg0Ao9vnzA If that's not the case, I would recommend copying it manually to the new folder (if there's already a database.sqlite file in the new one, just remove it), and then, run |
So that It appears that the current issue might be a permissions item with my
|
If I attempt to access the original download of
|
But that is probably expected. Have you ever initialized Shlink on that one? Otherwise, it won't have a database at all, and trying to do anything will initialize an empty one, throwing that kind of error, because the tables do not exist.
We might be onto something here. What I think happened in your last attempt is that everything worked except copying the database file itself, hence, this suggestion:
After that you will end up with a working copy of Shlink 3.0.2 with your older database. |
Alright, so this worked....kind of. Here is what I did:
However, I am getting an error when trying to pull up the
In fact, my entire DB is now without domains. It has short urls, but no domains. So I get short urls like this: |
What you are missing now are all the steps of the update. You don't have the generated config (that's why it's not showing the domain, not because you don't have domains in the database), and you don't have the generated proxies (that's why it throws those errors in which it fails to open some files). |
So, I had to do the update, again. Still not clear why I had to do it again, since all the I finally got it. I decided to use the original untouched
Then I downloaded
I then removed the database from
I then performed the install updated again and referenced my
Thank you for the assistance with this. Not sure where and how I messed it all up originally. One last thing, why do I get this error message each time I
Again, thank you for your patience with this. |
I'm super glad to hear that. I'm not sure what happened in the middle of the process, but at least everything is there now.
It's actually not an error. For some reason, the library I use to run Shlink commands from the CLI, displays that ERR prefix when running a sub-process in verbose mode, which is quite confusing. But if you check, it's actually a successful output. I'll try to report it to them. Or maybe it's me, that I'm redirecting the standard output of the sub-process to the error output of the parent process. I'll check that as well. |
Hi @acelaya. So, I'm really not sure what's going on with my install. I just tried to update from 3.0.2 to 3.0.3 and I'm still getting error messages and a failure to migrate.
Am I going to have to manually migrate my database each time I upgrade shlink?
|
I seem to be having a similar issue when upgrading from 2.10.2 > 3.0.0
How Shlink is set-up
Shlink Version: 3.0.0
PHP Version: 8.0.14
How do you serve Shlink: Self-hosted, Apache 2.4.4, Ubuntu 20.04 LTS
Database engine used: SQLite
Summary
Trying to upgrade from 2.10.2 to 3.0.0 and v3 is unable to migrate v2 database.
Behavior
The CLI accepts the previous instance path, but then it asks to setup the database, though one already exists. Completing the CLI questions results in a broken install and database not migrated. If I tried to enter other paths, but the CLI will tell me those aren't valid, so obviously my initial path is correct.
Originally posted by @antwonw in #1357 (comment)
The text was updated successfully, but these errors were encountered: