Skip to content

Latest commit

 

History

History
76 lines (58 loc) · 4.03 KB

File metadata and controls

76 lines (58 loc) · 4.03 KB
title pg hardstorage timetravel create
description CLI reference for the pg hardstorage timetravel create command.
tags
cli
reference

pg_hardstorage timetravel create

Provision a timetravel session pinned at --at

Synopsis

Restore the deployment's most recent backup whose stop time is at-or-before --at into --target, configure recovery to replay up to --at and pause, and record the session.

--at accepts:

  • RFC3339 timestamps: "2026-04-01T00:00:00Z"
  • Natural language: "5 minutes ago", "yesterday 9pm"
  • PG LSNs: "0/3F5A1B40"

The session expires after --ttl (default 1h). Run 'timetravel cleanup' periodically (or wire it to cron) to reap expired sessions.

After 'timetravel create' returns, start PG separately:

pg_ctl -D start

PG comes up paused at the recovery target. Promote with pg_promote() if (and only if) you actually want a writable copy that diverges from production.

pg_hardstorage timetravel create <name> [flags]

Options

      --at string           target time/LSN (RFC3339, natural language, or LSN; required)
      --deployment string   source deployment (required)
      --force               permit a non-empty --target
  -h, --help                help for create
      --repo string         repository URL (required)
      --target string       target data directory (required)
      --ttl duration        session expiry; cleanup will reap past this (default 1h0m0s)

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