Unix/bsd/linux
From Heterotopias Wiki
mysql
Mysql migrate/backup 指令參考 http://wiki.dreamhost.com/index.php/Migrate_MySQL
- mysql 匯入資料指令
mysql -h mysql.example.com -u username -p password newdbname < outfile.sql mysql -u heterotopias -p -h mysql.heterotopias.net heterotopias < yourfiledump
- 搬移資料庫
mysqldump -h oldhost -u oldusername -poldpassword olddbname | mysql -h newhost -u newusername -pnewpassword newdbname
- Getting a Backup From the Shell
mysqldump --opt -u username -ppassword -h yourMySQLHostname dbname > output.sql
Finding Causes of Heavy Usage
- find hardest hits to sites, go user/logs/domain/http
tail -10000 access.log| awk '{print $1}' | sort | uniq -c |sort -n
- firewalling ips, This will refuse all GET and POST requests made by IP address 127.0.0.1 and show an error message instead, also see http://wiki.dreamhost.com/index.php/Finding_Causes_of_Heavy_Usage
<Limit GET HEAD POST> order allow,deny deny from 127.0.0.1 allow from all </LIMIT>
- User resource reporting, GO Http://mysite.com/stats/resources
robots.txt
- PUT robots.txt see http://www.robotstxt.org/

