commit 52ebf9671c1593dc26b314dc7fafb3560cb18acc Author: Clemens Schwaighofer Date: Tue Dec 14 06:35:56 2021 +0900 Scripts to dump and restore PostgreSQL databases diff --git a/pg_db_dump_file.sh b/pg_db_dump_file.sh new file mode 100755 index 0000000..09f1a35 --- /dev/null +++ b/pg_db_dump_file.sh @@ -0,0 +1,661 @@ +#!/bin/bash + +set -e -u -o pipefail + +# dumps all the databases in compressed (custom) format +# EXCLUDE: space seperated list of database names to be skipped +# KEEP: how many files to keep, eg 3 means, keep 3 days + todays backup +# the file format includes the database name and owner: +# ..-____