@@ -0,0 +1,16 @@ | |||
#!/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 |
@@ -0,0 +1,8 @@ | |||
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 |
@@ -8,6 +8,7 @@ nvm install v16.19.1 | |||
node --version | |||
npm --version | |||
npm install -g @angular/cli | |||
npm install pm2 | |||
# echo "Enter the version of node you want to install: (Example. 'v16.19.1')" | |||
# read nodeversion | |||
# nvm install $nodeversion |