Skip to content

Conversation

samrose
Copy link
Collaborator

@samrose samrose commented Sep 30, 2024

What kind of change does this PR introduce?

Per request from @olirice we needed a tool to restore from a pg_dump that can restore to a given version of supabase/postgres

This util has a help flag that outputs the following

nix run .#pg-restore -- --help
Usage: nix run .#pg-restore -- [OPTIONS]

Run pg_restore with the specified parameters.

Options:
  --version     PostgreSQL version (currently only 15 is supported)
  --dbname      Name of the database to restore to
  --host        Host of the database server
  --user        Database user to connect as
  --file        Path to the file to restore from (absolute or relative to current directory)
  --port        Port number (default: 5432)
  -h, --help    Show this help message and exit
Example:
nix run .#pg-restore --  --version 15 --dbname postgres --host localhost --user postgres --port 5435 --file my.dump

@samrose samrose requested a review from a team as a code owner September 30, 2024 21:06
@samrose samrose requested a review from olirice September 30, 2024 21:06
Copy link
Contributor

@olirice olirice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, thanks!

@samrose samrose merged commit 4ab3640 into develop Oct 9, 2024
8 checks passed
@samrose samrose deleted the sam/pg-restore branch October 9, 2024 20:54
damonrand pushed a commit to cepro/postgres that referenced this pull request Jun 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants