This shows you the differences between two versions of the page.
openvz:migrate-vps-without-vzdump [2012-11-12 17:44] kokkez [Method overview] |
openvz:migrate-vps-without-vzdump [2012-11-12 17:48] (current) kokkez [A faster copy: tar then rsync] |
||
---|---|---|---|
Line 18: | Line 18: | ||
=== Never attempt to migrate an OpenVZ to a dedicated or KVM unless you know what you're doing. == | === Never attempt to migrate an OpenVZ to a dedicated or KVM unless you know what you're doing. == | ||
- | **Why?** OVZ images often do not include certain files that make no sense to it, for example a linux kernel or a **/boot** folder. These are critical to booting hardware or hardware emulated systems. At this point you've walked beyond the scope of this document: Beware, here be dragons. | + | **Why?** OVZ images often do not include certain files that make no sense to it, for example a linux kernel or a ''/boot'' folder. These are critical to booting hardware or hardware emulated systems. At this point you've walked beyond the scope of this document: Beware, here be dragons. |
---- | ---- | ||
Line 38: | Line 38: | ||
If you have any large data folders that can be copied after the core system has been transferred, exclude them now as well. | If you have any large data folders that can be copied after the core system has been transferred, exclude them now as well. | ||
+ | |||
+ | ==== Using `rsync` == | ||
Run the following command on the source host: | Run the following command on the source host: | ||
Line 51: | Line 53: | ||
You may get a warning when re-running rsync that your sshd's host key has changed, that's normal. The previous command copied the host key from your old host. | You may get a warning when re-running rsync that your sshd's host key has changed, that's normal. The previous command copied the host key from your old host. | ||
- | Run the reboot command to restart the destination host. | + | Execute the ''reboot'' command to restart the destination host. |
- | ==== A faster copy: tar then rsync ==== | + | ==== A faster copy: `tar` then `rsync` ==== |
Since a linux system is largely small files, it is usually faster to tar them up before transfer as rsync checks each file. Instead of checking each file, this merely replaces everything it finds from the old system on the new system. | Since a linux system is largely small files, it is usually faster to tar them up before transfer as rsync checks each file. Instead of checking each file, this merely replaces everything it finds from the old system on the new system. |