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

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: 20
Registered: May 2012
Junior Member
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
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 messageGo to next message
devnull is currently offline  devnull
Messages: 20
Registered: May 2012
Junior Member
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
Re: How To Migrating OpenVZ 6 CT into OpenVZ 7 [message #53792 is a reply to message #53757] Tue, 05 July 2022 12:51 Go to previous message
HHawk is currently offline  HHawk
Messages: 27
Registered: September 2017
Location: Europe
Junior Member
In the past I have many failures when using ovztransfer.sh unfortunately.
Not really a reliable tool to be honest, also causes a lot of downtime. Sad

The best results were achieved with small CT's though.
Previous Topic: pcompact deprecated warning from cron
Next Topic: Just wanted to say: -"Thank you!" and the best for OpenVZ 8
Goto Forum:
  


Current Time: Thu Aug 11 06:30:47 GMT 2022

Total time taken to generate the page: 0.00812 seconds