|
Re: How To Migrating OpenVZ 6 CT into OpenVZ 7 [message #53758 is a reply to message #53757] |
Thu, 14 October 2021 22:42   |
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]! ^^
|
|
|
|
|
|
|
|