Connecting Tech Pros Worldwide Forums | Help | Site Map

how to take all database backup .i need single query

Newbie
 
Join Date: Jun 2006
Posts: 29
#1: Dec 22 '06
hai all,

i have 10 database in one server. i need to take a backup daily

iam using
this type of query
ex:
mysqldump -a -u root -p dbname > dbname.sql(for each db)

but i need

single backup query for all databse (10 db)

and also restore all db in single query

thanks in advance.
barrathi
ronverdonk's Avatar
Moderator
 
Join Date: Jul 2006
Location: The Netherlands
Posts: 4,139
#2: Dec 22 '06

re: how to take all database backup .i need single query


Why don't you look then in the MySQL standard documentation? You could have looked that up yourself! There it is all explained: use the --all-databases, -A option of the mysqldump command.
And if you don't want to backup all databases, you can specify them using mysqldump [options] --databases db_name1 [db_name2 db_name3...]

See http://dev.mysql.com/doc/refman/4.1/en/mysqldump.html

Ronald :cool:
Newbie
 
Join Date: Jul 2007
Posts: 9
#3: Nov 29 '07

re: how to take all database backup .i need single query


Hi barrathi,
After seeing your question I think that you are very good in taking back up.
can you please help me in taking backup of my table from any GUI after table is filled with 10000 records.
i.e as the record count reached to 10000 ...then automatically backup should be taken of that particular rtable

regards,
Sandhya
Reply