Backup and recovery

The messaging server stores data under its <data directories> that are {working directory}/data/messaging-server. The {working directory} property is configured inside conf/messaging-server/path.conf.

For data consistency, these operations should be performed on a stopped node.

Backup

For a full backup of data from a messaging server, copy or archive its <data directories>.

If you are interested in backing up only certain data topics from a messaging server, copy or archive all directories matching {topic}-{partition_number} under <data directories>.

Backup with Docker

  1. Stop the messaging server container.

    Stop a messaging server
    $ docker stop --time 60 dims_messaging-server_XXXXXXXX-XX
    dims_messaging-server_XXXXXXXX-XX

    You can check that the container is stopped using:

    $ docker ps -a
    CONTAINER ID        IMAGE                                               COMMAND                 CREATED             STATUS              PORTS               NAMES
    f3b094761509        axway/decisioninsight-messagingsystem:XXXXXXXX-XX   "/opt/dims/node/bi..."  5 seconds ago                                               dims_messaging-server_XXXXXXXX-XX
  2. Start a temporary container with all volumes from dims_messaging-server_XXXXXXXX-XX mounted on it. 

    1. Make a file copy of all the data directories.

    2. (Optionally)   Make an archive file of the previously copied directories (for instance a .tar.gz file).

      Configure a messaging server
      $ docker run --rm --tty --interactive --user dims-user --volumes-from=dims_messaging-server_XXXXXXXX-XX --volume ~/backup:/backup axway/decisioninsight-messagingsystem:XXXXXXXX-XX /bin/sh
      / # cp -R /opt/dims/node/var/data/ /backup/
      / # tar -czvf /backup/backup_decisioninsightmessagingsystem:XXXXXXXX-XX.tar.gz ./data
      / # exit 

Recovery

To recover data from a backup of the messaging server, copy your backup directories (or extract your backup archive) to a new node under its <data directories>.

Upon restart, the backed up data will be available in the messaging server.

Recovery with Docker

  1. Start a temporary container with all volumes from dims_messaging-server_XXXXXXXX-XX mounted on it. 

    1. Make a file copy of the backup directory under the /opt/dims/node/var directory.

    2. (Optionally)   Extract the backup file.    

      Configure a messaging server
      $ docker run --rm --tty --interactive --user dims-user --volumes-from=dims_messaging-server_XXXXXXXX-XX --volume ~/backup:/backup axway/decisioninsight-messagingsystem:XXXXXXXX-XX /bin/sh
      / # cp -R /backup/data /opt/dims/node/var/data
      / # cd /opt/dims/node/var/
      / # tar -xzvf /backup/backup_decisioninsightmessagingsystem:XXXXXXXX-XX.tar.gz
      / # exit 
  2. Restart the messaging server container.

    $ docker start dims_messaging-server_XXXXXXXX-XX
    dims_messaging-server_XXXXXXXX-XX

Related Links