Skip to content
SHC Docs

shc backup export

export a backup (or consistency group) to a one-off archive you name

Write one backup out of the indexed store as a one-off .bak archive at a location you name. Several --id (or --with-connected) bundle into one .bkg group archive instead.

--file is required and takes either a directory (the archive lands inside it, named for the backup) or a full path ending in the filename you want. There is no default folder: a .bak is not indexed, not encrypted, not swept by retention and not read by any scheduled path, so where it lives is the operator’s decision and the operator’s responsibility. Scheduled backups never produce one: they go straight into the restic repository.

What a .bak is for, in full: shc backup restore --file <archive> restores directly from it on any cluster, and shc backup import <archive> ingests it back into the indexed store (restic snapshot + ledger row). Delete it once you are done with it.

--native writes the app’s own native format instead, a bench-shaped tarball for the frappe family. A backup is what a deployment owns (frappe: its files; the shared engine: its databases). An export is the native artifact, derived offline from those captures: the engine’s per-database dump becomes database.sql.gz, the app’s own volume snapshot supplies the files tars and site_config. It never opens a connection to a live engine and never boots a database. It needs the pairing backup create --with-dependants records, or an explicit --engine-backup. Apps whose package declares no export: recipe are refused, politely and by name.

shc backup export [backup-id|name] [flags]
shc backup export -i 20260818T213000Z_645cafff7f65e1d6 --file /srv/handover
shc backup export -i 20260818T213000Z_645cafff7f65e1d6 --file /srv/handover/db.bak
shc backup export -s myblog --latest --file .
shc backup export -i 20260818T213000Z_645cafff7f65e1d6 --native --file /srv/handover
--database string with --native: which database inside the engine archive to re-wrap, when the pairing names none
--engine-backup string with --native: the engine archive holding the app's database, when the backup records no with-dependants pairing
-f, --file string required destination: a directory to put the archive in, or a full path ending in its filename
-h, --help help for export
-i, --id stringArray backup ID or name to export (repeatable)
--latest only export the latest backup (with -s/--stack)
--native write the app's native format (frappe: a bench-shaped tarball) instead of a portable .bak, derived offline from this backup's files and the paired engine's per-database dump, never from a live engine
-s, --stack string export the latest backup of this stack
--with-connected include all backups sharing the target's consistency_id, the target named by --id or the latest of -s
--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)
-t, --tenant string tenant name (default: $SHC_TENANT)
-v, --verbose verbose output (default: $SHC_VERBOSE)