diff --git a/id.tjo.space/root/usr/local/bin/postgresql-backup-restore.sh b/id.tjo.space/root/usr/local/bin/postgresql-backup-restore similarity index 78% rename from id.tjo.space/root/usr/local/bin/postgresql-backup-restore.sh rename to id.tjo.space/root/usr/local/bin/postgresql-backup-restore index 81a4c5f..6c65982 100755 --- a/id.tjo.space/root/usr/local/bin/postgresql-backup-restore.sh +++ b/id.tjo.space/root/usr/local/bin/postgresql-backup-restore @@ -1,6 +1,15 @@ #!/bin/bash set -euo pipefail +# Restoring PostgreSQL Database +# +# The backup file from pg_dump (with format=custom) +# must be provided via stdin. +# +# Example: +# +# cat /path/to/backup.sql | postgresql-backup-restore + echo "=== Reading Configuration" set -a && source /etc/postgresql/postgresql.env && set +a