Taking a break from the recent Frankenmac posts, here's a little trick for creating "Time Machine like" backups of anything you'd care to back up1I don't know how well this might work for Mac files, as opposed to Unix files. But Mac files can be saved to the real Time Machine.. In my case, it's the HTML files off of my web sites, both personal and work. I used to simply back these up, but then realized it'd be better to have versions rather than totally overwriting the backup each day (which is what I had been doing).
Once you've got it set up and working, you'll have a folder structure similar to the one at right, with one folder for each backup, and a "current" link that takes you to the newest backup.
I get zero credit for this one; my buddy James explained that he'd been using this method for a year without any troubles, and pointed me to this great guide2The original site that hosted this script is gone; I've linked to a copy I found on archive.org. Original URL:
https://blog.interlinked.org/tutorials/rsync_time_machine.html that explains the process.
I used that guide and added the following to my backup script to create my own customized Time Machine for the files from here, robservatory.com:
/usr/local/bin/rsync -aP \ --link-dest=/path/to/quasi/TM_backup/current user@host:/path/to/files/on/server/ \ --exclude "errors.csv" \ --delete --delete-excluded \ /path/to/quasi/TM_backup/back-$newtime rm -f /path/to/quasi/TM_backup/current ln -s /path/to/quasi/TM_backup/back-$newtime /path/to/quasi/TM_backup/current
And that's all there is to it. Note that you may need a newer version of rsync than what comes with macOS now (2.6.9)—I use version 3.1.2 from Homebrew, so I can't say for sure that this script works with the stock version.
I've only been using this for a couple weeks, but it's working well for me so far.