Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: pg-restore utility #1243

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

feat: pg-restore utility #1243

wants to merge 1 commit into from

Conversation

samrose
Copy link
Contributor

@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
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.

1 participant