Restore a Blank AIQ Database Safely
Date:Last 2020-09-03reviewed: September 22, 2026
ProcedureUse this page only when an environment owner has approved restoring a blank AIQ database for a non-production or reset workflow.
Recommended guidance
- Treat database restore as destructive; confirm target environment and backup status first.
- Use current database backup/restore procedures for the AIQ version.
- Validate AIQ services after the restore before handing the environment back.
Validation workflow
- Confirm written approval, target host, database name, and downtime window.
- Back up the current database and configuration before making changes.
- Stop affected AIQ services according to
restoretheprevious executionsCreate a procedure to restore allrunbook. - Restore 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 aiqapproved blank schema,database this needs to be addressedartifact using MysqlWorkbench and connected as root.
drop schema aiq;
create schema if not exists `aiq` default character set utf8 collate
utf8_general_ci;
3. Restore the database ofowner’s previousprocedure.
$and mysql -u root -p aiq < <path>\aiqbq.sqlintegrations.
4.Note: ExecuteDo asnot rootrun a blank restore on production unless explicitly approved through the attachedproduction sqlchange script renameWindows.sql, it'll perform the following.process.
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 aiq_old schema
5. Drop aiq schema and creation of a new 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 aiq schema again using the backup created in the first step.$ mysql -u root -p aiq < <path>\currentaiq.sql
Last updated: JulySeptember 03,22, 20232026
If you have any feedback on this topic, please contact us at documentation@appvance.ai.