Advertisement:

Author Topic: Moving forum to new host  (Read 2276 times)

Offline Siirist

  • Sophist Member
  • *****
  • Posts: 1,201
  • Gender: Male
  • What would Kindred or Illori do?
    • A Sanctuary (Support for Survivors of abuse/Info for Family & Friends)
Moving forum to new host
« on: June 24, 2017, 10:00:55 AM »
Hello All,

Finally got a new "Clean & Fresh" forum Installed with the help of the support team here. THANK YOU!  :D

Went to Online Manual "How do I move my SMF forum to a different host"  (See attachment)

Went to old server, phpMyAdmin,
went to forum2,
exported the database (about 5mb)
saved (asanctua_forum2.sql) to my laptop,
compressed to a zip file using Win7 zip (asanctua_forum2)

Error  :-\  (see attachment)

Glad my buddies are here.   ;D

Thanks for all the help with the installation and now perhaps I can get a database installed.  Or perhaps I used the wrong "Forum Prefix". Just don't know anything any more, suffering from c.r.s.

Kindly,
Siirist
Needed information:
- What's your SMF version?, What MODs are installed? What Theme(s) are you using? Have you backed up your database?

--> At least 50% of the questions asked are answered in the Online Manual <--
Mods for ver 1.x will NOT run on ver 2.x

Offline Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 51,133
Re: Moving forum to new host
« Reply #1 on: June 24, 2017, 11:43:03 AM »
create the database, and remove that section from the sql file you have. your user does not have permissions to create the database so you need to do so first.

Offline Siirist

  • Sophist Member
  • *****
  • Posts: 1,201
  • Gender: Male
  • What would Kindred or Illori do?
    • A Sanctuary (Support for Survivors of abuse/Info for Family & Friends)
Re: Moving forum to new host
« Reply #2 on: June 24, 2017, 12:21:50 PM »
create the database,
Database info attached

and remove that section from the sql file you have.
Which section?

your user does not have permissions to create the database so you need to do so first.
User has all permissions.


Should I login to the new server and delete:
1. The new database
2. The database user
3. The forum2 folder and subfolders

4. Create a brand new database named "forum2"
5. Create a brand new database user named "user"
6. Create a new folder named "forum2" in the Public_Html folder
7. Upload files to Public_Html/forum2
8. Go to Public_Html/forum2/install.php

9. Try to import the original database into the new database again?
 ???

*blurry headed*

Kindly,
Siirist
Needed information:
- What's your SMF version?, What MODs are installed? What Theme(s) are you using? Have you backed up your database?

--> At least 50% of the questions asked are answered in the Online Manual <--
Mods for ver 1.x will NOT run on ver 2.x

Offline Gluz

  • Sr. Member
  • ****
  • Posts: 985
  • Gender: Male
Re: Moving forum to new host
« Reply #3 on: June 24, 2017, 04:45:48 PM »
When in the old host, in phpmyadmin, at the time to export the database choose, Method -> Custom and remove the thick to "CREATE DATABASE / USE", that's the line is failing at the import.

There in the custom settings to export, you can choose the compression method too, so you can use .zip, .gzip or .bzip to get the database.
Need help with PHP, HTML, CSS, Themes or MODs?

Quote
Think in spanish, habla en inglés.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,243
Re: Moving forum to new host
« Reply #4 on: June 25, 2017, 12:19:43 AM »
IIRC, some versions of phpmyadmin will export bzip, but won't import it.  gzip works both ways.

compressed to a zip file using Win7 zip (asanctua_forum2)

Why did you zip the db after exporting it?  Even the worst hosts will import a 5mb sql.

Offline Siirist

  • Sophist Member
  • *****
  • Posts: 1,201
  • Gender: Male
  • What would Kindred or Illori do?
    • A Sanctuary (Support for Survivors of abuse/Info for Family & Friends)
Re: Moving forum to new host
« Reply #5 on: June 25, 2017, 10:54:14 AM »
IIRC, some versions of phpmyadmin will export bzip, but won't import it.  gzip works both ways.

compressed to a zip file using Win7 zip (asanctua_forum2)

Why did you zip the db after exporting it?  Even the worst hosts will import a 5mb sql.

It would time out during the import because it is a 6.5mb db.
Needed information:
- What's your SMF version?, What MODs are installed? What Theme(s) are you using? Have you backed up your database?

--> At least 50% of the questions asked are answered in the Online Manual <--
Mods for ver 1.x will NOT run on ver 2.x

Offline Siirist

  • Sophist Member
  • *****
  • Posts: 1,201
  • Gender: Male
  • What would Kindred or Illori do?
    • A Sanctuary (Support for Survivors of abuse/Info for Family & Friends)
Re: Moving forum to new host
« Reply #6 on: June 25, 2017, 11:09:56 AM »
When in the old host, in phpmyadmin, at the time to export the database choose, Method -> Custom and remove the thick to "CREATE DATABASE / USE", that's the line is failing at the import.

There in the custom settings to export, you can choose the compression method too, so you can use .zip, .gzip or .bzip to get the database.

Thank you Gluz.   ;)
Here is exactly what I did
I went to "old" host > phpMyAdmin > Selected "asanctua_forum2" > Clicked on "Export" > Clicked on "Custom" > Removed the tick for "CREATE DATABASE / USE" > Used the DropDown which offered gZipped and Zipped > Chose "Zipped" > "Saved" as "asanctua_forum2.sql.zip" > Clicked on "Go"

Went to new host > phpMyAdmin > Clicked on "asanc695_forum2" > Clicked on "Import" > Clicked on "Browse" > Selected "asanctua_forum2.sql.zip" > Clicked on "Go"

ERROR:  :-\  See attachment

Hmmm . . .
Needed information:
- What's your SMF version?, What MODs are installed? What Theme(s) are you using? Have you backed up your database?

--> At least 50% of the questions asked are answered in the Online Manual <--
Mods for ver 1.x will NOT run on ver 2.x

Offline a10

  • Charter Member
  • Sr. Member
  • *
  • Posts: 863
Re: Moving forum to new host
« Reply #7 on: June 25, 2017, 11:14:20 AM »
Timeout for a minuscule 6.5 mb? Maybe time to look for a new host (imo).

Or export your original db as single tables (1 table at the time), and import the same way, may overcome timeouts.
Compare size\records etc of each imported table with original, and if needed retry importing if something does not seem right (had a sh*t host long time ago, full db always failed, single tables always worked :O)

Or if on php 5x, try mysqldumper, especially good at taking care of timeouts.
2.0.15, ssl, php 7.1.31, MySQL 10.3.13-MariaDB~bionic
Mods: Contact Page, Like Posts, Responsive Curve, Search Focus Dropdown, Add Join Date to Post.

Offline Siirist

  • Sophist Member
  • *****
  • Posts: 1,201
  • Gender: Male
  • What would Kindred or Illori do?
    • A Sanctuary (Support for Survivors of abuse/Info for Family & Friends)
Re: Moving forum to new host
« Reply #8 on: June 25, 2017, 11:36:29 AM »
Timeout for a minuscule 6.5 mb? Maybe time to look for a new host (imo).
I could be wrong about the timeout, but I think that was it, which is why I was compressing the sql file.
ALSO I have to consider that the timeout may be at my end, not the server, ie, my ISP.

Quote from: a10 link
Or export your original db as single tables (1 table at the time), and import the same way, may overcome timeouts.
Compare size\records etc of each imported table with original, and if needed retry importing if something does not seem right
That seems like A LOT of work.

Quote from: a10 link
(had a sh*t host long time ago, full db always failed, single tables always worked :O)
I worked out a deal where they are hosting my non-profit websites for free with 2gb storage and 50gb bandwidth.

Quote from: a10 link
Or if on php 5x, try mysqldumper, especially good at taking care of timeouts.
Will look into this.

Thank you for your knowledge.

Kindly,
Siirist
Needed information:
- What's your SMF version?, What MODs are installed? What Theme(s) are you using? Have you backed up your database?

--> At least 50% of the questions asked are answered in the Online Manual <--
Mods for ver 1.x will NOT run on ver 2.x

Offline Gluz

  • Sr. Member
  • ****
  • Posts: 985
  • Gender: Male
Re: Moving forum to new host
« Reply #9 on: June 25, 2017, 02:10:58 PM »
Now it is importing to that database, but the data have some error.

Can you check the tables after the one that fails to see if they have data in them?

IIRC, some of the log tables can be emptied before export, but I don't remember right now wich ones, and I'm on my phone.
Need help with PHP, HTML, CSS, Themes or MODs?

Quote
Think in spanish, habla en inglés.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,243
Re: Moving forum to new host
« Reply #10 on: June 25, 2017, 04:18:02 PM »
Some zip utilities create files that are not compatible with phpmyadmin.  You should be able to import a 6.5mb dump no problem.  Ask host support to import it.

Offline KSRandom

  • Newbie
  • *
  • Posts: 2
Re: Moving forum to new host
« Reply #11 on: June 25, 2017, 06:22:31 PM »
Alternatively, you can just break the file up into multiple files that are below the hosts file size limits and upload each one.

This is similar to what a10 suggested, just with the file you already have.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,243
Re: Moving forum to new host
« Reply #12 on: June 25, 2017, 06:28:15 PM »
Alternatively, you can just break the file up into multiple files that are below the hosts file size limits and upload each one.

No, you can't.

I've been having problems with phpmyadmin exporting/importing database dumps, even small ones, on several hosts recently.  Whatever it is also seems to be affecting MySQLDumper on GoDaddy servers.


Offline Siirist

  • Sophist Member
  • *****
  • Posts: 1,201
  • Gender: Male
  • What would Kindred or Illori do?
    • A Sanctuary (Support for Survivors of abuse/Info for Family & Friends)
Re: Moving forum to new host
« Reply #13 on: June 26, 2017, 10:23:52 AM »
Hello All,

Just for "S&Gs", I created the DB forum1 on new host, went to old host and exported forum1 without compression and then went back to new host and imported the DB.
Imported fine, but after uploading SMF, renaming the 4 install.php files, running Repair_Settings and making corrections it wouldn't "run" on index.php
Something about the about a missing file.

Deleted both the DB and the forum1 folder on the new host.

This at least shows that the DB does NOT have to be compressed to be imported.

Regards,
Siirist
Needed information:
- What's your SMF version?, What MODs are installed? What Theme(s) are you using? Have you backed up your database?

--> At least 50% of the questions asked are answered in the Online Manual <--
Mods for ver 1.x will NOT run on ver 2.x

Online shawnb61

  • Developer
  • Sophist Member
  • *
  • Posts: 1,336
    • sbulen on GitHub
Re: Moving forum to new host
« Reply #14 on: June 26, 2017, 03:22:39 PM »

This whole thread has me a bit confused... 

We are moving an existing forum to a new host.   As noted in the original post, there are 3 steps involved...
1)  Move your filesystem over
2)  Move your db over via export/import
3)  Run repair_settings.php

At no point is an installation needed.   I think that is fundamentally part of the problem. 

You may be able to import an existing db into a freshly installed db, but there are a bunch of conditions that must be met - No mods, attachments, avatars, custom smileys, etc., etc...    And the versions must agree - or at least be pretty close. 

Even assuming all those conditions are met...  That import into a freshly installed DB will need to be approached with care.  I'd rather nuke the freshly-installed DB and just import the new one, rather than try to overwrite/merge the old & new DBs somehow. 

Make sense?  Or am I way off base?
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline Siirist

  • Sophist Member
  • *****
  • Posts: 1,201
  • Gender: Male
  • What would Kindred or Illori do?
    • A Sanctuary (Support for Survivors of abuse/Info for Family & Friends)
Re: Moving forum to new host
« Reply #15 on: June 26, 2017, 05:13:22 PM »
Shawn thanks for your thoughts.  ;)

This whole thread has me a bit confused... 

We are moving an existing forum to a new host.   As noted in the original post, there are 3 steps involved...
1)  Move your filesystem over
2)  Move your db over via export/import
3)  Run repair_settings.php
Here's what I did:
1. Went to old host phpMyAdmin and exported the forum1 database (asanctua_forum1).
2. Went to new host and created a database with the same name (except for the prefix which I have no control, asanc695_forum1).
3. Went to new host phpMyAdmin and imported the (uncompressed) database without issues.
4. Used FileZilla to connect to old host and downloaded all files and folders from public_html/forum1.
5. Used FileZilla to connect to new host and uploaded all files and folders to public_html/forum1.
6. Used FileZilla to connect to new host and uploaded repair_settings.php.
7. Went to new host a-sanctuary.org/forum1/repair_settings.php. Which resulted in the option to download the file.  :(

I removed the repair_settings.php for safety.

Quote from: shawnb61
At no point is an installation needed.   I think that is fundamentally part of the problem. 

Make sense?  Or am I way off base?
Totally makes sense to me.
Too bad it totally wasn't the solution.

Kindly,
Siirist
Needed information:
- What's your SMF version?, What MODs are installed? What Theme(s) are you using? Have you backed up your database?

--> At least 50% of the questions asked are answered in the Online Manual <--
Mods for ver 1.x will NOT run on ver 2.x

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,430
  • Gender: Male
    • Kindred-999 on GitHub
Re: Moving forum to new host
« Reply #16 on: June 26, 2017, 05:30:37 PM »
And, as we have explained... the problem is that you new host has not configured PHP correctly.   php files should be run and parsed by the SERVER...  the fact that it asks you to download indicates that the SERVER does not recognize a .php file as a run-able file.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 51,133
Re: Moving forum to new host
« Reply #17 on: June 26, 2017, 05:31:07 PM »
i thought you fixed the issue of the download of files when you did the edit to your .htaccess file coreisp suggested in your other topic.
From .htaccess, hash out this line (put a # in front of it):
AddHandler application/x-httpd-php54 .php

Also, why SMF 2.0.11? o0

Offline a10

  • Charter Member
  • Sr. Member
  • *
  • Posts: 863
Re: Moving forum to new host
« Reply #18 on: June 26, 2017, 05:45:15 PM »
100% chaos. Was able to donwload php's, incl settings. Move those files out of there (or password protect the domain) immediately. Then change -all- passwords. Find a normal and sane host.
2.0.15, ssl, php 7.1.31, MySQL 10.3.13-MariaDB~bionic
Mods: Contact Page, Like Posts, Responsive Curve, Search Focus Dropdown, Add Join Date to Post.

Offline Siirist

  • Sophist Member
  • *****
  • Posts: 1,201
  • Gender: Male
  • What would Kindred or Illori do?
    • A Sanctuary (Support for Survivors of abuse/Info for Family & Friends)
Re: Moving forum to new host
« Reply #19 on: June 26, 2017, 06:28:02 PM »
100% chaos. Was able to donwload php's, incl settings. Move those files out of there (or password protect the domain) immediately. Then change -all- passwords. Find a normal and sane host.

Thanks a10

Added a password for that directory per your reply.

Quote from: Illori
i thought you fixed the issue of the download of files when you did the edit to your .htaccess file coreisp suggested in your other topic.
I know, Right?!

Quote from: Kindred
And, as we have explained... the problem is that you new host has not configured PHP correctly.   php files should be run and parsed by the SERVER...  the fact that it asks you to download indicates that the SERVER does not recognize a .php file as a run-able file.
Well, considering I was able to do "Clean & Fresh" install that produced an operation forum, wouldn't that indicate that the server is handling .php files?

Hmmm . . .

I have PMed Sir and he hopes to make the moves for me this evening.
Assuming others are reading this topic, I think it prudent to post the results once the move is completed and the forum is in production.

Kindly,
Siirist
Needed information:
- What's your SMF version?, What MODs are installed? What Theme(s) are you using? Have you backed up your database?

--> At least 50% of the questions asked are answered in the Online Manual <--
Mods for ver 1.x will NOT run on ver 2.x

Offline a10

  • Charter Member
  • Sr. Member
  • *
  • Posts: 863
Re: Moving forum to new host
« Reply #20 on: June 27, 2017, 02:26:25 AM »
Yesterday your database password etc was freely available. Seems things are getting better now.
2.0.15, ssl, php 7.1.31, MySQL 10.3.13-MariaDB~bionic
Mods: Contact Page, Like Posts, Responsive Curve, Search Focus Dropdown, Add Join Date to Post.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,243
Re: Moving forum to new host
« Reply #21 on: June 27, 2017, 04:00:47 PM »
Was being caused by .htaccess file in both forums, carried over from old host -

Code: [Select]

# Set PHP handler to application/x-httpd-phpbeta on Tue Nov 17 14:23:26 MST 2015.
AddHandler application/x-httpd-phpbeta .php