shc recover
shc recover
Section titled “shc recover”recover deployments from backup archives
Synopsis
Section titled “Synopsis”Recover deployments from exported backup archives. --from-backup/-b
takes a .bak file or the restic:
--dry-run prints the recovery plan without executing. A real run
executes asynchronously on the daemon and this command streams
per-phase progress until it finishes. Deployments can be remapped on the
way in: --rename changes stack names (
shc recover [flags]Examples
Section titled “Examples” shc recover -f ./cluster.bkg --dry-run shc recover -f ./cluster.bkg --yes shc recover -b myblog.bak=myblog2 -b mydb.bak --yes shc recover -f ./cluster.bkg --rename blog=blog2 --override host:old.example=new.example shc recover --consistency-id 4c2f31d8 --secrets-password-file pw.txtOptions
Section titled “Options” --consistency-id string recover a consistency group directly from the restic store (no .bkg export); restores each member's latest backup in place. Takes precedence over --file/--from-backup --dry-run show what would be recovered without executing -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") -f, --file string single backup file to recover from (.bak or .bkg) -b, --from-backup stringArray backup file, restic location or orphan id to recover from (<backup>[=<target>]; repeatable) -h, --help help for recover --override strings override ingress hostnames ([<stack>:]host:<old>=<new> or [<stack>:]hosts=<new>; repeatable) --rename strings give recovered deployments new stack names (<old>=<new>) --runtime string target runtime (docker|podman|incus|apple) --secrets-password stringArray candidate password to decrypt backup secrets (repeatable; tried after the vault master) --secrets-password-file stringArray file of newline-separated candidate passwords (repeatable). Also reads $SHC_SECRETS_PASSWORDS / $SHC_SECRETS_PASSWORD_FILES --skip-integration strings skip integration during recovery --storage string storage backend to restore all recovered deployments onto, overriding the backend recorded in each backup; a backend this cluster cannot serve is refused before any data is restored -y, --yes skip confirmation promptOptions inherited from parent commands
Section titled “Options inherited from parent commands” --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) --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)SEE ALSO
Section titled “SEE ALSO”- shc - Selfhosted Cloud CLI