Skip to main content

db start

Clone a remote database to local and initialize a migration session.

Usage

postkit db start [--remote <name>]

Options

OptionDescription
--remote <name>Use specific remote (otherwise uses default)
-v, --verboseEnable verbose output
--dry-runShow what would be done without making changes
--jsonOutput as JSON

Examples

# Uses default remote
postkit db start

# Use specific remote
postkit db start --remote staging

What It Does

  1. Checks prerequisites (pgschema, dbmate installed)
  2. Resolves target remote (default or specified)
  3. Tests connection to remote database
  4. Clones remote database to local using pg_dump and psql
  5. Creates a session file (.postkit/db/session.json) to track state
  • plan - Generate schema diff
  • status - Show session state
  • abort - Cancel session