Jump to content

Transferring servers


Guest Philiwily

Recommended Posts

I'm in the process of transferring servers, and importing my sql database is giving me issues. It's 135mb, 25mb gzipped. When I try to import it in phpmyadmin, I have "Allow interrupt of import in case script detects it is close to time limit. This might be good way to import large files, however it can break transactions" ckecked off. So, it will do a couple of tables, then stop. Then I have to start it again. If I uncheck it, Firefox just times out after a little bit and I have to start from the beginning. Is there any easier way to do this? I've transferred servers before and I've never had this problem.

Link to comment
Share on other sites

Usually you can re-send the same file and it will continue from where it previously stopped, are you sure you're not already doing that?



I'm doing that, but it's taking forever. The first time I did it, it imported 57 tables. The second time it imported 3 tables. There are 135 tables total. I'm going on round three, but it's taking a while.
Link to comment
Share on other sites

If the file has SQL commands and you have root access to the server and MySQL via SSH then you can do this using the mysql prompt and it will take no time at all to import.

I have imported a database of similar size in a matter of minutes.

Steps are

  • Create the destination database in MySQL
  • Put the sql import file into a convenient location on the server
  • login to MySQL on the sever and select the database (USE <dbname>)
  • at the mysql prompt enter the command SOURCE followed by sqlfilename (eg; SOURCE /var/mysqldump.sql)

See http://dev.mysql.com/doc/refman/5.0/en/batch-commands.html
Link to comment
Share on other sites

If you don't have shell access to the "new" server, connect via FTP to it. Above public_html (so it is not web visible!) , create a temporary directory (call it "to_import" or something)

Upload your database backup into this directory.

Now contact your host and ask them to import it for you (telling them where you have put it)

When its imported and you are happy it's ok, remove the temporary directory you made.

Make sure you create the directory above public_html / www though, as you do not want it to be accessible via the web.

:)

Link to comment
Share on other sites

I do have SSH access... and I tried importing the database using this tutorial (ya... I'm new to the whole SSH deal), but it only imported 60 tables. That's similar to what happened last time too...

Edit: Nevermind, I got it imported successfully. Thanks for your help guys.
Edit 2: Actually, is there anyway I can update a database with a newer database, without deleting all the stuff that's on there?
If that was confusing at all I'll try to make it simpler: I'm transferring servers. One is live and one is not. Before switching over domains, I've been transferring stuff from the live one to the one that is going to be my new server. I already transferred the database, but it is going to be dated when I finally switch the domains to make it live. All I want to do is update the database with the new posts and such. I tried doing this by exporting my database from the live server with the "Update" mode on. Then I imported it to my not-live server. It partially worked, but it timed-out again. :(

Link to comment
Share on other sites

  • 1 month later...

I already transferred the database, but it is going to be dated when I finally switch the domains to make it live. All I want to do is update the database with the new posts and such.



We've always just done a couple of rehearsals like you are doing now, making detailed notes of all the steps so we can be sure what we need. Then we've

sTEP 1 STOPS ANYBODY WRITING ANYTHING TO THE DATABASE during transfer, SO NOTHING GETS LOST. oops caps lock :(
  1. [*]Closed the old forums with a board offline messgae. It says something like "We're moving, the next time you see this board online, you'll have reached us on our new server" [*]Backup the old and import onto the new, using the detailed notes. [*]Make the DNS changes to point the domain at the new server [*]Bring the new board online and post a 'Welcome' topic! :)


Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...