diff scripts/remote-backup-all.sh @ 319:7c460a921709

making changes to remote backup scripts to create directory
author aldrich@ssdt-ohio.org
date Thu, 31 Oct 2019 11:40:53 +0100
parents c61524abdfd6
children 58c49a386a11
line wrap: on
line diff
--- a/scripts/remote-backup-all.sh	Wed Oct 30 15:49:51 2019 +0100
+++ b/scripts/remote-backup-all.sh	Thu Oct 31 11:40:53 2019 +0100
@@ -96,8 +96,15 @@
 
 echo "completed backup of all files for $project to ${backupFile3}"
 
+#Create remote directory before scp
+host=`echo $userName@$remoteTarget | sed -e 's/:.*//'`
 
-#
+target=`echo $remoteTarget | sed -e 's/.*://'`
+
+ssh $host mkdir -p $target/$project
+
+
+#Create remote directory
 #
 scp ${backupFile1}.gz  ${backupFile2}.gz ${backupFile3} $userName@$remoteTarget/$project