ZFS Administrative tools to comment zfs/beadm snapshots?

Hello everybody,

I am quite a newbie as a system administrator and I recently switched from Linux (CentOS) to FreeBSD (server) and I really love it, especially the ZFS integration and Jails.

I love FreeBSD that much that I also will migrate my desktops to FreeBSD. What a great OS!

But now my question: I create quite a lot of ZFS/Beadm snapshots and in order to keep track of what the contents of the snapshots (new software installed, versions and so on, and so on) are, I administer that by hand.

Now I am wondering if tools exist to add comments to the ZFS/beadm snapshots to explain what is in the snapshots (preferably at the moment of creation)?

Or that can keep (semi-automatically) track of what each snapshot is about?

Also I am curious if shortcuts exist for ZFS commands: For zfs list -t snapshot for example something like zfsl.snap.

Furthermore I am interested in any other management tool for ZFS/NFS, for instance something like the browser (web) interfaces for FreeNAS.

Thanks in advance.
 
Now I am wondering if tools exist to add comments to the ZFS/beadm snapshots to explain what is in the snapshots (preferably at the moment of creation)?

Code:
# beadm list
BE  Active Mountpoint  Space Created
backup NR  /  3.8G 2014-11-27 01:24
snap  -  -  311.0M 2015-01-10 01:35
# mkdir /etc/beadm
# echo 'Some backup snapshot.' > /etc/beadm/backup
# echo 'Daily snapshot.' > /etc/beadm/snap

... in other words, You may create a file under /etc/beadm with BE name and description inside.

ZFS dataset does not have a field for comment or description from what I know.
 
I think you could set a user property on a the dataset as a comment/description before making a snapshot and the resulting snapshot would then have the correct information for the snapshot.

Something like:

Code:
zfs set org.example:backuptime $(/bin/date "+%Y-%m-%d_%R:00") zpool/dataset
zfs snapshot zpool/dataset@backup

The snapshot zpool/dataset@backup would then have a org.example:backup property you could read with zfs get.

The above example is of course a bit redundant because the ZFS snapshots have a creation time property but you can adapt it for non-trivial information.
 
Hello everybody,
But now my question: I create quite a lot of ZFS/Beadm snapshots and in order to keep track of what the contents of the snapshots (new software installed, versions and so on, and so on) are, I administer that by hand.

Thanks Vermaden and kpa, but this is not what I meant.

I was looking more for a tool in which one can create a snapshot semi automatically and that at the same time adds a short and optionally a long description of each generated snapshot into a text file, so that later one can check the text file for each stage a snapshot is generated and edit it later if necessary.

I was thinking making something like that myself, but I have very little time, am a bad programmer and why should I try to re-invent something if something like that maybe already exists?

What I was thinking about is this: Suppose there are several datasets named tank/dataset1, tank/dataset2, tank/datasetN.

Now I want to make a tool, say "creasnap" with a creasnap.conf file. In the .conf file each dataset could for example be associated with a digit like this:
1 tank/dataset1
2 tank/dataset2
3 tank/dataset3
N tank/datasetN

So now I could give the following command to create a snapshot:

[B]creasnap "N; short description; long description"[/B]

which creates for example the snapshot tank/dataset3@snap1 (short description here= snap1) and adds, for each occurence, the line:

tank/dataset3@snap1, date:time, long description

to a text file called: tank.dataset3.snapshots

It will cost me less or no more time (or maybe a little more time when I also create a real long description) than typing the command:

[B]zfs snapshot tank/dataset3@WithAnUnderstandableExplanationWhatItIsAbout[/B]

Beside that, the eventually much shorter names of the snapshots makes them much easier to handle. And to my opinion [B]cat tank.dataset3.snapshots[/B] gives a more clear overview (of this dataset) than zfs list -t snapshot which, of-course, one also still can use.

This way I can always keep track of all snapshots I made and eventually alter the short and/or long description later.

But if nothing like this exists, I will have to make it myself. (when I have more time. :confused: )
 
Back
Top