Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mysql backup

Status
Not open for further replies.

ashz

Programmer
Dec 9, 2002
43
ES
Hi,

What is the easiest way to backup/restore a mysql database, and how to do it.

Thanks.
 
I usually just tar up the mysql dir. Probably not the safest thing to do if people are currently using it but in my situations nobody is ever using it when I do it so there are no open sessions or locks.

On unix machines just do:
tar -cvf mysqlbak.tar /var/lib/mysql

The official way isn't very hard to do either.. I just do this because it faster for me.

The mysql documentation has a good walkthrough.


Hope that helps! -Dustin
Rom 8:28
 
mysqlhotcopy can be very useful if you can tolerate locks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top