PDA

توجه ! این یک نسخه آرشیو شده میباشد و در این حالت شما عکسی را مشاهده نمیکنید برای مشاهده کامل متن و عکسها بر روی لینک مقابل کلیک کنید : چگونگی تنسفر یک سایت از یک سرور به دیگرب بدون dowm time



Vahid
August 7th, 2008, 00:19
At one point sooner or later you will have to move a website from one server to another. In the good ol' days you would copy the site to the new server, change the DNS server information at the domain registry and pray that the DNS update goes through fast. In the mean time you would check email via IP address on both servers hoping not to loose any important messages. You even had more concerns when having a website with dynamic content.

Well, there is an easier way to move a website with almost no downtime - depending on how much control you will have on the new server and about DNS. Our quick and easy guide will help you to move your site between servers as quick as possible. This guide has been written for Cpanel servers but in general the steps described should work similar on other platforms.

Let's get started:

1) Create the domain account on the new server. Either create it manually or use the "Move Account" feature in WHM
2) Copy the files and data over and test everything for functionality. Do not worry too much about dynamic data yet
3) Gon into the DNS management on the new server and change the IP address for all records to the IP address of the existing domain account on the old server. Record the IP on the new server first before doing this. You will need to change it back later on.
4) Go to the domain registry where the domain that you are moving was registered. Change the DNS server settings to reflect the DNS servers of the new server.
5) Go back into the DNS on the new server and change the TTL value to something like 120 or 180.

Ok, what have we done so far? We created the basic account on the new server. We changed the IP address on the new server to point to the old server and we changed the DNS servers for the domain. And we changed the TTL (Time To Live) value to a much lower number. What will all this do for us? The changes will allow us to turn the website on the server live almost immediately when considered functional. No DNS Server change is required anymore.

6) Let's wait 24-48 hours for the DNS Server change to go through at the registry level. Meanwhile the site is still fully functional running on the old server.
7) If your site has only static data and nothing has changed on the old server compared to when you created and setup the account on the new server, then you're good to go. If your site has dynamic content or files have been changed since the account has been setup on the new server - - continue with step 11.
8) Retrieve all emails from the old server. Go into the DNS and change the IP address for that domain back to the new IP address.
9) On the old server create a redirect to the new server by using the IP address.
10) You're done. The site has been moved to the new server. Wait about 1 day before closing the old account. Change the DNS TTL value back to its original value.

11) If your website has dymanic content you will need to add a few more steps to move everything and to turn the site live on the new server. For this scenario we assume that you have a database (moderate size (50 megs) to move). Very little downtime will happen in this scenario. We are talking about 60 minutes or less - depending on the amount of dynamic data that needs to be moved.
12) Create a database dump on the old server and move it over to the new server. Get it uploaded into the new database and verify functionality. You should ftp the data from the old account directly to the new server and avoid download to your computer first and then uploading again. If all works you are ready for the actual move / turnover.
13) On the old account place a non-dynamic page - explaining a short downtime. Do the same thing on the new server.
14) On the new server change the IP address for the website to the new IP address.
15) Create another database dump and ftp it over to the new server and load it into the database. Test functionality.
16) On the new server remove the static parking page - your website is now live on the new server. Go to the old server via IP address and setup a redirect to the new server via IP address. On the new server - change the DNS TTL value back to its original value.

You're done.

Your website has now been moved to the new server with small or no downtime at all. You will not need access to the DNS on the old server at all. This comes in handy if you do not have control over the DNS at all or do not want anyone at your old server or reseller account provider realize that you are moving.

This guide might not cover your situation or might require a dry run. Please make sure you understand each step and realize what each step does. If you do not feel comfortable doing it this way - do it the old fashion way that you know.