|
12345678910111213141516 |
- #!/bin/bash
-
-
- DB_USER="root"
- DB_PASS="root@123"
- DB_NAME="triq_demo"
-
-
- BACKUP_DIR="/mysql_backup"
-
-
- DATE=$(date +"%Y-%m-%d_%H-%M-%S")
- FILENAME="${DB_NAME}_${DATE}"
-
-
- mysqldump -u $DB_USER -p$DB_PASS $DB_NAME > $BACKUP_DIR/$FILENAME
|