Server Migration


Some folks who go to dannychoo.com will still see the old server. This is because that persons ISP still has not updated their DNS records. ISPs usually update their records every 24 hours - some less than, some more than. If you have came here via http://74.53.196.114/, then you should be able to access this site via dannychoo.com within 48 hours.
Some of your comments on the last post may have disappeared. This is because I took a snapshot of data from the old server last night - any comments made on the old server since last night have not been ported over to this server.
The old server was a 512MB Intel Celeron 1300MHz. This new server is a 2GB Intel Xeon CPU 3060 @ 2.40GHz with unmetered bandwidth. The site was previously using near to 2 terabytes of bandwidth (1 terabyte over my limit) and costing me 0.50 USD per GB over my limit @.@;;; I dont need to worry about the bandwidth now as its unmetered (thank you god).
I was wondering why the old server kept choking on 30,000 daily users as I think it could have taken a bit more. The reason was that the daily average for June was actually 48,000 users per day. May alone generated over 6.3 million page views. I was looking at the wrong logs ^^;;;
I need to do more optimization to this server before I implement load balancing and set up a separate image server.
Another priority for me is to make sure that I am sharing the current traffic with others who have contributed to it. I will soon set up a system that will enable me to easily add RSS feeds of folks who have registered my feed on their site. Your feed will appear randomly on the top page and on all blog post pages. This means that I will be driving traffic back to you too and that DC Rewards will be even more rewarding - give me a few weeks to complete this.

Some of you wanted to know how I done the server migration and I have outlined that below.
1. Copy files from old server to new server
Unix has a command called rsync which is just too amazing. *One* command (below) syncs the new server with all the files on the old server. All file permissions also remain intact too. I just could not imagine doing this manually and then chmodding all the folders again. I did this once then done QA on the new server. Once that was complete, I run rsync again which syncs any changes made on the old server over to the new one.
rsync -aze ssh root@207.44.218.20:/home/httpd/vhosts/dannychoo.com/httpdocs/
/var/www/httpd/vhosts/dannychoo.com/httpdocs/
2.Dump mysql table from old server
I make a backup of the MYSQL DB on the old server. The file is saved at "/httpdocs/dannychoo_com_dumpeddb.sql" which is the equivalent of "http://www.dannychoo.com/dannychoo_com_dumpeddb.sql"
mysqldump --add-drop-table dannychoo_com_db > /home/httpd/vhosts/dannychoo.com/httpdocs/
dannychoo_com_dumpeddb.sql -u username -p
3.Create new DB on new server
After logging into MYSQL via the terminal on the new server, I type...
create database dannychoo_com_db
4.Get MYSQL Dump from old server
I then get the backup of the MYSQL DB that I made on the old server. curl is a command that will fetch any file and save it locally.
curl -O http://www.dannychoo.com/dannychoo_com_dumpeddb.sql
5.Import data from dump
Data that I just got from the old server using curl is then imported into the database on the new server.
mysql dannychoo_com_db < /var/www/httpd/vhosts/dannychoo.com/httpdocs/
dannychoo_com_dumpeddb.sql -u username -p
6.Add MYSQL users
GRANT ALL ON *.* TO username@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
FLUSH PRIVILEGES;
7.Edit php.ini
Edit php.ini to your liking.
vi /etc/php.ini
8.Install ImageMagick
ImageMagick is a command line tool for generating graphics - just imagine Photoshop that can be controlled with text commands. Follow this tutorial for installation.
9.Set cron jobs
Cron jobs are tasks that you ask the server to do at regular intervals. Set any jobs that you want to run regularly.
17 7 * * * /usr/local/psa/admin/bin/php /usr/local/psa/admin/plib/
report/autoreport.php --auto daily >/dev/null 2>&1
10.Set up mail accounts
I ordered my server with Plesk which I use to set up domains and mail accounts. Should obviously be done before switching the DNS so that you dont loose mail.
11.Request IP change at hosting company
The server has a new IP so I need to tell The Planet to point dannychoo.com to the new IP address.
12.Switch nameservers at registrar
I get my domains at GoDaddy. Strange name but cheap domains. They sometimes run campaigns for 1 USD per .com domain. They are currently running a 0.99 USD for .info domains.
OK, thats it for today as I need to tweak the server a bit more. Lemme know if you spot anything odd.
The otaku shenanigans continues tomorrow.
BTW, Otakurl, Otavids and RDC bookmarklets wont work until the DNS has fully propagated throughout the internet. If you need to add something, change the "www.dannychoo.com" to "74.53.196.114" when you use the bookmarklets.











