changeset 322:4285b8a2762e

making changes to remote backup scripts to account for IRN - tweaks
author aldrich@ssdt-ohio.org
date Thu, 31 Oct 2019 16:15:12 +0100
parents 2cb1093f9aef
children a2efad4e79d9 389acfd7be9a
files scripts/remote-backup-all.sh scripts/remote-backup.sh
diffstat 2 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/remote-backup-all.sh	Thu Oct 31 14:40:02 2019 +0100
+++ b/scripts/remote-backup-all.sh	Thu Oct 31 16:15:12 2019 +0100
@@ -73,15 +73,15 @@
      echo "ERROR:  $(tail ${backupFile1})"
 	 echo "Error: empty database"
 	 #else  We still gzip the backup file
+  fi
      gzip ${backupFile1}
 
      echo "completed backup of $container1 for $project to ${backupFile1}"
 
-  fi
 
 
 #####
-#uspsdb is being used
+#uspsdb
 
 echo "starting backup of $container2 for $project"
 docker-compose exec -T $container2 sh -c "gosu postgres pg_dump -Cc --if-exists --dbname=$container2 ; (exit $?) " > ${backupFile2}
@@ -91,11 +91,12 @@
      echo "ERROR:  $(tail ${backupFile2})"
 	 echo "Error: empty database"
      #else  We still gzip the backup file
+  fi	 
      gzip ${backupFile2}
 
      echo "completed backup of $container2 for $project to ${backupFile2}"
 
-  fi
+  
 
 #######
 
@@ -112,10 +113,10 @@
 
 target=`echo $remoteTarget | sed -e 's/.*://'`
 
+
 ssh $host mkdir -p $target/$project
 
-
-#Create remote directory
+#SCP files
 #
 scp ${backupFile1}.gz  ${backupFile2}.gz ${backupFile3} $userName@$remoteTarget/$project
 
--- a/scripts/remote-backup.sh	Thu Oct 31 14:40:02 2019 +0100
+++ b/scripts/remote-backup.sh	Thu Oct 31 16:15:12 2019 +0100
@@ -85,7 +85,7 @@
 
 ssh $host mkdir -p $target/$project
 
-#Create remote directory
+#scp file 
 #
 scp ${backupFile}.gz  ${backupFile2} $userName@$remoteTarget/$project