Hi Geoffroy,
Very true, restore depends on the kind of backup we do. I was just wondering
if mysql has any option to restore just one database from the mysqldump
having all the database.

So, as of now mysql does not provided option to just restore just one
database from dump having all database..Right?

regards
anandkl


On 5/28/07, Geoffroy Cogniaux <[EMAIL PROTECTED]> wrote:

Hi Ananda,

Recovery strategy depends essentially of the backup strategy you choose. I
think that if you want be able to proceed to a restoration, database per
database, you should separate their backups. It can simply be done with
this
kind of script:

for db in (`echo 'show databases;' | mysql -u <user> --password=<pwd> |
grep
-v ^Database$`); do  mysqldump -u <user> --password=<pwd> $db
>/mybackupdir/$db.bak ; done;

If you want to have all in one file, use tar after your backup:
cd /mybackupdir && tar -czf mybackup.tar.gz *.bak && rm -fr *.bak

Best regards,
Geof.

-----Message d'origine-----
De: Ananda Kumar [mailto:[EMAIL PROTECTED]
Envoyé: dimanche 27 mai 2007 13:52
À: John Meyer
Cc: MySQL General
Objet: Re: restore one database.

Hi All,
I think my question was not understood.
All the database are important. Now that one of the database is accidently
dropped, can i restore from that single database from my dump and use the
bin log and recover till "AS OF NOW".

regards
anandkl


On 5/27/07, John Meyer <[EMAIL PROTECTED]> wrote:
>
> Ananda Kumar wrote:
> > Hi Pelle,
> > I dont have enough space on any other storage, so i was thinking if we
> > would
> > just restore one database from dump that would save lot  of time ,
> rather
> > than restoring all the database.
> >
> > regards
> > anandkl
> >
> >>
> Well, if only one database is important enough to back up, then yes it
> will.  But if you have multiple databases that you are actively using
> then you'll need to back them all up.  You don't necessarily need to use
> an all databases dump, though.
>
>
> --
> The NCP Revue -- http://www.ncprevue.com/blog
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
>
>



Reply via email to