- # Set the database credentials
- DB_USER="root"
- DB_PASS="root@123"
- DB_NAME="triq_demo"
-
- # Set the backup directory
- echo "Enter the name of backup file: "
- read fileName
- BACKUP_FILE="/mysql_backup/$fileName"
-
- # Restore backup file
- mysql -u $DB_USER -p$DB_PASS $DB_NAME < $BACKUP_FILE
|