Radogost is an old god of hospitality in the Slavic mythology.
This project is a set of scripts to:
- fetch backup from remote machines using scp
cd $HOME
git clone https://github.com/goodylabs/radogost.git
The following will install a crontab entry with fetching:
- files that match regexp: backup_*.sql.gz
- from a remote directory /home/some_remote_user/backup
- from a remote machine somehost.com:22
and put it in $HOME/project_x into local user. It will autorotate old backups and only latest 3 will remain in that directory.
{ crontab -l ; echo '38 5 * * * $HOME/radogost/scripts/fetch_latest_backups.sh somehost.com 22 /home/some_remote_user/backup "backup_*.sql.gz" $HOME/project_x 3'; } | crontab -