Skip to Content
Best PracticesMaintenance

Maintenance

Backup the Metadata Repository

Use ExportBundle operation. To backup all content of the metadata repository, use the following specification:

{ "applications": "all", "globalObjects": "all" }

You can find an example in our Tutorials application in InfoLink Maintenance scenario.

We recommend to create a separate application with a scenario that creates a backup of the metadata repository and schedule to execute this scenario regularly.

Accessing Metadata Repository from Scenarios

Various maintenance and auditing/reporting operations can be implemented by directly querying/updating the metadata repository. Feel free to query any table in the metadata repository but be very careful with updates. We suggest that you can update only il_activity_log table and only in a way described in Trim Activity Log section.

To access the metadata repository, create a source by taking the connection string and credentials from the InfoLink configuration file. The source type can be H2Source, MSSQLSource, or PgSQLSource depending on where the metadata repository is configured to store its data. Then use Transform operation for querying and RunSourceScript operation for updating the metadata repository. When you query the metadata repository, do not create any tables in the repository - create them in some other staging database.

Trim Activity Log Periodically

Activity Log grows infinitely that can reduce performance of the system over time. To truncate Activity Log is to use Maintain operation with trimActivityLog command. See Maintain for more details. If the functionality of Maintain - trimActivityLog is not sufficient for your needs, you can access the metadata repository directly as described in Accessing Metadata Repository from Scenarios. This way you can implement more advanced procedures such as backing up the activity log records before deleting them. Be careful when you update the master repository. We suggest that you use only the following queries for updates. In particular, it is important not to delete records for jobs that are still running (otherwise it will lead to an error when job tries to update activity log on completion). You can achieve it by adding status != 'running' filter.

Delete activity log records for all jobs

delete from il_activity_log where status != 'running';

Delete activity log records for all jobs ended before Wed, 12 Oct 2022 20:02:27 GMT. start_time and end_time columns are epoch timestamp in milliseconds. You can use epochconverter.com  to convert to epoch milliseconds.

delete from il_activity_log where status != 'running' and end_time < 1665604947000;

You can find an example in our Tutorials application in InfoLink Maintenance scenario.

We recommend to create a separate application with a scenario that trims Activity Log and schedule to execute this scenario regularly.

Last updated on