Back up and Restore Consul Using a Snapshot

30 minutes
  • 5 Learning Objectives

About this Hands-on Lab

This lab will require you to complete the following tasks:

1. Create a KV pair in the key store.
2. Take a snapshot of Consul to a backup file.
3. Delete the KV pair from the store.
4. Restore the snapshot from the backup file.
5. Test the KV pair is back in the store.

You will be provided a Consul server already in dev mode.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Log in to the Provided Server
  1. Log in to the server using the credentials provided.
  2. Test that Consul is ready for use with a consul members command.

    Note: It may take several minutes after the lab has started before Consul is ready for use.

Create a Key Pair in the KV Store
  • Using Consul commands, create a key value pair in the KV store. This pair may be anything. If you’re not sure what values to use, use the following:

    aws with a value of us-east-1

Take a Snapshot of Consul and Delete the Key in the KV Store
  • Using the appropriate commands, take a snapshot of the running Consul system.
  • Delete the KV pair you created in the previous step.
  • Check the KV store to ensure that key pair is missing.
Restore the Snapshot to the Running Consul System
  • Using the appropriate commands, restore the previously created snapshot to your Consul.
Test the KV Pair Is Back in the KV Store
  • Test the newly created KV pair is now back in the KV store.

Additional Resources

You have been tasked with testing the restore process via a snapshot in Consul. You will create an entry in the KV store containing data and take a snapshot of the Consul environment. You will need to delete the newly created KV pair from the KV store and restore the earlier snapshot. Finally, test the snapshot by checking the recently deleted KV pair is back in the KV store.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?