Welcome to WebmasterWorld Guest from 54.221.49.52

Forum Moderators: open

Message Too Old, No Replies

Easy way restoring a database

is there a painless way to do it?

     

rady

10:50 am on Jun 24, 2006 (gmt 0)

10+ Year Member



I was wondering if there are people here who know about restoring databases, in an easy way.
For example, i have a forum database which has to be restored, but it can't be done all the sql file at once, i have to break it into dozen of pieces, and it takes a lot of time

How do you restore your database?

larryhatch

12:00 pm on Jun 24, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This may sound dumb, and possibly is, but my first thought is:
BACK UP EVERYTHING, multiple times, and do that first.
The rest is details. -Larry

rady

12:39 pm on Jun 24, 2006 (gmt 0)

10+ Year Member



oh, no no no :) this is not what i meant :)
I know the steps, i did many restores by now, i just want to know if there is any easy way to be done. Any specific tools to be used. For example, all of you use the phpMyAdmin interface for restores?

mack

1:02 pm on Jun 24, 2006 (gmt 0)

WebmasterWorld Administrator mack is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



If you have a backup in sql format you can just use the "sql" tab in phpmyadmin and paste your sql in there. It will then populate the database for you with the existing data.

Try this on another database first so you can test the data before using it on a live database.

Mack.

rady

9:10 am on Jun 25, 2006 (gmt 0)

10+ Year Member



problem is that the sql is file very big and it doesn't work this way. is the backup of a phpbb with ~ 25,000 posts

mack

9:14 am on Jun 25, 2006 (gmt 0)

WebmasterWorld Administrator mack is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Ahh yea there is a limit on file size within phpmyadmin.

You might be able to use mysql administrator. It's a free download from the mysql website.

If that fails you might want to have a look into "mysql dump".

Mack.

maccas

9:33 am on Jun 25, 2006 (gmt 0)

10+ Year Member



[webmasterworld.com...] the big dump script works a treat.

physics

5:56 am on Jun 28, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you know how to SSH in with, for example, putty you can do (to back it up):

$mysqldump -uname -ppass --opt dbname > dbname.sql
then you can zip it, scp it to your home computer, whatever.

Then to restore:
$mysql dbname < dbname.sql

There is no limit on file size with this method (unless you're approaching the 2GB limit of some linux operating systems).

 

Featured Threads

Hot Threads This Week

Hot Threads This Month