One Hat Cyber Team
Your IP :
18.190.176.244
Server IP :
103.133.214.160
Server :
Linux venus.ewebguru.net 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
Server Software :
Apache/2
PHP Version :
8.1.30
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
View File Name :
dbdump.sh
#! /bin/bash ##Backupdir TIMESTAMP=$(date +"%F") d=$(date +%d) x=$((d % 7)) if [ $x == 0 ] then BACKUP_DIR="/backup/mysql/weekly/$TIMESTAMP" else BACKUP_DIR="/backup/mysql/daily/$TIMESTAMP" fi MYSQL=/usr/bin/mysql MYSQLDUMP=/usr/bin/mysqldump mkdir -p "$BACKUP_DIR/mysql" mkdir -p "$BACKUP_DIR" for x in $(mysqlshow | awk '{print $2}'| grep -v -w performance_schema |grep -v -w mysql| grep -v -w modsec| grep -v -w cphulkd| grep -v -w information_schema | grep -v -w Databases | grep -v -w roundcube); do mysqldump $x > $BACKUP_DIR/$x.sql gzip $BACKUP_DIR/$x.sql chown root:root -R $BACKUP_DIR done find /backup/mysql/daily/* -type d -mmin +11520 | xargs rm -rf find /backup/mysql/weekly/* -type d -mmin +11520 | xargs rm -rf