Skip to main content

Restore "blank" DB

LastDate: reviewed:2020-09-03 September 22, 2026

UseProcedure to restore previous executions

​Create a procedure to restore all the old (previous) data and the ability of AIQ to handle.

    Create a backup for current and active aiq (need to be performed having aiq offline) as below.

    ​$ mysqldump -u root -p aiq > <path>\currentaiq.sql

    2. Drop aiq schema and creation of a new aiq blank schema, this pageneeds onlyto whenbe anaddressed environmentusing ownerMysqlWorkbench hasand approvedconnected restoringas aroot.

    blank

    drop AIQschema aiq;

    create schema if not exists `aiq` default character set utf8 collate

    utf8_general_ci;

    3. Restore the database forof aprevious non-productionexecutions orto resetpoint workflow.

    of
    • Treat database restoreperforming as destructive;below.
      $ confirmmysql target-u environmentroot and-p backupaiq status< first.
    • Use<path>\aiqbq.sql
      current

      4. databaseExecute backup/restoreas root the attached sql script renameWindows.sql, it'll perform the following.


      a. create the aiq_old schema

      b. grant permissions to aiq user for aiq_old schema

      b. rename aiq's tables to aiq_old schema

      c. create views, functions, stored procedures for theaiq_old AIQschema

      version.
    • Validate

      5. AIQDrop servicesaiq after the restore before handing the environment back.

    Validation workflow

    1. Confirm written approval, target host, database name,schema and downtimecreation window.
    2. Backof upa thenew aiq blank schema, this needs to be addressed using MysqlWorkbench and connected as root.

      drop schema aiq;

      create schema if not exists `aiq` default character set utf8 collate

      utf8_general_ci;

      6. Restore current databaseaiq andschema configuration before making changes.

    3. Stop affected AIQ services according to the runbook.
    4. Restore the approved blank database artifactagain using the databasebackup owner’screated procedure.
    5. Restart AIQ services and validate sign-in, projects, scenarios, and integrations.

    Note: Do not run a blank restore on production unless explicitly approved throughin the productionfirst changestep.
    $ process.mysql -u root -p aiq < <path>\currentaiq.sql


    Last updated: SeptemberJuly 22,03, 20262023

    If you have any feedback on this topic, please contact us at documentation@appvance.ai.