Skip to content

Instantly share code, notes, and snippets.

@renatamarques97
Last active March 25, 2025 20:26
Show Gist options
  • Select an option

  • Save renatamarques97/ee5c8e53f597c0ea2dce9112563042f7 to your computer and use it in GitHub Desktop.

Select an option

Save renatamarques97/ee5c8e53f597c0ea2dce9112563042f7 to your computer and use it in GitHub Desktop.

pg_restore -U renatamarques -d qulture_development < ../Downloads/dump

or

psql -U renatamarques -d qulture_development < ../Downloads/dump.sql

or

./config/scripts/restore-db.bash ../Downloads/dump

docker

$ docker exec -i qultureapp-postgres-1 psql -U postgres -d postgres -c "DROP DATABASE IF EXISTS qulture_development;"
DROP DATABASE

$ docker exec -i qultureapp-postgres-1 psql -U postgres -d postgres -c "CREATE DATABASE qulture_development;"
CREATE DATABASE

$ cat dump.sql | docker exec -i qultureapp-postgres-1 psql -U postgres -d qulture_development

qr environment

# Download and restore local database with the latest QA dump
qr dump restore

# Download and restore local database with the specified QA dump
qr dump restore <dump_id>

# List available dumps
qr dump list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment