If you have a remote web server, then for a small fee, your hosting company will back it up for you. This is money for old rope. If you run Linux at home, then you can back it up yourself – just by transferring the contents to a local folder on your computer using a shell script that performs the ftp transfer, which can be fully automated by adding it to cron (crontab -e)
#!/bin/bash
HOST=’ftp.mywebserver.co.uk‘ # change the ipaddress accordingly
USER=’myftpusername‘ # username also change
PASSWD=’myftpuserpassword‘ # password also change
ftp -n $HOST < quote USER $USER
quote PASS $PASSWD
bin
prompt off
cd /www # this folder contains files to be backed up…
lcd /webserverbackup # this location is the local directory to backup to.
mget *
bye
exit
Don’t forget to change the username, password, ftp server name/ip address and remote and local mount points to suit your requirements. And don’t forget to chmod +x the ftpbackup.sh script to make it executable. Finally use crontab -e to add a scheduled job to run this script automatically. You can also add to it in order to create a readable log file or to warn you via email in the event of an error.