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*

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 message
devnull is currently offline  devnull
Messages: 17
Registered: May 2012
Junior Member
From: 141.98.102*

(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. (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]! ^^
Previous Topic: Can migration continue after IO errors?
Next Topic: Bug reports should go to
Goto Forum:

Current Time: Sun Oct 17 22:49:53 GMT 2021