From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 449B85BDA6 for ; Wed, 8 Jul 2020 11:56:56 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 34F6B2F9A9 for ; Wed, 8 Jul 2020 11:56:26 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 6ACF32F99A for ; Wed, 8 Jul 2020 11:56:24 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id E528342742 for ; Wed, 8 Jul 2020 11:47:54 +0200 (CEST) Date: Wed, 8 Jul 2020 11:47:46 +0200 (CEST) From: =?UTF-8?Q?Fabian_Gr=C3=BCnbichler?= To: Proxmox VE user list Message-ID: <190302424.156.1594201666202@webmail.proxmox.com> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Normal X-Mailer: Open-Xchange Mailer v7.10.3-Rev15 X-Originating-Client: open-xchange-appsuite X-SPAM-LEVEL: Spam detection results: 0 AWL 0.133 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [proxmox.com] Subject: Re: [PVE-User] qmrestore stopped working for filename restrictions X-BeenThere: pve-user@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE user list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2020 09:56:56 -0000 > Simone Piccardi via pve-user 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.