Re: restore one database.
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]
RE: restore one database.
Yes it is. This is why I suggest dumping db per db. Bye. -Message d'origine- De : Ananda Kumar [mailto:[EMAIL PROTECTED] Envoyé : lundi 28 mai 2007 10:41 À : Geoffroy Cogniaux Cc : John Meyer; MySQL General Objet : Re: restore one database. 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] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: restore one database.
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 On 5/26/07, Ezequiel L. Pellettieri [EMAIL PROTECTED] wrote: Hi Ananda, I don't know how to solve this, but if you have space in another storage, try restoring your all-databases dump there and then create a new onlyone-database dump to restore in your server. Regards. Pelle.- -Mensaje original- De: Ananda Kumar [mailto:[EMAIL PROTECTED] Enviado el: Sábado, 26 de Mayo de 2007 10:23 a.m. Para: MySQL General Asunto: restore one database. Hi All, I have take mysqldump of all the databases. If somebody accidently drops one database, can i restore just that database from mysqldump and apply the binary logs to restore all the data to that database. If yes, can you please let me know how that can be done. I am using version 5.0.40 regards anandkl No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.472 / Virus Database: 269.8.0/819 - Release Date: 26/05/2007 10:47 a.m. No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.472 / Virus Database: 269.8.0/819 - Release Date: 26/05/2007 10:47 a.m.
Re: restore one database.
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]
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]
RE: restore one database.
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] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: restore one database.
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] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: restore one database.
Hi Ananda, I don't know how to solve this, but if you have space in another storage, try restoring your all-databases dump there and then create a new onlyone-database dump to restore in your server. Regards. Pelle.- -Mensaje original- De: Ananda Kumar [mailto:[EMAIL PROTECTED] Enviado el: Sábado, 26 de Mayo de 2007 10:23 a.m. Para: MySQL General Asunto: restore one database. Hi All, I have take mysqldump of all the databases. If somebody accidently drops one database, can i restore just that database from mysqldump and apply the binary logs to restore all the data to that database. If yes, can you please let me know how that can be done. I am using version 5.0.40 regards anandkl No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.472 / Virus Database: 269.8.0/819 - Release Date: 26/05/2007 10:47 a.m. No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.472 / Virus Database: 269.8.0/819 - Release Date: 26/05/2007 10:47 a.m. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]