Code Monkey home page Code Monkey logo

vma-extractor's Introduction

VMA extractor

vma.py implements an extraction tool for the VMA backup format used by Proxmox. The tool is implemented in Python3.

Usage:

./vma.py path/to/source.vma path/to/target/directory

I think it is pretty important to be able to read Proxmox backups outside of a Proxmox environment. Yet, porting their VMA implementation to a standalone tool proved difficult. VMA-Reader and VMA-Writer are implemented as patches to the Proxmox-patched version and Qemu and are thus very difficult to compile on non-Proxmox systems.

The format specification can be found on git.proxmox.com.

vma-extractor's People

Contributors

jancc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

vma-extractor's Issues

FR. Using stdin as input

This is really the best solution to handle a *.vma outside of ProxMox.

But typically we face with compressed *.vma.gz format, so we have to write a BIG file twice:
*.vma.gz --> *.vma
*.vma --> *.raw

Actually we need a triple free disk space (vma.gz + vma + raw) at a time.

It would be perfect if the script has the ability to use stdin as input (as origin vma has), so we can use it in such a way:

zcat big.vma.gz | vma.py - /tmp/big-vma-extracted

Unfortunately named pipe doesn't work:

$ mkfifo blackhole
$ zcat big.vma.gz > blackhole &
$ vma.py blackhole /tmp/big-vma-extracted
[1]  + 237676 broken pipe  zcat big.vma.gz > blackhole
Traceback (most recent call last):
  File "vma.py", line 357, in <module>
    sys.exit(main())
  File "vma.py", line 352, in main
    extract(fo, args)
  File "vma.py", line 239, in extract
    fo.seek(0, os.SEEK_END)
io.UnsupportedOperation: File or stream is not seekable.

Thank you for your work!

AssertionError

hiya, thanks for this, i get this error

OS: windows 11 | Python 3.10

c:\temp>vma.py blueiris.vma c:\temp\blueiris
Traceback (most recent call last):
File "C:\temp\vma.py", line 357, in
sys.exit(main())
File "C:\temp\vma.py", line 352, in main
extract(fo, args)
File "C:\temp\vma.py", line 243, in extract
vma_header = VmaHeader(fo, args.skip_hash)
File "C:\temp\vma.py", line 14, in init
assert magic == b'VMA\0'
AssertionError

Thank You for Creating This

Sorry to abuse the issue system, but I saw no other way to express my gratitude for you creating this vma-extractor. I wish Promox offered the option to backup to a true raw file, and not this VMA obfuscation. I don't understand the reason for VMA even existing unless it is to deter migration to non-proxmox alternatives. This is not the type of behavior I'd expect from an open source project. Perhaps I'm completely wrong, and there are other legitimate reasons for VMA's existence, but no one yet has offered a reason I'd consider legitimate. Feel free too disabuse my speculation.

I posted my concern here:
https://forum.proxmox.com/threads/vma-archive-restore-outside-of-proxmox.14226/post-474023

Thank you

Hey man,
i want to say thank you so much for this.

I was in Big Trouble for Data-Losses and only got a .vma snapshot as Backup.
With your stuff i got my latest update back and dont lost a wekk of work.

Keep up and thanks again

Error! Destination path exists!

gremlin@gremlin-VirtualBox:~/Загрузки/vma-extractor-master$ ./vma.py
usage: vma.py [-h] [-v] [-f] [--skip-hash] filename destination
vma.py: error: the following arguments are required: filename, destination

gremlin@gremlin-VirtualBox:~/Загрузки/vma-extractor-master$ ./vma.py /media/sf_DISK_H/vzdump-qemu-101-2023_01_12-16_22_49.vma /media/sf_DISK_D/raw
Error! Destination path exists!

gremlin@gremlin-VirtualBox:~/Загрузки/vma-extractor-master$ ./vma.py /media/sf_DISK_H/vzdump-qemu-101-2023_01_12-16_22_49.vma /media/sf_DISK_D/raw/
Error! Destination path exists!

gremlin@gremlin-VirtualBox:~/Загрузки/vma-extractor-master$ sudo ./vma.py /media/sf_DISK_H/vzdump-qemu-101-2023_01_12-16_22_49.vma /media/sf_DISK_D/raw
[sudo] пароль для gremlin:
Error! Destination path exists!

gremlin@gremlin-VirtualBox:~/Загрузки/vma-extractor-master$ nano /media/sf_DISK_D/raw/1.txt

Please help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.