Potgres-Ubuntu: Bash-script to take backup of list of databases

 #!/bin/bash

declare -a arr=("db1" "db2" "db3" "db4" "db5" "db6")

for i in "${arr[@]}"

do

   echo "$i"

   pg_dump -U postgres -h localhost -Fc "$i" > ~/<folderPath>/"$i".dump

done


No comments:

Post a Comment

If you have any doubts, please let me know.

Regarding site Free Browser Tool (https://free-browser-tools.mohitkrgupta.dev) (discussion with google search AI)

Various discussions with Google Search AI regarding site  Free Browser Tool are as below: site free-browser-tools.mohitkrgupta.dev what doe...