From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: Proxmox VE user list <pve-user@lists.proxmox.com>
Subject: Re: [PVE-User] qmrestore stopped working for filename restrictions
Date: Wed, 8 Jul 2020 11:47:46 +0200 (CEST) [thread overview]
Message-ID: <190302424.156.1594201666202@webmail.proxmox.com> (raw)
In-Reply-To: <mailman.33.1594198738.12071.pve-user@lists.proxmox.com>
> Simone Piccardi via pve-user <pve-user@lists.proxmox.com> hat am 08.07.2020 10:53 geschrieben:
>
>
> _______________________________________________
> pve-user mailing list
> pve-user@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-user
> Hi,
>
> I have a problem with qmrestore not working on some dump filenames, it
> worked some time ago, but with the last version:
>
> # pveversion
> pve-manager/6.2-6/ee1d7754 (running kernel: 5.4.44-1-pve)
>
>
> I got:
>
> # qmrestore vzdump-qemu-fuss-server-10.0-latest.vma.lzo 110 -unique
> -storage local-lvm
> ERROR: couldn't determine archive info from
> '/var/lib/vz/dump/vzdump-qemu-fuss-server-10.0-latest.vma.lzo'
>
> I found that the problem is that the name do not follow an expected
> naming scheme (renaming the file as
> vzdump-qemu-000-0000_00_00-00_00_00.vma.lzo works fine). It work also if
> I make /var/lib/vz/dump/vzdump-qemu-fuss-server-10.0-latest.vma.lzo a
> simbolic link to vzdump-qemu-000-0000_00_00-00_00_00.vma.lzo, and I find
> this quite strange).
>
> Anyway that error message is at least misleading: if the problem is the
> filename not having a right name, just tell this: from the message
> wording at first I thinked the file was corrupted.
how is it misleading? we tried to determine the archive info (backup time, format, compression, backed-up guest ID and type) from the file name, and were not able to..
>
> But then I do not undertstand why this restriction suddenly come up, and
> what's the problem of restoring a VM from a file having a more
> descriptive name.
the code was refactored to allow re-use of the same logic in more places, was initially to strict, got relaxed, but not as far as your use case ;)
>
> That one I'm restoring is a template image I'm distributing, I'd like to
> avoid names like vzdump-qemu-000-0000_00_00-00_00_00.vma.lzo.
>
> I tried also to overcame the restriction using the standard input as the
> source but I got a different error:
>
> # cat /var/lib/vz/dump/vzdump-qemu-fuss-server-10.0-latest.vma.lzo|
> qmrestore - 110 -unique -storage local-lvm
> restore vma archive: vma extract -v -r /var/tmp/vzdumptmp31864.fifo -
> /var/tmp/vzdumptmp31864
> command 'set -o pipefail && vma extract -v -r
> /var/tmp/vzdumptmp31864.fifo - /var/tmp/vzdumptmp31864' failed: got timeout
in that case you need to pipe in the extracted vma, not the compressed one.
>
> Is there a way to restore a file dump avoiding to rename it?
yes and no. currently you need at least the prefix 'vzdump-qemu-\d+-', e.g. 'vzdump-qemu-0' if you want to use a VMID that is not usable in general and thus not colliding. I see no reason why this could not be relaxed further to allow the full 'vzdump-qemu-*.FILEXTENSION' though, so I'll send a patch shortly to do just that.
parent reply other threads:[~2020-07-08 9:56 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <mailman.33.1594198738.12071.pve-user@lists.proxmox.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=190302424.156.1594201666202@webmail.proxmox.com \
--to=f.gruenbichler@proxmox.com \
--cc=pve-user@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox