enable delete

master
Marc Wäckerlin 7 years ago
parent 50455b610a
commit d92fcdd6fc
  1. 10
      btrfs-snapshots.sh

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

Loading…
Cancel
Save