diff scripts/remote-backup.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.sh	Wed Oct 30 15:49:51 2019 +0100
+++ b/scripts/remote-backup.sh	Thu Oct 31 11:40:53 2019 +0100
@@ -65,8 +65,15 @@
 
 echo "completed backup of all files for $project to ${backupFile2}"
 
+#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 ${backupFile}.gz  ${backupFile2} $userName@$remoteTarget/$project