Koozali.org: home of the SME Server

mysql backup

Paul

mysql backup
« 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

Chaloner Hale

Re: mysql backup
« Reply #1 on: November 08, 2002, 07:53:47 AM »
mysqldump databasename > somefilename.sql

Byte

Re: mysql backup
« Reply #2 on: November 08, 2002, 12:41:15 PM »
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

Paul

Re: mysql backup
« Reply #3 on: November 08, 2002, 02:46:02 PM »
Great.. thank you both.  

I really appreciate all the help that I have received via this website.  Great community here.  Thanks again.

Paul

Re: mysql backup
« Reply #4 on: November 11, 2002, 01:51:53 AM »
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