|
|
@ -110,7 +110,7 @@ for fs in ${BTRFS_VOLUMES}; do |
|
|
|
echo " " mount "$device" "$TMP_MNT" |
|
|
|
echo " " mount "$device" "$TMP_MNT" |
|
|
|
echo " " btrfs subvolume snapshot "${TMP_MNT}${subvol}" "${TMP_MNT}${target}${date}" |
|
|
|
echo " " btrfs subvolume snapshot "${TMP_MNT}${subvol}" "${TMP_MNT}${target}${date}" |
|
|
|
if test -n "$del"; then |
|
|
|
if test -n "$del"; then |
|
|
|
for f in $(ls -1 "${TMP_MNT}${target}"-* | tail -n +"$del"); do |
|
|
|
for f in $(ls -d1 "${TMP_MNT}${target}"-* | sort -r | tail -n +"$del"); do |
|
|
|
echo " " btrfs subvolume delete "$f" |
|
|
|
echo " " btrfs subvolume delete "$f" |
|
|
|
done |
|
|
|
done |
|
|
|
fi |
|
|
|
fi |
|
|
@ -118,7 +118,7 @@ for fs in ${BTRFS_VOLUMES}; do |
|
|
|
else |
|
|
|
else |
|
|
|
sudo btrfs subvolume snapshot "${TMP_MNT}${subvol}" "${TMP_MNT}${target}${date}" |
|
|
|
sudo btrfs subvolume snapshot "${TMP_MNT}${subvol}" "${TMP_MNT}${target}${date}" |
|
|
|
#if test -n "$del"; then |
|
|
|
#if test -n "$del"; then |
|
|
|
# for f in $(ls -1 "${TMP_MNT}${target}"-* | tail -n +"$del"); do |
|
|
|
# for f in $(ls -d1 "${TMP_MNT}${target}"-* | sort -r | tail -n +"$del"); do |
|
|
|
# sudo btrfs subvolume delete "$f" |
|
|
|
# sudo btrfs subvolume delete "$f" |
|
|
|
# done |
|
|
|
# done |
|
|
|
#fi |
|
|
|
#fi |
|
|
|