comparison scripts/remote-backup-all.sh @ 318:c61524abdfd6

correcting adding project to remote backup scripts target
author aldrich@ssdt-ohio.org
date Wed, 30 Oct 2019 15:49:51 +0100
parents 146c0c263cf9
children 7c460a921709
comparison
equal deleted inserted replaced
317:146c0c263cf9 318:c61524abdfd6
35 fi 35 fi
36 36
37 37
38 IRN=$(docker-compose exec -T $container1 psql --username=postgres --dbname=$container1 -t -c 'select irn from organization') 38 IRN=$(docker-compose exec -T $container1 psql --username=postgres --dbname=$container1 -t -c 'select irn from organization')
39 39
40 if ["$IRN" == ""]; then 40 if [ "$IRN" == "" ]; then
41 IRN=$(docker-compose exec -T $container2 psql --username=postgres --dbname=$container2 -t -c 'select irn from organization') 41 IRN=$(docker-compose exec -T $container2 psql --username=postgres --dbname=$container2 -t -c 'select irn from organization')
42 fi 42 fi
43 43
44 ##Trim function in postgres didn't work - so take out the extra space this way. 44 ##Trim function in postgres didn't work - so take out the extra space this way.
45 IRN=`echo $IRN | sed -e 's/^[[:space:]]*//'` 45 IRN=`echo $IRN | sed -e 's/^[[:space:]]*//'`
101 # 101 #
102 scp ${backupFile1}.gz ${backupFile2}.gz ${backupFile3} $userName@$remoteTarget/$project 102 scp ${backupFile1}.gz ${backupFile2}.gz ${backupFile3} $userName@$remoteTarget/$project
103 103
104 echo " " 104 echo " "
105 105
106 echo "completed sending ${backupFile1}.gz, ${backupFile2}.gz, and ${backupFile3} to ${remoteTarget}/$(project) as user $userName" 106 echo "completed sending ${backupFile1}.gz, ${backupFile2}.gz, and ${backupFile3} to ${remoteTarget}/${project} as user $userName"
107 107
108 108