CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: DBI:
Easy backup, and import backup?

 



skirrow
stranger

Feb 23, 2003, 8:59 AM

Post #1 of 5 (5490 views)
Easy backup, and import backup? Can't Post

Hi,
Are their any modules or any easy ways of backing up an entire mySQL database? Also, if possible also an easy way to then import the backup?

Is the only way to read all the records from the db out to data files and then import from the data files back to the mySQL db?

Thanks,
- Neil
--
http://www.locked-area.com/
http://www.opencrypt.com/


Paul
Enthusiast

Feb 24, 2003, 6:04 AM

Post #2 of 5 (5486 views)
Re: [skirrow] Easy backup, and import backup? [In reply to] Can't Post

bash$ mysqldump -u USERNAME -p DATABASE > /path/to/file.txt


skirrow
stranger

Feb 24, 2003, 6:12 AM

Post #3 of 5 (5483 views)
Re: [Paul] Easy backup, and import backup? [In reply to] Can't Post

Thank you!
What about importing the data back to the mySQL db? Or does that dump the structure info as well so I can just run it to re-create dbs?
- Neil
--
http://www.locked-area.com/
http://www.opencrypt.com/


Paul
Enthusiast

Feb 24, 2003, 6:14 AM

Post #4 of 5 (5482 views)
Re: [skirrow] Easy backup, and import backup? [In reply to] Can't Post

It dumps the structure. Reimport using:

mysql -u USERNAME -p DATABASE < /path/to/file.txt


skirrow
stranger

Feb 24, 2003, 6:27 AM

Post #5 of 5 (5479 views)
Re: [Paul] Easy backup, and import backup? [In reply to] Can't Post

Excellent! Thank you so much.
- Neil
--
http://www.locked-area.com/
http://www.opencrypt.com/

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives