Skip to main content
In this guide, you’ll learn how to automate backups of your Consul data using the Consul Snapshot Agent—an enterprise-only feature that takes and stores snapshots on a schedule.

Overview

Consul’s open source edition requires manual snapshots. With a valid enterprise license, you can deploy the Snapshot Agent to automatically capture and store snapshots at defined intervals, either locally or in AWS S3.

Prerequisites

  • Enterprise license installed on every Consul server
  • Consul binary present on all nodes
  • A running cluster with two servers and two clients
  • AWS credentials configured for S3 storage (if using S3)
Make sure your Enterprise license is active and that your IAM user has write permissions for the S3 bucket.

Verify Cluster Membership

Run this command on any server to confirm all nodes are online:
Expected output:

Create a Systemd Unit for the Snapshot Agent

The Snapshot Agent runs as a separate Consul process in agent mode. Place this file at /etc/systemd/system/consul-snapshot.service:

Configure the Snapshot Agent

Create /etc/consul-snapshot.d/consul-snapshot.json with your settings:
Adjust values to match your environment and naming conventions.

Start and Enable the Service

Verify Service Status and Logs

Sample log output:

Confirm Snapshots in S3

  1. Open the AWS S3 Console.
  2. Navigate to your bucket (us-east-1-krausen-consul-snapshots).
  3. Verify that snapshot files appear under the configured prefix at the expected interval.

High Availability & Leadership Failover

Deploy a second agent on another server:
It will log:
To test failover, stop the first agent:
Then restart on server-2:
You should see:
Confirm new snapshots in the S3 bucket.

Cleanup

When you’re done:

References

Watch Video

Practice Lab