Skip to content
SHC Docs

shc db snapshot create

take a control-plane snapshot now, on the leader

Take a snapshot of the control-plane database now, through the same dump the nightly db_snapshot_cron runs, into the same directory (/snapshots/control-plane). Run it before a change you may need to undo by hand: vault rows, placement, users.

It runs on the leader only. On any other node it refuses and names the leader; it does not forward.

On-demand and nightly snapshots are kept apart: each kind keeps its newest maintenance.control_plane_snapshot_retention files (default 7). Taking one on demand prunes only older on-demand snapshots, never a nightly.

shc db snapshot create [flags]
shc db snapshot create
shc db snapshot ls
-h, --help help for create
--config stringArray extra YAML config file to layer on top of auto-discovered config; repeatable, later files win
-d, --debug enable debug mode (default: $SHC_DEBUG)
-e, --environment string environment name (default: "prod", or "default" on an estate with no licence and no trial; $SHC_ENVIRONMENT and shc ctx -e override it, and the "master" tenant is always "default")
--exclude string comma-separated dotted paths to drop
--fields string comma-separated columns/keys to show (and their order)
--filter string comma-separated dotted paths to keep (drops everything else)
-o, --output string output format: tty|text|json|yaml (default: $SHC_OUTPUT)
-s, --stack string stack name (default: $SHC_STACK)
-t, --tenant string tenant name (default: $SHC_TENANT)
-v, --verbose verbose output (default: $SHC_VERBOSE)