Import/Export definitions

The LavinMQ definitions file consist of users, queues, exchanges, bindings, virtual hosts, permissions, and parameters. These definitions can be exported to a file to import into another server or used for a schema backup.

What is the definitions file?

The definition file contains information and definitions of all objects in LavinMQ, like queues, exchanges, bindings, users, virtual hosts, permissions, and parameters.

Can the definitions file be exported and imported?

Yes, it can be exported to a JSON object, and imported as a JSON object.

Why do I need to export the definitions file?

An exported definitions file can be used to restore the basic setup on a secondary LavinMQ server. It might be used when creating a backup or moving from one AMQP-server to another.

How to export or import LavinMQ configuration

Definitions can be exported or imported as a JSON using any of the following methods:

Note: Be aware that the exported definitions contain hashed passwords.

Using the LavinMQ management

The LavinMQ management overview tab contains two sections, namely Upload definitions and Export definitions.

Upload and export definitions in LavinMQ management interface

Upload definitions

Upload the definitions by clicking Choose file, then select the JSON file containing the definitions, and click upload.

Export definitions

Definitions can be exported for a specific virtual host or for the entire LavinMQ server. Select All or a specific vhost from the drop-down and click Download. When definitions are exported for just one virtual host, some information will be excluded from the exported file.

Using Lavinmqctl commands export_definitions and import_defintions

lavinmqctl allows for definitions to be exported in JSON format using the command lavinmqctl export_definitions.

Importing definitions is done using lavinmqctl import_definitions <file>

Calling the api/definitions API endpoint

More information on the definitions export and import functionality can be found in the LavinMQ API docs.

Ready to take the next steps? Here are some things you should keep in mind:

Managed LavinMQ instance on CloudAMQP

LavinMQ has been built with performance and ease of use in mind - we've benchmarked a throughput of about 1,000,000 messages/sec. You can try LavinMQ without any installation hassle by creating a free instance on CloudAMQP. Signing up is a breeze.

Help and feedback

We welcome your feedback and are eager to address any questions you may have about this piece or using LavinMQ. Join our Slack channel to connect with us directly. You can also find LavinMQ on GitHub.