reverted progress display
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2019-12-29 07:11:35 +01:00
parent e116a90979
commit ee7aca3c82

8
backup.sh Executable file → Normal file
View File

@@ -38,13 +38,7 @@ healthchck_ok(){
healthchck_start "Starting Backup" healthchck_start "Starting Backup"
cd /backup cd /backup
echo "make archive" echo "make archive"
FROMPATH='./' tar -c ${TAR_PARAM} ${TAR_EXTRA_PARAM} -f ~/$BACKUP_FILENAME ./* || healthchck_fail "TAR Failed"
FROMSIZE=$(du -sk ${FROMPATH} | cut -f 1);
CHECKPOINT=$(echo ${FROMSIZE}/50 | bc);
echo "Estimated: [==================================================]";
echo -n "Progess: [";
(tar -c --exclude=${BACKUP_FILENAME} --record-size=1K --checkpoint="${CHECKPOINT}" --checkpoint-action="ttyout=>" -f - "${FROMPATH}" | xz > "${BACKUP_FILENAME}") || healthchck_fail "TAR Failed"
echo "]"
cd / cd /
echo " done" echo " done"