BigDump: Staggered MySQL Dump Importer

I decided to move one of my sites over to a friend of mine who does hosting (Check out his website, he offers a great service and looks after you if you have any problems). I was with FastHosts, but because they are not exactly on the cheap side and you have to pay separately for pretty much every little nook and cranny you want, nevermind the fact that it just feels too “official”, I thought that considering the site has been up for a year now, I would move it over to Neil for a more permanant abode.

Well, talk about problems! The domain transfer somehow didn’t work quite at it should, so the site ended up being down for a couple of days! Thankfully, after many hours of trying to figure out what the problem was, I saw that the nameservers were not pointing the location they should have been, so once I changed this, things pretty much worked again straight away! What a relief!

The only thing that really concerned me in the change was grabbing all the data from the database from the old host, and transferring it to the new database! Well, you can imagine, after a years worth of data, the database file was pretty large! This meant that I couldn’t just import the file into the new database via the MySQL database! So, after a few searches on Google, I came across BigDump, yeah, sounds interesting hey! lol

Basically BigDump enables you to ftp your database file and it will then automatically import all you info into your new database, regardless of the file size! It was as simple as ABC! Miles easier than I was initially anticipating. Fantastic for people who are not too clued up on MySQL (such as me).

All you have to do is download a file from the BigDump website and then:

1 Open bigdump.php in a text editor and adjust the database configuration

2 Drop the old tables on the target database if your dump doesn’t contain “DROP TABLE” (use phpMyAdmin)

3 Create the working directory (e.g. dump) on your web-server

4 If you want to upload the dump files directly from the web-browser give the scripts writing permissions on the working directory (e.g. make chmod 777 on a Linux based system). You can upload the dump files from the browser up to the size limit set by the current PHP configuration of the web-server. Alternatively you can upload any files via FTP.

5 Upload bigdump.php and the dump files (*.sql or *.gz) via FTP to the working directory (take care of TEXT mode upload for bigdump.php and dump.sql but BINARY mode for dump.gz if uploading from MS Windows).

6 Run the bigdump.php from your browser via URL like http://www.yourdomain.com/dump/bigdump.php. Now you can select the file to be imported from the listing of your working directory.

7 BigDump will start every next import session automatically if you enable the JavaScript in your browser.

8 Relax and wait for the script to finish. Do not close the browser window!
IMPORTANT: Remove bigdump.php and your dump files from your server

If you are new to stuff like this, don’t get too bogged down about the terms, all I did was:

Download the file
Changed database details in bigdump.php
created a new folder called “dump” (the new folder is classed as the directory)
Put bigdump.php and the database file into the “dump” directory
Uploaded the “dump” folder/directory to my server
Typed in the url www.your-domain.com/bigdump.php
Clicked to perform the import

Within seconds the process was complete and everything worked out fine and dandy!

It really was that simple, hense the shout out for BigDump for created such an easy way for us amatures to import large files into databases - whether its to a new database or to restore a database for an old backup file!

Great work!

Needless to say, the site I was referring to is now just as it should be - can I go to bed now?

Popularity: 37%

Submit Article :- Digg + Del.icio.us + Google Bookmarks + Technorati

Related Posts :- Wasting the Day Away! - 

This entry was posted on Wednesday, January 24th, 2007 at 12:48 am and is filed under Web Stuff. You can follow any responses to this entry through the rss feed. You can leave a response, or trackback from your own site.

3 Responses to “BigDump: Staggered MySQL Dump Importer”

thrifty January 25th, 2007 at 12:13 am

thought for a moment you had had a good weekend out when i read the title perhaps you could come for a jolly here some time with the lasses ;-) interesting stuff though no where to come back for info

Leave a Reply