sunetdrive/templates/script/backup-hb.erb.sh

7 lines
227 B
Bash
Executable file

#!/bin/bash
environ="prod"
if [[ $(hostname -d) == "drive.test.sunet.se" ]]; then
environ="test"
fi
rsync -e "ssh -i ${HOME}/.ssh/id_script" -avz /opt/backupmounts/ "sd-${environ}@sd-${environ}-backup.hb.se:~/sd-${environ}"