KB Article #181071

How to correctly backup the shared messages folder

Problem

  • Using embedded ActiveMQ and would like to backup the shared messages folder while API GW is running.
  • Corruption of KahaDB after restoring a backup of the messaging-shared or a KahaDB folder. Backup taken with filesystem command like cp / copy while API GW was running.
  • ActiveMQ will not start with corrupted KahaDB.

Resolution

The files and sub folders in the shared directory used by the embedded Active MQ are locked and open for read / write while API Gateway is running. It is not possible to safely back up this folder or files while API Gateway is running. Either stop all instances before taking the backup, or use a frozen or snapshot type that captures the entire directory at a single point in time.
Active MQ reference: link.


Such snapshot backups are typically done via 3rd party commercial backup software, or file system specific commands as appropriate for your OS and file-system type.


Note: Even with a snapshot backup, a message written to disk after the last journal checkpoint and before the snapshot may be lost.