[Original] ESXi virtual machine package backup

At some point, the virtual machines in the esxi host need to be backed up.

Generally, I directly use the method of copying the virtual machine, which is relatively simple, but the disadvantage is that it consumes more disk space.

In addition, one way is to directly log in to the esxi host, and directly compress and package the virtual machine through the command line.
insert image description here

First switch to the directory where the virtual machine is located, and then execute the command as follows:

tar -zcvf test.gz 模板_W2022/

"Template_W2022" is the virtual machine folder, which contains all the files of the entire virtual machine.
After the execution is completed, a compressed package of test.gz will be obtained.

After testing, the results are as follows:

分配磁盘容量:100G
磁盘有效数据:13.6G
压缩包大小:6.7G
耗时:46分钟

insert image description here
insert image description here
Basically, the compression ratio is 50% for the effective data, but only 6.7% for the allocated disk capacity, which is a very high compression ratio. In fact, although the allocated space is 100G, there is no data in most of the space, so the compression ratio is very high.

VMware officially provides an export function. Export the virtual machine through the web interface and put it on your PC. The disadvantages are still obvious, time-consuming and labor-intensive, and it is troublesome to restore. After exporting, compress it again to reduce the volume.

分配磁盘容量:100G
磁盘有效数据:7.2G
压缩包大小:7.03G(360最高压缩)
耗时:导出+压缩(未测算)

insert image description here
In general comparison, it is more convenient to operate directly in the esxi host. Of course, if disk space is not considered, copying the virtual machine directly is the most convenient choice.

Guess you like

Origin blog.csdn.net/u013667796/article/details/130839748