#!/bin/bash

BACKUP_DIR="/app/backup"
mkdir -p "$BACKUP_DIR"

TIMESTAMP=$(date +"%Y%m%d")
BACKUP_FILE="$BACKUP_DIR/d3live_$TIMESTAMP.sql.gz"


mysqldump -h 15.164.245.131 \
	-u root \
	-p \
	--column-statistics=0 d3 | gzip > "$BACKUP_FILE"
echo "[$(date +"%Y-%m-%d %H:%M:%S")] Database backup completed: $BACKUP_FILE"

