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.
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.
Recommendedfailure, guidance
Treat database restoreperforming asdestructive;below.$confirmmysqltarget-uenvironmentrootand-pbackupaiqstatus<first.Use<path>\aiqbq.sql
current4.
databaseExecutebackup/restoreas root the attached sql script renameWindows.sql, it'll perform the following.
a. create the aiq_old schemab. 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_oldAIQschemaversion.Validate5.
AIQDropservicesaiqafter the restore before handing the environment back.
Validation workflow
Confirm written approval, target host, database name,schema anddowntimecreationwindow.Backofupathenew 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 collateutf8_general_ci;
6. Restore current
databaseaiqandschemaconfiguration before making changes.Stop affected AIQ services according to the runbook.Restore the approved blank database artifactagain using thedatabasebackupowner’screatedprocedure.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.