- #!/bin/bash
- vpngateway='172.16.255.1'
- vpngatewayport='22'
- backupsource='/data/nextcloud2/'
- backupdest='/backup/'
- destusername='simon'
- destport='27022'
- test=$(ssh -p $vpngatewayport root@$vpngateway -C 'cat /root/home.ip')
- rsync -av -e "ssh -p $destport" $backupsource simon@$test:$backupdest
|