2

I'm new to Solaris 11 and I have to apply updates. I read that you can create a ZFS snapshot -- apply updates -- then revert the snapshot if things break. I also read that you can create a backup of your boot environment (BE).

What is the difference between taking a ZFS snapshot versus creating a BE backup? Are certain files/directories backed up by one and not the other?

Clarification on the two and a recommendation on which to use for patching (or best practices) would be greatly appreciated.

jrd1989
  • 698
  • 15
  • 48

2 Answers2

4

Boot environments are ZFS snapshots at their core. Best practice is to use boot environments to save a copy of the system before making any configuration changes, as reverting to prior ones is easy and automatic.

You can take your own direct ZFS snapshots of the root dataset, but there's no real reason to do that instead of using BE's. However, for other datasets on the system, you would need to take your own snapshots.

When it comes to applying updates, however, you don't really need to do anything, as pkg will automatically create new and backup boot environments based on what is being updated.

Dave
  • 41
  • 1
  • 2
    *Boot environments are ZFS snapshots at their core.* Boot environments *can* be based on ZFS snapshots and clones - if they're in the same ZFS root pool. In my experience, for a server that's going to be around a long time and get many updates, it's better to build a new boot environment in a different root pool - that makes the new boot environment an entirely separate copy of the old one, and *not* a clone of a snapshot. For a long-lived system, after a lot of updates there's a huge mess of snapshots and clones that's hard to clean up, causing a lot of unneeded old data to be "pinned". – Andrew Henle May 27 '17 at 13:00
1

Boot Environments are always based on ZFS snapshots and clones, under normal circumstances. I would not generally recommend building a new boot environment in a different pool. Instead, I would consider simply cleaning up old BEs as they are no longer needed (be certain to always keep an older one around!).