OpenVZ Forum


Home » General » Support » How To Migrating OpenVZ 6 CT into OpenVZ 7 (How To Migrating OpenVZ 6 CT into OpenVZ 7)
icon5.gif  How To Migrating OpenVZ 6 CT into OpenVZ 7 [message #53757] Mon, 11 October 2021 12:32 Go to next message
mandrivian is currently offline  mandrivian
Messages: 4
Registered: March 2017
Location: indonesia
Junior Member

From: 202.80.219*
Hi,

As we all know that OpenVZ 6 has been EOL, i'm currently still running vz 6 on my vps host server and attend to switch into vz 7 on my new server machine.
The problem is, how to restore or doing migration from existing conatiner backup on vz 6 into vz 7. So far, i can't find any tutorial to do so.

I need help to do this please, because the vz 6 vps host soon going to be a dead pool if i'm not doing the migration as soon as possible

Thank You
Re: How To Migrating OpenVZ 6 CT into OpenVZ 7 [message #53758 is a reply to message #53757] Thu, 14 October 2021 22:42 Go to previous messageGo to next message
devnull is currently offline  devnull
Messages: 19
Registered: May 2012
Junior Member
From: 141.98.102*
Hello!

(English is not my native language => I am a "frog eater" on my spare time...)

OpenVZ 7 provides "vzmigrate" but I did not use it (so I cannot help you with this command)

But, you could use "openvz-diff-backups": it is the tool I have created for my own needs.

https://www.openvz-diff-backups.fr (source code is in English)

At the beginning it was just a "hack" but, after years, it became stable and now everyone can use it safely.

If you need to transfer containers from OpenVZ Legacy to OpenVZ 7, you *must* use "cold" backups.

For instance, if the CTID of the container is 100:

(Source Host)
# vzctl stop 100
# openvz-diff-backups backup 100 cold -l 9 -t

(Target Host)
# openvz-diff-backups restore 100 cold -l 9 -t
# vzctl start 100

You can also use bash to process multiple/many/all containers.

(Source Host)
# cd /vz/private (or /var/lib/vz/private)
# for CTID in *; do echo "# --- $CTID"; sleep 1; vzctl stop $CTID; openvz-diff-backups backup $CTID cold -l 6 -q -t; done

Wait until everything is finished (could take hours, or days)

(Target Host)
# openvz-diff-backups restore all cold -l 6 -q -t
# cd /vz/private (or /var/lib/vz/private)
# for CTID in *; do echo "# --- $CTID", sleep 1; vzctl start $CTID; done

You have three settings to check/update/set in OVZDB configuration file:

- EMAIL_ADDRESS: to receive error reports
- MASTER_SSH_PATH: to define where backups are located
- MASTER_SSH_OPTIONS: if you do not use port 22 for SSH

If you need more infos to reduce global downtime, please post a message because there are several solutions (bash will solve this).

My personal email address is in README file so, do not hesitate to contact me.

Nevertheless, it would be nice if you could answer on this forum.

Have a great [day|night]! ^^
Re: How To Migrating OpenVZ 6 CT into OpenVZ 7 [message #53759 is a reply to message #53757] Wed, 20 October 2021 15:39 Go to previous messageGo to next message
ccto is currently offline  ccto
Messages: 61
Registered: October 2005
Member
From: 180.92.180*
To transfer container in OpenVZ 6 environment to OpenVZ 7 environment
ref.: https://wiki.openvz.org/Upgrade_script_from_OpenVZ_to_Virtuo zzo_7
Re: How To Migrating OpenVZ 6 CT into OpenVZ 7 [message #53761 is a reply to message #53759] Fri, 22 October 2021 23:32 Go to previous message
devnull is currently offline  devnull
Messages: 19
Registered: May 2012
Junior Member
From: *179.19.134.in-addr.arpa
Hello George!

Many thanks for the hint!

But, IFAIK, ovztransfer.sh does not try to "search and match" templates to find the more "compatible" template when migrating from OpenVZ 6 to OpenVZ 7.

Good night. Smile
Previous Topic: OpenVZ 8 / virtuozzo linux 8
Next Topic: using virsh instead of prlctl
Goto Forum:
  


Current Time: Wed Dec 08 14:21:15 GMT 2021