Ops: Added backup script, dashboard UI, and project cheatsheet.
This commit is contained in:
23
backup_db.sh
Executable file
23
backup_db.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/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"
|
||||
BACKUP_DIR="${PROJECT_ROOT}/backups"
|
||||
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
|
||||
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}"
|
||||
|
||||
echo "--- Backup Complete! ---"
|
||||
ls -lh "${BACKUP_FILE}"
|
||||
Reference in New Issue
Block a user