I would recommend using rsync+ssh for security reasons. You can use either pull
or push
backup. For instance, if you decide to use pull based backup, first generate ssh key on the remote server. You will then pull the files to the remote server from the original backup server.
Remote('another') server: generate private/public key
ssh-keygen -t rsa -b 2048
Take the public key generated, say /root/.ssh/id_rsa.pub
, to the Backup server.
Backup server - add public key of remote server to the authorized_keys of the backup server.
cat id_rsa.pub >> /root/.ssh/authorized_keys
Remote server -Test public key ssh connection
ssh -i /root/.ssh/id_rsa root@backupserver-hostname
Add the following command to your crontab
rsync -avz -e "ssh -i /root/.ssh/id_rsa" root@backupserver:/backupdir /thisdir
You can change the username, hostnames, private/public key file names, directories etc. based on your setup.