News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Upgrade strategy from 1.1.18 to 2.0.11

Started by Zsolteey, October 20, 2015, 03:59:10 PM

Previous topic - Next topic

Zsolteey

Hi,

I have a forum with version 1.1.18. I'm using some packages and mods for example Tinyportal, Gallery, Ads, Google Member map, language pack.
I want to upgrade this forum to 2.0.11.
I want to test the upgrade in a test environment and I want to publish a complete/working site into the production environment.

My ideal upgrade procedure would be:
1. Backup the prod forum files and databases.
2. Restore the backed up files and database in a test environment.
3. Upgrade the test site, solve the problems, apply and configure mods and test everything.
4. Create a new database on the prod site and restore the test database into the new one.
5. Shut down the prod forum.
6. Replace the prod site files with the updated files from the test site.
7. "Sync" the databases: new topics and posts which are posted after the first step have to add to the new database.
8. Configure the upgraded frontend to use the new database (which is updated and contains all the topic and post which was post until the shut down - step 5).
9. Start the new updated forum.

The first six step is OK for me. My big problem is step 7. Is it possible to do this? If yes, how? What is the supported/recommended upgrade process in my situation?

Thank you!

Sincerely,
Zsolteey.

Sir Osis of Liver

Import the 1.1.18 production db into a scratch db on the new 2.0.11 production install, upload the upgrade files from the 2.0.11 Large Upgrade package, run upgrade.php to upgrade the 1.1.18 db to 2.0.11.
Even if the whole world has forgotten,
The song remembers when.

                              - H. Prestwood

Illori

if you are moving the file location for SMF you also need to run What is repair_settings.php? before you can run the upgrade.

Kindred

to be clear... 
you either need to upgrade BEFORE you move and then move the upgraded files and database
OR
move the forum, confirm that it is working in the new location using 1.1.x and THEN run the upgrade...

trying to move and upgrade at the same time is a sure road to major issues.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Zsolteey

Quote from: Sir Osis of Liver on October 20, 2015, 04:14:07 PM
Import the 1.1.18 production db into a scratch db on the new 2.0.11 production install, upload the upgrade files from the 2.0.11 Large Upgrade package, run upgrade.php to upgrade the 1.1.18 db to 2.0.11.

Thank you for the answer. Could you a little bit more explain this?
As I said I want to build a complete test environment and if there everything is OK then I want to move the whole solution to the prod.
If in the prod I start a scratch db I lose for example the updated Tinyportal tables.
I think if I'm doing the way you written I have to rebuild the site in prod what I don't want. In the prod site I want that the upgrade looks like a "switchover". I shut down the old site, I sync the new/change db content, start the upgraded site.

Zsolteey

Quote from: Kindred on October 20, 2015, 04:52:55 PM
to be clear... 
you either need to upgrade BEFORE you move and then move the upgraded files and database
OR
move the forum, confirm that it is working in the new location using 1.1.x and THEN run the upgrade...

trying to move and upgrade at the same time is a sure road to major issues.

Yes, it's clear. I want to move the site to the test environment. I start the 1.1.18 version in the test I change the path and I confirm that the 1.1.18 is working.
After I make the upgrade in the test.
After the upgrade is done and every mod and everything that I need is working I plan to move back it into the prod.
There is my problem. Maybe the upgrade in test takes days, weeks, months. I have to merge this timeframe's posts into the upgraded db. But I have to keep something from the upgraded db for example the new Tinyportal content, the updated mods content and so on. So when I'm moving back the db to prod I can't start from scratch.

margarett

The upgrader will only touch the tables which relate to SMF. So TP's tables aren't touched. This means that you can upgrade again, then pick your modified tables and copy them to your upgraded database. Of course this is harder to do if your content goes into smf tables...

Anyway, you should prepare some downtime, warn your users before you go at it. The upgrade can take somewhere between some minutes and several hours (depending on the size of the database), then you need to tweak the content you prepared during the downtime, then test it, then go live.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Illori

Quote from: Zsolteey on October 20, 2015, 05:03:25 PM
I have to merge this timeframe's posts into the upgraded db.

if the upgrade works fine, then do the upgrade on the live forum dont try to do a merge of stuff that is just asking for issues as the database structure between SMF 1.1 and SMF 2.0 has some major changes.

Zsolteey

Quote from: margarett on October 20, 2015, 05:47:31 PM
The upgrader will only touch the tables which relate to SMF. So TP's tables aren't touched. This means that you can upgrade again, then pick your modified tables and copy them to your upgraded database. Of course this is harder to do if your content goes into smf tables...

Anyway, you should prepare some downtime, warn your users before you go at it. The upgrade can take somewhere between some minutes and several hours (depending on the size of the database), then you need to tweak the content you prepared during the downtime, then test it, then go live.

Yes of course, it takes minutes and hours it's ok. What I don't want is that I take the upgrade and after I have a half broken site. For example the forum is working but the TP main page is broken or the mods not available. If I take the upgrade in prod and after the site has problems for weeks that's not looks so good. Because of this I want to do everything in the test where I have time to solve the problems and after I want to transfer my shiny new site to prod.

So these are the steps if I understand well:

1. Backup the prod forum files and databases.
2. Restore the backed up files and database in a test environment --> The old site is working in test.
3. Upgrade the test site, solve the problems, apply and configure mods and test everything.
4. Create a new database on the prod site and restore the test (updated) database into the new one.
5. Shut down the prod forum.
6. Replace the prod site files with the updated files from the test site.
7. Backup the old forum database.
8. Restore the old forum database to the new database. Replace the tables which are exists in the backup. Which are not (for example the new TP tables) let untouched.
9. Configure the upgraded frontend to use the new database (settings.php)
10. From the large upgrade zip copy the upgrade.php and the SQL scripts to the new site.
11. Run upgrade.php which is upgrade the tables.
12. Configure the mods that uses SMF tables to store its config.
13. Start the new updated forum.

Should it work?

margarett

I wouldn't do it like that...

* Duplicate your live site to your test environment
* Play with it, upgrade it, theme it, MOD it. Make note of what you did, you'll need it.
* Repeat as much as you like until you are cool with the look and layout. Then add the content you want (do note: don't add SMF content, you'll loose that)
* When ready, keep that "test" database handy.
* Shut down your live forum. Back it up
* Run the upgrade. Install the MODs and themes you tried before.
* Now the tricky part: from your "test" database, copy the important contents to your "live" database. Any MOD that uses its own tables should be dead easy to copy over.
* Have your new forum back, done ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Kindred

Please do note:  When you upgrade - all mods will be removed. You will have to re-apply mods for smf 2.0.x (mods for 1.1.x will NOT work)

Also, themes for 1.1.x will not work on 2.0.x
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

lurkalot

Quote from: Kindred on October 20, 2015, 07:29:26 PM
Please do note:  When you upgrade - all mods will be removed. You will have to re-apply mods for smf 2.0.x (mods for 1.1.x will NOT work)

Also, themes for 1.1.x will not work on 2.0.x

Also if using Tinyportal after upgrading your front panels might not load correctly, if this happens turn off blocks one by one until you find out which one is causing the issue, then that block will need updating to work with SMF 2.0.x

Advertisement: