Boy, I’m late to this party! Freebsd’s usual file system, UFS (unix file system), has snapshots. It’s had them for years. I wonder why MacOS doesn’t appear to have them? In anycase, these are great!
There is a nice tool kit for managing them be found in ports freebsd-snapshot. Written by an old friend too. That gets you 95% of the value of a netapp. So, now I have hourly and daily snapshots of all my main file systems and can trivially recover lost files and do diffs of things like log files. e.g
diff /snap/var:hourly.1/log/messages /var/log/messages. Suddenly it is easy and cheap to see what happen recently.
This is also a big help in doing proper backups; i.e. you can backup snapshots. Orchustrating a good snapshot for backup purposes is a nice programming puzzle. You want to tell every running process to flush it’s state to disk and to lock out changes during while you make the snap. That’s a lot easier if the file system supports snapshots. Of course this flush to disk and lock intervals should create a suitable restart/recovery point for the application. You can see example here for doing just that with mysql as the application.