Dedicated Server being moved

Hi there, I am in a little bit of a panic as I have just been informed that my VPS is being moved to a different box. The nice thing is that I get more disk space, RAM, CPU...the not so nice thing is that I have to backup and restore everything myself.

What's the easiest way to achieve this? Is it possible to take a full snapshot backup including OS etc...and then restore.

I have SSH, FTP, SFTP access to the device.

I have also asked to keep the IP address, but I don't know if that will happen..which is a pain as my box acts as a nameserver. :/

Hailp!!

Thanks

Status: 
Active

Comments

Howdy -- sorry to hear they're making you move!

There's actually steps to perform a Virtualmin migration though, that should simplify the process quite a bit.

Directions for that are here:

https://www.virtualmin.com/documentation/system/upgrades-and-migrations

Now, that doesn't handle the OS, and packages that may have been manually installed after Virtualmin was put onto the system.

It also doesn't handle config file tweaks for all the config files in /etc (just the ones that are associated with Virtual Servers, such as Apache and BIND).

After performing your migration, just do some testing, and review your log files if you discover any issues. It should hopefully be straight forward as to how to resolve the issue.

If you have any problems you're not sure about, let us know and we'll review it with you.

How much time are they giving you to migrate?

I'm not sure I'm going to get any time. I have to backup, they will delete the old one and give me access to the new one.

I am looking at a baremetal type restore. Just install the OS on the new box and then restore from a full system backup.

Not sure if this would work, and am not 100% certain how to do this. Can I tar from / as root and then untar it one the new box?

I have asked for the same IP addresses (I have 2 for the nameservers) - Could this work? Any idea how to go about it?

We don't have any instructions detailing how to make a migration work using tar or rsync to move the entire installation, though in theory it can work.

If it's a remote system, rsync may be the simpler tool to use.

You'd want to start with the same distro/version on the remote system, then move all the files.

When doing that, you'd want to make sure that a minimal amount of services are running on both systems. Things like MySQL, Apache, Webmin, and such should be stopped if you're using tar or rsync to copy files.

Problems can occur when trying to perform a migration like that, so I'd do your best to work with your provider to make sure they aren't shutting down your old VPS quite yet.

I suppose I should ask, is there anything you can do to convince them to move your VPS?

From your provider's perspective, your VPS is just a single image file, and it should be possible for them to just copy the VPS image to the other system, and then resize it.

Note that before doing any of this, I would highly recommend making sure that you have a good Virtualmin backup of all of your domains.

I would also recommend having a backup of the entire /etc directory.

Hi there

They are giving me a whole suite of reasons why they can't move the image...none of them make sense, but that's the situation I am in.

I have bought a 2nd VPS and will cancel my current one when the migration is complete.

The plan is to rsync everything across. The new box will have the same version of Debian installed, but no services whatsoever (except the standard stuff).

How will this affect Virtualmin? I am not sure how it does license checking. Obviously for a short time, it will be running on both systems until the transfer is complete and confirmed, and the nameservers change to point at the new box..at which point I will delete the old one completely.

Would you know what files that the server IP addresses get hard written into? I just want to be able to rsync, edit and go..

Would there be a quick way, that any access to webservices on the old box could be pointed to a single - static - page that simply says "Server Migration in progress, please have a little patience"..so I will be able to tell when the new box is live.

Thanks :D

We're not at all concerned about the Virtualmin license during your migration. It's normal to have the license on two servers during a migration.

Note that it's been years since I've tried performing a migration using rsync, so I don't have exact steps for you. You may need to do some trial and error to get it working :-)

There's a handful of files you wouldn't want to migrate with the rsync -- /etc/fstab, /etc/network/interfaces, and any virtual directories such as /proc and /sys.

You would want to shut down services on the old server as well -- if nothing else, absolutely turn off MySQL (the copy won't work properly with it on), but the more services you stop the better.

Once it's complete, you can then go into Addresses and Networking -> Change IP Addresses on the new server, and there you can have it re-configure all the config files with the new IP.

Thanks :)

Is there a quick way, once the copy has taken place, to take virtualmin offline, so that I can just have a single, static, page displayed for all sites?

It would be useful for 2 reasons..the first being that DNS can take a while to propagate and I want to avoid new forum posts etc once the copy has been made. The second is that I will instantly be able to see when the DNS has propagated, as the sites will start loading again when everything starts resolving to the new IP.

Cheers Dave

There isn't a way built into Virtualmin to do that.

I suppose you could always remove all the Apache config files in /etc/apache2/sites-enabled except for one, and have that one be the static site you're looking for.

Hi again

We did an rsync between the boxes and everything seems to be running without issue.

One annoyance is when I click on System Information in Virtualmin, the System Hostname is MYHOSTNAME (OLDSERVERIP)

Can I change this somewhere?

Thanks

oops - Sorry, found it - Needed to update the hosts file

Great, I'm glad things are working well, and that you found the file to edit!