some cleanup of messy backup/restore facilities

This commit is contained in:
phanes
2023-02-27 21:47:25 -05:00
parent c4192e2328
commit 4fbe0c8d81
2 changed files with 26 additions and 5 deletions

View File

@@ -4,7 +4,7 @@
APPNAME="Offer Backup"
# ISO 8601 variation
TIMESTAMP="$(date +%Y-%m-%d_%H:%M:%S)"
TIMESTAMP="$(date +%Y-%m-%d_%H%M%S)"
LOG_DIR="${LOGS_ROOT}/${APPNAME}-${TIMESTAMP}"
@@ -55,7 +55,8 @@ function perform_backup() {
disarm_chroot
disarm_chroot
logprint "Performing backup...This will take a long time..."
tar cpzf ${project_root}/${TIMESTAMP}.backup.tgz ${dir_stage}
pushd ${dir_artifacts}
tar cpzf ${project_root}/${TIMESTAMP}.backup.tgz *
assert_zero $?
logprint "Backup completed successfully. Moving on."
logprint "Entering project root."