DROP DATABASE [IF EXISTS] When restoring Databases

Christos Panagiotakis shared this idea 10 months ago
Under Consideration

We encounter a very strange MariaDB innodb failure and almost all databases where empty.

Jetbackup couldn't restore only Databases and queue was "partially completed" because of this.

Databased exists but only their names. With zero data. Just DB names.


A trigger to "DROP if DB exists" should be nice.

We had to select DBs and check which were empty, like that:

SELECT S.SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA S
LEFT OUTER JOIN INFORMATION_SCHEMA.TABLES T ON S.SCHEMA_NAME = T.TABLE_SCHEMA
WHERE T.TABLE_SCHEMA IS NULL;

and then DROP them. And after dropping them only then jetbackup could restore it.

There are already triggers like:

"terminate account before restore"

"merge backup data"

"suspend account after restore"

But nothing for Databases.

A "Drop if exists" should do the trick.

Replies (2)

photo
1

Hello Christos Panagiotakis,

Thank you for leaving your feedback and opening a feature request. We will be reviewing your request and provide updates accordingly. In the meantime, you can achieve this effect by downloading the preferred backup item and subsequently extracting the file into the account where you intend to store the files.

Best Regards,

The JetApps Team

photo
1

Hello there. For one or two accounts that's not an issue. But when I had to restore 300 accounts, 422 databases and ONLY databases -because of the InnoDB failure- , it was a pain... A big one.

P.S: So a "DROP if DB exists" or / and DROP if DB is empty (or both) would be nice addition.

photo
1

Hello Christos Panagiotakis,

Your feedback is greatly appreciated! Our developers have placed this feature under consideration and we will provide updates when available. Please note that the voting system lets us gauge the popularity of the feature and the more votes a feature has, the more likely our team will consider it.

Best Regards,

The JetApps Team

photo
Leave a Comment
 
Attach a file