Koozali.org: home of the SME Server
Legacy Forums => Experienced User Forum => Topic started by: Paul on November 08, 2002, 04:09:57 AM
-
Hi everyone.. How do I backup MYSQL databases. I am knew to the whole linux, esmith and database thing. I am doing well and love this system. I have insalled post nuke and i am cruising right along leaving Microsoft in the dust.
I just need some instruction on how to back up and maybe restore these databases that I have created. Any basic instruction would be very much appreciated.
Thank you in advance.
Paul
-
mysqldump databasename > somefilename.sql
-
or you could tar ball the whole mysql database which can be found via
/var/lib/mysql
be careful though leave the sock file as it is DONT TOUCH IT otherwise your in trouble.
I use tar -cf mysqlbkup.tar /var/lib/mysql/example
Then i go to another machine install the same software put the backup i made from another machine and works great.
If you dont fancy that then search for phpmyadmin that is a GUI based
Hope this helps
Byte
-
Great.. thank you both.
I really appreciate all the help that I have received via this website. Great community here. Thanks again.
-
Byte... .how about the reverse... I can pull down or dump a given database..what if I want to restore one..lets say push up a previous 'dump'.
is it just a matter of uploading it to that sql directory?
paul