News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

changing servers while upgrading

Started by remingtonk, November 21, 2017, 09:56:14 AM

Previous topic - Next topic

Irisado

Off topic discussion removed and merged with https://www.simplemachines.org/community/index.php?topic=556652.0.  Let's stay on the topic outlined in the first post of this topic from now on.  Thank you.
Soñando con una playa donde brilla el sol, un arco iris ilumina el cielo, y el mar espejea iridescentemente

remingtonk

Hi folks:

I was able to get 1.1.21 installed and working on my local machine (a MacBook).  Not sure which alignment of stars got it to work (sorry - I wanted to document the particular issue(s) involved, but am not sure what the magic combination was.)

So, I have a working 1.1.21, and try to import the 1.1.11 data dump from the old server, and get this complaint:


  • 07:25:07 Restoring /Users/remingtonk/SMF Bawdy/David.sql
    Running: /Applications/MySQLWorkbench.app/Contents/MacOS/mysql --defaults-file="/var/folders/y4/hvshll2s207_wcj9lh4tm1b80000gn/T/tmpHaHCZj/extraparams.cnf"  --protocol=tcp --host=127.0.0.1 --user=root --port=3306 --default-character-set=utf8 --comments --database=smf  < "/Users/remingtonk/SMF Bawdy/David.sql"
    ERROR 1062 (23000) at line 8917: Duplicate entry '-1-0-poll_view' for key 'PRIMARY'

    Operation failed with exitcode 1
    07:25:08 Import of /Users/remingtonk/SMF Bawdy/David.sql has finished with 1 errors


Does this look like something easy to remedy?  Or does it look like the start of a cascade that would just lead to similar complaints?  I'm looking around for a thread that addresses this, but if you recognize this and can point me to the right place, that would be great.

Thanks
Newbie, getting older by the minute

remingtonk

Update:  (with good news - not complete yet, but getting there)

I did finally get 1.1.21 running on my local Mac, and just managed to successfully import the 1.1.11 data dump from the old server.

To get through this, I had to add to add column LastUpdated to the table structure for 'smf_boards',  and logTime to the table structure for 'smf_log_mark_read'.

Between each attempt, I needed to clear the table data to prevent ID conflicts when restarting the import.

So, I think from here I will be able to follow a migration path to 2.latest, and then transfer to the AWS server I'd originally intended to use.

I'd like to keep this open until I complete that, but I think that will go much more smoothly now that I've got the data from the old server successfully imported.

No victory lap yet, but definitely felt good to get the data imported successfully to 1.1.21 on a server I control.

Newbie, getting older by the minute

Kindred

In the 1.1.x series, there were database changes. Tha is why you need to run upgrade.php on the old database...   and then do the same for the 2.0,x upgrade
Сл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."

Just Another Member

Remingtonk, I like reading your posts. I can see the progress you are making and I'm pretty certain you will get your forum fixed and back on the Internet.

Just one thing, remember that hosting service you are with and make plans to kick them to the curb.

You're clever enough that you'll be fine without a hosting service that sabotages your sites.

Aleksi "Lex" Kilpinen

Quote from: remingtonk on December 29, 2017, 07:27:48 PM
I'd like to keep this open until I complete that, but I think that will go much more smoothly now that I've got the data from the old server successfully imported.
That's fine, just let us know how it goes :)
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

remingtonk

Quick question:

The dump file I uploaded didn't contain the data for the actual posts - the topics show on the home page, and counts are there, but the posts themselves are not.

I was looking for where these are in the database, and I think they would be in "smf_messages"  (not to be confused with "smf_personal_messages")     I just want to check that with someone here before trying to figure out why that table wasn't exported as anticipated.   Is "smf_messages" where the posts are stored? 

I now know way more about SMF than I had intended to know, and apparently still less than I need to know.  So thanks for just a quick answer.  With Googling, I think I have the right impression, but want to check before running down a rabbit hole. 


Newbie, getting older by the minute

Aleksi "Lex" Kilpinen

Yes, the actual posts are in smf_messages. :)
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Sir Osis of Liver

If you used phpmyadmin to dump the database, export can fail without error, giving you a partial dump.  Most commonly chokes on smf_messages, that's usually the largest table, unless there's a huge smf_log_errors (I've seen two forums with gb error logs).  If dump fails at smf_messages, all following tables will be missing.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

remingtonk

Quote from: Sir Osis of Liver on January 03, 2018, 11:38:22 AM
If you used phpmyadmin to dump the database, export can fail without error, giving you a partial dump.  Most commonly chokes on smf_messages, that's usually the largest table, unless there's a huge smf_log_errors (I've seen two forums with gb error logs).  If dump fails at smf_messages, all following tables will be missing.

Hey, thanks.  That might be the key.  I wasn't the one who did the data dump, so I'm not sure about this past one, but I think I'll be able to control the next one.   So I will be alert. 
Newbie, getting older by the minute

Aleksi "Lex" Kilpinen

If something seems to be missing, anything at all, it may be a good idea to compare the database structures, it should be fairly easy to see if all the tables are there. Most commonly export functions will also include a last row in the dump to signify in clear text that the dump was complete.
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

remingtonk

Here's an unfortunate thing that happened - and I'm searching around for help, but want to mention it here for completeness:

My co-administrative buddy (the one who is retiring and trying to hand this admin task to me) seems to have inadvertently messed with the SMF credentials used to launch the server while he was trying to give me access to the DB.  He and I both recall the initial SMF set-up step which calls for a initial user-name/password during the install.   We aren't seeing that in the DB, so we aren't sure how to recover.  Is there a post about recovering an install password? 

Please be kind - we are just trying to muddle through. 
Newbie, getting older by the minute

Aleksi "Lex" Kilpinen

That step only setups the first user in the database, user ID 1, that is the default admin of the forum.
What are you trying accomplish with it? Is there a reason you need this specifically?
It shouldn't really be needed for anything if there are other admin accounts,
and just to move the forum from one place to another it isn't needed at all.



Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

remingtonk

What happened is that my partner's attempt to give me access to the DB seems to have broken the board.  So, while I can now see the DB, the users aren't able to get in.  David (previous admin) says he thinks he was asked for those old credentials, which are about 10 years in the past for him, and he isn't sure where the process went wrong.

If I have database access, can I help repair it?  We have a lively community who has just become disconnected, so I'm trying to fix as soon as possible (earlier, we were just trying to migrate smoothly).
Newbie, getting older by the minute

Aleksi "Lex" Kilpinen

Why are the users not able to get in? Do they get an error or a maintenance message?

Without knowing what your partner actually did, and without knowing what was the end result exactly it's a bit hard to say how you could fix it.
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Illori

i think they need to run repair_settings.php and set the correct password for the database assuming that the username as not changed.

remingtonk

Here's what I see (which I think is what other forum members are seeing):



I will try to let David know about trying to run "repain_settings.php"   I don't think he changed user names.  Maybe was adding one (for me). 
Newbie, getting older by the minute

Aleksi "Lex" Kilpinen

Most probably the database information used for connecting to the database has changed from the time the forum last worked, and would need to be changed in settings.php, where SMF keeps the information.

Easiest way to do this is repair_settings.php like Illori said.

What is repair_settings.php?
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Sir Osis of Liver

It's possible other admin tried to create a new db user in cpanel and borked the existing user that's been in Settings.php.  Look in mysql section of cpanel, check db users, and that they are assisgned to your production database.  $db_user and $db_passwd must agree with a valid user for that db.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

remingtonk

Quote from: Sir Osis of Liver on January 04, 2018, 03:51:10 PM
It's possible other admin tried to create a new db user in cpanel and borked the existing user that's been in Settings.php.  Look in mysql section of cpanel, check db users, and that they are assigned to your production database.  $db_user and $db_passwd must agree with a valid user for that db.

We think that is indeed what happened.  We tried a couple of different things to fix, but then decided to just run with the accidental "maintenance window" and get things moved while everyone was already off-line.  The group is loosely attached through Facebook, so we're keeping them apprised.

Good news:  I managed to get a full database dump from the 1.1.11 server, and it's now up and running on a new server with 1.1.21.
Notes:   
I think the comment from Sir Osis about exports sometimes choking in smf_messages without warning was spot on.  I did the dump from the command-line, and got all of the data. 

I had to tweak a few things to get it imported to the new (intermediate) server (my mac):

  • had to preserve the newly installed smf_settings table (by deleting it in the dump file), and
  • had to add LastUpdated and logTime columns to tables for smf_boards and smf_mark_read, respectively, and then
  • drop those added columns from the 1.1.21 install, so that the database would reflect the 1.1.21 structure.

So, I'm moving on to upgrading from SMF 1.1.21 to SMF 2.whatever on this local server, and then will try exporting and moving the forum to the intended Amazon server.  I'm not yet very aware of the upgrade processes, but will look up the support information, and hope that the move from 1.1.21 to 2.something is more smooth now that I'm on a server I can control.

Thanks for the comments. I really didn't intend to learn this much about SMF, and since this isn't my day job, and my mental cache isn't huge, I'm going to try to wrap this up as soon as possible.

Still, please keep this open for now.  There might be another issue between now and the full migration, and having this log open helps.
Newbie, getting older by the minute

Advertisement: