Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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..

share|improve this question
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

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

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.

share|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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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