Archive for August 2013

Migrating web hosts.

I’ve migrated more web hosts then I care to count yet it seems to remain for the most part a mystery and magic trick to migrate a hosted web service ( in this case I’ll stick to general web hosting ) from one server to another without fault or downtime.  In other-words a seamless migration.

I recently migrated a miscellaneous handful of web sites and associated services from GVO (Possibly the worst hosting company I have ever worked with) to Site5 (reasonable, affordable, simple hosting).  Here’s how I went about the seamless transfer.  In this case both hosts had cPanel & WHM however due to the websites on GVO being setup as add-on domains rather then standalone accounts I wasn’t able to just backup the whole picture in a single file and publish it to the new server.  The intent was to properly setup each domain as it’s own account (grouping some domains within a single account when it made sense to do so)

Logically the whole operation breaks down to individual domains or sets of domains most often simply redirecting to a single primary domain.

Information & Resource Gathering

Identify the Domain’s Registrar, owner and management credentials or the person responsible for managing (paying for) the domain name itself. This might be Godaddy, NetworkSolutions, etc. This information is easily sourced through a WhoIs Query.

Identify the Domain’s Name Servers and again, source the management credentials for the Name Server Zone File. Name servers are NS1.SOMETHING.COM and NS2.SOMETHING.COM and so on.  This information can be sourced from the Whois data as well. Managing a domains Zone File is often done within the existing hosting account’s control panel.

Review the domains Zone file.  Grab a copy of it even.  It’ll reveal all the sub-domains, redirects, mail server exchanges & so on.  These are all the items you’ll want to make sure migrate properly if necessary.


^^ simple zone file records ^^

Simple (standard?) web hosting can be broken down in to three primary elements.

  1. Files
  2. Database(s)
  3. E-Mail System

Files can usually (simply) be copied from the old server to the new server.  Keeping the file permissions in tact during the transfer is healthy otherwise ya end up with file upload folders like you find in WordPress that no longer allow files to be written to them.  This can get especially complicated in old school LAMP environments where apache runs as a single user. This is however this is not the case in most windows environments.

FTP User Accounts – Sometimes a client will have multiple FTP user accounts for various reasons – don’t overlook them.   Occasionally I’ve run in to situations where clients (or I) have setup automatic backups over ftp/sftp both to and from the web host.  Identifying the things you’re going to break before you break them is always handy.

Databases are another simple acquire -> post situation.  Given phpMyAdmin or MySQLDump just export the databases from one entity and then import in to the next.  I create new username/password combinations for simple websites and CMS systems like WordPress,etc. If for whatever reason you are unable to duplicate the previous hosts database name, user name and password you’ll want to update the configuration files for the website if it did make use of a database resource.   A last note on databases: It’s been a few years since I’ve seen any issues migrating from one database version to another but it’s still worth noting that if you’re migrating between different DB versions (such as MySQL 5.7 and 5.8) – be prepared for problems. Try and upgrade the old database or import and update the data before trying to import between database versions.

Consider purging the junk – It’s easy to simply copy all databases to a new host.  It’s prefer to not let the clutter and waste build on web servers.  I always think in the back of my head that eventually some old unused piece of code or database entry will be used to exploit something so it’s best purged when possible.  In most cases it’s not necessary but if files and content are not being actively used then their only real use becomes the target of exploits.

E-Mail systems are (in my opinion) best operated outside of the web hosting environment but since email hosting comes as part of the standard package of web hosting you’ll often find e-mail accounts and the mail exchange are all on the same machine.  I’ve been a fan of Google Apps for Business for my own e-mail which requires no changes during a host migration – just remember to maintain the same MX entries in the domain’s Zone File.

Setup the New Host

Matching the existing setup – configure the new host environment.  Transfer files, Databases, E-Mail accounts, etc.

To ensure no changes are made to the files and database (CMS content) on the old server while setting up the new be sure to disable any login systems, FTP accounts, etc.

After I think I’ve got everything setup on the new server properly but BEFORE updating any DNS, NS or otherwise making the new host live I add an entry to the Zone File on the old server or Name Server management resource that points to the new host and begin testing the environment with a subdomain of the existing domain. I also add the same detail to the new host just for the sake of consistency.  This is generally enough to test most CMS systems with little trouble.  While I’m making updates to both the old and new host’s Name Server Zone File configurations I also add a subdomain (A) record targeted at the old host.  It’s come in handy a time or two. In this case

  • (A)  =   IP.Address.of.New.Host
  • (A)    =   IP.Address.of.Old.Host

Now – after doing as much testing as possible, get someone else to review what you’ve done.  Generally speaking the customer or client is not a good target for this task.  Just !ping another tech with whom you share system administration tasks, resources, and so on.  A quick review isn’t much to ask and will help make sure that nothing blatantly obvious was overlooked.

While your work is being reviewed setup some simple automated backups.   Don’t rely on your host in any situation as the sole overseer of the content you rely on them to maintain.  I’ve played every role there is from managing simple reseller hosting accounts to maintaining dedicated, collocated & self hosted servers and in the last 12 years I have seen catastrophic failure twice.  The first time – there were no backups outside of the host that crashed and I lost years of resources so no matter how wild or far fetched a failure would have to be to truly atomize everything beyond any capacity to recovery it – it can and will happen.  Prepare for it!



Update the domain name Zone File primary (A) record to the new server & then update the DNS entries of the domain at the registrar to the new site.

…and test. test. test.  Everything should be green – bring on the client to verify every page is perfect.  Run a link checker, monitor system logs, etc.  I use UptimeRobot as a 3rd party resource to see if my sites kick rocks outside of my own monitoring.  If you seamlessly migrated from one host to another then none of your uptime monitoring tools should have complained.  Further – google webmaster shouldn’t complain either.

I’m sure I skipped a bunch.  I’ll add it as I realize what those things are.


My Girlfriend is a Hacker…

The definition of ‘Hacker‘:

A “computer hacker,” [then,] is someone who lives and breathes computers, who knows all about computers, who can get a computer to do anything. Equally important, though, is the hacker’s attitude. Computer programming must be a hobby, something done for fun, not out of a sense of duty or for the money. (It’s okay to make money, but that can’t be the reason for hacking.)

~ Brian Harvey (University of California, Berkley)

The fact that Zahira is an amazing tech has been obvious for quite a while however it really set in yesterday as I walked past her desk.  On it were the following things:

  • an iPhone 3G displaying what looked like a linux console.
  • a 21″ LCD extending the desktop of a Dell [model] laptop running Ubuntu Linux (BackTrack) testing our Netgear WNDR3700v2
    • After disabling WPS on the wireless router it seemed to advertise that it had WPS enabled.
  • a Dell i5105 running Linux Mint Cinnamon x64 – Her favorite Operating system second only to OSx Mountain Lion.
  • a 27″ iMac w/Terminal, Google Chrome, iTunes & the Console [log viewer] app visibly running and Synergy operating in the back ground allowing her to use the iMac’s Apple keyboard and trackpad seamlessly across all three devices.
  • an iPad leaning against it’s protective shell displaying a paused YouTube video.
  • an iPhone 4Gs in an Otter-box minus the rubber external shell so it fit in the iHome doc.

Seeing Z surrounded by linux and an an android icon laid over a CLi on the phone brought it home.  As long as I’ve known her Z’s demonstrated the same attitude toward tech which is essentially and very simply being intrigued by virtually every tech ‘thing’.

What I really enjoy though is the awesome moments of revelation when something she’s been working on -clicks- and all the dots come together.  I love helping everyone with their technical issues but it’s been quite a while since I’ve seen the glow of self gratification after all the research comes together and she figures it out.  It’s nothing short of inspiring. ^_^  It’s awesome.  And of course she’s always working on something cool while we progress through the actual IT ‘work’.

For example:

There’s a Dell D630, Dell E6400 and a Toshiba Satellite A135 S7404 sitting in my office right now running OSx.  A couple months ago with a couple hard drives in hand and a bunch of support tools she set out to install Mac OSx on every PC she could get her hands on. hehehe.   Then as if to contrast the situation: she helped me prepare, develop and use our “install anything” network boot environment which has since been used to deploy our own highly customized versions of nearly every Microsoft operating system on any device that supports PXE booting.  Perhaps the icing on the cake i that most all of the really interesting projects get reverted and undone shortly after their launch due to some reason or another – often times simply the lack of appropriate licensing but that never derails the completion of the project.

I believe her iPhone 4Gs, iPad and iMac are currently running stock iOS ^_^ and according to the network management resources on our gateway – her iPad and iMac (in that order) are not only the 1st and 2nd largest consumers of bandwidth on our network but those two devices alone out-weigh all the other devices on our network combined.!.  She consumes and retains information like it’s easy. lol

According to our logs – I’m a wierdo with a secret lust for ad networks and tracking servers while Zahira has watched all of YouTube a couple times. Which brings about my last major note for this post.  I am perpetually blown away by how good she is at not only researching and finding information that leads to logical answers but in the same effort of digging for information she makes it seem effortless to bring it all back and put it together in writing that she publishes for others (and myself) to consume. No matter the topic she produces the most amazing results.  When we were re-structuring TechnologyBytes business model she produced an intense Employee Handbook and business brochures.  While developing Think Smart, Inc as the Marketing director during startup phase she created quite literally everything from the logo, Mission Statement, Investor Presentation, business plan, marketing plan, brochures and many more marketing pieces.  All while proactively managing her own web presence, maintaining all her sites and writing all the original content.


Zahira, You’re amazing.  You’re pure inspiration and I’m blessed to be graced with your presence every day in and day out!  Thank you so much!  I love youl <3


A couple sites Zahira actively maintains:

A couple social profiles for the real Zahira Schmidt ^_^