Posts Tagged ‘backup’

Server Rack
3 June, 2013 — Hosting, Tech

How To Transfer / Migrate cPanel Accounts With No Downtime

Before The Move

Before we even think about moving accounts we need to think about a few other things that need sorting first.

Purchasing A New Server

First things first, if you haven’t already you need to have your new server set-up, have cPanel installed, installed your Firewall and then leave it… just leave it for 4-5 days. This is so you can make sure a. the server is stable and b. the new companies network is stable. The last thing you need is to move all your accounts over and find out the new network is rubbish and your server crashes every five minuets.

Update DNS TTL (Time to Live)

This step has to be done 48-72 hours prior to migration. Changing the TTL (Time To Live) from 14400 (4 hours) to 300 (5 minutes) means that as soon as we make a change to a DNS zone, it will take affect everywhere within 5 minutes as opposed to 4 hours.

To do so you need to run the following commands in your SSH console.

mkdir -p /backup/named-baka ; cp /var/named/*.db /backup/named-baka
perl -pi -e 's/\$TTL 300/\$TTL 14400/g' /var/named/*.db

Once you have done this its just a waiting game… Leave it for a while just to make sure its populated though out the world (24 hours).

Migration Day

Once a day has gone by its d-day… The day of migration. First we need to stop all services on the old server other than Apache and MySQL (to avoid loosing any emails or files people upload) You can do this by running the following commands in SSH

/etc/init.d/cpanel stop
/etc/init.d/exim stop
/etc/init.d/pure-ftpd stop;/scripts/ckillall -9 pure-ftpd;/scripts/ckillall -9 pure-authd
/etc/init.d/proftpd stop

Let The Copying Begin

After that login to WHM on the new server as root then do the following steps:

  1. Click on “Copy Multiple Accounts/Packages From Another Server” (under Transfers)
  2. Fill out the old server data
  3. Select the accounts to transfer
  4. Start the transfer process (this can take some time)

Update DNS

Once the transfer has finished make sure everything is copied across ok and nothing is missing, if you run into any trouble comment below and I will try to help. Once you are happy everything is there SSH into the old server and run the following commands:

mkdir -p /backup/named-bak ; cp /var/named/*.db /backup/named-bak
sed -i 's/[OLD_SERVER_IP]/[NEW_SERVER_IP]/g' *.db
/etc/init.d/named restart

The above commands first make a backup of your DNS databases for each account. Then goes through all of the accounts and updates the DNS records from the old IP to the new IP forcing the DNS servers to send all traffic to the new server! (note this can take anything from 15 – 60 minuets to take effect).

For sites not on a shared IP you will need to edit these DNS records separately to reflect the new IP. Well Done! – All the websites are functioning on the new server, now transfer your Nameservers! Don’t forget to give it 48 hours for the DNS to settle down. DNS can be a pain and take longer to update than other peoples DNS its all different. Once you have waited 48 hours you can shutdown your old server and cancel your account with that host you couldn’t wait to leave!

Resellers?

Note: If you have resellers, we have to copy all the files in /var/cpanel that reference resellers and anything ending in .accts to the new server.

Photo By: Getbutterfly

Amazon Web Services
30 April, 2013 — Development, Hosting, Reviews, Tech

Amazon S3 Review 2013

Below is my Amazon S3 Review for 2013.

What is Amazon S3

S3 stands for Simple Storage Service and is exactly that. S3 is storage that is located in Amazons large data centres across the world, designed to make web-scale computing easier for developers. Amazon S3 provides a simple web services interface that can be used to store and retrieve any amount of data, at any time, from anywhere on the web.

I was sceptical when I first started looking into S3 as I didn’t believe it was as cheap as people said it was. After using it for the past 4 months I know now why people love it! The clue really is in the name “Simple”. The user interface is easy to use and is clean, the pricing again is simple and easy to understand. Keep on reading below, where I will go into more detail about why I love S3.

Amazon S3 Dashboard

Amazon S3 Dashboard

S3 Pricing

S3 operates on a basis of paying only for what you use, with separate fees for storage and data requests. The fees break down as follows:

Storage

5GB FREE (for the first year), then $0.095/GB per month (100GB = $9.50)

Data Transfer (Upload)

$0.00/GB Yes FREE for the first 1TB of data

Data Transfer (Download)

$0.00/GB Yes FREE for the first 1TB of data

PUT, COPY, POST, or LIST Requests

$0.005/1000 Requests

Find out more about the prices here.

No-one can really argue with these prices, and yet Amazon keeps dropping there prices! Only a few years ago S3 storage was priced at $0.15/GB and people thought that was cheap, now with it at an all time low of $0.095/GB people are wondering just how cheaper it can go.

Glacier

I know this is an S3 review but I wanted to bring your attention to a similar service as part of Amazons Web Services and almost a brother to S3 – Glacier.

Glacier is one of Amazons other 25 web service products that is designed to be used for large amounts of data you want to archive away and not touch very often. This is known as Cold Storage. This is because the data is stored deep inside Amazon’s servers where you know its safe but unlike S3 you have less of a need to keep dipping into your data. If you suddenly have the need to access your data you can, however it takes anywhere between 3 to 5 hours to retrieve your data from the Glacier servers. Almost think of Glacier like storing something in a freezer for years until that one day when you need it and you have to wait for it to defrost before using it.

Amazons Glacier’s pricing is as little as $0.01 per GB / month!

Conclusion

Its very hard to find something wrong to write about Amazon S3 because its just so easy and simple to use. You know how much your bill will be at the end of each month and you know the bill will be lower than you think it will be (I know I did). I even managed to not pay a penny for 3 of the 4 months I have been using S3.

Give Amazon S3 a go, I think you will be surprised.
If you already use S3 or any other often Amazon’s web services I’d love to hear your experience.