Bug #16030 the whole database restore doesn't work correctly
Submitted: 28 Dec 2005 5:23 Modified: 5 Nov 2008 10:00
Reporter: ming lu Email Updates:
Status: Not a Bug Impact on me:
Category:MySQL Administrator Severity:S4 (Feature request)
Version:1.1.2 OS:Microsoft Windows (windows & linux)
Assigned to: CPU Architecture:Any

[28 Dec 2005 5:23] ming lu
I backup a database with  "complete backup"  mode. Then i create several new tables in the database.When i restore the database with the backup script, the new tables is still exist. 
I think that the whole database restore mode should remove all tables in the  database automatically. 

How to repeat:
see the Description

Suggested fix:
I think that the whole database restore mode should remove all tables in the  database automatically.
[28 Dec 2005 10:35] Valeriy Kravchuk
You have restored to the original database, I believe. In this case database should not be dropped. At least, there is nothing about it in documentation. Please, read in the Help:

"Target Schema: You can choose the Original Schema option to have all tables restored into their original databases. You can also choose the New Schema... option to restore all tables into a new database. Finally you can choose from one of the existing databases in the drop-down list to force all tables to be restored to that database."

So, it is not a bug, but intended behaviour, I believe.

I can mark this as a feature request to add the ability to drop all the content in original database before restoring. What do you think?
[29 Dec 2005 2:39] ming lu
Different database system maybe has different backup&restore mode.  I think that the mode i proposed is a more popular mode that could be received by most of the users.
I agree with your advice, you can mark it as a feature request.
[5 Nov 2008 10:00] Susanne Ebrecht
Many thanks for writing a feature request. I will close this report now.

I just looked into several other DBMS and non of them put DROP/CREATE database in the backup/dump file per default. Also for mysqldump you have to add some options when you want that the database will be recreated during restore.

At the actual version of MySQL Administrator (1.2.14) for restore you have the option to choose if you want to use the existing database/schema or if you want to create a new one.