Enhance DB automation: Added conference export, absolute path restore logic, and automated multi-user credential resetting. Updated README and CHEATSHEET.

This commit is contained in:
Scott Idem
2026-01-12 20:28:02 -05:00
parent f886250ae3
commit ea45d99f13
6 changed files with 106 additions and 10 deletions

View File

@@ -11,10 +11,16 @@ rm -rf "${RESTORE_DIR:?}"/*
echo ">>> Phase 1: Extracting ${BACKUP_FILE} to ${RESTORE_DIR}..."
gunzip -c "${BACKUP_FILE}" | mbstream -x -C "${RESTORE_DIR}"
echo ">>> Phase 2: Fixing checkpoint metadata names..."
echo ">>> Phase 2: Metadata Check..."
cd "${RESTORE_DIR}"
ln -sf mariadb_backup_checkpoints xtrabackup_checkpoints || true
ln -sf mariadb_backup_info xtrabackup_info || true
if [ -f "mariadb_backup_checkpoints" ] && [ ! -f "xtrabackup_checkpoints" ]; then
echo ">>> Linking mariadb_backup_checkpoints to xtrabackup_checkpoints..."
ln -sf mariadb_backup_checkpoints xtrabackup_checkpoints
fi
if [ -f "mariadb_backup_info" ] && [ ! -f "xtrabackup_info" ]; then
echo ">>> Linking mariadb_backup_info to xtrabackup_info..."
ln -sf mariadb_backup_info xtrabackup_info
fi
echo ">>> Phase 3: Decompressing data..."
mariabackup --decompress --target-dir="${RESTORE_DIR}" --open-files-limit=65535
@@ -22,4 +28,4 @@ mariabackup --decompress --target-dir="${RESTORE_DIR}" --open-files-limit=65535
echo ">>> Phase 4: Preparing backup (Applying logs)..."
mariabackup --prepare --target-dir="${RESTORE_DIR}" --open-files-limit=65535
echo ">>> Restore preparation complete!"
echo ">>> Restore preparation complete!"