Skip to content

Instantly share code, notes, and snippets.

@pratikbin
Last active April 5, 2022 12:37
Show Gist options
  • Save pratikbin/2ee21cb8b3bdb83c712480d1eec0ba62 to your computer and use it in GitHub Desktop.
Save pratikbin/2ee21cb8b3bdb83c712480d1eec0ba62 to your computer and use it in GitHub Desktop.
docker run \
-d \
--name postgres-1 \
-e POSTGRES_PASSWORD=3TpnLwGawEKpJVkC \
-e POSTGRES_USER=persistence \
-e POSTGRES_DB=persistence \
-v /home/ubuntu/pg_data:/var/lib/postgresql/data \
-p 5432:5432 postgres:13
# unzip the dump.dump zip
pg_restore -U persistence -h localhost -d persistence -1 dump.dump
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment