Skip to content

Latest commit

 

History

History
74 lines (56 loc) · 4.25 KB

File metadata and controls

74 lines (56 loc) · 4.25 KB
title pg hardstorage partial inspect
description CLI reference for the pg hardstorage partial inspect command.
tags
cli
reference

pg_hardstorage partial inspect

Report which manifest entries a partial restore would touch

Synopsis

Walk the named backup's manifest and project file-level statistics.

Without --tables, the output is the manifest summary: file/chunk counts + total logical bytes — answers "how big is this backup?"

With --tables (a comma-separated list of qualified names), inspect also cross-references the manifest to find each table's heap file:

  • --tables alone: report each table's expected heap path (computed from pg_relation_filepath conventions: base//) matched against manifest FileEntries when possible.

  • --tables AND --pg-connection: queries the live source DB's pg_class for the actual relfilenode, then matches against the manifest. This is the path — gives the operator the concrete "X bytes across Y chunks" estimate for each table before the partial restore runs.

A failed pg_class lookup surfaces as a structured notice rather than failing the inspect; the manifest-summary fields stay valid.

pg_hardstorage partial inspect <deployment> [flags]

Options

      --backup latest          backup ID, or latest for the most recent committed backup (default "latest")
  -h, --help                   help for inspect
      --pg-connection string   libpq connection string — when set, looks up each --tables relfilenode in pg_class and matches against the manifest
      --repo string            repository URL (required)
      --tables string          comma-separated table list (qualified, e.g. public.users)

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