Starting over...
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user