diff --git a/backup b/backup index 077f808..507fb3a 100755 --- a/backup +++ b/backup @@ -32,18 +32,14 @@ echo "" echo -e "\e[0mStarting Backup" -tar -pcvf $BACKUP_LOCATION ./*.bak +SIZE=`python3 -c "print($(cat *.bak | tr '\n' '\0' | xargs -0 du -sk | cut -f 1 | tr '\n' '+')0)"` + +tar -cpT *.bak -f - 2>/dev/null | pv -p -s ${SIZE}k > $BACKUP_LOCATION -while read folder; do - # list the contents of each folder - echo -e "\e[32mBacking Up: $folder" - tar -r -p -f $BACKUP_LOCATION $folder &>/dev/null -done < *.bak echo "" - if [ "$COMPRESS" = true ]; then echo -e "\e[0mCompressing Backup"