shc backup relocate
shc backup relocate
Section titled “shc backup relocate”point every archive row at a restic repository that moved
Synopsis
Section titled “Synopsis”Rewrite every backup archive row (and backup cache row) that names the restic repository --from so it names --to instead.
Use it after copying a repository somewhere new (another bucket, another account, another provider): each archive row stores its repository, and restore, verify, mount, export and retention open the repository from the row, so changing backup.repo alone leaves every older archive pointing at the old place.
Set backup.repo and the backup credentials to the new repository first. relocate opens --to with the credentials the daemon resolves and refuses, rewriting nothing, unless it holds every snapshot id the rows reference. --skip-missing moves only the rows whose snapshot --to holds and leaves the rest on --from: a nightly mirror lacks whatever was captured after its last run. --dry-run does the whole check and writes nothing. A run that stops part way is finished by running it again.
shc backup relocate --from <repo> --to <repo> [flags]Options
Section titled “Options” --dry-run check everything and write nothing --from string the restic repository the rows name now -h, --help help for relocate --skip-missing move only the rows whose snapshot --to holds; leave the rest on --from --to string the restic repository the rows should name -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) -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)SEE ALSO
Section titled “SEE ALSO”- shc backup - create and manage backups