Fix manual snapshots not used
This commit is contained in:
parent
0578879c54
commit
6b4daed099
1 changed files with 1 additions and 1 deletions
|
@ -111,7 +111,7 @@ fi
|
||||||
# Working snapshots
|
# Working snapshots
|
||||||
|
|
||||||
# Find snapshots
|
# Find snapshots
|
||||||
snapshots="$( find "/mnt/${dataset}/.zfs/snapshot"/* -maxdepth 0 -name 'auto*' -type d | sed -E 's/.*-([0-9]{4}-[0-9]{2}-[0-9]{2}_[0-9]{2}-[0-9]{2})/\1\t&/' | sort -n | cut -f 2- | xargs -n1 basename )"
|
snapshots="$( find "/mnt/${dataset}/.zfs/snapshot"/* -maxdepth 0 -type d | sed -E 's/.*-([0-9]{4}-[0-9]{2}-[0-9]{2}_[0-9]{2}-[0-9]{2})/\1\t&/' | sort -n | cut -f 2- | xargs -n1 basename )"
|
||||||
# Use the two latest snapshots
|
# Use the two latest snapshots
|
||||||
from_snapshot="$( tail -n2 <<< "${snapshots}" | head -n1 )"
|
from_snapshot="$( tail -n2 <<< "${snapshots}" | head -n1 )"
|
||||||
to_snapshot="$( tail -n2 <<< "${snapshots}" | tail -n1 )"
|
to_snapshot="$( tail -n2 <<< "${snapshots}" | tail -n1 )"
|
||||||
|
|
Loading…
Reference in a new issue