Backup and Restore from the HiveMQ Control Center

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

The HiveMQ backup feature is useful in situations where you need to recover from a failure, update to a new version of HiveMQ, or move your HiveMQ setup to a different environment. The use of backups helps ensure that your data is protected and can be easily restored in the event of a problem.

For a detailed explanation of how HiveMQ backup and restore functions work, see HiveMQ Backup and Restore.

Backup View in the HiveMQ Control Center

The Backup page of your HiveMQ Control Center provides a clear overview of your previous backups as well as a convenient way to create and restore from backups:

Control Center Backup page
Figure 1. Example backups overview page

Stored Backups

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

Download Backup

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

Delete Backup

To delete a backup file from HiveMQ and remove the backup entry from the Stored Backups overview, select the delete action of the desired backup file in the table.

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

Create a Backup with the HiveMQ Control Center

To create a new backup file from all persistent HiveMQ data in a HiveMQ cluster, select Create Backup on the Backup overview. After a confirmation, HiveMQ creates a backup file. Completed backups appear in the Stored Backups overview.

Before you start, make sure that there is at least 1 GB disk space available on the node where you want to create the backup.

To cancel the backup action, select 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. Example backup in progress screen

Restore From Backup

Since HiveMQ 4.9.0, it is possible to restore a backup to a running HiveMQ cluster that contains data and has active client sessions. To restore form a backup file, select a backup from the Stored Backups overview table or choose a backup file on your filesystem.
To start the restore process, select Upload and confirm the restoration action in the dialog that opens.

You can leave the backup page while HiveMQ completes the restore from backup process. When the restoration is finished, a notification displays on every page of your control center.

Once the import process begins, the backup import cannot be stopped.
Backup In Progress
Figure 3. Example backup import in progress screen

For more information on how HiveMQ restores from a backup file, see Restore From Backup