| #!/bin/bash | |||||
| # Set the database credentials | |||||
| DB_USER="root" | |||||
| DB_PASS="root@123" | |||||
| DB_NAME="triq_demo" | |||||
| # Set the backup directory | |||||
| BACKUP_DIR="~/mysql_backup" | |||||
| # Set the backup filename format | |||||
| DATE=$(date +"%Y-%m-%d_%H-%M-%S") | |||||
| FILENAME="${DB_NAME}_${DATE}.sql" | |||||
| # Create the backup | |||||
| mysqldump -u $DB_USER -p$DB_PASS $DB_NAME > $BACKUP_DIR/$FILENAME |
| 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 |
| node --version | node --version | ||||
| npm --version | npm --version | ||||
| npm install -g @angular/cli | npm install -g @angular/cli | ||||
| npm install pm2 | |||||
| # echo "Enter the version of node you want to install: (Example. 'v16.19.1')" | # echo "Enter the version of node you want to install: (Example. 'v16.19.1')" | ||||
| # read nodeversion | # read nodeversion | ||||
| # nvm install $nodeversion | # nvm install $nodeversion |