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 D6D64B02C for ; Wed, 6 Apr 2022 11:15:40 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id C6C82286D4 for ; Wed, 6 Apr 2022 11:15:40 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (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 40DBF286C1 for ; Wed, 6 Apr 2022 11:15:40 +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 09BF441FA4 for ; Wed, 6 Apr 2022 11:15:40 +0200 (CEST) Content-Type: multipart/alternative; boundary="------------p0utOPdGVNPI1ZleV2BCUZj9" Message-ID: <71ae28f0-e07f-8190-d669-388f5515f99b@proxmox.com> Date: Wed, 6 Apr 2022 11:15:28 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Content-Language: en-US To: Dietmar Maurer , Proxmox Backup Server development discussion References: <1074870458.1383.1649233576312@webmail.proxmox.com> From: Dylan Whyte In-Reply-To: <1074870458.1383.1649233576312@webmail.proxmox.com> X-SPAM-LEVEL: Spam detection results: 0 AWL 0.669 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% HTML_MESSAGE 0.001 HTML included in message KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment NICE_REPLY_A -0.631 Looks like a legit reply (A) SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - Subject: Re: [pbs-devel] [PATCH proxmox-backup] fix #3613: catalog_shell: include matched dir's contents on restore X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Apr 2022 09:15:40 -0000 This is a multi-part message in MIME format. --------------p0utOPdGVNPI1ZleV2BCUZj9 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 4/6/22 10:26, Dietmar Maurer wrote: >> On 04/04/2022 6:19 PM Dylan Whyte wrote: >> >> >> Prior to this, during an interactive restore, if a directory was matched >> via a pattern match or selection, only the empty directory would be >> restored, and not its contents. > Why not simply use "**" if you want to restore a whole tree? I had originally thought about this, but there are some good reasons for the patch: * I believe there is an expectation when selecting a directory for restore, that you would like for the entire directory to be restored (unless any sub-directory is explicitly excluded). * The 'select' command doesn't do pattern matching, so it wouldn't be able to use '**' to restore the directory. This point doesn't apply to 'find' and 'restore --pattern'. * With the current implementation, '**' won't restore empty sub-directories of a matched directory, in spite of the fact that they appear in the match list. --------------p0utOPdGVNPI1ZleV2BCUZj9 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
On 4/6/22 10:26, Dietmar Maurer wrote:

      
On 04/04/2022 6:19 PM Dylan Whyte <d.whyte@proxmox.com> wrote:

 
Prior to this, during an interactive restore, if a directory was matched
via a pattern match or selection, only the empty directory would be
restored, and not its contents. 
Why not simply use "**" if you want to restore a whole tree?

I had originally thought about this, but there are some good reasons for the patch:

  • I believe there is an expectation when selecting a directory for restore, that you would like for the entire directory to be restored (unless any sub-directory is explicitly excluded).
  • The 'select' command doesn't do pattern matching, so it wouldn't be able to use '**' to restore the directory. This point doesn't apply to 'find' and 'restore --pattern'.
  • With the current implementation, '**' won't restore empty sub-directories of a matched directory, in spite of the fact that they appear in the match list.
--------------p0utOPdGVNPI1ZleV2BCUZj9--