Migration
I am a noob here and have just bought a package to test the service out. I contacted support to ask if they did a migration service from where I am to Linode. No luck!
However they did suggest that I ask in the forum and see if there was a server admin that could help, for money of course. So here I am asking the question. All replies gratefully received.
JR
8 Replies
@JR:
Hi
I am a noob here and have just bought a package to test the service out. I contacted support to ask if they did a migration service from where I am to Linode. No luck!
However they did suggest that I ask in the forum and see if there was a server admin that could help, for money of course. So here I am asking the question. All replies gratefully received.
JR
Here are instructions based on how I did it:
1. Create a Linode instance with as close a matching standard installation as I could (my server uses Arch Linux so I used the standard Arch Linux installation). Be sure to choose the architecture that matches your existing VPS (i.e. i686 or x86_64).
2. Let the Linode be created but don't even boot it.
3. Boot the "Rescue" image, log into it using the LISH via SSH method, and mount your Linode's root filesystem under /tmp/mnt like this:
$ mkdir /tmp/mnt
$ mount /dev/xvda /tmp/mnt
4. Back up the /etc/fstab from your Linode:
$ cp /tmp/mnt/etc/fstab /tmp
4. rsync your other VPS's root filesystem onto this disk image:
$ rsync --delete -avz --rsh=ssh user@host:/{dir1, dir2, ...} /tmp/mnt
You may want to shut down as many services as possible on your other VPS before doing this to avoid files being changed while the rsync is in progress. Also, note that I have put { dir1, dir2, … } for the set of directories to rsync. You'll have to decide what the correct set is, and it depends on how you've mounted things on your other VPS and what other root directories are there. I used this: { bin, boot, data, etc, home, lib, local, media, mnt, opt, root, sbin, selinux, srv, usr, var }, but you'll have to decide on a case-by-case basis which root directories are necessary. Certainly you don't need to sync /dev, /proc, /sys, /lost+found, or /tmp from a running system - but be sure that any directory that you don't rsync, that acts as a mount point for a virtual filesystem (such as /dev, /proc, etc) is at least created in the root filesystem of your Linode.
The rsync will take a long time, depending on how much data you have on your VPS. You can restart it if it is interrupted with exactly the same command, and can even run it again after it has completed successfully to get any changed files. rsync is smart and will only copy over changes every time it is run.
5. Put your fstab back:
cp /tmp/fstab /tmp/mnt/etc
6. Shut down your rescue instance and boot your Linode.
If you are lucky that's all that is needed; that was all that was needed for me, but I was coming from another Xen hosting provider so the filesystem I had was already Xen-aware and moving it to a new Xen instance really was as simple as mirroring the filesystem over and ensuring that /etc/fstab was set up correctly for the Linode.
You will almost certainly have to tweak these instructions for specific details of your setup, but it should give you a starting point.
Note that if your other VPS was using a statically defined IP, then you'll have to switch over to using DHCP on your new Linode. You can accomplish this by logging in using LISH over SSH even if your network on your new Linode is not working for some reason - console access to your Linode is one of the great things about this service and it will allow you to diagnose and fix lots of problems, especially those that interrupt your server's networking and wouldn't allow you to SSH to your server as normal.
@bji:
Note that if your other VPS was using a statically defined IP, then you'll have to switch over to using DHCP on your new Linode. You can accomplish this by logging in using LISH over SSH even if your network on your new Linode is not working for some reason - console access to your Linode is one of the great things about this service and it will allow you to diagnose and fix lots of problems, especially those that interrupt your server's networking and wouldn't allow you to SSH to your server as normal.
You don't have to use DHCP on Linode if you don't want to. The proper DNS servers and networking settings are listed in the "Remote Access" tab of the manager.
I really do appreciate the replies and while I understand what you are saying I can't help but feel there is a lot to go wrong and these are not personal domains but clients that all come with email boxes and scripts that would not appreciate any downtime, well a little maybe.
So my question still stands, but I really do appreciate the advice.
John
@Amar:
What do you need to migrate ?
My exsiting server 20 domains / mysql / php scripts / mail the usual stuff
@JR:
Hi
I really do appreciate the replies and while I understand what you are saying I can't help but feel there is a lot to go wrong and these are not personal domains but clients that all come with email boxes and scripts that would not appreciate any downtime, well a little maybe.
So my question still stands, but I really do appreciate the advice.
John
Step 1: Sign up for a Linode. They are cheap and you have nothing to lose and can pay only for what you use with pro-rated refund.
Step 2: Try the instructions that I have provided; if you are coming from another Xen based VPS then they should work. You don't have to take your other VPS down during this process and if it doesn't work then no harm done.
Step 3: If they don't work, then come back and ask again with specifics.
@bji:
Step 2: Try the instructions that I have provided; if you are coming from another Xen based VPS then they should work. You don't have to take your other VPS down during this process and if it doesn't work then no harm done.
OP has never said he was even on a VPS. You're making quite an assumption there. He could easily be attempting to migrate from shared hosting.
@glg:
@bji:Step 2: Try the instructions that I have provided; if you are coming from another Xen based VPS then they should work. You don't have to take your other VPS down during this process and if it doesn't work then no harm done.
OP has never said he was even on a VPS. You're making quite an assumption there. He could easily be attempting to migrate from shared hosting.
Thanks. The noob is on a VPS and reading your advice again