DB_USER="root" DB_PASS="root@123" DB_NAME="triq_demo" echo "Enter the name of backup file: " read folderName BACKUP_FILE="~/mysql_backup/$folderName" # Restore backup file mysql -u $DB_USER -p$DB_PASS $DB_NAME < $BACKUP_FILE