Skip to content

Latest commit

 

History

History
68 lines (51 loc) · 3.78 KB

File metadata and controls

68 lines (51 loc) · 3.78 KB
title pg hardstorage repo set-mode
description CLI reference for the pg hardstorage repo set-mode command.
tags
cli
reference

pg_hardstorage repo set-mode

Toggle the repository's write-access posture

Synopsis

Set the repository's write-access posture.

read-only: refuses every mutating operation (backup, wal push, wal stream commit, gc, rotation, kms rotate/shred). Reads — restore, verify, list, show, repo usage — still work. Use for forensics or while a separate incident is in flight.

read-write: the default. All operations permitted.

The mode is recorded in HSREPO; flipping it takes effect for any subsequent operation. In-flight operations are NOT cancelled.

--require-approval : gate the flip on an existing n-of-m approval request. The approval's Op must be repo.set_mode and its Target must equal the URL being changed; otherwise the flip is refused at the gate. See pg_hardstorage approval.

pg_hardstorage repo set-mode <url> <read-only|read-write> [flags]

Options

  -h, --help                      help for set-mode
      --require-approval string   approval request ID that must be in approved state for repo.set_mode + this URL (n-of-m gate)

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