Skip to content

Backup Internal Database

Before you start

Goal

  • Take a backup of the Altair SLC Hub internal database

Backup the internal database

Firstly, ensure that the internal database service (slchub.internaldb) is active. To verify this, check the output of the following command shows an Active state of 'Active':

hubctl service status internaldb

If the internal database service is not running, start it by running:

hubctl service start internaldb

With the internal database service running, you can now take a backup. By default, a ZIP file will be output to [var directory]/backups/internaldb and include a timestamp in the filename. Optionally, you can specify a different location (which you must ensure exists) and filename by providing a filepath as an argument to the backup command, such as:

hubctl backup internaldb /var/slc-hub/backups/backup001.zip
hubctl backup internaldb "C:\slc-hub\backups\backup001.zip"

By default, the backup is compressed in a ZIP file which contains the backup as a single SQL file. To skip the compression and just get the SQL file, supply the --nocompress option:

hubctl backup internaldb /var/slc-hub/backups/backup001.sql --nocompress
hubctl backup internaldb "C:\slc-hub\backups\backup001.sql" --nocompress

Having generated the backup file, it would now be a good idea to copy the backup file to another server.

Verification

Verify backup

  • Check the output from hubctl backup internaldb

You should see a message reading Backup file written to /var/slc-hub/backups/backup001.zip