[PC-BSD] lpreserver problem reverting ZFS snapshot

I started using the lpreserver utility from PC-BSD for automated snapshots. I'm trying to revert a snapshot but lpreserver doesn't seem to like my syntax.

Code:
# lpreserver listsnap zroot/usr/home
NAME                                      USED  AVAIL  REFER  MOUNTPOINT
zroot/usr/home@auto-2013-11-10-03-00-00  65.1K      -   656G  -
zroot/usr/home@auto-2013-11-11-03-00-00      0      -   656G  -
...
zroot/usr/home@auto-2013-12-01-03-00-00      0      -   656G  -

Then I try to revert:
Code:
# lpreserver revertsnap zroot/usr/home auto-2013-11-10-03-00-00
ERROR: No such snapshot!
# lpreserver revertsnap zroot/usr/home zroot/usr/home@auto-2013-11-10-03-00-00
ERROR: No such snapshot!
lpreserver revertsnap zroot/usr/home 2013-11-10-03-00-00
ERROR: No such snapshot!

There is no manpage for lpreserver but here is the help output:
Code:
# lpreserver help revertsnap
Life-Preserver
---------------------------------
Help revertsnap

Revert ZFS to a snapshot of a dataset

Usage:

  lpreserver revertsnap <dataset> <SNAP>

Example:

  lpreserver revertsnap tank1/usr/home/kris 20130729-140510

Does anyone have any experience with this?
 
I found a bug in one of the scripts, I'm using pcbsd-utils-1382605460.

lpreserver revertsnap calls /usr/local/share/lpreserver/backend/zfsrevertsnap.sh.

zfsrevertsnap.sh
Code:
#!/bin/sh
# ZFS functionality
# Args $1 = DATASET
# Args $2 = zfs directive
#######################################################################

# Source our functions
PROGDIR="/usr/local/share/lpreserver"

# Source our variables
. /usr/local/share/pcbsd/scripts/functions.sh
. ${PROGDIR}/backend/functions.sh

DATASET="${1}"

if [ -z "${DATASET}" ]; then
  exit_err "No dataset specified!"
fi

revertZFSSnap "${DATASET}" "${SNAP}"

The script never sets
Code:
SNAP="${2}"
With that fix, everything works as expected.
 
Back
Top