Home CLI guides PITR Recovery CLI

PITR Recovery CLI

Last updated on May 07, 2026

Current Status

There is no first-class PITR command group in the current CLI implementation.

Point-in-time recovery is currently reviewed through the macOS module because the workflow needs careful target labeling, historical timestamp selection, current-vs-historical diffing, and guarded restore behavior. The CLI page exists to define the boundary for operators: do not expect terminal commands to load or restore historical documents yet, and do not bypass the GUI safety checks with ad hoc scripts unless your team has its own approval process.

GUI-Only Coverage Today

Use the macOS PITR Recovery module for:

  • point-in-time document loading
  • current vs recovered diff
  • historical JSON inspection
  • guarded restore

When investigating a recovery, collect the project ID, database ID, document path, target timestamp, and environment before opening the module. Firestruct loads the current document and the historical version side by side, then shows structured JSON and diff output so the user can verify the exact fields that would change during restore.

The GUI workflow is also where restore confirmation belongs. Production restore requires explicit confirmation, read-only projects must block writes, and any long-running restore should be task-backed with visible status and actionable errors. Those requirements should carry forward unchanged when CLI support is implemented.

Future CLI Shape

Expected future commands:

pitr load --document users/alice --read-time 2026-05-03T12:00:00Z
pitr diff --document users/alice --read-time 2026-05-03T12:00:00Z
pitr restore --document users/alice --read-time 2026-05-03T12:00:00Z --confirm

Source Anchors

  • Sources/FirestructCore/FirestorePITRService.swift