Intended audience: Solo Stackers, Stacking pool operators, and node operators who need to create reliable chainstate backups.
Regular snapshots of your Stacks chainstate help you recover quickly when things go wrong. This guide shows you how to create and manage chainstate snapshots properly.
Critical: Always shut down your Stacks node properly before creating a snapshot. Creating snapshots while the node is running will result in corrupted chainstate data.
Shutdown Procedure
To produce a valid chainstate backup, the node should be stopped gracefully before making a copy. The following steps will correctly shutdown the Stacks node:
1
Check node status before shutdown
2
Initiate graceful shutdown
For Docker: docker stop stacks-node (allows at least 10 seconds for graceful shutdown)
For systemd: systemctl stop stacks-node
For manual processes:
3
Verify complete shutdown
Overview of Snapshot Methods
There are two primary approaches for creating Stacks chainstate snapshots:
File-based snapshots - compress up the chainstate folder
Volume snapshots - snapshot the entire disk/volume
Each method has its advantages depending on your infrastructure setup and recovery requirements.
File-Based Snapshots
This method involves compressing the chainstate directory and storing it locally, or uploading to a cloud storage service.