Starting over...

This commit is contained in:
2026-10-21 08:52:34 -04:00
parent 5c93704d21
commit a5a035c6d2
2 changed files with 0 additions and 25 deletions
@@ -1,13 +0,0 @@
#!/bin/bash
if [ -f /run/appdata_active_snapshot.txt ]; then
SNAPSHOT_NAME=$(cat /run/appdata_active_snapshot.txt)
# Unmount and clean up scratch directory
umount -R /mnt/appdata-scratch || true
rmdir /mnt/appdata-scratch || true
# Destroy the recursive snapshot tree across all appdata datasets
zfs destroy -r tank/appdata@"$SNAPSHOT_NAME"
rm -f /run/appdata_active_snapshot.txt
fi
@@ -1,12 +0,0 @@
#!/bin/bash
set -e
SNAPSHOT_NAME="restic-auto-$(date +%Y%m%d_%H%M%S)"
echo "$SNAPSHOT_NAME" > /run/appdata_active_snapshot.txt
# 1. Take a recursive snapshot from the top-level tank/appdata parent
zfs snapshot -r tank/appdata@"$SNAPSHOT_NAME"
# 2. Mount the parent snapshot to a temporary scratch directory
mkdir -p /mnt/appdata-scratch
mount -t zfs tank/appdata@"$SNAPSHOT_NAME" /mnt/appdata-scratch