It is recommended to regularly create backup images in order to maintain the NPKD application. The Administrator can restore NPKD the application data from the backup file and the NPKD can also monitor disk usage.

Database Properties File

The file containing the necessary access information to the database; the database name, username, and password. These access information will be used only when creating the maintenance report and the during database backup and restore. It is recommended that the user specified in this file will have no higher privileges than what is necessary to perform these functions. 

Maintenance Report

The maintenance report reports the size of the database and the size of each of its tables on the disk. Additionally, a warning is issued when the disk is running low on space.

  • Disk Mount Point: The directory used for calculating disk usage space.
  • Application Logs Folder: The folder where the application server logs are saved. Used only for monitoring the log folder size, as it has a tendency to substantially grow in size.
  • Warning Disk Usage Threshold: The threshold level after which NPKD will start warning the user about high disk usage
  • Click Save to update the configuration or select Create Maintenance Report to update the configuration above and create a maintenance report
  • Click Result Logs to view the maintenance report.

Database Backup

When creating the database backup, a MySQL dump is done and stored on the local file system. The name of the backup file is marked with the date and time of the backup operation. The database backup file can also be encrypted using an RSA key

  • Backup Destination Folder: The folder where the database backup file will be stored. This folder has to be on the local file system. Make sure that the NPKD user has the necessary permissions to write to the this directory
  • Backup Filename Suffix: A suffix added to the name of the database backup file. Can be left empty
  • Encrypt Database Backup: If checked, the database backup file will be encrypted or restored from an encrypted file using an RSA key specified the configurations bellow.
  • Type of Keystore for Database Backup Encryption: The type of the keystore containing or referencing the RSA key used to encrypt/decrypt the database backup file. If set to "PKCS12" or "JKS", the keystore will be loaded from the file specified in the Keystore field.
  • Keystore or PKCS11 Shared Library File: The full path of the keystore file containing the RSA key used to encrypt/decrypt the database backup file, or the path to the shared library file (.so file) specific for the installed HSM; or a SUN configuration file.
  • Keystore Password or Hard Token Pin: The password to be used for opening the protected keystore file, or the pin to be used for the keys stored on the HSM
  • PKCS11 Slot Label Type: The method used to identify the HSM's slot containing the key to be used, or "SUN Configuration File" if a SUN configuration file is specified in the TLS Keystore or PKCS11 Shared Library File field. Used only if the keystore is of type "PKCS11".
  • PKCS11 Slot Label Value: The HSM's slot containing the key to be used. Used only if the keystore is of type "PKCS11"
  • PKCS11 Key Alias: The alias of the RSA key in the HSM that will be used to encrypt/decrypt the database backup file. Used only if the keystore is of type "PKCS11"
  • Click Save to update the configurations and select Create Database Backup to update the configuration and create a database backup.
  • Click Restore to restore the database from a backup file.
  • Click Delete to remove a database backup file from the file system.

If you get a "Broken pipe" error on backup/restore:

This error indicates that there is a problem with the mysqldump (during backup) or mysql (on restore) command.

Please check that the username, password and database name are configured correctly in conf/databasebackuprestore.properties. If not, please change them, and re-deploy NPKD (run ant deploy-ear)

If backup succeeds, but restore fails, there may be a permissions issue. Please ensure that the MariaDB user has the CREATE, DROP, INDEX and LOCK TABLES permissions (in addition to the standard INSERT, SELECT, UPDATE, DELETE).