From 3f72c6fb83f847646c5754aeb495cad61da19201 Mon Sep 17 00:00:00 2001 From: Djan <> Date: Tue, 1 Aug 2023 20:13:14 +0200 Subject: [PATCH] Deleting bobaindex functions : security and performances issues --- borgaliasandfunctions.txt | 55 --------------------------------------- 1 file changed, 55 deletions(-) diff --git a/borgaliasandfunctions.txt b/borgaliasandfunctions.txt index bcdf7db..17ca927 100644 --- a/borgaliasandfunctions.txt +++ b/borgaliasandfunctions.txt @@ -225,61 +225,6 @@ function bobadur { done } -function bobaindexgeneratelist { - TestBorgRepo - echo "Warning, list of file will be generating OUTSIDE the repo,so it will be in CLEARTEXT." - echo "This could be a securty issue, as it will expose file list of all archives." - echo "Generating list could last a very long time and take some disk space." - read -p "Continue ? [N/y] " CONT - if [ "$CONT" != "y" ];then - return - fi - - echo "Generating list..." - indexdir=bobaindex_$(date +%Y%m%d) - mkdir -p $indexdir - - for archive in $(borg list --short ./);do - echo "Generating list for $archive" - borg list --short .::"$archive" >> $indexdir/"$archive" - done - - echo "Adding index to repo..." - borg create .::bobaindex_$(date +%Y%m%d) $indexdir/ - rm -rf $indexdir/ - echo "Borg index generated." -} - -function bobaindexsearch { - TestBorgRepo - indexarchive=$(borg list --short . | grep bobaindex | head -n 1) - - if [ "$1" = "" ];then - echo "No argument.";return - fi - - if [ $indexarchive = "" ];then - echo "bobaindex not found";return - fi - - if [ ! -d $HOME/$indexarchive ];then - echo "Mounting index..." - mkdir $HOME/$indexarchive - borg mount ./::$indexarchive $HOME/$indexarchive - fi - - cd $HOME/$indexarchive - grep -i -r $1 ./ - cd - -} - -function bobaindexumount { - mountpoint=$(findmnt -l --output TARGET | grep bobaindex) - fusermount -u -z "$mountpoint" - sleep 5 - rmdir "$mountpoint" -} - ############################################################################### # mount functions ###############################################################################