Skip to content

Instantly share code, notes, and snippets.

@codesenju
Created June 19, 2020 13:44
Show Gist options
  • Save codesenju/d6d68145202198f6761abbd593ad114f to your computer and use it in GitHub Desktop.
Save codesenju/d6d68145202198f6761abbd593ad114f to your computer and use it in GitHub Desktop.
postgresql-replication setup-db.sh
#!/bin/bash
# pg_restore is a utility for restoring a PostgreSQL database from an archive created by pg_dump.
# Here we are restoring tables that have records of movie titles(basics.tar.gz) and actors(actors.tar.gz) into the movie database.
pg_restore -d movie /tables/actors.tar.gz
pg_restore -d movie /tables/basics.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment