local/bin/btrfs-backup: Remove dated snapshot tweak.

master
Pierre Neidhardt 2019-10-27 22:16:15 +01:00
parent cd8a8cef9f
commit 4472a909e4
1 changed files with 2 additions and 4 deletions

View File

@ -18,17 +18,15 @@ SOURCE="$1"
TARGET="$2"
for i in "$SOURCE"/.snapshots/*; do
if echo "$i" | grep -q 2019 ; then
echo "TODO: Temporarily ignoring snapshot '$i' with dates directly in .snapshots."
continue
fi
parent=""
target_i="$TARGET/.snapshots/$(basename "$i")"
for j in "$i"/*; do
if [ ! -e "$target_i/$(basename "$j")" ]; then
if [ -z "$parent" ] ; then
echo "Sending '$j' to '$target_i'..."
sudo btrfs send "$j" | sudo btrfs receive "$target_i"
else
echo "Sending '$j' to '$target_i' with parent '$j'..."
sudo btrfs send -p "$parent" "$j" | sudo btrfs receive "$target_i"
fi
fi