Backups
Nomad's state consists of the following components:
- Jobs
- Deployments
- Evaluations
- Allocations
- Nodes
- Variables
- Key Material to encrypt secrets such as Variables and to sign JWTs
All of this information is backed up once Nomad generates a snapshot.
Note
The only exception is the keystore(opens in new tab), if the local one is used, it needs to be backed up separately.
You can trigger snapshot creation manually or automatically with the snapshot agent(opens in new tab).
To support your company's RPO policy we recommend configuring Nomad snapshot agent to take periodic backups of the Nomad cluster state. You should configure the snapshot agent to take backups at a specified interval and store them in S3 or other compatible remote storage, preferably with configured lifecycle policy. The snapshot agent can also be configured to retain a specified number of backups.
When restoring from a snapshot, backup taken with the Nomad Enterprise snapshot agent, the state of the entire cluster will be reverted back to the point in time at which the snapshot was taken. There isn’t an easy way to directly pull individual items from the snapshot without restoring it to an isolated cluster and using the API to retrieve individual items.
You can only restore snapshots to the same Nomad version in which they were created.
Use the nomad operator snapshot restore
command to restore a snapshot.