-
Notifications
You must be signed in to change notification settings - Fork 3
Use case: Daily backups
Jonatan edited this page Sep 16, 2018
·
1 revision
This script can be used to take a daily backup and copies it to a remote server. Thanks muad-dweeb!
#!/bin/bash
# This script should be run by the root cron
REPO='/home/me/rundeck-backup-restore'
LOCAL='/home/me/data/rundeck'
REMOTE='user@<ip-address>:/home/me/data'
echo 'Creating local backup'
python $REPO/keeper.py backup --dest $LOCAL --ignore-running
echo 'Pushing remote backup to remote server'
rsync -e "ssh -i /home/me/.ssh/lan_rsa" -av $LOCAL $REMOTE