*Make a backup of yours databases:*

shell> mysqldump -u <user> -p --all-databases -e > path/file.dmp

Implicit to this command quoted above, you will have the --opt option (
shorthand for --add-drop-table --add-locks --create-options --disable-keys
--extended-insert --lock-tables --quick --set-charset ) and -e ( use
multiple-row INSERT syntax that include several VALUES lists. This results
in a smaller dump file and speeds up inserts when the file is reloaded ).
Consider to use -e option when you have a big backup - *you will get more
faster restore*, improving the time-recovery.

*Make a backup of a table:*

shell> mysqldump -u <user> -p mysql user -e > path/file.dmp

In this last way, you will copy to a file only a table of mysql database -
its simply like that.

*Restore the backup:*

To restore, use mysql client, like this...

shell> mysql -u <user> -p < path/file.dmp

Other considerations regards of the operations of restore a backup is to
apply the correct O_DSYNC innodb_flush_method to InnoDB, disable foreign key
checks and autocommit. These practicals will execute you backup faster then
other way. When you use MyISAM, configure in my.cnf the
bulk_insert_buffer_size with a value big enough and don't worry, start
restore and be happy.

*See it on manual:*
http://dev.mysql.com/doc/refman/5.0/en/innodb-tuning.html
--
Wagner Bianchi - Web System Developer and Database Administrator
Phone: (31) 8654-9510 / 3272-0226
E-mail: wagnerbianch...@gmail.com
Lattes: http://lattes.cnpq.br/2041067758113940
Twitter: http://twitter.com/wagnerbianchi
Skype: infodbacet


2010/1/29 Anand kumar <anand....@gmail.com>

> it should be windows.. .
>
> On Fri, Jan 29, 2010 at 2:29 PM, Suresh Kuna <sureshkumar...@gmail.com
> >wrote:
>
> > Which OS your are using ?
> >
> > Suresh Kuna
> > MySQL DBA
> >
> > On Fri, Jan 29, 2010 at 2:25 PM, muralikrishna g
> > <muralikrishn...@gmail.com>wrote:
> >
> > > i am working on my pc with mysql-5.0.27-community-nt
> > >
> > > i have created several data bases and tables in that.. to take backup,
> we
> > > have to use dump., i dont know the correct syntax how to use dump to
> take
> > > backup to a specific location., after that how to resore. please help
> me
> > > regarding this.
> > > thanks in advance
> > >
> >
>

Reply via email to