#!/bin/bash

# Set the database credentials
DB_USER="root"
DB_PASS="root@123"
DB_NAME="triq_demo"

# Set the backup directory
BACKUP_DIR="/mysql_backup"

# Set the backup filename format
DATE=$(date +"%Y-%m-%d_%H-%M-%S")
FILENAME="${DB_NAME}_${DATE}"

# Create the backup
mysqldump -u $DB_USER -p$DB_PASS $DB_NAME > $BACKUP_DIR/$FILENAME