Answer the question
In order to leave comments, you need to log in
How to make a dump if we do not know the name of the base, but want to dump everything one by one?
Here is the almost finished code, how to modify it to solve the dump task, and the dump should be saved in the custom format:
#!/bin/bash
set -e
set -u
set -o pipefail
pathToConf="$dir/conf_${currentDate} ”
user=“postgres”
database=“db”
mkdir $pathToConf
cp /var/postgres/11/data/pg_hba.conf $pathToConf
cp /var/postgres/11/data/postgresql.conf $pathToConf
pg_dump -h 127.0.0.1 -d db -U ${user} -F c -f dump.tar.gz
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question