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.
- Log in to the console of node2 and stop the node by running the following
docker stop node2
- Log in to the console of node3 and stop the node by running the following
docker stop node3
- Log in to the console of node1 and restore the database using the
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.
- 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.
- Once the backup has successfully been restored, stop the node by executing the
docker stop node1
- Remove the node from the cluster by running the following
docker rm node1
The node is removed from the Distributed DDNS Data Node cluster.
- Create and start a new node container as a bootstrap node of a new cluster using
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:21.3
- Log in to the console of node2 and start the node by running the following
docker start node2
- Log in to the console of node3 and start the node by running the
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.