Schedule backups
- Manually add the
backupApplicationDbandbackupComputeDbtasks to thecrontabfile. Include the frequency at which you want to perform backups in the following format:<Minute> < Hour> <DayOfMonth> < Month> <DayOfWeek> < Command>For example, to run a full backup of the ApplicationDB and ComputeDB components every day at midnight, add the following:
0 0 * * * /opt/infogix/dqplus/bin/backupApplicationDb0 0 * * * /opt/infogix/dqplus/bin/backupComputeDb
Restore the system
- Backup the application database by executing the
backupApplicationDbscript from the<dqplus home>/bindirectory:./backupApplicationDb - Clean-up the application database:
- Stop the application before erasing its database:
<dqplus home>/bin /stopApplication - Step into the ApplicationDb Docker Container:
docker exec -it dqplusApplicationDb bash - Obtain a connection to the PostgreSQL database, within the ApplicationDb Docker Container:
psql -U postgres -d igxsagacity - Drop the application schema:
DROP SCHEMA sagacity CASCADE;Note: The application database backup is a full backup of the schema, therefore the schema will be created as a part of the restore process. - Exit the PostgreSQL shell and the Docker container:
\qends the current psql sessionexitexits the current Docker session and returns you to the terminal
- Stop the application before erasing its database:
- Restore the application database:
- To list all available application database backups, run the following command:
./restore applicationdb list - To restore to a backup, run the following command, pointing to the specific backup that you want to restore to:
./restore applicationdb 2017-08-09-11-21/igxsagacity_backup.sql.gz
- To list all available application database backups, run the following command:
- Restart the application after backup recovery:
./stop./start - Backup the Compute database:
- Run the
backupComputeDbscript from the<dqplus home>/bindirectory:./backupComputeDb - To list all available compute database backups, run this command:
./restore computedb list - Copy the
sagacity_default_backup.inifile from the new backup location to thebackup/configurationdirectory, for example, copy from:<backup location>/computeDb/full/20190613175428/configrations/sagacity_default_backup.inito
<backup location>/configrations/sagacity_default_backup.ini - To restore to a backup, run the following command, pointing to the specific backup that you want to restore to:
./restore computedb 20170622220804
- Run the
- Restart the application after backup recovery:
./stop./start