Page tree
Skip to end of metadata
Go to start of metadata

Summary: information about backing up the persistence databases used by AIP Console (front-end) and all AIP Nodes.

Introduction

AIP Console (front-end) and all AIP Nodes use a persistence database (h2) to store information about global and application level settings. These databases are located by default here:

%PROGRAMDATA%\AipConsole\AipConsole\db > AIP Console front-end
%PROGRAMDATA%\AipConsole\AipNode\db > AIP Node

Automatic backup

By default in ≥ 1.24, these databases are backed up automatically to the following locations at 1am on a nightly basis. For AIP Nodes, the location is determined by storage folder settings - see Configure AIP Node storage folder locations - optional for more information. 

%PROGRAMDATA%\AipConsole\AipConsole\backup\h2\YYYY-MM-DD_HH-mm-SS.zip > AIP Console front-end
%PROGRAMDATA%\AipConsole\AipNode\backup\\h2\YYYY-MM-DD_HH-mm-SS.zip > AIP Node

Changing the automatic backup strategy

If you want to change how the automatic backup strategy functions, modify the following files:

%PROGRAMDATA%\AipConsole\AipConsole\aipConsole.properties > AIP Console front-end
%PROGRAMDATA%\AipConsole\AipNode\aip-node-app.properties > AIP Node

Locate the following section and make changes as required. Save the file and restart AIP Console/AIP Node to ensure the change is taken into account.

# enable the automatic backup of H2 db
h2.backup.enabled=true
# location to store the backup file
h2.backup.location=C:/CAST/CONSOLE_126/data/AipNode/backup/h2
# scheduled H2 backup every day at 1 am.
h2.backup.cron=0 0 1 * * *
# enable the automatic backup cleanup of H2 db
h2.backup.cleanup.enabled=false
# enable the automatic backup cleanup of H2 db older than x days
h2.backup.cleanup.days=30
h2.backup.enabledSet to true by default. Change to false to disable the automatic h2 backup.
h2.backup.location

Defines the location of the h2 backup file. The path must conform to the following syntax:

Path typeRequired syntaxExamples
UNC network pathBack slashes escaped with a back slash.\\\\server\\some\\path
Local pathForward slashes, not escaped, or back slashes escaped with a back slash.

D:/CAST/some/path

D:\\CAST\\some\\path

Mapped drive

Forward slashes, not escaped, or back slashes escaped with a back slash.

S:/some/path

S:\\some\\path

h2.backup.cron

Governs when the automatic h2 backup is run. Modify any of the six parameters that are listed in this order:

  • seconds (0-59)
  • minutes (0-59)
  • hours (0-23)
  • date of the month (1-31)
  • month (1-12 or JAN-DEC)
  • days of the week (0-6 where Sunday=0 or 7, or SUN, MON, TUE, WED, THU, FRI, SAT, or range of days MON-FRI)

For example to change to running the job at 1am on a Sunday (weekly):

h2.backup.cron==0 0 1 * * SUN
h2.backup.cleanup.enabledSet to false by default. Change to true to enable a backup cleanup process to run when the automatic h2 backup runs. This will remove old backups over a certain age (days) as configured with the h2.backup.cleanup.days option. 
h2.backup.cleanup.daysSet to 30 (days) by default. If the h2.backup.cleanup.enabled option is set to true, any backups over 30 days old will be removed the next time the automatic h2 backup is run. Change the value to change the age threshold for backups before they are removed. 


  • No labels