Skip to content

Instantly share code, notes, and snippets.

@febriliankr
Created November 13, 2022 06:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save febriliankr/7e324675d1f33d22cef5b8cd9e743991 to your computer and use it in GitHub Desktop.
Save febriliankr/7e324675d1f33d22cef5b8cd9e743991 to your computer and use it in GitHub Desktop.
Makefile Import Database to Local
# Database name is "risetku"
autoimport:
@pg_dump postgres://postgres:<PASSWORD>@127.0.0.1:15432/postgres>> backup.sql
@psql -U postgres -c "DROP DATABASE risetku;"
@psql -U postgres -c "CREATE DATABASE risetku;"
@psql risetku < backup.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment