News:

Join the Facebook Fan Page.

Main Menu

Moving forum to new host

Started by Siirist, June 24, 2017, 10:00:55 AM

Previous topic - Next topic

Siirist

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

Illori

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.

Siirist

Quote from: Illori on June 24, 2017, 11:43:03 AM
create the database,
Database info attached

Quote from: Illori on June 24, 2017, 11:43:03 AM
and remove that section from the sql file you have.
Which section?

Quote from: Illori on June 24, 2017, 11:43:03 AM
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

Gluz

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.

Sir Osis of Liver

IIRC, some versions of phpmyadmin will export bzip, but won't import it.  gzip works both ways.

Quote from: Siirist on June 24, 2017, 10:00:55 AM
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.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Siirist

Quote from: Sir Osis of Liver 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.

Quote from: Siirist on June 24, 2017, 10:00:55 AM
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

Siirist

Quote from: Gluz 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.

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

a10

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.19, php 8.0.23, MariaDB 10.5.15. Mods: Contact Page, Like Posts, Responsive Curve, Search Focus Dropdown, Add Join Date to Post.

Siirist

Quote from: a10 on June 25, 2017, 11:14:20 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

Gluz

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.

Sir Osis of Liver

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.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

KSRandom

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.

Sir Osis of Liver

Quote from: KSRandom 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.

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.

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

                                     - R. Waters

Siirist

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

shawnb61


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

Siirist

Shawn thanks for your thoughts.  ;)

Quote from: shawnb61 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
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

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.
Сл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."

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.
Quote from: CoreISP on June 23, 2017, 10:11:52 PM
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

a10

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.19, php 8.0.23, MariaDB 10.5.15. Mods: Contact Page, Like Posts, Responsive Curve, Search Focus Dropdown, Add Join Date to Post.

Siirist

Quote from: a10 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.

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

Advertisement: