Allow matching any snapshot between src & dest

Previously we looked for the specific tagged snapshot, but that doesn't
actually work properly. Now simply find the most recent snapshot on dest
and compare to src. It must exist on src.
This commit is contained in:
Kevin McCormick 2016-09-16 15:50:26 -07:00
parent 0850e82df3
commit cf353fafd4

View File

@ -121,10 +121,9 @@ cur="$srcfs@${tag}_$date"
ZFS "$srchost" snapshot -r "$cur" || die $? "zfs snapshot failed" ZFS "$srchost" snapshot -r "$cur" || die $? "zfs snapshot failed"
### ###
### find newest snapshot matching the tag on dest ### get newest snapshot on dest - it must exist on src
### ###
last="$(ZFS "$desthost" list -d 1 -t snapshot -H -S creation -o name $destfs/$srcbase 2>/dev/null \ last="$(ZFS "$desthost" list -d 1 -t snapshot -H -S creation -o name $destfs/$srcbase | head -n1 | cut -f2 -d@)"
| grep -F "@${tag}_" | head -n1 | cut -f2 -d@)"
### ###
### send & receive ### send & receive