Backup & Restore

Since HiveMQ 4.2.0 it is possible to create backups and restore from backups with the HiveMQ Control Center.

For a detailed explanation of how the backup and restore functions work, see the HiveMQ User Guide.

Backup Page

The backup page has three sections:

Backup Page
Figure 1. Backup Page

Stored Backups

Every backup you create is shown in the stored-backups table. This table provides information about the start date of the backup and and the size of the file after compression. The table also provides the download and delete actions.

Download Backup

To download a backup from HiveMQ, simply click the download button of the desired backup. A dialog opens where you can see the preparation progress. When the preparation is complete, click save to download the backup to your filesystem.

Delete Backup

To delete a backup from HiveMQ and the stored-backups table, click the delete button of the desired backup file in the table.

This action permanently deletes the backup file. Deleted backup files cannot be restored.

Create New Backup

To create a new backup from all persistent HiveMQ data, click the Create Backup button. After a confirmation, HiveMQ creates a backup. Completed backups are shown in the stored backups table.

Please make sure that there is at least 1 GB disk space left on the node where you want to create the backup.

To cancel the backup, click Abort Backup.

You can leave the backup page during the creation of the backup. When the backup is finished, a notification displays on every page of the control center.

You can only create one backup at a time.

The backup contains the following data:

  • Client session data (persistent sessions only)

    • Subscriptions

    • Shared subscriptions

    • Queued messages

    • In-flight messages

    • Session attributes

  • Retained messages

  • Shared subscription queues

Backup In Progress
Figure 2. Backup In Progress

Restore From Backup

To restore a backup to a fresh HiveMQ cluster, you can upload a backup file. Click into the empty text field on the right side. Choose a backup file on your filesystem. Click the Upload button and confirm the restoration action in the dialog that opens.

A fresh HiveMQ cluster is defined as follows:

  • No client sessions.

  • No subscriptions.

  • No retained messages.

  • No queued messages.

If any of the data listed above is present, HiveMQ denies a restoration.

You can leave the backup page during the restoration. When the restoration is finished a notification displays on every page of the control center.

You should know what you are doing. The import cannot be aborted.
Backup In Progress
Figure 3. Import In Progress