create file sync user account(mlmsync for example)
LOG ON AS mlmsync;
create .ssh under user folder
ssh-keygen -b 1024 -t rsa -f /home/mlmsync/.ssh/id_rsa
(do not enter a pass-phrase - leave it blank)
append id_rsa.pub to remote box authorized_keys file
scp /home/username/.ssh/id_rsa.pub [email protected]:/home/username/.ssh/authorized_keys
sync all files under /home/vhosts/xxxx.com/logs/ to directory /home/mlmsync
rsync --progress -vrae 'ssh -p 2200' /home/vhosts/xxxx.com/logs/ [email protected]:/home/mlmsync
rsync -vrae 'ssh -p 2200' /home/vhosts/xxxx.com/logs/ [email protected]:/home/mlmsync
rsync --progress -vrae 'ssh -p 2200' /home/asseenon/logs/ [email protected]:/home/mlmsync
rsync -vrae 'ssh -p 2200' /home/drtvvide/logs/ [email protected]:/home/mlmsync
Set up Cron Job:
crontab -e
0 3 * * * mlmsync rsync -vrae 'ssh -p 2200' /home/vhosts/xxxx.com/logs/tmp/ [email protected]:/home/mlmsync/awstats