1234567891011121314151617181920212223242526272829 |
- # Set the database credentials
- sudo apt-get update
- sudo apt-get -y install cifs-utils
- cd /
- mkdir mysql_backup
- sleep 2
-
- sudo chmod 777 mysql_backup
- sleep 2
-
- sudo mount //10.10.5.26/trias /mysql_backup/ -o username='baptist',password='2021Bbh',domain='bbh'
- sleep 2
-
- cd /mysql_backup/
- ls
-
- 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"
-
- mysql -u $DB_USER -p$DB_PASS -e "CREATE database triq_demo;"
-
- # Restore backup file
- mysql -u $DB_USER -p$DB_PASS $DB_NAME < $BACKUP_FILE
|