comparison 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
comparison
equal deleted inserted replaced
318:c61524abdfd6 319:7c460a921709
94 #tar -czf ${backupFile3} . --exclude=./backup 94 #tar -czf ${backupFile3} . --exclude=./backup
95 tar --exclude=./backup -czf ${backupFile3} . 95 tar --exclude=./backup -czf ${backupFile3} .
96 96
97 echo "completed backup of all files for $project to ${backupFile3}" 97 echo "completed backup of all files for $project to ${backupFile3}"
98 98
99 #Create remote directory before scp
100 host=`echo $userName@$remoteTarget | sed -e 's/:.*//'`
99 101
100 # 102 target=`echo $remoteTarget | sed -e 's/.*://'`
103
104 ssh $host mkdir -p $target/$project
105
106
107 #Create remote directory
101 # 108 #
102 scp ${backupFile1}.gz ${backupFile2}.gz ${backupFile3} $userName@$remoteTarget/$project 109 scp ${backupFile1}.gz ${backupFile2}.gz ${backupFile3} $userName@$remoteTarget/$project
103 110
104 echo " " 111 echo " "
105 112