catalog replay

Replay the catalog’s operation log into a target catalog.

Useful for mirroring a catalog with a different remote backend, or for migrating between storage providers.

With --rebuild, each entry is re-added under current code: entries with no catalog references are re-added from their stored expression; entries containing catalog references (Composed, or ExprBuilder wrapping a composition) have the catalog subtree recomposed against their already-rebuilt dependencies in the target catalog. Outer builder wrappings pass through untouched.

Usage

xorq catalog replay TARGET_PATH [OPTIONS]

Arguments

  • TARGET_PATH—Filesystem path where the target catalog is initialized.

Options

Option Default Description
--env-file none Env file for the annex remote (for example .env.catalog.s3; mutually exclusive with –env-prefix).
--env-prefix none Env-var prefix for the annex remote (for example XORQ_CATALOG_S3_; mutually exclusive with –env-file).
--gcs off Apply GCS defaults to the S3 remote config.
--remote-url none Git remote URL for the target catalog (sets origin and pushes).
--preserve-commits / --no-preserve-commits --preserve-commits Preserve original commit authors and timestamps.
--force off Force-push to the remote.
--dry-run off Show what would be replayed without executing.
--rebuild off Rebuild each entry under current code (refreshes build_metadata and entry hashes).

Examples

# Preview the operations that would be replayed
xorq catalog replay ./mirrored-catalog --dry-run
# Replay into a new catalog and push to a fresh remote
xorq catalog replay ./mirrored-catalog --env-file .env.target.s3 --remote-url git@github.com:acme/mirror-catalog.git

See also