|
|
|
|
|
|
|
|
DB_NAME="triq_demo" |
|
|
DB_NAME="triq_demo" |
|
|
|
|
|
|
|
|
# Set the backup directory |
|
|
# Set the backup directory |
|
|
BACKUP_DIR="~/mysql_backup" |
|
|
|
|
|
|
|
|
BACKUP_DIR="/mysql_backup" |
|
|
|
|
|
|
|
|
# Set the backup filename format |
|
|
# Set the backup filename format |
|
|
DATE=$(date +"%Y-%m-%d_%H-%M-%S") |
|
|
DATE=$(date +"%Y-%m-%d_%H-%M-%S") |
|
|
FILENAME="${DB_NAME}_${DATE}.sql" |
|
|
|
|
|
|
|
|
FILENAME="${DB_NAME}_${DATE}" |
|
|
|
|
|
|
|
|
# Create the backup |
|
|
# Create the backup |
|
|
echo mysqldump -u $DB_USER -p$DB_PASS $DB_NAME > $BACKUP_DIR/$FILENAME |
|
|
|
|
|
mysqldump -u $DB_USER -p$DB_PASS $DB_NAME > $BACKUP_DIR/$FILENAME |
|
|
mysqldump -u $DB_USER -p$DB_PASS $DB_NAME > $BACKUP_DIR/$FILENAME |
|
|
# mysqldump -u root -p 'root@123' triq_demo > ~/mysql_backup/temp_1 |
|
|
|