[pbs-devel] [PATCH proxmox-backup 6/8] file-restore: fallback to mpxar if catalog not present

Fabian Grünbichler f.gruenbichler at proxmox.com
Fri Jun 7 13:35:38 CEST 2024


On June 7, 2024 12:43 pm, Christian Ebner wrote:
> On 6/7/24 12:32, Fabian Grünbichler wrote:
>> On June 7, 2024 11:43 am, Christian Ebner wrote:
>>> The `proxmox-file-restore list` command will uses the provided path to
>>> lookup and list directory entries via the catalog. Fallback to using
>>> the metadata archive if the catalog is not present for fast lookups in
>>> a backup snapshot.
>>>
>>> This is in preparation for dropping encoding of the catalog for
>>> snapshots using split archive encoding. Proxmox VE's storage plugin
>>> uses this to allow single file restore for LXCs.
>>>
>>> Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
>>> ---
>>>   proxmox-file-restore/src/main.rs | 72 +++++++++++++++++++++++++-------
>>>   1 file changed, 56 insertions(+), 16 deletions(-)
>>>
>>> diff --git a/proxmox-file-restore/src/main.rs b/proxmox-file-restore/src/main.rs
>>> index 38cc1ce85..a09873467 100644
>>> --- a/proxmox-file-restore/src/main.rs
>>> +++ b/proxmox-file-restore/src/main.rs
>>> @@ -124,7 +124,8 @@ async fn list_files(
>>>           ExtractPath::ListArchives => {
>>>               let mut entries = vec![];
>>>               for file in manifest.files() {
>>> -                if !has_pxar_filename_extension(&file.filename, true)
>>> +                if !file.filename.ends_with(".pxar.didx")
>>> +                    && !file.filename.ends_with(".mpxar.didx")
>>>                       && !file.filename.ends_with(".img.fidx")
>> 
>> is this hunk here stray? or why do we now list regular pxar files here
>> but didn't before? this seems unrelated to the rest of this patch?
> 
> This makes sure that the `.mpxar` is not listed as archive, e.g. when 
> accessing the snapshot via the Proxmox VE file browser. (Please note the 
> negation).
> 
> But I will split this off into a single patch, adding some context as 
> commit message.

but the previous version using the helper had the same effect of not
listing mpxar archives, the only difference is that thew new variant
does list ppxar ones?




More information about the pbs-devel mailing list