Skip to content

Instantly share code, notes, and snippets.

@morice3
morice3 / export_db_structure.sh
Created October 30, 2024 13:40 — forked from dantheman213/export_db_structure.sh
Batch backup and export your Postgres or PostgreSQL table schemas and stored functions or procedures into individual *.sql files --the easy way!
#!/bin/sh
# AUTHOR
# DANIEL E. GILLESPIE (2016)
# https://github.com/dantheman213
# DESCRIPTION
# Export your app's table schemas and stored functions from a PostgreSQL
# database into individual *.sql files for easy management and source control.
@morice3
morice3 / import_db_structure.sh
Created October 30, 2024 13:35 — forked from dantheman213/import_db_structure.sh
Batch import all *.sql files in a folder recursively into your Postgres or PostgreSQL database
#!/bin/sh
# AUTHOR
# DANIEL E. GILLESPIE (2016)
# https://github.com/dantheman213
# DESCRIPTION
# Import all *.sql files in a folder recuresively into your PostgreSQL database
# Batch export all table schemas and stored functions with this script located here: