Disgusted with the way FireFox was constantly forgetting my login credentials with WordPress, I suspected the issue might have something to do with the way my caching plugin, Quick Cache, was working. It didn’t handle browser-side header expiration or GZIP compression through its control panel, for example, and I suspected the overly-broad rules I’d defined in my .htaccess file had something to do with it. So, I figured it was worth trying another plugin. Notes follow.
In the beginning, I hosted with a shared host called Pair.com. They are one of the earliest commercial hosts that provided shell access all the way back in the 1990s, and it was good.
Shared hosting is kind of like living in a college dormitory, with many people sharing the facilities. Like a college dormitory, there were certain problems that come from many web sites living on the same server. While it’s cheap, it’s also prone to disruption. If one of the other websites on your host does the Internet equivalent of bouncing a golf ball on the floor at 2am, everyone is affected and mad as hell. If another website is not very conscientious about locking down security holes in its software, everyone is compromised. And then there is the sheer limited amount of space. At some point, you outgrow it and need a place of your own.
When you blog hits around 1500-2000 pageviews a day, that’s when you’ll start hitting capacity limits. A cheap hosting plan of $5-9 a month just won’t cut it anymore, expecially with WordPress. For a while, I was paying $39 for a very well-managed hosting plan from a host called FutureQuest, but unfortunately for me I got a few high traffic days that were exacerbated by some poorly-written WordPress plugins installed on my site. They gave me an option to upgrade to a $200/month managed host, or to go elsewhere. My elsewhere ended up being Media Temple, which is another well-known commercial host. While it’s not the cheapest nor the most technically advanced, I’ve found they offer a good balance of features and service for the medium-traffic website operator. Full disclosure: I’ve been hosting with them for about 4 years under a hosting partnership original acquired through the old 9rules blogging network, which allowed me to try their services at a slight discount. However, even without the discount, Media Temple has proven to be a pretty reliable and friendly solution for my needs, and I continue to recommend them to people who want a balance of control, ease of use, and stability without a high price tag.
Media Temple’s Service Offerings
At the time I switched to Media Temple, I had the choice between their Dedicated Virtual Server option or the (then) brand-new Grid Server. These are respectively known as the (dv) and (gs) hosting packages.
I started with the base (dv) system, which at $50/month offered 256MB of working memory in 2008 (it’s 512MB as of this writing). As I mentioned earlier, the (dv) is the “dedicated virtual server” option, which means that you have the equivalent of a complete server all to yourself. You can do almost anything you want to it as far as software installation goes. The (dv) option is inexpensive because you are actually sharing the space with other virtual servers. You can imagine the difference as follows:
- shared hosting = dormitory, with shared bathroom and common access halls to each individual room.
- dedicated virtual server = multi-unit condominium building, with separate access and privacy inside the walls, but with some shared facilities outside.
- dedicated server = your own building, inside and out
Media Temple also has another option, the (ve) server, which is like stripped-down industrial space that has to be built-out by you. Unless you like configuring servers, it is a huge pain in the butt. The (dv), by comparison, comes with several time-saving conveniences:
Pre-installed Control Panel – Like many web hosting packages, the Media Temple (dv) service includes the popular Plesk control panel, which provides a graphical user interface for configuring your web server. This is very important if you’re not comfortable using a terminal window to type in shell commands or edit configuration files directly. Web servers are fairly complex beasts, and while you still have to learn a lot of new concepts, you at least don’t have to worry about screwing up your web server configuration irreversibly. You can do things like add websites, website users, install popular packages like WordPress, and manage multiple users.
Pre-installed and Configured Operating System – Out of the box, the (dv) server is ready to start working. You just need to upload some files to the right place and you’re up and running. I didn’t realize how convenient this was until I was setting up a (ve) server for a client; you have to install and configure everything from scratch, which took me several head-scratching hours. With total control comes great responsibility, but with the (dv) option some of this is taken care for you.
Developer Tools and Full Root Access – For experienced administrators, you can install compilers and other software packages with root-level access. You just click a button to install the tools, set a password, and in a few minutes it’s all set up. The (dv) uses the CentOS operating system, which is the “community version” of the venerable Red Hat Enterprise Linux used by many companies. One caveat: if you are making configuration changes, you need to be aware of the way that Plesk integrates itself into the operating system (e.g. Apache virtual host configuration).
Between these three features, you have a ready-to-go web host that is, for all practical purposes, completely yours. You can scale up to use more memory if you need it (at a higher price, of course) and you are not locked into a contract.
Media Temple Support
Technical support is a big deal for most users of web hosting services. When your website isn’t working, or you’re stuck trying to get some piece of software to work, you’re going to have to use your web hosting provider’s technical support system.
Unless you are paying big bucks for “fully managed hosting” from a company that offers it (Rackspace, for example), it’s important to realize the most web hosting providers in the $5 to $99 range per month are responsible ONLY for maintaining overall uptime of the service. The deal is much like the one you have with your home’s electricity provider: if the power goes out, that’s a problem they deal with, but if you have a broken washing machine, or don’t know how to use your VCR, it’s NOT the electric company’s responsibility to fix it for you. You need to call an expert or get educated. This is the case also with web hosting with the (dv), though to Media Temple’s credit they do seem to go out of their way to help their clients. Another nice touch is that they estimate how long it will take to get back to you. I believe that the (dv) users have access to telephone support, but I’ve never tried it. UPDATE: Media Temple does provide telephone support to all customers, though I’ve never tried it myself. They are also available via Twitter and chat (thanks Drew for the clarification).
I’d say a key sticking point in the selection of a web host is how much support you need. If you are really clueless about how servers work and don’t want to learn (I really don’t blame you either), you should be prepared to spend several hundred dollars a month for a fully-managed solution. At $50/month for your basic Media Temple (dv), you’re not going to get the level of handholding you will need. Alternatively, you could put your money into a specialized host provider which can help with some configuration issues. For example, if you use WordPress exclusively, a host like WPEngine has their entire service built around deploying and maintaining high-performance WordPress websites, and they are more knowledgeable about the platform than your generic tech support person. My own experience with WPEngine has been mixed, with several broken installations and a demonstrable lack of knowledge regarding their own system features that dragged resolution out for days, but to their credit they fixed the underlying problems once caught, and made changes to their customer support system to prevent the problem in the future. And I probably should have just called them up. The vast majority of feedback I’ve seen on them has been positive, and I’ve been impressed with the features they offer.
But I digress…Media Temple has two main lines of support:
The Media Temple Account Center, which is the online service area where you can make some service configuration changes yourself AND request support. The customer service system has been refined over time and is very good about keeping track of your issue. While they probably won’t debug your your WordPress installation for you, they will probably help you figure out what you might try to fix it. Again, it’s not their responsibility, and given that it costs between $50 and $250 per hour for a system guy to fix such problems, I wouldn’t expect them to either.
The Media Temple Community Wiki has a lot of staff- and user-contributed articles about how to configure and use their services most efficiently. I have a few contributions in their system myself regarding optimization of server resources, for which Media Temple asked permission to include, and then they sent me a mug.
I’m a fairly advanced user and like to fix my own problems. Beyond the official channels, I’ve found that many of my questions can be answered by using a keyword search on Google, including plesk and/or centos in the query. For example, “How do I install WordPress Multisite Plesk Centos”. You can also try mediatemple and dv as keywords.
Media Temple Reliability
I personally haven’t had any problems with them for the time I’ve been with them, about 3-4 years. There have been two outages I can think of: one was related to denial of service attacks being made upon the entirety of Media Temple by unknown hackers. In the early years of the Grid Server (gs) service, I heard a LOT of complaints about the downtime and sluggishness of the system, which is designed to scale-up to meet demand. This was early in the history of cloud computing (before they were even calling it that), so these growing pains are perhaps understandable. Since I was using a dedicated virtual server, I didn’t experience any problems.
Of equal concern, especially if you are running popular software installations like WordPress, is security. Media Temple does seem to proactively check and test for security issues, but it’s also up to you to worry about it. The simplest thing to do, I’ve found, is use a website malware scanner like Sucuri.net and possibly use their cleanup services (fairly cheap for the peace of mind). On the (dv), you are somewhat more isolated from runaway malware infections than you would be on a shared host from another provider.
I’ve heard a lot of negative things about Media Temple uptime over the years. In my case, I’m not running a mission-critical website and I don’t monitor uptime, so I haven’t personally experienced any problems. That doesn’t mean that they don’t happen; I just haven’t noticed. After I tuned my server has been tuned, I just let it run and run and don’t think about it. In my daily use, I actually hit my server dozens if not hundreds of times a day because I have a common bookmark page on it so they are accessible from my multitude of computing devices; I haven’t noticed any downtime except when I’ve been fooling with the server. In the cases that there are loading problems, the problem is usually related to the network connection. The (dv) has been very stable for me; I would have left in disgust years ago if that hadn’t been the case.
Media Temple Performance
I don’t have wide-ranging experience with different server hardware profiles, so I can’t tell you how fast Media Temple’s (dv) are relative to the industry. Personally, I haven’t had any problems with it. I do know that the (dv) is periodically upgraded as new technology becomes available, which generally offermeans more speed, disk space and memory. I just upgraded to (dv) 4.0, and have been pleased with the beefed-up specifications.
Connectivity-wise, like most big web hosts Media Temple has multiple redundant connections to major Internet backbones. They’re located in both California and Virginia, so performance across the United States seems pretty uniform. I don’t worry too much about bandwidth; there are quite a few large clients that use Media Temple, so I presume the infrastructure is solid.
The biggest effect on overall performance has resulted from me making my own optimizations. To my knowledge, there are two major performance bottlenecks for your average web servers:
Physical Memory – A web server runs multiple programs at the same time, each taking up a certain amount of physical memory. If there are more programs requiring memory than is available, a regular unix-style system will start “swapping” programs in and out of memory from another source, usually the hard disk drive. This can be very slow, and when there are a lot of people requesting information from your server at the same time, it will become unresponsive as memory is completely used up.
Processing Power – The amount of time it takes for the web server to receive, process, and respond affects how long that a certain amount of resources are “locked up”. The shorter this response time, the more requests can be handled. Responsiveness is also quicker, of course.
Of the two, memory is probably the most critical. It’s also the easiest to fix by throwing money at the problem; if you find your (dv) is running slow, you can upgrade to a (dv) package with more memory. More memory means that more programs can run simultaneously. Optimizing the way your server uses memory is another way, allowing you to get more done with less. I spent several weeks learning how to optimize my first (dv) with 256MB memory, which allowed it to run as efficiently (if not more) than the 512MB version. However, if you’re running a business where your time is more valuable than money, just buy a bigger (dv).
There’s an important difference between a virtual server (the dv) and a dedicated server: You have an allocation of “guaranteed” memory with additional “burst” memory. Imagine that you own a condo unit with a deck and a shared yard. You are guaranteed exclusive use of your private deck, and if there is no one else in the yard you can expand into it for a short period of time. By analogy, your deck corresponds to “guaranteed” memory and the shared yard is the “burst”; it’s a short period of time where you need more space than you normally do.
It’s important to configure your server so that operates mostly in your guaranteed memory space, otherwise if your website gets hit by an unexpected spike in demand it will probably go down. There are some good optimization guides out there that can help you figure out what’s going on, but these are advanced topics. Several guides can be found by searching the Media Temple Community Wiki and Knowledge Base (try keyword: optimize).
Media Temple Competitive Costs
At $50/month for their base (dv) 4.0 offering with 512MB of memory, Media Temple comes in a little high compared to other host providers. For the same amount of money, I’ve priced other hosts offering the same dedicated virtual server services offering more RAM and disk space. However, I haven’t been quite tempted to jump ship because of several advantages I perceive with Media Temple:
Flexible DNS Configuration in the Account Center – Media Temple gives you the ability to edit DNS zone files yourself, using their domain name servers rather than running your own. This saves about 50MB of memory on my (dv) because I don’t have to run BIND, and it’s easy to connect my mail services to Google Apps. Running two fewer services on my server means two less things for me to worry about. Access to the name server may be common with other dedicated virtual server providers for all I know. I like it.
The Account Center looks great and actually works. I’m kind of a sucker for aesthetics, and I’ve always liked the way Media Temple presents themselves both as a brand AND backs it up with an attractive custom account management center. Media Temple also maintains an active knowledge base that is continually updated, and there are enough people using the Media Temple (dv) that I can usually Google my way to a solution.
Customer Service, the few times I’ve used it, has been unfailingly polite and professional, even when I didn’t like the answer. While it’s not instantaneous—responses times are within 24 hours—it has been reliable. I have not tried their telephone or chat support, but it is available as well.
Some other vendors I’ve looked at with comparable offerings are Slicehost (now owned by Rackspace) and Knownhost. Their costs are about 20-30% less last I checked, and they seem to get good reviews on the Web and on Webhostingtalk forum. Perhaps one of these days I’ll get a chance to test them, but for now I’m pretty content with Media Temple.
Summary
I’d say that Media Temple’s dedicated virtual (dv) hosting service would appeal to people who want a combination of both convenience and control:
- You’ve outgrown shared hosting plans but don’t want to pay too much more.
- You need the LAMP stack: Linux / Apache / MySQL / PHP.
- You do not need a lot of help with basic Linux system administration.
- You are a medium-to-large website operator who is comfortable with installing and administering Linux-based web servers (or are willing to learn)
- You are a developer that prefers a standard Linux environment as opposed to a cloud-based one.
- You are fine hosting mail on another site (for example, using Google Apps), because a minimum-spec server just doesn’t have the juice to handle spam filtering AND serve lots of web pages. You will be very sad. Trust me.
- You want to manage multiple websites with different domain names and users.
- You like the convenience of the Plesk control panel, with the freedom to install their own software
- You are more comfortable with a larger known company than a smaller one (Media Temple does host several large websites for commercial clients you have heard of).
- You are prepared to occasionally do some digging into the server, or hire someone, to optimize and maintain the server during times of woe (security breach, performance tweaking, wordpress tuning)
If you are looking for a hosting company that will take care of your website operations on your behalf as quickly as possible, you need to find one that offers fully-managed hosting. You will pay a lot more for this.
If you are looking to pay as little as possible for a dedicated virtual server, you’ll have to navigate the uncertain waters of smaller hosts. Webhostingtalk is a good place to start; look for hosts offering “VPS services”, which stands for Virtual Private Server and is the same thing as a dedicated virtual server. The lower cost may come at the expense of the inclusion of the control panel (Plesk or CPanel). For me, the DNS zone editing on Media Temple’s own name servers is really handy, so I’d hate to lose that.
Again for the sake of full disclosure: I’m currently on a discounted Media Temple plan through an old partnership agreement through my former blog network.
» Check them out! Media Temple and their dedicated virtual hosting packages.
I recently had to move my website to a newer server on Media Temple, which is quite an undertaking. Even though I was moving within MT’s (dv) line, from 3.5 to 4.0 using their automated migration tools, it’s still a journey fraught with pitfalls and hidden gotchyas. In addition to my own website, there are several websites I maintain for friends, so it becomes a logistical headache. The goal is to move from the old server to the new server with ZERO disruption to any of those websites.
My Server History
I’ve done this type of move before between other web hosts and other servers, usually when I’ve run out of resources due to traffic. It’s not such an issue if you just have a few simple HTML pages, but if you’re running WordPress, you’ll hit the limits much quicker (today, I’d guess it’s around 2000 pageviews a day). You’ll know when your web pages start loading really slowly, or if your hosting provider starts telling you that you’re hogging too many server resources and are starving everyone else. I got kicked off my last shared host sometime in 2007 for a bad plugin that counted downloads by loading THE ENTIRE DOWNLOAD into memory, which brought the server to its knees. As a result, I was offered a choice between paying $200/month for a dedicated server, or moving. That’s when I moved to Media Temple, which is a web host that I’ve wanted to try for some time because they had a reputation of being designer-friendly (and they had cool graphics on their website :)
Because my website was part of the 9rules Network, which had a hosting relationship with Media Temple, I was able to get into a dedicated virtual server setup for a bit less than $50/month. While this was more expensive than the $29/month I had been paying before on FutureQuest’s impeccable servers, it also gave me the equivalent of my very own small server that wasn’t shared with anyone else. This is actually a trick; the (dv) is a virtual dedicated server, as opposed to a physical dedicated server. Through low-level software, one physical dedicated server can be split into multiple virtual servers, which has several advantages. I could go on and on about this, but the general benefit is that you can get a lot of control for a little more money. And, if you’re clever about how you configure your virtual server, you can achieve high performance.
Anyway, I’ve been using Media Temple’s (dv) service for quite some time now, and while there are other options like MT’s (ve) servers (barebones servers that you have to configure from scratch), their grid server cloud system (a form of demand-based cloud computing), and even Amazon’s Elastic Cloud thingy, I’ve stuck with the (dv) because they offer a good blend of direct control and convenient configuration through their control panel. The (dv) servers are configured with the software to serve web pages out-of-the-box, handle customers accounts if you’re doing hosting, and create multiple websites and domain names.
My (dv) 3.5 service is being retired this year, and so I’m forced to move to the newer (dv) 4.0. Exciting, and also daunting! There are newer versions of server software available, and the configuration has changed here and there, so I need to make sure my old setup works on the new server. With 20-odd websites to move, some of them quite complex, I allocated an entire week to carefully move and test each one. And it ended up taking the entire week. I made some configuration changes to make it easier in the future, and have made extensive notes here so I’ll be better prepared for the inevitable future upgrade to (dv) 5.0.
Preparation
There are two guides that were helpful in getting my head wrapped around the entire enterprise. The first is Media Temple’s official migration guide and tips on migrating from (dv) 3.5 to (dv) 4.0 articles on Media Temple. This is what I generally followed. The second resource is Jeff Starr’s (dv) migration experience, which per his usual standard of excellence is detailed and insightful.
Offloading Services
The more services you run on your server, the bigger the headache when it’s time to move. I long ago had dropped the following services from my (dv) for my own sanity:
- mail – Handled by Google Apps for Domains for the past 4 years
- spam filtering – When handling your own mail, this crushes your server because of the huge volumes of spam. With mail gone, so goes spam filtering.
- DNS – Media Temple already gives you access to their domain name server through Account Center, so there’s no need to run this service on your machine
Since these services are already configured elsewhere, I don’t have to move them. However, there is one last service that I till was running, and that was the version control software Subversion aka SVN. After consulting with various people, I decided to dump SVN and upgrade to another system called Mercurial. I converted to Mercurial, and then set up my central repository on bitbucket.org so they hosted everything. The result? One less thing to move.
Establishing Procedures
The general order of operations for moving a website from one server to another is as follows:
- Copy Files from old to new server
- Copy Databases from old to new server
- Configure the new server so it recognizes and responds to your domain name
- Test locally, resolve any errors
- Update the Domain Name Server to point to the new server
- Test again
- Repeat for each website
There is a built-in “migration tool” that handles everything except for testing and updating the domain name server, but it doesn’t always work because the configuration parameters don’t exactly match between the old server and the new server, and this sometimes breaks the migration process. It tends to work for simple websites, but not for customized setups like mine.
Planning the Site Migration Order
Because I had a couple dozen sites to move, I decided that I’d test the migration tool on the simplest ones. This covered about half the websites, which used very simple HTML and no PHP or fancy server features. For the more complex sites, I would move them one-by-one.
To prepare to move these sites, I had to go to the into the Media Temple Account Center and edit the DNS Zones for each site I planned to move, lowering the Time To Live (TTL) for entry. This values tells users of the Internet that the domain name (e.g. davidseah.com) is going to be changing much more rapidly than usual. The default value is 12 hours, and lowering TTL reduces it to five minutes. You can think of it as telling the Internet to not assume that “davidseah.com HQ” is at a fixed server address, but is about to move. If you don’t lower TTL and point your domain name to the new server, it will take 12 hours for the change to be noticed, and a lot of traffic will go to the old server for that period. It’s a pain in the butt for testing, so that’s why I lower TTL first.
Ordering and Prepping the New Server
You’ll need to have your old server active in addition to the new server. That means you’ll be paying for both servers for the period of time that you are actively moving your websites from one to the other. The Media Temple Guide mentioned earlier details the process; it ends up not being very expensive if you can move your sites quickly.
After you have the new server, immediately request installation of developer tools and shell access. While developer tools may not strictly be necessary, they’re handy when you want to install a few additional packages. I try to keep my server installations are vanilla as possible to keep things simple, but at very minimum you’ll want shell access through SSH, and maybe a favorite text editor if you don’t like the default-installed editors nano and vi.
If your server had more than one IP address, you can contact support and request it and Plesk Migration Manager will be able to use it. The alternative approach is to go back and change your dedicated IP to shared instead before doing the migration. This will break your SSL during the transition, however, if you had it set up.
Save Old Configuration Data
Because I’d customized my old server, I made copies of several key files, just in case I needed to check something after cancelling the old server.
/etc/passwd,/etc/group– to make sure I didn’t forget any special users or groups that I had created- password files for
.htaccessauthentication php.ini,my.ini, and other initialization files for important services, so I could compare them to the new server setup
Doing the Migration
The Plesk Migration Manager is a great help in transferring files, account names, databases, and passwords. It also will transfer the contents of /root and all stats and logs that are stored within each domain’s statistics directory. Here’s what it looks like:
Here’s the (dv) 4.0 fancy new control panel! I have highlighted the migration manager entry.
The choices for migration are simple. When you first start, you’ll get the choice to start a new migration. If you have some migrations going on in the background, you’ll see them listed here, as they can sometimes take a long time. In my case, a big site with about 3GB of data took about 45 minutes.
To start the migration, you need to provide the root access credentials to the old server. You can use any domain name that’s on that server; the migration manager will be able to see all websites created with Plesk. I also only chose to migrate parts of the server at a time (see check boxes toward the bottom); I left everything else mostly alone.
The next screen gives you the opportunity to choose which domains or clients to move. I zapped out the other websites in this listing since I don’t think people need to know everything that’s running on my server.
When you first set up a new (dv), you get one IP address that’s shared between multiple domain names. The other option is to have a “dedicated IP” address, which is assigned to one and only one domain name. This is required for security (SSL) certificates, so I requested an extra IP address before starting the migration as I needed to match my old configuration. This allowed me to assign them appropriately on this screen. NOTE: this deviates from the recommended installation instructions, and in my case was necessary because my old server’s Plesk access has been completely broken for months, and I couldn’t change it if I wanted to.
Here is the aftermath of moving davidseah.com. I had an error related to the configuration file, which I was able to fix by going into the davidseah.com vhost.conf via SSH and figuring out that I didn’t have DAV installed on the new server. I just nuked the offending settings, and clicked the link, and the migration continues to completion.
When the Migration Manager Fails
About half the sites I moved, including some very simple ones, had some small configuration glitch. My methodology was to keep two ssh windows open, one connected to the old server and the other to the new server, logged-in as root. If I suspected a discrepancy, I used tar to package up all the files in httpdocs of that site, then used SFTP to securely copy the tar file to the new server:
on old server as root
cd /root
tar cvzf davidseah-files.tgz /var/www/vhosts/davidseah.com/httpdocs/*
sftp {ip-address-of-new-server}
sftp> cd /root
sftp> put davidseah-files.tgz
sftp> quit
switch to new server as root
cd /root
cd /var/www/vhosts/davidseah.com/httpdocs
rm -fr *
tar xvzf /root/davidseah-files.tgz
Be careful with that rm command…it deletes everything in the current directory! Make sure you’re in the right subdirectory!
The migration manager generally handles the creation of users and copying of databases without any problems, except in one case when the database was so large that MySQL timed-out and reported an error. In this case, I then used mysqldump to make a backup, used SFTP to copy the backup to the new server, then used mysql to restore the backup, more or less as follows:
on old server as root
cd /root
mysqldump -u{dbuser} -p {dbname} > dump.sql
sftp {ipaddress-of-new-server}
sftp> cd /root
sftp> put dump.sql
sftp> quit
switch to new server SSH window as root
mysql -u{dbuser} -p {dbname} < /root/dump.sql
General Observations on the Plesk Migration Manager
It tends to choke on converting domain account settings and permissions from the old Plesk 8.0 in dv (3.5) to Plesk 11. This will require manual tweaking and some knowledge of both Plesk account models. The new thing in Plesk 11 is the notion of “subscriptions”, which didn’t exist in 8.0. If you have multiple domains and customers before, then expect to spend some time defining basic levels of service such as disk space, bandwidth, and other server features. You can override all this stuff for now, giving everyone lots of access to everything, just to make sure the sites work.
Plesk Migration Manager useful for moving MOST files, including everything in each domain’s
privatedirectory, but not all files in theconfdirectory (if you have added custom files there, as I did for user authentication with htaccess, they won’t be copied. Users, including web users, were transferred. Groups, however, were NOT. Anything you added to your /etc directory isn’t copied. Plesk Migration Manager will NOT move anything that’s not part of the standard Plesk setup.For very large database transfers, Plesk Migration Manager can fail with a “MySQL server has gone away”. This might be due to a timeout error. In these cases, I just used
mysqldumpand then usedSFTPto grab the file directly between servers (much faster than downloading and reuploading 2GB of data), then restoring the dump.The same server-to-server SFTP can be use to move files. If you use
tarto create an archive of all the files in your httpdocs directory, this is fast and reliable.If you have added fancy Apache directives in your
vhosts.conffile that depend on modules you added yourself, then you may get Plesk migration errors if you didn’t add them on the new server. For example, I had installed WebDAV on my old server, and the Migration Manager complained bitterly about misconfiguration until I nuked the related directives out of the afflictedvhosts.conf.
Other Critical Server Differences
I found that the (dv) 4.0 has a few critical differences that I had to understand before I could get my PHP and MySQL databases fully functioning on all sites:
I had been using mod_php before, which requires that any directories that your PHP scripts needs to write (for example, cache files or image uploads) be owned by the
apacheuser. Since the directories are usually owned by a different user, this creates something of a pickle: you have to essentially leave your front door unlocked on several directories; on my old server, I’d added theapacheuser to thepsaclngroup by modifying the/etc/groupfile, which is sort of like installing a pet hatch in your front door.FastCGI PHP, unlike mod_php, has the advantage of not requiring writeable directory hacks. Instead, PHP runs under your domain’s user account, so you can just have them all owned by that user. However, Plesk Migration Manager will retain your old file ownerships…you MUST change their ownership with a quick
chown -R username.psacln *executed inside thehttpdocsdirectory, if you previously used mod_php instead of FastCGI. This is described in this MT knowledge base article.The nginx reverse proxy server was unfamiliar to me, which is another way of serving web pages to the Internet. It’s supposed to be REALLY fast, but as configured on the (dv) 4.0 out of the box, it is not compatible with WordPress Networks AKA Multisite. I just disabled the service, letting Apache take on its traditional role as main web server. There may be performance repercussions, but it was just easier for me to disable nginx until I had the time and inclination to study it. The problem seems to be that it doesn’t handle “wildcard IP address” assignment in the Plesk control panel, and it also breaks the ability to set a default website for each IP address you have. This is a known bug at this time.
The default PHP security settings have the OPENBASEDIR option set to “default”, which can be a pain in the butt for some scripts. If you see errors where a script cannot open some file “above” it, it’s probably this. Set it to “none” or figure out what paths need to be added for extra security. My understanding is that OPENBASEDIR is not really a security panacea to begin with.
The (dv) 4 hardware platform is a 64-bit architecture, compared to the (dv) 3.5′s 32-bit architecture. This has ramifications for some MySQL database types, so if you are relying on max/minimum sizes for unsigned ints, they have changed. This affected my realtime web analytics package, Mint. Fortunately there was a fix provided. WordPress was unaffected.
The new Plesk makes some operations, such as adding options to
php.ini, a little different. For example, instead of creating a customvhost.confin your/var/vhosts/yoursite.com/conffolder, you can add them to the Website Advanced Setting / PHP Settings in the “Custom Directives” box. This is more Plesk friendly, and I imagine it will migrate with you in future moves.
Adapting to the new Plesk
As I mentioned earlier, Plesk 11 adds a new “subscription” model layered on top of the familiar domains and customers. Basically, a subscription a set of server presets that’s assigned to each domain. For example, the included “Simple Website” subscription specifies 100MB of disk storage, 1GB of network transfer, and the ability to use PHP.
Since subscriptions don’t exist in Plesk 8.0, the Migration Manager either can jam each domain into an existing subscription, or it can just assign a “custom setup”. You have to play with the website setup for the domains to get a feel for what’s available, and consult online Plesk documentation to figure out what each option does. This also requires a fairly advanced understanding of web server technology for it to make any sense.
You can create a number of subscription profiles and then assign them, though it’s not necessary. In my transition, I assigned custom setups during the initial transfer, and later created subscription packages that made sense for me.
Beware use of “the expiration date” feature, because Plesk will calculate the expiration based on the expiration + the original account creation date. For example, if your client example.com was created on September 15, 2005, and you set the length of the subscription to 1 year, it expires on September 15, 2006. You won’t see this until Plesk does its 2AM accounting, and everyone will get a “your domain has expired” email, which is very hostile. I just set everything to unlimited for now.
Plesk now has three control panels instead of one. The main ones are at https://yoursite.com::8443, and the “Power Control Panel” which manages the nuts and bolts of your server is located at https://yoursite.com:4643/. You will need the admin password you created when you first ordered the new server for the regular Plesk panel, and your root password for the Power Control Panel.
New Copy Database feature, great for cloning databases for quickbackup. However, be warned that a cloned database does NOT clone users; you’ll have to recreate them.
Previewing your Server Changes Without Changing Main DNS Records
Once you’ve moved your files, databases, and configurations for a particular domain to the new server, you have three ways to test it:
You could go to the Media Temple Account Center and change the DNS for the domain so it points at the new server IP address. However, if it’s broken it will break your website for all visitors.
A neat alternative trick is to edit your own computer’s local hosts file so only it knows about the new server. This overrides the DNS that the world sees with your new value, which allows you to see the site as if it has already be transitioned. Everyone else will be unaffected. If everything looks good on your browser, then go to option 1 and change it for real.
The Plesk Control panel has several forms of site preview, but I can never find the icon for it and it doesn’t work very well. Go with option 2.
Editing your host file on the Macintosh or Windows is the least disruptive way. Just remember it works only on your computer, and that you should remove your changes once you’ve transitioned your website completely to the new server and made the DNS switch. Be warned also that some browsers do additional caching of DNS entries (Chrome, for example), so you will need to disable “DNS pre-fetching” or “network optimization” in the advanced settings, somewhere.
Optimizing and Tweaking the Server
I disabled a few services from autostarting, because they’re not needed. This performance tuning article is helpful in getting started.
To disable additional services, you can dig into the etc/init.d directory and chmod 644 any startup scripts you don’t want running. You can also do this through the Plesk Power Control Panel, but I find the chmod approach easier. I disabled the following scripts:
- named – this is the local nameserver service, which is totally unnecessary
- spamassassin – since I don’t receive mail on this server, I don’t need this very resource-hoggy service running
- psa-spamassassmin – this is the Plesk version of spamassassin, which I didn’t notice before
- nginx – this is the front-end web server
Before applying the chmod 644 to these scripts, you first want to shut them down (if they are running, which you can check with a ps aux or by running top) by typing:
/etc/init.d/named stop
/etc/init.d/spamassassin stop
...
…and so on. Then, apply the permission change with chmod to prevent them from ever running again.
Simple Transition Monitoring
I let the both sites run for two weeks afterwards, to make sure that everything was working properly. By keeping the old server up, I had the ability to go back and check its configuration files to see if there were any differences.
I also kept top running in a terminal window during the transition test period, watching memory usage and looking for anything weird. Here’s an example of what I look for:
The yellow line at the top shows the overall memory usage. The number that concerns me is the memory free line, because if it dips below 50MB (it’s around 940MB here) then the server is in danger of running out of working memory, which will result in a massive slowdown. The key variable that contributes to memory use is the number of people browsing webpages on the server, which includes not just visitors to davidseah.com but also the other 20-odd websites.
I’ve highlighted the three main users of memory on my system:
Purple shows the number of Apache webserver processes. Every time a web page or image is requested, there is a “httpd process” that is serving it. Each httpd process takes up about 20MB on average, and the number of them is determined by how many requests are active at the same time. For a site like mine, not very many people are hammering my website unless some larger news site links to it, so this “peak usage” must be accounted for if I don’t want my server to go down during extreme traffic events.
Green shows the memory of of MySQL processes, the database server that helps power the dynamic websites on the server. These numbers don’t change often. My server actually runs two MySQL instances, because I’ve isolated the davidseah.com database from the other sites to see if it helped performance. It doesn’t really, so I may switch back to the single instance. Here you can see around 245MB is used by both MySQL instances.
Blue shows the memory use by PHP running as a FASTCGI module. Each PHP process runs PHP scripts that power dynamic web pages with MySQL, and this number rises and falls as well with the number of simultaneous web page requests at a given time. It’s closely tied with the number of active Apache processes (purple).
There are some other memory resources that aren’t shown by top (interprocess communication buffers, for example, which is a limited resource). You can see those by going to the Power Control Panel and looking at the Quality of Service (QoS) Alerts.
To tune my server, I need to check a few configuration files:
The Apache Configuration, particularly
MaxServersandMaxClientssettings. In the past I’ve found MT’s recommended settings to be overly aggressive, failing completely under extreme server load, so I use my own recommendations to avoid exceeding my guaranteed memory allocation. Running out of memory, at least in the past, exactly a much greater performance penalty than making a web browser wait a few seconds more. I have yet to really test this, though. The pertinent configuration file is at/etc/httpd/conf/httpd.conf; don’t forget to/usr/sbin/apachectl restartor/etc/init.d/httpd restartto make the changes take effect.The number of FastCGI PHP processes can be limited as well, though I haven’t had any practical experience tuning this. The pertinent configuration file is located at
/etc/httpd/conf.d/fcgid.conf. This article on fcgid installation and tuning is worth studying.
Tuning is an ongoing process, and optimizations at the website and software level can yield large gains in performance. What I’ve described here is the basic approach: know how much memory your critical web server processes are taking up, and make sure that they don’t run out of memory in extreme conditions. You can slim down the processes themselves with clever configuration and other software optimizations.
Back to Business
After working out the aforementioned issues with server configuration differences, everything is working smoothly, and I’m ready to turn off the old server and let things go. I really do like the (dv) setup. There may be a few extra configuration tweaks to make; it might be nice to learn how to configure nginx to see if I can lower the average memory use of the server, but in the meantime everything appears to be working fine without it.
The (dv) 4.0 continues to offer me a good balance of cost, performance, control, and ease of configuration…the next step up is a dedicated server, or perhaps some cloud-based approach. There are a lot of other companies offering similar hosting packages that I’ve been intrigued by, but they seem to be smaller players and I don’t really want to change my hosting if I can avoid it…as you can gather, it’s kind of a giant pain in the butt! I’d rather just let it run and not think about it :)
For a while, I’ve wondered what all the difference Amazon cloud computing services were. With unfamiliar jargon and technical hyperbole, I came to believe that it was an entirely new way of thinking. It turns out it isn’t, thanks to this primer on amazon web services on Ars Technica. A virtual machine is still a virtual machine; it’s just called an “instance” in Amazon parlance. Short and sweet, the article just made cloud computing more accessible to me.
I’ve been wanting to replace Skype with something else, so I thought I would dust off my old GrandCentral / Google Voice account. I couldn’t get it to work at first and shelved it. In the meantime, I posted the number online and only recently received a few calls, which I promptly missed.
Skype, despite its bloated user interface, works fairly well out of the box once you figure it out. The paradigm is familiar: click a name to call, or find the latest hiding place for the “call phones” keypad. Google Voice, however, is a bit different.
First of all, there are actually three voice-enabled products. Google Voice is the one that handles the telephone call connections. Google Talk is a voice enhancement of Google Chat, an instant messager (IM) client that runs like a normal desktop application. Finally, Gmail has the ability to send and receive calls, in addition to serving as your browser-based email client.
Google Voice works with GMail to place calls. Instead of connecting from your computer to the phone number, Google Voice is like a switchboard operator that sets you up with a two-person conference call. You initiate your call to a number with Google Voice using the Google Voice web page, and then Google Voice calls YOU back to make the connection. Once you answer the phone, Google Voice then calls the phone number you’re trying to reach.
To make a call from your computer, then, you need the ability to answer the incoming call. Google Voice allows you to designate “Google Talk” running on your computer as the “phone” it will call. You may have it installed as a desktop client, as it works as a messenger client. However, Google Talk does not answer calls if you have Google Voice open on your computer. However, if you also have GMail open, you will get a ringer alert there. Once you answer the Google Voice call with GMail, you are connected and the other phone number is dialed, and things proceed rather well from there.
It’s very weird and convoluted. It may be that Google isn’t interested in creating and easy point-to-point calling solution that works completely on a computer like Skype, but it may also be typical Google disorganization with regards to their family of overlapping solutions, additionally hamstrung by the lack of concise, well-curated documentation.
In summary, to set up you need to:
- Signup for Google Voice with your Google account
- Set up Google Talk account, if you don’t already have one
- Register Google Talk as a Phone in Google Voice
- You may have to make an outgoing call first in GMail to activate the calling feature
- You may have to add credit for dialing numbers outside the United States/Canada
Then, to make a call:
- Open Google Voice in a browser window
- Open GMail in a separate browser window
- Use Google Voice to place the call to a phone number
- Use GMail to answer the Google Voice connection, which will then proceed to call the phone number
To receive a call:
- Google Voice will attempt to ring all your devices registered to it, and it will do so all at the same time
- If Gmail is not open in a browser window, I presume that the Google Talk IM client will pick up, but I’ll have to test that.
Although this is a lot of hoops to jump through, the Google Voice product is technically pretty good. Call quality is good for me, and the voice mailbox and transcription services are cool. It’s nice to get an email when you get a voice message.
A friend of mine reported this problem:
“You see, my external hard drive has just kicked the bucket…with all my files still on it. It randomly started making a clicking noise. It will no longer connect to any computer for longer than 40 seconds. I’ve gone around to a couple different places to see what they could do without sending it out for it to be taken apart to retrieve my data.”
I received the drive already removed from its IOMEGA 1TB enclosure. The drive was a regular 3.5″ 1TB SATA drive.
Low Level Disk Recovery
The first step was to stuff the drive into a bare PC rig and run Spinrite 6 on it. Spinrite is a hard drive utility written by Steve Gibson, an old-school assembly language programmer whose relationship to computers is similar to the way a master swordsmith relates to steel. Spinrite fixes any problems it finds at the very deepest level of the hard disk, below the operating system layer, so it works both for Macintosh drives as well as PC drives. It is very highly regarded. However, it only runs on PCs, not Macintoshes, so if you’re a Mac user or are a PC user that doesn’t have an extra throwaway PC lying around, you are out of luck; there is no comparable software for the Mac that goes as deep as this. Best bet: make friends with your local PC tech! This thread about disk recovery on Macintouch, while old, still gives useful information about the use of SpinRite with Macintosh hard drives.
After a 4.5 hour run at level 2 “data recovery” mode, Spinrite found no unreadable sectors. The drive was, as far as level 2 scanning was concerned, just fine. Furthermore, I didn’t see any signs of disconnecting or hear any weird clicking noises.
MacOS X Disk Utility
I booted up my MacBook Pro and used a USB SATA connection kit to connect to the drive. It mounted (appeared) on the desktop just fine.
Next step was to do a VERIFY DISK operation on it with Apple’s Disk Utility program. Disk Utility can check whether data on the disk is organized as expected. Every disk drive in a computer has data on it that describes how it is organized. Files, for example, have file names and other properties, and these are all put into an index that is stored in addition to your data. If the index gets corrupted, then the operating system can’t find files anymore. The data is there, but the pointer to the data is gone.
After a few hours, Disk Utility reported a minor problem (volume size mismatch), which it reportedly was able to repair. There were no other errors at all. I returned the drive to its owner to try to copy the data from it.
If Disk Utility had reported significant problems, then I would have had to purchase a utility like Disk Warrior to do a more comprehensive disk recovery. Unlike Disk Utility, which can only make minor repairs to an existing disk index, DiskWarrior looks at the hard drive like a giant jigsaw puzzle and attempt to reconstruct a new disk index from scratch through smart analysis of each sector and figuring out where it should go. This is a time-honored technique.
As I was not familiar with the current crop of Macintosh disk utilities, I looked for insightful commentary:
One non-technical computer user tried all five major repair tools: DiskWarrior, Drive Genius, Data Rescue, and Techtool Pro. Unfortunately, his experience did not have a happy ending. His despair, however, is our gain: he describes the difference between each tool, as he learned by trying out each one.
Old-school Macintosh user and tech writer Ted Landau writes about the fading-away of disk utilities in today’s marketplace. The comments provide additional insight into the use of each tool.
My assessment at this moment is that DiskWarrior is the program to buy, to be used after running Spinrite 6 on the drive on a PC. Like Spinrite, DiskWarrior is a single-purpose tool designed to repair the disk indexing structures. However, it does not fix unreadable sectors on a disk; that’s what Spinrite does. The combination of the two should be powerful enough to handle any data recovery situation where the drive is still physically operating. The other programs mentioned–Drive Genius, Data Rescue, and Techtool Pro–appear to be more like Swiss army knives, and are sold with dozens of functions that have more to do with broader disk management and general computer maintenance.
The mystery, however, is why Spinrite detected no errors and Disk Utility reported only a volume size mismatch. This is a non-critical error, akin asking someone how much money they have in their wallet and getting an answer that is a few pennies off. It should not have caused the clicking and disconnection problems reported.
Diagnosis?
As I mentioned, the disk itself was received already removed from its enclosure. Since the disk worked fine in my PC rig through the SATA port, and mounted without trouble on my Macintosh via a SATA-to-USB adapter, that means that it’s probably the enclosure itself that is faulty. There are two major components other than the disk drive itself: the logic board and the power supply.
Unless there was some kind of electrical surge event, every single external hard drive enclosure I’ve owned since 1994 has failed due to the enclosure. The symptoms: the drive works intermittently and shuts down unexpectedly, or disappears from the operating system while you’re trying to use it. The drive itself is fine, so transplanting either the power supply or putting it in a new enclosure (which includes a new power supply) has worked. I haven’t been able to find references to “power supply degradation over time”, so I’m not sure how much of my experience is coincidence, but practically speaking I’ve had good luck swapping the drive with a newer power supply or enclosure.
As my friend had already purchased a new external hard drive, I didn’t bother to test the old enclosure by putting the drive back inside. However, I did check to see whether Iomega sold replacement power supplies (they are external AC-DC adapter “wall warts”), and they do. He may test the enclosure with a different power supply to see if there’s any difference. He’ll need to match voltage, current, plug and polarity.
Tools Mentioned
Software
Spinrite 6 – PC ONLY commercial software. Use for low-level data recovery/repair before doing anything else, as this verifies the physical data integrity (“whether data can be read or not”) of the disk. Requires a PC that can boot from either CD or floppy disk into FreeDOS. Although Spinrite 6 was last updated in 2004, it works with any hard drive in a PC that can be accessed from DOS. To use it, you must plug your hard drive into the computer, and then boot the Spinrite CD or diskette. It takes about 4 hours to scan a 1TB disk with no errors. If there are many errors on the disk, the scan/repair time can be measured in days; the software shows you the estimated time to completion. Price: US$89.
Disk Utility – Available in your Mac’s Utilities folder. Run DISK VERIFY on the Spinrite-recovered disk to ensure that the logical data integrity (“whether data is organized correctly”) is OK.
DiskWarrior – Commercial software that is highly specialized in fixing scrambled Macintosh hard drives, and nothing else. Doesn’t handle recovery of unreadable disk errors, so you would use Spinrite for that first. It’s possible that other Mac software such as Drive Genius, Tech Tool Pro, or Data Rescue can do that, but it seems unlikely that they are a match for Spinrite’s low-level approach. Price: US$99.
Hardware
Handling a Hard Drive Safely – Once you have removed a hard drive from its enclosure (be sure to handle it carefully to avoid damage). A drive that is outside of an enclosure or case is called a “bare drive” (as in naked).
SATA or PIDE – You need to see what kind of hard drive you have. Drives manufactured between 1990 and 2006 are probably going to be IDE drives. Such drives are described as ATA, PATA, or PIDE. They have a wide ribbon cable that plugs into the back, with a 4-prong power blog. Most drives today use SATA connectors, which are a lot smaller.
Hard Drive to USB Adapter – This is a device that allows you to temporarily connect a bare drive (either SATA or PIDE) to your computer through a USB port. There are many, many cheap kits on the market, but this one from the venerable Cables to Go gets high marks for build quality. I like that it also has an additional power switch. When you use one of these, you should be careful NOT TO MOVE THE DRIVE while it is operating, unless you really want to trash it permanently. You should also carefully power it on and off as you would any external drive. Price: About US$20 for the Cables to Go version, US$10 for the cheap-o versions.
Hard Drive Dock – Unlike the adapter, a dock allows you to plug a bare hard drive into a slot like a toaster. They’re useful if you like using bare drives for backup purposes. This is an option, generally speaking, only for SATA drives. If you have an older PIDE / ATA drive, then you need to use the adapter. Like the adapters, they plug into a USB port. If you are transferring data between bare drives, you might find the dual slot dock version more useful. Price: Between US$40 and US$80.

