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

7 lines
227 B
Bash
Raw Normal View History

2024-06-26 10:48:50 +00:00
#!/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}"