How Rick Backs Up his Moodle

My Moodle is small, typically under 20GB.

Every night, I run a VPS cron job that "tars" the Moodle code and moodledata folder. The cron job also backs up the database. This nightly cron job also keeps the previous six nights of data, removing the oldest while keeping the most recent six backups.

My VPS has limited disk space, so I must be careful about how many backups I keep. To solve this problem, I employ a system that moves the VPS backups to my Mac(s).

I have an older Mac. I always leave it plugged in and awake. Each night my old Mac runs a cron job that copies the VPS backup files to this Mac. The cron job also keeps a moving backup of the last seven days. It also copies one of the backups to a "weekly" folder and a copy to a "monthly" folder. I think I am keeping about the last seven weeks and the last 12 months. These files are in my old Mac's "Documents" folder, which is regularly (almost immediately) synchronized via iCloud to my production Mac's Documents folder. I also copy my Moodle backups to an SSD external drive on my old Mac. On my production Mac, I run TimeMachine, which keeps regular backups (to an external big hard drive) every hour. So, I have my VPS backups in about five or six places (VPS, "Documents" in my old Mac, production Mac, and iCloud, and on two external hard drives). I implemented the extra "Mac" backup method because external hard disk space is much cheaper for a computer than it is for a VPS.

About once a month or so, I move my VPS Moodle to my local MAMP installation of Moodle, so this is yet another place. However, I use my MAMP for experimentation, so it serves this purpose more than a backup.