vzdump & qmrestore over ssh with compression

MrHackCZ

New Member
Nov 22, 2020
3
0
1
28
Hi guys !

Is any way, how to migrate VM from one pve to another with compression? On origin I have ZFS storage, the new one has thin lvm. Im trying to use vzdump with --compress but its doesnt work, with zstd same:

Code:
vzdump 306 --stdout --compress=lzo | ssh 10.60.xxx.xxx "lz4 -d | qmrestore --storage local-lvm-pool - 208"
could not activate storage 'local': storage 'local' is disabled
restore vma archive: vma extract -v -r /var/tmp/vzdumptmp1731933.fifo - /var/tmp/vzdumptmp1731933
error before or during data restore, some or all disks were not completely restored. VM 208 state is NOT cleaned up.
command 'set -o pipefail && vma extract -v -r /var/tmp/vzdumptmp1731933.fifo - /var/tmp/vzdumptmp1731933' failed: got timeout

I think, cmd is correct. When I try to simply echo string, compress and decompress on destination it works:

Code:
echo test | zstd -z | ssh 10.60.xxx.xxx "zstd -d | cat -"
test

Im limited with 1GbE NICs and VMs are big. Need to speed up the process. Any hints? Thank you !
 
Hi,
please try lzop -d -c to decompress. -c is for writing to stdout so it can be piped again.

Also there is an error about the local storage. Is that used by the VM? What's your pveversion -v on both source and target?
 
Ah so, I dont even get dump of VM...

Code:
vzdump 306 --stdout --compress=zstd
could not activate storage 'local': storage 'local' is disabled

I had disable local storage which handle vzdump backup files. This works with a charm !
Code:
vzdump 103 --stdout --compress=lzo | ssh 10.x.0.x "lzop -d -c | qmrestore --storage local-lvm-pool - 209"
or
vzdump 103 --stdout --compress=zstd | ssh 10.x.0.x "zstd -z | qmrestore --storage local-lvm-pool - 209"
 
Ah so, I dont even get dump of VM...

Code:
vzdump 306 --stdout --compress=zstd
could not activate storage 'local': storage 'local' is disabled

I had disable local storage which handle vzdump backup files. This works with a charm !
Code:
vzdump 103 --stdout --compress=lzo | ssh 10.x.0.x "lzop -d -c | qmrestore --storage local-lvm-pool - 209"
or
vzdump 103 --stdout --compress=zstd | ssh 10.x.0.x "zstd -z | qmrestore --storage local-lvm-pool - 209"
Thank-you!
changing from zstd -z to zstd -d made it work for me.
vzdump 103 --stdout --compress=zstd | ssh 10.x.0.x "zstd -d | qmrestore --storage local-lvm-pool - 209"