.

De périodes d'indisponibilité! Seamless site / blog Move - VPS Bible n ° 19

English Anglais (changer)
  • Digg
  • Twitter
  • Technorati
  • del.icio.us
  • Facebook
  • MySpace
  • Reddit
  • StumbleUpon
  • LinkedIn
  • email

Set Up VPS Unmanaged (4 Newbies) - Partie 19: Moving Day! Comment faire pour déplacer votre blog ou site

serveur rack image

Migrer votre site web ou blog à un nouveau serveur avec très peu de problèmes ou d'inaccessibilité. Ce guide suit une procédure de réinstallation prouvée.

Quand j'ai déménagé mon site de mon hébergeur partagé à mon VPS flambant neuf à linode, cela a été une préoccupation pour moi, d'autant plus que j'avais une base de données en constante mutation. Récurer le web, j'ai trouvé quelques instructions mais rien ne peu approfondie, et pas de tutoriaux qui m'a donné confiance. J'ai donc demandé au Forum linode, et le processus de tracé ci-dessous est une récapitulation de l'avis donné par les gens de genre là, avec ma propre expérience.

Configuration d'un VPS Unmanaged (4 Newbies) .. Le VPS Bible

En 20 un copier / coller des mesures .. de zéro à héros, case vide de cute-en tant que serveur Linux.

Faites défiler la liste pour l'indice de la série complète.

So, hey, remise partagé & viva virtuel! Hope it helps. The_guv

.. Ainsi, par ce processus, vous pouvez remercier linode utilisateurs du forum btmorex, Lykaon, kirbysdl et hybinet.

Ce guide se réfère à un partage de déplacer les VPS, mais peut être appliquée à n'importe quel serveur-à-move serveur.

First up, Self-Service

NE DITES PAS D'ACCUEIL DE VOTRE ANCIEN que vous envisagez de déménager.

Inscrivez-vous avec le nouvel hôte Web d'un

Si vous n'êtes pas sûr du type d'accueil vous avez besoin, VPS Bible Partie 1: VPS (Virtual Private Server) vs vs partagé Dédié vous aidera à choisir.

Si vous allez la route non géré VPS, lisez cette bible de la tête aux pieds. Si vous ne sont pas gérés, pour le reste de ce guide, je vais supposer que vous avez construit votre boîte. En commun, géré VPS ou dédié, votre boîte est construite de toute façon, nous allons donc sauter sur.

Créer des enregistrements DNS

Fondamentalement, ces indiquer à un serveur pour trouver un nom de domaine.

Si votre nouvel hôte ne permet pas la configuration DNS, c'est assez pauvre. Sinon vous êtes avec un serveur partagé, auquel cas vous trouverez ce que vous payez. Pour ceux qui peuvent réaliser des requêtes DNS administration ..

Ajouter des enregistrements DNS dans votre panneau de contrôle afin, par exemple, avec linode ou Slicehost que cela est fait dans le Gestionnaire DNS. Vous pouvez vous référer à la Bible VPS Partie 9: Ajouter une zone de domaine de votre VPS pour plus de détails et une vidéo explicative. Tout donner un TTL très faible (Time To Live) valeur. Si vous avez des MX ou autres enregistrements DNS de votre hébergeur actuel, reproduire ces.

Ne vous inquiétez pas, cela ne fait pas de résoudre votre nom de domaine vers le nouvel hôte prématurément, mais ne le préparer à la migration.

Twin L'ancien site ou blog

Dupliquer votre site ou votre structure de fichier du blog sur le nouveau serveur, créer et lier les bases de données et d'importer vos données à l'intérieur.

Site Web & Blog setup Resources

La plupart de ces tutoriels ont guides vidéo ainsi que le copier / coller how-to. Note: certains sont Nginx-centrique, mais c'est généralement considéré comme le serveur web le plus efficace de toute façon.

Modifier le fichier Hosts pour Test Site ou blog

Haut de truc, ça. Vous pouvez modifier un fichier sur votre PC pour rediriger votre URI pour le nouveau serveur, juste pour vous. Ceci n'affecte pas le site d'origine, ni sa circulation générale (sauf si elles ont changé d'hôte de fichiers aussi!)

Windows

Goto mon c:> Windows> system32> drivers> etc et les hôtes ouvert avec un éditeur de texte.

Linux

Goto etc> et les hôtes ouvert avec un éditeur de texte.

Mac

Je ne sais pas. S'il vous plaît laissez-moi savoir!

Vous saurez que c'est le bon fichier, car cela va avoir une entrée ou deux comme: --

127.0.0.1	localhost

... and that is the format you want for the new lines you have to add to the file. So add something like:-

12.34.56.78  domain.com
12.34.56.78  www.domain.com

... swapping the IP for your new IP, and the domain for yours.

Upon saving the file, when you surf to domain.com, instead of taking you to your old server, it will take you to the new one, and you can fully test your site's functionality.

(I told you that was top ;) )

NOW TEST YOUR NEW SITE'S FUNCTIONALITY.

But don't administer the wrong site: after testing, don't forget to delete the new hosts entry, else comment it out with a # at the beginning of the line. And restart your web browser.

Resolve Email

Move your email accounts from your current host.

If you want a simple, spam-free solution with no web server resource cost (ie no personal mail server), check out the VPS Bible Part 18: Google Apps for Domain-Specific Email .

Test your email.

Create A or AAAA Records

This is the key to a seamless move, which is particularly important if, for example, you host a forum or receive a lot of blog comments.

What we're going to do is to set up your new host to resolve the domain call to your old host. Basically, this eliminates the possibility of writing to more than one database while, for example, the nameservers propagate or Google's global servers refresh your new domain details.

In the new server's DNS settings, add two A/AAAA records using these guidelines:-

Hostname IP TTL (Time to Live)
domain.com old web host IP address shortest option
www.domain.com old web host IP address shortest option

When you save your options, you may find one of the hostname fields is blank. That's normal.

Point Domain to Nameservers

Goto your domain registrar account and look for the Nameserver option. Renew the data.

For example, with Linode, bless, change to ns1.linode.com, ns2.linode.com, ns3.linode.com and ns4.linode.com. You'll find your new web host's nameserver details easily enough.

Now we are awaiting full propagation, at all server points around the world. I have no idea how long that takes, but about 72 hours is generally reckoned, so allow for 4-5 days to be safe.

MOVING DAY!

Go back to those A Records we created, replacing the old host IP to your new host IP. Set the TTL to the shortest possible 'time to live'. But before you click OK ..

Take a final backup of your old database and import the data into your new one.

.. And now you can click OK on those new A records.

While your A record changes will update the new host nameservers within minutes, it takes up to 72 hours for full web-wide propagation. You may find new data records in the old database, so you'll have to export and import those strays Vous saurez que c'est le bon fichier, car cela va avoir une entrée ou deux comme: --

127.0.0.1	localhost

... and that is the format you want for the new lines you have to add to the file. So add something like:-

12.34.56.78  domain.com
12.34.56.78  www.domain.com

... swapping the IP for your new IP, and the domain for yours.

Upon saving the file, when you surf to domain.com, instead of taking you to your old server, it will take you to the new one, and you can fully test your site's functionality.

(I told you that was top ;) )

NOW TEST YOUR NEW SITE'S FUNCTIONALITY.

But don't administer the wrong site: after testing, don't forget to delete the new hosts entry, else comment it out with a # at the beginning of the line. And restart your web browser.

Resolve Email

Move your email accounts from your current host.

If you want a simple, spam-free solution with no web server resource cost (ie no personal mail server), check out the VPS Bible Part 18: Google Apps for Domain-Specific Email .

Test your email.

Create A or AAAA Records

This is the key to a seamless move, which is particularly important if, for example, you host a forum or receive a lot of blog comments.

What we're going to do is to set up your new host to resolve the domain call to your old host. Basically, this eliminates the possibility of writing to more than one database while, for example, the nameservers propagate or Google's global servers refresh your new domain details.

In the new server's DNS settings, add two A/AAAA records using these guidelines:-

Hostname IP TTL (Time to Live)
domain.com old web host IP address shortest option
www.domain.com old web host IP address shortest option

When you save your options, you may find one of the hostname fields is blank. That's normal.

Point Domain to Nameservers

Goto your domain registrar account and look for the Nameserver option. Renew the data.

For example, with Linode, bless, change to ns1.linode.com, ns2.linode.com, ns3.linode.com and ns4.linode.com. You'll find your new web host's nameserver details easily enough.

Now we are awaiting full propagation, at all server points around the world. I have no idea how long that takes, but about 72 hours is generally reckoned, so allow for 4-5 days to be safe.

MOVING DAY!

Go back to those A Records we created, replacing the old host IP to your new host IP. Set the TTL to the shortest possible 'time to live'. But before you click OK ..

Take a final backup of your old database and import the data into your new one.

.. And now you can click OK on those new A records.

While your A record changes will update the new host nameservers within minutes, it takes up to 72 hours for full web-wide propagation. You may find new data records in the old database, so you'll have to export and import those strays.

Note: At Linode, updated DNS records take effect every 15 minutes. So if you edit an A record at 2:32, it'll take until 2:45, plus the time period specified in the TTL, for the update to be visible to the world. Careful timing will give you the least downtime.

Final Checks

If you completed the previous testing properly, there should be no surprises. Then again ..

After the time period specified in the TTL, check your site to ensure everything works. Because your local nameservers may not yet have resolved with the new A record data, and so that you can be sure you're looking at the new, not the old, web application, use the host file trick.

Shed Shared, Viva Virtual!

Whatever kind of web host you've moved to, you can cancel the old host 4-5 days after moving day. Your breathing will gradually shallow out. Take tea!

Virtually Done

This series is pretty much complete, and I'm definitely gonna be spending more time down the pub.

However, as a round-up, VPS Bible Part 20: Blogroll, Links, Credits, Resources will list some of the best resources on the web for anything Linux or VPS. Plus it's a bit of a thank you to all those whose advice has helped me to go from VPS newbie, a few months ago to, well, senior newbie. Hey, you be the judge, but I sure ain't a sysmin.

By way of a follow up, and as promised in VPS Bible Part 17: Nginx Control Panel Workarounds , I'll be publishing some appendix guides too, showing you how to administer your VPS without relying on bloatware like cPanel.

Here's the you-know-what ...


SETUP an Unmanaged VPS (4 Newbies) .. The V-P-S Bible

Serve multi sites & blogs on a budget .. at the fastest possible speed .. with the least downtime .. in the most secure environment .. and future-proofed for easy admin.

That's what the VPS Bible is about, stepped out in simple copy & paste guides.

From high traffic WordPress blogs to startup web hosts, here's what you need.

Set it up?   Click here for the 21 part follow-up .. V-P-S Admin

  1. * Includes video tutorial.

  2. Not linked = not published. Won't be long. Fix a feed for updates.


If you liked that ...
... maybe you'll like these?

.