local/bin/btrfs-snap-all: Reduce gap time to 10 minutes.
parent
a52272b290
commit
574168febf
|
@ -4,7 +4,7 @@ usage () {
|
|||
cat <<EOF>&2
|
||||
Usage: ${0##*/}
|
||||
|
||||
Snapshot all Btrfs subvolumes older than 1 day to a read-only '.snapshots/SUBVOLUME/DATE'.
|
||||
Snapshot all Btrfs subvolumes older than 10 minutes to a read-only '.snapshots/SUBVOLUME/DATE'.
|
||||
|
||||
Options:
|
||||
|
||||
|
@ -64,7 +64,7 @@ for fs in $(findmnt -t btrfs -n --output TARGET); do
|
|||
fi
|
||||
last_date=$(date --date="$last" +%s)
|
||||
now=$(date +%s)
|
||||
if [ $(($now - $last_date)) -gt 86400 ]; then
|
||||
if [ $(($now - $last_date)) -gt 600 ]; then
|
||||
snap "$fs" "$subvol"
|
||||
fi
|
||||
unset now
|
||||
|
|
Loading…
Reference in New Issue