ZFS How to add all ZFS datasets to Boot Environment (BE) for BECTL rollback?

Hi. I am new to FreeBSD and am wondering how to ensure that all ZFS datasets are captured when performing "bectl create {example}"?
Said differently, how to capture the whole machine in a BE for bectl recovery?

Presently, have tested the following:
bectl create {beName}
However when I make a change to "/home/username" and then rollback using beclt, the change is still there. This indicates that the "/home/username" directory/dataset (zroot/usr/home?) is not part of the BE.
How can I add it to the BE?

Thank you.
 
Hi,
You have to put all your desired datasets under the dataset you use for "/".

But be very careful and that it is really what you want. Once rollbacked you cannot recover the data changed since the snapshot.
 
However when I make a change to "/home/username" and then rollback using beclt, the change is still there. This indicates that the "/home/username" directory/dataset (zroot/usr/home?) is not part of the BE.
This is intentional.
A BE should *only* contain the OS datasets so you can rollback upgrades. This should never affect user data!

Use your own snapshot strategy for user data, e.g. with something like sysutils/zfsnap2.
 
  • Like
Reactions: mer
Back
Top