Fix snapper integration by correctly using the right directory for snapshot configurations.

This commit is contained in:
Cody Cook 2019-04-01 23:57:12 -07:00
parent f83929341a
commit 5f371260ee

View file

@ -92,7 +92,7 @@ EOF
follow symlinks = 1
EOF
cat > /etc/snapper/$((shares-1)) << EOF
cat > /etc/snapper/configs/$((shares-1)) << EOF
# subvolume to snapshot
SUBVOLUME="/$volume/$item"
@ -259,6 +259,7 @@ if [[ ! $number ]]; then
exit 1
else
echo "== [Info] $number volume(s) found."
backupsnappershots
for volume in $volumes; do
echo "== [Task] Investigating volume /$volume..."
objects=$(cd /"$volume"; ls -dA ./*/ 2>/dev/null)
@ -268,8 +269,7 @@ else
objects=$(echo "$objects" |egrep -v "^.apps\/$|^\.\/home\/$|^.purge\/$|^._share\/$|^.timemachine\/$|^.vault\/$|^.TemporaryItems\/$" | sed 's/\/$//;s/\.\///')
echo "=== [Info] Number of items found : $(echo $objects | wc -w)"
echo "=== [Info] Items found:" $objects
backup_configs
backupsnappershots
backup_configs
for item in $objects; do
echo "=== [Task] Reviewing $item"
if ! btrfs subv show /"$volume"/"$item" &>/dev/null; then