Posts

Showing posts from February, 2026

drushti copy backup

 Your find should look like that to avoid sending directory names to sed: find ./ -type f -exec sed -i -e 's/apple/orange/g' {} \; find ./ -type f -exec sed -i -e 's/192.227.112.108/162.19.155.118/g' {} \; #!/bin/sh Date1=`date +%d-%m-%Y` T1=`date +%H-%M` rsync -avz  --password-file=/backup_script/for_144  -u  root@162.19.155.118::home/ /Backup2/INDIA/162.19.155.118/DAILY/home/ > /backup_script/INDIA/162.19.155.118/logs/home.log  2>&1 T2=`date +%H-%M` echo "START : " $T1  >> /backup_script/INDIA/162.19.155.118/logs/home.log echo "END : " $T2  >> /backup_script/INDIA/162.19.155.118/logs/home.logcd .. /backup_script/INDIA/162.19.155.118/daily-ador-vps.sh /weeklybackup/INDIA/162.19.155.118/weekly-ador-vps.sh ################Ador vps 118########################### 22 23 * * 1,2,3,4,5,6 /bin/sh /backup_script/INDIA/162.19.155.118/daily-ador-vps.sh 30 23 * * 7 /bin/sh /weeklybackup/INDIA/162.19.155.118/weekly-ador-vps.sh [root@server-...

mysql installed but command not found

 mysql installed but command not found export PATH=$PATH:/usr/local/mysql/bin  export PATH=$PATH:/usr/local/mysql/bin/mysqldump

enable the Slow Query Log in MySQL

 ✅ IMMEDIATE ACTIONS (DO THESE NOW) 1️⃣ Enable MySQL slow query log (VERY IMPORTANT) SET GLOBAL slow_query_log = ON; SET GLOBAL long_query_time = 1; Then watch: tail -f /var/lib/mysql/*-slow.log tail -f /var/log/mysql/mysql-slow.log This will show exact queries + which site causes them. 2️⃣ See live MySQL queries SHOW FULL PROCESSLIST;