mirror of
https://github.com/bashclub/bashclub-zfs-push-pull.git
synced 2024-11-07 21:01:58 +01:00
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:
parent
0850e82df3
commit
cf353fafd4
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user