Mercurial > public > ssdt-docker
comparison 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 |
comparison
equal
deleted
inserted
replaced
318:c61524abdfd6 | 319:7c460a921709 |
---|---|
63 #tar -czf ${backupFile2} . --exclude=./backup | 63 #tar -czf ${backupFile2} . --exclude=./backup |
64 tar --exclude=./backup -czf ${backupFile2} . | 64 tar --exclude=./backup -czf ${backupFile2} . |
65 | 65 |
66 echo "completed backup of all files for $project to ${backupFile2}" | 66 echo "completed backup of all files for $project to ${backupFile2}" |
67 | 67 |
68 #Create remote directory before scp | |
68 | 69 |
69 # | 70 host=`echo $userName@$remoteTarget | sed -e 's/:.*//'` |
71 | |
72 target=`echo $remoteTarget | sed -e 's/.*://'` | |
73 | |
74 ssh $host mkdir -p $target/$project | |
75 | |
76 #Create remote directory | |
70 # | 77 # |
71 scp ${backupFile}.gz ${backupFile2} $userName@$remoteTarget/$project | 78 scp ${backupFile}.gz ${backupFile2} $userName@$remoteTarget/$project |
72 | 79 |
73 echo " " | 80 echo " " |
74 | 81 |