Automation: Final robust DB restore fixes and updated gitignore rules.

This commit is contained in:
Scott Idem
2026-01-12 18:33:05 -05:00
parent 7bd22d1086
commit f886250ae3
15 changed files with 140 additions and 59 deletions

View File

@@ -1,7 +1,5 @@
#!/bin/bash
# Aether MariaDB Backup Script (Physical Backup)
# Performs a live, hot backup of the running local container.
set -e
PROJECT_ROOT="/home/scott/OSIT_dev/aether_container_env"
@@ -10,14 +8,12 @@ TIMESTAMP=$(date +%Y%m%d_%H%M)
BACKUP_FILE="${BACKUP_DIR}/local_backup_${TIMESTAMP}.gz"
echo "--- Starting Aether Local Database Backup ---"
# Ensure backup directory exists
mkdir -p "${BACKUP_DIR}"
# Run mariabackup inside the container and stream it to a gzipped file on the host
# We use root here since it's a workstation dev env
# Increased open-files-limit to prevent OS error 24
echo ">>> Backing up to ${BACKUP_FILE}..."
docker exec ae_mariadb_dev mariabackup --user=root --password='$1sky.AE_dev.2023' --backup --stream=xbstream | gzip > "${BACKUP_FILE}"
docker exec ae_mariadb_dev mariabackup --user=root --password='$1sky.AE_dev.2023' \
--backup --stream=xbstream --open-files-limit=65535 | gzip > "${BACKUP_FILE}"
echo "--- Backup Complete! ---"
ls -lh "${BACKUP_FILE}"
ls -lh "${BACKUP_FILE}"