i'm newbie at linux...

1. i want to make backup database(use mysqldump)
2. copy from server(use linux-server) to client PC (use linux- ubuntu 9.0)..
3. before that i want to search that DB file using terminal..
4. bcoz i dont know where the files are located 

how to do that..? please help i've never been do this..

link|improve this question

feedback

2 Answers

up vote 1 down vote accepted

Your steps should be something like this:

Variant 1 - if you can't access the database directly over the network: 0. Connect to server via ssh 1. mysqldump > /path/to/bakcup/file.sql 2. Presume you copy over ssh: scp user@server:/path/to/backup/file.sql /path/to/local/file.sql 3. you don't have to search for the db file, since you know where you saved it. I you want to search inside the db file for a particular string, you can do that with a lot of tools. As suggested above, grep is a good choice.

Variant 2 - if you can access the database on the server over the network: 1. Be sure you have mysql-client installed on your computer (there are versions both for Linux and Windows PCs) 2. use mysql dump (read the manual for exact parameters) to dump the file over the network directly to your computer

link|improve this answer
Or for variant 1, no SCP required: ssh remotehost mysqldump > localfile.sql – Ignacio Vazquez-Abrams Jul 16 '10 at 7:53
feedback

Don't backup the raw database files. Use the database's dump tools (mysqldump, pg_dump, etc.) to get the actual data from the server.

link|improve this answer
and how search DB file? – klox Jul 16 '10 at 4:50
with grep. the dump is plain-text. – akira Jul 16 '10 at 5:33
can you give me an example??i have never use this – klox Jul 16 '10 at 7:19
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.