Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Can I move my Ubuntu install to a new server (with different hardware) using CloneZilla?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Can I move my Ubuntu install to a new server (with different hardware) using CloneZilla?

jant90jant90 Member
edited May 2016 in Help

I think the title formulates my question best. The main thing I'm afraid of is that Ubuntu will have problems running on the new server because of different hardware, possibly breaking things. However Ubuntu isn't Windows so I just hope there shouldn't be any problems with different hardware and it's required drivers.

I'll elaborate a little more, and I also I bolded a couple of extra questions that I had about this process.

I'm currently on a dedicated server from Delimiter (to my satisfaction btw) but I'm thinking of moving to a EU based server from Hetzner.

The server runs Ubuntu Server 14.04, some apps, some custom scripts, a webserver, etc and I'm not sure how I would move that to a new server with minimal downtime and minimal work.

I'm a little bit familiar with CloneZilla and I would love to just move all the content in one go and have the new server boot as if it's the old one. The procedure I came up with would look a little like this:

  1. Shutdown the current Delimiter server and boot CloneZilla (load it to RAM).
  2. Backup the entire server to my cloud storage (accessible over WebDAV, which is supposed to be supported by CloneZilla).
  3. Launch CloneZilla (load it to RAM) on the new Hetzner server and restore the CloneZilla image over WebDAV (is booting CloneZilla like that possible with Hetzner?).
  4. Boot the new Hetzner server (should already boot Ubuntu just fine now, right?).
  5. Change the network configuration on the new Hetzner server (I assume this is possible over VNC or something?).
  6. Adjust partitions size (I assume this is necessary when moving from a 1TB to a 3TB disk?).

Can anyone give me pointers about the procedure, maybe some do's and don'ts?

Comments

  • BochiBochi Member

    If you are trying to get "minimal downtime", what about this approach:

    1. Make a clean install on the new server, just with the software you need.
    2. If you are using a database: Setup the new server as slave of the old one and have your database mirrored.
    3. rsync your files and configs.
    4. Change your DNS entries and make your slave database the new master.

    I would think a solution like this would be way less hassle than the cloning and fixing, that would also come with some serious amount of downtime.

  • IkoulaIkoula Member, Host Rep

    Hello,

    You can also give a try to dd command

    https://en.wikipedia.org/wiki/Dd_(Unix)

  • consider docker. while its a bit of work to move your applications etc into docker, once its done you can simply move the docker image to any new server - it doesnt really matter what hardware/os is on new server

  • jant90jant90 Member
    edited May 2016

    Well, it is a personal server for me and my friends so a couple of hours downtime wouldn't be that much of an issue I guess. I'm more concerned with possible configuration errors leading to way more issues (and downtime) when doing it all manually. It's very easy to forget a script, a cronjob or a configuration item somewhere deep in the OS. Also I can imagine file permission or lock errors which I why I wanted to go outside of the OS, so there should be no permission issues or file lock issues at all.

    I guess I can make a full clone with CloneZilla during quiet hours within an hour or so (so possibly no one even noticing it). Then I can let my friends use the old server again while I set up the new one, when I'm done I'll simply change the DNS records and turn off the old server so the most my friends would need to do is flush their DNS cache.

    There may be a little dataloss then, but that can largely be overcome by disabling as many features as possible, turning the old server in sort of a read-only state.

    Anyways, my main concern with a clone like this is that there may be issues because of the new hardware in the new server. Is that something Ubuntu will take care of automatically or can I expect problems there?

  • tommytommy Member

    If you use full clone, linux will take care everyting.

    I often clone fedora and never had problem from intel/nvdia to amd/ati

    Thanked by 1jant90
  • msg7086msg7086 Member

    You can even do a full rsync after stopping all services. If it's a physical server you own, you can also swap the HDD directly.

  • hoczajhoczaj Member

    @sirrobin said:
    consider docker. while its a bit of work to move your applications etc into docker, once its done you can simply move the docker image to any new server - it doesnt really matter what hardware/os is on new server

    Well, Docker is for application containerization. What he is more likely looking for is LXC. This is really gives him the simplicity of moving all of his data and settings next time.

  • jant90jant90 Member

    @tommy said:
    If you use full clone, linux will take care everyting.

    I often clone fedora and never had problem from intel/nvdia to amd/ati

    @msg7086 said:
    You can even do a full rsync after stopping all services. If it's a physical server you own, you can also swap the HDD directly.

    Thanks, that sounds great. Then I think I'll try the procedure I set out in the OP first, that way I'm mostly familiar with the tools required to do it and I shouldn't be able to forget or mis anything.

    @hoczaj said:

    @sirrobin said:
    consider docker. while its a bit of work to move your applications etc into docker, once its done you can simply move the docker image to any new server - it doesnt really matter what hardware/os is on new server

    Well, Docker is for application containerization. What he is more likely looking for is LXC. This is really gives him the simplicity of moving all of his data and settings next time.

    I've looked into installing Proxmox and then run Ubuntu virtualized but I was afraid that would lead to a lower performance within Ubuntu, also that would lead to another networking layer (as all guest OS's will be behind a NAT), meaning extra resources would be needed to routing all the internet traffic.

    I do run another OS (Windows Server 2012) on the same server (just for a few Windows only apps) but there performance isn't really that important. I run that inside a KVM on its own LVM partition.

  • hoczajhoczaj Member

    @jant90 said:

    @tommy said:
    If you use full clone, linux will take care everyting.

    I often clone fedora and never had problem from intel/nvdia to amd/ati

    @msg7086 said:
    You can even do a full rsync after stopping all services. If it's a physical server you own, you can also swap the HDD directly.

    Thanks, that sounds great. Then I think I'll try the procedure I set out in the OP first, that way I'm mostly familiar with the tools required to do it and I shouldn't be able to forget or mis anything.

    @hoczaj said:

    @sirrobin said:
    consider docker. while its a bit of work to move your applications etc into docker, once its done you can simply move the docker image to any new server - it doesnt really matter what hardware/os is on new server

    Well, Docker is for application containerization. What he is more likely looking for is LXC. This is really gives him the simplicity of moving all of his data and settings next time.

    I've looked into installing Proxmox and then run Ubuntu virtualized but I was afraid that would lead to a lower performance within Ubuntu, also that would lead to another networking layer (as all guest OS's will be behind a NAT), meaning extra resources would be needed to routing all the internet traffic.

    I do run another OS (Windows Server 2012) on the same server (just for a few Windows only apps) but there performance isn't really that important. I run that inside a KVM on its own LVM partition.

    I see.

    However virtual machine is a bit more different than LXC (or Docker which was based on LXC previously until they had their own stuff).

    an operating-system-level virtualization method for running multiple isolated Linux systems (containers) on a control host using a single Linux kernel.

    An example here: https://www.savjee.be/2016/05/Getting-started-with-LXC-on-a-Scaleway-cloud-server/

    So basically yes, you would need to set up some iptables rules to allow that the container can be reached from the outside.

    But it comes with benefits like that you can read from the blog post. The more interesting part is the: "Backing up to Amazon S3"

    So LXC does not eat away your resources like hardware virtualization does, but also gives you some additional protection.

    Thanked by 1jant90
  • msg7086msg7086 Member

    @hoczaj said:

    So LXC does not eat away your resources like hardware virtualization does, but also gives you some additional protection.

    I even started using systemd-nspawn and that's as good as LXC but it has native support by the init (so even better and easier).

  • sinsin Member

    Nice article! I've been meaning to play around with LXC

Sign In or Register to comment.