Wednesday 12 June 2013

Automated Snapshots

My test systems don't get backed up or snapped via the SAN. So I figured I'd create zfs snapshots on a regular basis just in case.

For Solaris 10 I had a script that did this for me (including sending it to a remote machine if need be) but it was really complex and a bit of a mission for anyone other than me to figure out. For Solaris 11, there is a services that takes care of the snapshotting and scheduling for you (without the option of sending to a remote site).

It's pretty easy to install and configure as well:
  1. Install the package:
    • pkg install time-slider
  2. Start the services
    • svcadm restart dbus
    • svcadm enable time-slider
  3. Choose which filesystems it snaps (properties should be inherited by child filesytems)
    • zfs set com.sun:auto-snapshot=true rpool/export
  4. Manually exclude certain filesystems
    • zfs set com.sun:auto-snapshot=false rpool/swap1
  5. Enable the snap schedules you need:
    • svcadm enable auto-snapshot:hourly
    • svcadm enable auto-snapshot:daily
and it includes the steps for checking and modifying the frequency of the snaps, as well as how many it will keep.

I just wish there was a text only version of time-slider so that I don't have to install all the Gnome packages I'm never going to use.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.