#!/bin/bash test=$(ssh root@172.16.255.1 -C 'cat /root/home.ip') rsync -av -e 'ssh -p 27022' /data/nextcloud2/ simon@$test:/backup/