Automatic Backups of Agents

Create a key on a server

ssh-keygen -t rsa -b 2048

Login to the other server to copy the key


Then connect with rsync We want to PULL the files from remote onto local

rsync -ar --delete -e ssh user@server:/source/ /localbackup/

If servers have backup space, use that. Put these commands into a Crontab to execute daily

On Germany backup Kansas
rsync -ar --delete -e ssh /home/backup/kansas/
On Kansas backup Germany 
rsync -ar --delete -e ssh /home/backup/germany/

Also we need to keep our local ADDONS folder in /var/www/html so we can access the files with a link. Rsync those among like machines by using crontab. Using this method, if we make changes on our master SERVER, kansas it will be replicated

on Germany, backup Kansas
rsync -ar --delete -e ssh /var/www/html/addons/
Repeat on all other like servers so all LINUX servers have identical and all WINDOWS servers have identical and should point to the main repository

Leave a Reply