Skip to content

Commit

Permalink
Update brio-br
Browse files Browse the repository at this point in the history
Version-4.3.0.202109101400 : Fixed backup location & tweaked backup display via spinner
  • Loading branch information
DennisLfromGA authored Sep 10, 2021
1 parent 3e3703b commit b3ca1c1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions brio-br
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ NOTE: Please use 'install.brio-br' to install and link the above scripts automag
( URL:https://raw.githubusercontent.com/DennisLfromGA/brunch-things/main/install.brio-br )
"
# VERSION format: "n.n.$(date +%Y%m%d%H%M)"
VERSION='4.2.2.202109062230'
VERSION='4.3.0.202109101400'
VERHIST="\
${APPL}-4.3.0.202109101400 : Fixed backup location & tweaked backup display via spinner
${APPL}-4.2.2.202109062230 : Tweaked displayed output for unknown option entered
${APPL}-4.2.1.202109061742 : Added URL for 'install.brio-br'
${APPL}-4.2.0.202109061337 : Changed container selection for restorals
Expand Down Expand Up @@ -219,15 +220,15 @@ b_do_backup() {
local CONT=''
for CONT in ${BACKUPS}; do
echo
cd ${HOME}/brioche/${CONT} 1>/dev/null
echo "Stopping '${CONT}' - just in case ..."
brioche ${CONT} stop 2>/dev/null
echo "Backing up '${CONT}' to '${DOWNLOADS}/${CONT}.${DATE}.brio' ..."
sudo rm -f "${DOWNLOADS}/${CONT}.${DATE}.brio" 2>/dev/null
trap "rm -f ${DOWNLOADS}/${CONT}.${DATE}.brio; \
error 2 \"Back up of '${CONT}' aborted, file deleted!\"" INT HUP TERM 0
if type -P pv 1>/dev/null; then
# "'pv' is installed."
cd ${HOME}/brioche/${CONT} 1>/dev/null
echo "Backing up '${CONT}' to '${DOWNLOADS}/${CONT}.${DATE}.brio' ..."
sudo tar -cf - . | pv -s $(sudo du -sb . 2>/dev/null | awk '{print $1}') | gzip > \
${DOWNLOADS}/${CONT}.${DATE}.brio || FAILED="${FAILED} ${CONT}"
if echo ${FAILED} | grep -q ${CONT}; then
Expand All @@ -236,6 +237,7 @@ b_do_backup() {
fi
else
# "'pv' is NOT installed."
echo -n " Backing up '${CONT}' to '${DOWNLOADS}/${CONT}.${DATE}.brio' ..."
spinner 10 sudo tar --checkpoint=10 --checkpoint-action=exec=echo --numeric-owner \
-czf ${DOWNLOADS}/${CONT}.${DATE}.brio . 1>&2 || FAILED="${FAILED} ${CONT}"
if echo ${FAILED} | grep -q ${CONT}; then
Expand Down

0 comments on commit b3ca1c1

Please sign in to comment.