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

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!