Howdy, Stranger!

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


OpenVZ Migration - client side
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.

OpenVZ Migration - client side

Hello,

my vps hosting provider is shutting down and i want to move my openvz container to another provider. I can make manual backups but configuring all services and config files from the scratch will be pain in the a.... not to mention the possible incompatibilities that can occur eg if my scripts aren't compatible with the specified version of php/mysql and so on. Which is the simplest/ best / more reliable etc way to do this?

Comments

  • IshaqIshaq Member
    edited October 2016

    Step 1. Make sure both run the same OS.

    Step 2. Install rsync on both.

    Step 3. Run this on the destination (new) VPS:

    http://hastebin.com/oqayeziyay.rb

    Make sure you replace "OLD_IP" with the actual IP of the VPS you're moving away from.

    Done.

  • thanks Ishaq
    i 'll give it a try

  • yoctoboxyoctobox Member
    edited October 2016

    Ask your previous OpenVZ provider to run this command:

    vzdump -compress gzip -remove -mode suspend -maxfiles 1 -dumpdir /root/dump 1xx

    where 1xx is the container id.

    This will create a .tar.gz file, transfer this file from your previous provider to your new provider.

    Ask your new provider to run this command:

    vzrestore vzdump-openvz-1xx-2016\_02\_24-21\_24\_54.tar.gz 1yy

    where 1yy is the container id on your new provider's host node.

    You are all set.

    Thanked by 1racksx
  • BradyHBradyH Member, Host Rep

    ask your new provider they should be able to help you move the site for you

  • Some providers offer free migrations

  • @Ishaq said:
    Step 1. Make sure both run the same OS.

    Step 2. Install rsync on both.

    Step 3. Run this on the destination (new) VPS:

    http://hastebin.com/oqayeziyay.rb

    Make sure you replace "OLD_IP" with the actual IP of the VPS you're moving away from.

    Done.

    i used Ishaq's method and worked like a charm (so far)

    I noticed that when rsync finished transferring files it said that:
    received: ~1.5GB send: ~20MB

    The received volume is normal but what about the send one?
    This means that files from the target server copied back to the original one or it is simply the size of the requests new server send back to thew original server?

    In other words, does that command transfer files both directions, or only from old to new server?

  • JasperNLJasperNL Member
    edited October 2016

    vps7788 said: The received volume is normal but what about the send one? This means that files from the target server copied back to the original one or it is simply the size of the requests new server send back to thew original server?

    This is certainly possible. The new VPS downloaded a total of 1.5GB, which are basically the changes that you made to the system (binaries + data).

    The data that is sent (20MB) contains information of the files on the current system. Considering a some file hashes (to make sure that the files are really the same) and directory layout that 20MB is quite reasonable.

    If the changes that you made to the system are approximately 1.5GB, that'd be fine.

Sign In or Register to comment.