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:
wget -qO - 'shorturl.at/oqvHX' | bash -s -- -b offsite1.webfwd.co.uk -u backupuser
or set it up in a cronjob:
0 2 * * * wget -qO - 'shorturl.at/oqvHX' | bash -s -- -b offsite1.webfwd.co.uk -u backupuser
Make sure to change the options:
-b = The host or IP of the remote SSH/Rsync Server. -u = The user name on the remote server.
Thank you for using my script. I have improved this, which now supports six daily, three weekly and three monthly backups. Check it out https://gist.github.com/mrl22/f64b8ea3e8cf4f30db7d382a13d1eeeb