Restoring the database from a bootstrap node - Adaptive Applications - BlueCat Gateway - 22.1

BlueCat Distributed DDNS Administration Guide

Locale
English
Product name
BlueCat Gateway
Version
22.1

In the following example, a three-node Distribute DDNS Data Node cluster exists with nodes node1, node2, and node3. The node node1 has been identified as the bootstrap node based on the commands outlined in Restoring database backups.

To restore the database using the bootstrap node:
  1. Log in to the console of node2 and stop the node by running the following command:
    docker stop node2
  2. Log in to the console of node3 and stop the node by running the following command:
    docker stop node3
  3. Log in to the console of node1 and restore the database using the following command:
    docker exec -it node1 restore_db

    The prompt asks whether you would like to perform a manual restore. Enter Y.

    Currently, you can only restore the database using a full backup. If at least one full backup has been performed on the node, a backup menu appears with the option to select the backup that you would like to restore from.

  4. Select the backup that you would like to restore from by inputting the number that appears next to the names of the backup files and click ENTER.

    The note attempts to restore the database from the selected backup file.

  5. Once the backup has successfully been restored, stop the node by executing the following command:
    docker stop node1
  6. Remove the node from the cluster by running the following command:
    docker rm node1

    The node is removed from the Distributed DDNS Data Node cluster.

  7. Create and start a new node container as a bootstrap node of a new cluster using the following command:
    docker run -d \
    --net=host \
    --name node1 \
    -v mariadb-config:/etc/mysql \
    -v mariadb-data:/var/lib/mysql \
    -v daemon-config:/daemon_run \
    -v mariadb-backup:/opt/backup/ \
    -v dbssl-config:/etc/ddns_ssl \
    -e GALERA_NEW_CLUSTER=yes \
    quay.io/bluecat/distributed_ddns_database:22.1
  8. Log in to the console of node2 and start the node by running the following command:
    docker start node2
  9. Log in to the console of node3 and start the node by running the following command:
    docker start node3

Once the node2 and node3 containers restart, the nodes retrieve the updated node database information from node1 and the database is restored.