Browse Source

Added DB backup scripts

master
Steffan JJ 1 year ago
parent
commit
ea01dbc62d

+ 16
- 0
trias/DB/mysql_backup.sh View File

#!/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

+ 8
- 0
trias/DB/mysql_restore.sh View File

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

trias_appserver_script.sh → trias/Server/trias_appserver_script.sh View 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

trias_dbserver_script.sh → trias/Server/trias_dbserver_script.sh View File


Loading…
Cancel
Save