E ejmerkel Renowned Member Proxmox Subscriber Sep 20, 2012 121 4 83 Nov 18, 2015 #1 Is it possible to determine what the name of the KVM virtual machine is from a backup lzo file? Best regards, Eric
Is it possible to determine what the name of the KVM virtual machine is from a backup lzo file? Best regards, Eric
G gradinaruvasile Renowned Member Oct 22, 2015 84 12 73 Nov 18, 2015 #2 For uncompressed vma files: Code: vma config filename.vma For vma.gz fies is like this: Code: zcat file.vma.gz | vma config - Probably something like it for lzo too (probably using lzop). Basically you have to uncompress it on the fly and pass it to vma config. Using it to reveal all names in the current directory (somemount/dump/): Code: #!/bin/bash list=`ls -1 *.vma.gz` for f in $list do echo "$f `zcat $f | vma config - | grep name| cut -d ':' -f 2`" done Last edited: Nov 18, 2015
For uncompressed vma files: Code: vma config filename.vma For vma.gz fies is like this: Code: zcat file.vma.gz | vma config - Probably something like it for lzo too (probably using lzop). Basically you have to uncompress it on the fly and pass it to vma config. Using it to reveal all names in the current directory (somemount/dump/): Code: #!/bin/bash list=`ls -1 *.vma.gz` for f in $list do echo "$f `zcat $f | vma config - | grep name| cut -d ':' -f 2`" done
M mmenaz Renowned Member Jun 25, 2009 835 25 93 Northern east Italy Nov 8, 2017 #3 Just to add that for .lzo compressed files the syntax is like this (the -c in lzo is fundamental to have output in stdout): Code: lzop -d -c file.vma.lzo | vma config - I got it from Storage.pm, having the source code is GREAT, long life to FOSS
Just to add that for .lzo compressed files the syntax is like this (the -c in lzo is fundamental to have output in stdout): Code: lzop -d -c file.vma.lzo | vma config - I got it from Storage.pm, having the source code is GREAT, long life to FOSS