Skip to content

Validate new dump can be restored before trying #14

@gregcorbett

Description

@gregcorbett

Before the failover pipeline can restore the database from the dump file, it has to drop the existing data.

  • For ORACLE, this happens all at once in dropGocdbUser2.sh
  • For MariaDB, this happens table by table i.e.:
DROP TABLE IF EXISTS `countries`;
CREATE TABLE `countries` (...);
INSERT INTO `countries` VALUES (...);

This leads to problems (atleast under ORACLE) where if the dump can't be restored, the existing data gets dumped anyway.

I can imagine a similar problem under MariaDB, where by a CREATE TABLE command could fail, which would mean the database would be missing a table and its data.

Before trying to restore the dump to the live database, the failover scripts should try and restore the dump to some dummy dataabse and if (and only if) that's successful, then restore the dump to the live database.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions