Przeglądaj źródła

Added DB backup scripts

master
Steffan JJ 1 rok temu
rodzic
commit
ea01dbc62d

+ 16
- 0
trias/DB/mysql_backup.sh Wyświetl plik

@@ -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

+ 8
- 0
trias/DB/mysql_restore.sh Wyświetl plik

@@ -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

trias_appserver_script.sh → trias/Server/trias_appserver_script.sh Wyświetl plik

@@ -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

trias_dbserver_script.sh → trias/Server/trias_dbserver_script.sh Wyświetl plik


Ładowanie…
Anuluj
Zapisz