Skip to content

Latest commit

 

History

History
73 lines (57 loc) · 4.27 KB

File metadata and controls

73 lines (57 loc) · 4.27 KB
title pg hardstorage backup delete
description CLI reference for the pg hardstorage backup delete command.
tags
cli
reference

pg_hardstorage backup delete

Soft-delete a specific backup (chunks reclaimed by next repo gc)

Synopsis

delete tombstones the named backup. The manifest body and chunks remain on disk until the next repo gc --apply cycle clears unreferenced chunks; this split is deliberate so an operator who deletes the wrong backup has time to recover.

If the backup has live incremental descendants the delete refuses (chain-protection: tombstoning an anchor would leave its children un-restorable). Pass --cascade to drain the entire chain leaf-first in one operation; every tombstoned manifest is recorded in the audit chain, and the same approval (--require-approval) gates the whole cascade rather than each step.

The destructive op gate (--require-approval) is strongly recommended for operator-initiated deletes outside of retention. Approval Op must be backup.delete and Target must be the backup ID.

For automated deletion driven by retention policy, use pg_hardstorage rotate instead — it derives a structured soft-delete plan from the configured policy.

pg_hardstorage backup delete <deployment> <backup-id> [flags]

Options

      --cascade                   also delete every incremental descendant of this backup, leaf-first
  -h, --help                      help for delete
      --reason string             free-form reason captured in the tombstone + audit chain
      --repo string               repository URL (required)
      --require-approval string   approval request ID that must be in approved state for backup.delete + this backup ID (n-of-m gate; strongly recommended)

Options inherited from parent commands

      --airgapped airgapped: strict                                                       refuse outbound endpoints (LLM providers, sinks, OTLP collectors) outside loopback / RFC1918 / explicit airgap.allowlist. Also enabled by PG_HARDSTORAGE_AIRGAPPED=1 or airgapped: strict in the config file.
  -c, --config string                                                                     path to config file (default: XDG/FHS lookup)
      --cpu-profile go tool pprof <path>                                                  write a pprof CPU profile to this path for the duration of the command (go tool pprof <path> to analyse). Off when empty.
      --mem-profile string                                                                write a pprof heap profile to this path at command exit. Off when empty.
      --no-color                                                                          disable ANSI color in text output
      --on-error-llm                                                                      on a structured-error failure, drop into the matching LLM helper skill (auto_on_error trigger). Also enabled by PG_HARDSTORAGE_ON_ERROR_LLM=1.
      --otel-endpoint string                                                              OpenTelemetry OTLP/HTTP endpoint (e.g. http://otel-collector:4318); empty disables tracing
      --otel-stdout                                                                       also export OpenTelemetry traces to stderr (useful for dev)
  -o, --output string                                                                     output format: text|json|ndjson|yaml|template|csv|markdown|html|tap|junit|pdf (default: text on TTY, json off-TTY)
      --profile-port go tool pprof http://127.0.0.1:6060/debug/pprof/profile?seconds=30   if non-zero, expose net/http/pprof on 127.0.0.1:<port> for live profiling of long-running commands (e.g. go tool pprof http://127.0.0.1:6060/debug/pprof/profile?seconds=30). Off when zero.
  -q, --quiet                                                                             suppress non-essential output
      --template string                                                                   Go text/template applied when --output template (or implied if --template is set without --output)

SEE ALSO