Skip to content

Bash script that creates a local database dump from a postgresql production database.

License

Notifications You must be signed in to change notification settings

surferwat/postgresql-production-db-dump

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

postgresql-production-db-dump

Description

A bash script that creates a local data dump in script file format from a postgresql production database for the purpose of helping developers setup a local database.

Input

  • <database_url> - the url for a postgresql database in format, postgres://{user}:{password}@{server}:{port}/{db_name}
  • <file_path> - the file path to where output files should be placed

Output

  • production_dump.sql
  • local_dump.sql

Installation

Step 1: Clone the repo

git clone https://github.com/surferwat/postgresql-production-db-dump.git

Usage

bash index.sh <database_url> <file_path>

To Do

  • add pre-condition check for production db connection

References

About

Bash script that creates a local database dump from a postgresql production database.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages