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

ssh-copy-id frank@dallas3.iareserver.com

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 gameserver@kc.iareserver.com:/home/gameserver/ /home/backup/kansas/
On Kansas backup Germany 
rsync -ar --delete -e ssh gameserver@germany.iareserver.com:/home/gameserver/ /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 gameserver@kc.iareserver.com:/var/www/html/addons/ /var/www/html/addons/
Repeat on all other like servers so all LINUX servers have identical and all WINDOWS servers have identical

addons.iareserver.com and rsync.iareserver.com should point to the main repository

Leave a Reply

Your email address will not be published. Required fields are marked *