Skip to content
SHC Docs

shc backup create

create a backup

Create a backup of the current stack (or the stack named with —stack) into the cluster’s backup repository. —file instead exports a single-stack backup to a local .bak archive. —all-connected backs up the stack’s entire integration graph and —with-dependants adds every stack that depends on it (each produces one consistency group). Containers are paused for the snapshot (up to —timeout seconds); —stop stops them instead and —fail aborts when the pause deadline is exceeded. —secrets-password seals the backup’s secrets under a password of your choice so it can be restored on a cluster whose vault master differs.

shc backup create [flags]
shc backup create -s myblog
shc backup create -s myblog --name pre-upgrade --stop
shc backup create -s myblog --file ./myblog.bak --secrets-password s3cret
shc backup create -s mydb --all-connected
--all-connected backup entire integration graph
-c, --compression int compression level (1-9) (default 6)
-x, --exclude string comma-separated list of exclude patterns
--fail fail if pause timeout exceeded
--file string export backup to local file
-h, --help help for create
-n, --name string custom name for the backup
--no-jobs skip pre/post backup jobs
-p, --paths string comma-separated list of paths to backup
--secrets-password string encrypt the backup's vault secrets under this password instead of the vault master (lets the backup be restored where the master differs)
-s, --stack string stack name (overrides ctx)
--stop always stop containers during backup
--timeout float pause timeout in seconds (default 10)
--with-dependants backup stack and all stacks that depend on it
--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: $SHC_ENVIRONMENT)
--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)
-t, --tenant string tenant name (default: $SHC_TENANT)
-v, --verbose verbose output (default: $SHC_VERBOSE)