Import verified AzerothAI snapshot from GitHub
Core tests / core (push) Successful in 9m57s
Full verification / application (push) Failing after 5m16s
Full verification / local-brain (push) Failing after 6m15s
Realm simulation / simulated-live-world (push) Failing after 5m32s
WoW integration lab / real-worldserver (push) Canceled after 17m23s
Core tests / core (push) Successful in 9m57s
Full verification / application (push) Failing after 5m16s
Full verification / local-brain (push) Failing after 6m15s
Realm simulation / simulated-live-world (push) Failing after 5m32s
WoW integration lab / real-worldserver (push) Canceled after 17m23s
Source branch: feature/ai-brain-router Source commit: c2a09e0460465201a58aaab56c71424e9a96405e
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
||||
LAB_ROOT="${AZEROTHAI_PLAYABLE_ROOT:-$HOME/azerothai-pc-lab}"
|
||||
ACORE_ROOT="$LAB_ROOT/azerothcore"
|
||||
RUNTIME_ENV="$LAB_ROOT/runtime.env"
|
||||
OUT_DIR="${1:-$HOME}"
|
||||
STAMP="$(date +%Y%m%d-%H%M%S)"
|
||||
WORK="$LAB_ROOT/export-$STAMP"
|
||||
ARCHIVE="$OUT_DIR/azerothai-pc-lab-$STAMP.tar.gz"
|
||||
|
||||
mkdir -p "$WORK/mysql" "$WORK/azerothai"
|
||||
|
||||
if [[ ! -f "$RUNTIME_ENV" ]]; then
|
||||
echo "Missing $RUNTIME_ENV. This does not look like an initialized PC lab." >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC1090
|
||||
source "$RUNTIME_ENV"
|
||||
: "${DOCKER_DB_ROOT_PASSWORD:?Missing database password in runtime.env}"
|
||||
|
||||
if ! docker inspect ac-database >/dev/null 2>&1; then
|
||||
echo "The AzerothCore database container is not present." >&2
|
||||
exit 3
|
||||
fi
|
||||
|
||||
echo "==> Dumping AzerothCore databases"
|
||||
for db in acore_auth acore_characters acore_world; do
|
||||
docker exec ac-database mysqldump -uroot -p"$DOCKER_DB_ROOT_PASSWORD" --single-transaction --routines --events --triggers "$db" > "$WORK/mysql/$db.sql"
|
||||
done
|
||||
|
||||
echo "==> Preserving AzerothAI state and runtime configuration"
|
||||
cp "$RUNTIME_ENV" "$WORK/runtime.env"
|
||||
chmod 600 "$WORK/runtime.env"
|
||||
|
||||
if [[ -d "$REPO_ROOT/.wrangler/state" ]]; then
|
||||
tar -C "$REPO_ROOT" -czf "$WORK/azerothai/wrangler-state.tar.gz" .wrangler/state
|
||||
fi
|
||||
|
||||
if [[ -d "$LAB_ROOT/etc" ]]; then
|
||||
tar -C "$LAB_ROOT" -czf "$WORK/azerothcore-etc.tar.gz" etc
|
||||
fi
|
||||
|
||||
cat > "$WORK/MANIFEST.txt" <<EOF
|
||||
AzerothAI temporary PC lab migration export
|
||||
Created: $(date -Is)
|
||||
Source branch: $(git -C "$REPO_ROOT" rev-parse --abbrev-ref HEAD 2>/dev/null || echo unknown)
|
||||
Source commit: $(git -C "$REPO_ROOT" rev-parse HEAD 2>/dev/null || echo unknown)
|
||||
|
||||
Contains:
|
||||
- acore_auth SQL
|
||||
- acore_characters SQL
|
||||
- acore_world SQL
|
||||
- AzerothAI local D1/SQLite state, when present
|
||||
- AzerothCore generated configuration, when present
|
||||
- runtime.env including bridge/operator/database secrets
|
||||
|
||||
Treat this archive as sensitive because it contains credentials.
|
||||
EOF
|
||||
|
||||
echo "==> Creating migration archive"
|
||||
tar -C "$WORK" -czf "$ARCHIVE" .
|
||||
chmod 600 "$ARCHIVE"
|
||||
rm -rf "$WORK"
|
||||
|
||||
echo
|
||||
echo "Migration export created:"
|
||||
echo " $ARCHIVE"
|
||||
echo
|
||||
echo "Keep this file private. It contains realm data and runtime credentials."
|
||||
Reference in New Issue
Block a user