View Single Post
Old 03-31-2008, 03:44 PM   #5 (permalink)
docputer
Moderator
 
docputer's Avatar
 
Join Date: May 2006
Location: Midwest USA
Posts: 3,820
Points: 530
Send a message via ICQ to docputer Send a message via Yahoo to docputer
Quote:
Originally Posted by areagirls View Post
If the database is huge, here's what I do:

1. Use this script to back up your current database.
- Edit the user/pass/database variables in that script
- Edit the BACKUPS directory variable to a temporary directory on your server, with 777 permissions.
- Rename that script to whateveryouwant.php and run it on your server.
- That will give you a compressed GZ file of your database, and it will be placed in the directory you specified above.
- It's also handy to run this script as a cron job for backups of your DB.

2. Now, on your new server....
- Upload the .GZ file from above
- Grab a copy of this script (it's called Big Dump) and edit the mysql variables for your NEW
database on your NEW server. (They're on line 80)
- Rename the script to whateveryouwant.php and put it on your new server.
- Put this script file in the same directory as the .GZ file, and run the script. From there you can select the .GZ file and it will import it to your new database, no matter how big that database might be.

Mike
Great post. That is perfect for something I am working on now
docputer is offline   Reply With Quote Send a private message to docputer