This script will keep a daily, weekly and monthly rsync hardlinked backup of files. It will also create a gzipped MySQL dump of the last 6 days, a weekly backup for 3 weeks and a monthly backup for 12 months.
You must have already have public key access to the remote user.
Run the following: