#1 By: kevinfront Subject:How to move your website Time: 25.Mar.06 03:43:40
Hey we have been having a ton of problems with our board which is all server related. We are looking to move the board to a new server within the next week.
I wanted to ask what is the best method to do this without loosing anything and making this as smooth as possible? I looked through all the forums and read me, but I didn't see this discussed. I know there may be some tricky stuff with re-importing the database and such but I wanted to make sure.
Wiz, I can always provide you with the full login info for both servers if you would rather take care of this. Please let me know, thanks!
#2 By: webmaster Subject:How to move your website Time: 25.Mar.06 18:24:25
What you have to do to move is export your data to file.
1.???You go into your MySQL panel and do a MySQL data save to file command, look for the export tab on the panel.
2.???Look at the image I attached, this is the export panel on MySQL. See the options I have selected in this image? Choose those same options.
Those options are the following:
1.???Select ALL (each table should be highlighted now)
2.???Export type SQL (right below the select all)
3.???Save as file
4.???Structure
5.???Add drop table
6.???Enclose table and field names with back quotes
7.???Data
8.???Use hexadecimal for binary fields
Click on the GO button and save the sql file to disk.
The easy way:
Now that you have the data backed up to your drive contact your new host. Ask your new host if they could give you temporary shell access so that you can restore your database when you move. FTP to your new site and copy the sqldumpfile over to the new site.
If they give you shell access this makes life very much easier for moving your data. From your new site do a new install of Supermod. Then, after you have the site installed go into shell via telnet (your host will give you the information how to telnet to the shell, if they don?t ask them for the info).
From the shell enter the following command:
shell> mysqlimport -u user_name -p[password] -r db_name sqldumpfile.sql
Where the db_name is the name of your database, user_name is the name of the user account that accesses that database and sqldumpfile is the file that you copied over via FTP. Make sure you?re in the same directory as where you have placed the file. Typically when you shell into your site you will be sitting at the doc root of your site.
That?s it, your data has been moved to the new site.
The hard way:
Typically most hosts do NOT allow website operators to have shell access. Therefore you have to import your data file through the MySQL panel. This can be a pain though because the MySQL panel will stall out when you try to import files > 1MB.
So what you need to do in this case is export your tables one at a time for starters.. Back to the image I included in this post. Instead of selecting ALL the tables select or highlight just one table and with all the other options the same export the data to file. Go back and do this for each table. Save the export files named the same as the table that each file belongs with.
When your done doing all this look at each file. Typically speaking you?ll fine these tables to be larger files:
1.???db_members
2.???db_messages
3.???db_instant_messages
4.???db_ip2country
5.???db_log_errors
6.???db_topics
7.???db_log_topics
Get yourself textpad, your going to need it. Using textpad open up anyone of those larger files. Copy to clipboard the first 1000 lines of the file and save those lines to a new file. Keep on doing this for every 1000 lines. Make sure to be careful you?re not overlapping your lines!
After you?ve done that for each file (hopefully you?ve named the new files the tablename they represent with say, a numeric append) now you can export each individual table to your new database.
Unfortunately this is tedious and painful. It takes a lot of time but it?s the only way I found to import data when moving an entire database to a new site. I found that usually takes me anywhere from 4 to 6 hours to do this.
If you anticipate me to do this then you really need to understand how long it would take for my labor to do so. I am reluctant to jump in and volunteer because of this but I?ll do so if Supermod could get a decent donation so I can pay for the domain fees which are due in 30 days.
Hey we have been having a ton of problems with our board which is all server related. We are looking to move the board to a new server within the next week.
I wanted to ask what is the best method to do this without loosing anything and making this as smooth as possible? I looked through all the forums and read me, but I didn't see this discussed. I know there may be some tricky stuff with re-importing the database and such but I wanted to make sure.
Wiz, I can always provide you with the full login info for both servers if you would rather take care of this. Please let me know, thanks!
|
|
#3 By: kriskd Subject:Re:How to move your website Time: 14.Jun.06 00:59:11
Wiz,
Last night I moved my site to a new server. I'm lucky my new host grants access to the shell as that part was a piece of cake. I updated my settings.php file as appropriate but the YaBB Directory, Sources Directory, and Avatars Directory in Forum Preferences and Settings all still point to the machine path of the old server. When I update them I get a mess of errors namely:
Warning: fopen(/home/.cutiekins/sprechereast/restonheights.com/board/template.html): failed to open stream: No such file or directory in /home/reston/public_html/board/Sources/Subs.php on line 452
Warning: filesize(): Stat failed for /home/.cutiekins/sprechereast/restonheights.com/board/template.html (errno=2 - No such file or directory) in /home/reston/public_html/board/Sources/Subs.php on line 453
Warning: fread(): supplied argument is not a valid stream resource in /home/reston/public_html/board/Sources/Subs.php on line 453
Warning: fclose(): supplied argument is not a valid stream resource in /home/reston/public_html/board/Sources/Subs.php on line 454 An Error Has Occurred!
2: fopen(/home/.cutiekins/sprechereast/restonheights.com/board/Settings.php): failed to open stream: No such file or directory (/home/reston/public_html/board/Sources/Admin.php ln 1701) |
|
I have CHMOD'ed everything in my sources and the forum root to 777. Any ideas?
#4 By: webmaster Subject:Re:How to move your website Time: 14.Jun.06 01:52:05
Double check all of your setting panels and also manually go through your settings table in the database.
Wiz,
Last night I moved my site to a new server. I'm lucky my new host grants access to the shell as that part was a piece of cake. I updated my settings.php file as appropriate but the YaBB Directory, Sources Directory, and Avatars Directory in Forum Preferences and Settings all still point to the machine path of the old server. When I update them I get a mess of errors namely:
Warning: fopen(/home/.cutiekins/sprechereast/restonheights.com/board/template.html): failed to open stream: No such file or directory in /home/reston/public_html/board/Sources/Subs.php on line 452
Warning: filesize(): Stat failed for /home/.cutiekins/sprechereast/restonheights.com/board/template.html (errno=2 - No such file or directory) in /home/reston/public_html/board/Sources/Subs.php on line 453
Warning: fread(): supplied argument is not a valid stream resource in /home/reston/public_html/board/Sources/Subs.php on line 453
Warning: fclose(): supplied argument is not a valid stream resource in /home/reston/public_html/board/Sources/Subs.php on line 454 An Error Has Occurred!
2: fopen(/home/.cutiekins/sprechereast/restonheights.com/board/Settings.php): failed to open stream: No such file or directory (/home/reston/public_html/board/Sources/Admin.php ln 1701) |
|
I have CHMOD'ed everything in my sources and the forum root to 777. Any ideas?
|
|
#5 By: kriskd Subject:Re:How to move your website Time: 14.Jun.06 03:32:09
Double check all of your setting panels and also manually go through your settings table in the database.
|
|
I corrected a couple paths in yabbsm_settings, but I was still unable to change the machine paths in Forum Preferences and Settings without getting the errors I described.
Also, I determined the forum is still accessing the database on the original server. Where can I point it to the db on the current server?
#6 By: kriskd Subject:How to move your website Time: 14.Jun.06 17:31:32
Okay, good news, it was a path problem in settings.php! Duh! My board is up, but not working completely yet. I'm now getting the following error:
Unknown column 'm.ID_MEMBER' in 'on clause' File: /home/.cutiekins/sprechereast/restonheights.com/board/Sources/BoardIndex.php Line: 360
|
|
Anyone want to help me debug this one?
#7 By: kriskd Subject:How to move your website Time: 14.Jun.06 18:21:33
Could this error be due to the PHP version? My new host runs version 4.4.2 and my old host 4.4.1.
#8 By: webmaster Subject:How to move your website Time: 15.Jun.06 00:27:41
m.ID_MEMBER, verify that this column exists in db_members. Edit your boardindex file, go to line 360.. now.. I looked at line 360 old version and it did not point to the query.. maybe your file does.. if it does.. let's validate that the php version isnt affecting you.. when you see a line like:
FROM {$db_prefix}messages as m, {$db_prefix}topics as t
change it to:
FROM ({$db_prefix}messages as m, {$db_prefix}topics as t)
if you notice, this is one of the things the new php/mysql structor demands.. make this change and then see if this helps..
If it does then ok, we better get you the new package..
Datarunner, I believe we really need to kick in gear.. And unfortuantly I am swamped with my new responsibilitys here in DC.. I have such a full plate now that there is no idle time for me.. none at all. Certainly a different environment than what I left back in Indiana..
Could this error be due to the PHP version? My new host runs version 4.4.2 and my old host 4.4.1.
|
|
#9 By: kriskd Subject:How to move your website Time: 15.Jun.06 03:25:39
Wiz --
Thanks for your quick response.
However, regretably I need to inform you that before I read this message, I converted my forum to an SMF forum. I needed to get this done as I'm letting my hosting with my prior host expire in favor of a different host that offers more space, bandwidth and the hosting of unlimited domains, with the unfortunate side effect that SM doesn't appear to work on their servers.
I still love SM and support you and your team getting it to be compliant with the higher versions of PHP. SM was the ideal package for me although there are pluses and minuses with SMF. I will still visit here to keep up with SM as I would like to use it for future projects.
Kris