MySQL Dump And Other Info
mysqldump --all-databases -root -p > backup.sql
1) Mysql
To bakckup:
# mysqldump --all-databases -root -p > backup.sql
To restore in the new server
# mysql -uusername -p < all-databases.sql
Does this command restores all user privilieges (root user included) ? if not how to do this ?
2) account
To backup one account:
* cd /home/account
# tar --create --verbose --gzip --same-owner --same-permissions --file account.tar.gz /home/account
To restore one account in the new server
* Add the account with cpanel and ...
* tar zxvfp account.tar.gz -C /home/account
* Update registrar dns for the domain.
MySQL Start Stop
/etc/rc.d/init.d/mysql stop
/etc/rc.d/init.d/mysql start
/etc/rc.d/init.d/mysql restart
Netstat Commands
netstat -autpn | grep :80
netstat -autpn | grep :3306
netstat -na
netstat -an|grep :80|sort|more
netstat -an|grep ESTABLISHED
netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -nr | more
ps ax | awk '$3 ~ /^D/ { print $0 }'
netstat -an | grep :80 | wc -l
Process running command
ps -aux --forest
Run Weblogs
/scripts/runweblogs

LinkBack URL
About LinkBacks









Reply With Quote

Bookmarks