Database Options

NAKIVO Backup & Replication allows you to migrate the internal H2 database used by the NAKIVO Backup & Replication Director to an external database. To do that, take the following steps:

 

Important

  • If you migrate the internal H2 database to an external database, you will not be able to switch back to the internal database or an external database of the same type later.

  • NAKIVO Backup & Replication may automatically recommend migrating to an external database if the current workload exceeds the limit recommended for the internal H2 database.

 

  1. Go to Settings > General > Database Options.

  2. Select the external database from the list of supported platforms in the Type drop-down list. Note that the internal database is selected by default.

  3. In the Host field, enter the hostname or IP of the server housing the database.

  4. In the Port field, enter the relevant port number.

  5. Enter the name for your database in the Database name field.

  6. Enter Username and Password in the corresponding fields.

  7. Click Test Connection.

  8. If the test is successful, click Apply Settings:

    • If the database does not exist, a dialog box appears asking if you would like to create one and proceed with the migration. Click Migrate.

    • If the database belongs to the current NAKIVO Backup & Replication installation, a dialog box appears asking if you would like to update the settings of the existing database. Click Update to proceed.

    • If the database already exists and is compatible with the current NAKIVO Backup & Replication installation, a dialog box appears asking if you would like to use it, cleanup all its records and replace the contents of the database with the new data. Click Proceed.

 

Notes

  • If you have the Self-Backup feature enabled, the self-backup process starts before the database switch and runs again after the switch is completed.

  • Self-backup of an external database is possible only with a single-tenant instance of the solution.

  • If the external database is installed on another VM or is using an IP address instead of localhost, take the following steps before migration:

    1. Open the pg_hba.conf file located in the external database installation folder.

    2. Change IPv4 local connections settings from 127.0.0.1/32 to 0.0.0.0/0.

    3. Save changes.

    4. Restart external database service.

  • If the connection between PostgreSQL and NAKIVO Backup & Replication cannot be established, add the following string to the pg_hba.conf file:

    host DATABASE USER ADDRESS METHOD [OPTIONS]

    host all all 0.0.0.0/0 md5

    Note that method (md5) may be different for some versions of PostgreSQL. Check the respective method for your version of PostgreSQL before applying the changes.

  • It is not possible to recover from a self-backup and system migration in the following cases:

    • The NAKIVO Backup & Replication installation uses the H2 database while the self-backup contains data from an external database.

    • The NAKIVO Backup & Replication installation uses an external database while the self-backup contains data from the H2 database.