You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| mc pipe backup/${S3_BUCK}/${S3_NAME}-${START_DATE}-${DATABASE}.pgdump${COMPRESS_POSTFIX}.pgp --insecure
102
+
fi
103
+
}
104
+
105
+
DB_NAME=${PG_URI##*/}
106
+
if [[ $DB_NAME==*"@"* ]]
107
+
then
108
+
DB_NAME=""
109
+
fi
110
+
111
+
uri_parser $PG_URI
112
+
export PGPASSWORD=${uri_password}
113
+
114
+
if [ -z"$DB_NAME" ]
28
115
then
29
-
pg_dump $PG_URI| pigz -9 | mc pipe backup/${S3_BUCK}/${S3_NAME}-`date +%Y-%m-%d_%H-%M-%S`.pgdump --insecure
116
+
echo"$(get_date) No specific database selected. Saving each in separate files"
117
+
DB_LIST=$(psql --host=${uri_host} --port=${uri_port} --username=${uri_user} -A -c "SELECT datname FROM pg_database WHERE datname NOT LIKE 'template%';"| head -n -1 | tail -n +2)
0 commit comments