From fba1045c8403082718f83ed31bccd7001cfa226f Mon Sep 17 00:00:00 2001 From: snaki Date: Wed, 12 Jul 2023 10:49:22 +0200 Subject: [PATCH] added disclaimer --- README.md | 4 ++-- btrbk | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 843dec1..72d6497 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # btrbk - btrfs backup and restore script -This is a bash script I made to create simple, incremental, PGP encrypted backups of your btrfs subvolumes. - +**This is horrible don't use this** +This is a bash script I made to create simple, incremental, PGP encrypted backups of your btrfs subvolumes. Rclone is used to support a wide variety of Storage Backends. Encryption is done by the Standard gpg commandline tool. ## Features diff --git a/btrbk b/btrbk index c0f44df..2abec07 100755 --- a/btrbk +++ b/btrbk @@ -146,6 +146,9 @@ function getSnap { if ! [ -d "$snapLast" ]; then snapLast=$SNAPDIR$(ls -a $SNAPDIR | grep ${VOLNAME[$i]}.$(date -d "$date" +%Y-%m)- | tail -n 1) fi + if [ $snapLast = $SNAPDIR ]; then + unset snapLast + fi done } @@ -222,6 +225,7 @@ function echoHelp { options=$(getopt -l "backup,force,date::,restore::,full-restore::,help" -o "bfh" -- "$@") eval set -- "$options" +options=($options) for i in ${!options[@]}; do case $1 in -b|--backup) backup=true; shift;;