I have installed Solaris 11 Express on my server and want to set up automatic backuping using zfs snapshots. In the backup script I need to find out the name of the last snapshot of the given filesystem (in order to refer to it as the startpoint of an incremental backup). What is the best way to do that?
When the script starts, it has no idea of what snapshots have been made so far. It first needs to find that out and choose the newest. After that's been determined, it can make a new snapshot and send the difference to the backup disk.
So the problem is I cannot call
zfs get creation pool/snapshot
directly - I first need to find out what snapshots to call it on.
I have the idea of calling
zfs list -t snapshot
and manually parsing the output for a list of snapshots made so far. Is this the easiest way to do that?