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

BlueCat Distributed DDNS Administration Guide

Locale
English (United States)
Product name
BlueCat Gateway
Version
21.2

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 node1 and stop the node by running the following command:
    docker stop node1
  2. Log in to the console of node2 and stop the node by running the following command:
    docker stop node2
  3. Log in to the console of node3 and restore the database using the following command:
    docker exec -it node3 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 node3
  6. Remove the node from the cluster by running the following command:
    docker rm node3

    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 \
    --restart=unless-stopped \
    --net=host \
    --name node3 \
    -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:21.2
  8. Log in to the console of node1 and start the node by running the following command:
    docker start node1
  9. Log in to the console of node2 and start the node by running the following command:
    docker start node2

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