Determine system name from backup lzo

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:
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 :)