Re: Flat extract option

Denis Corbin <[email protected]>
Newsgroups gmane.comp.sysutils.backup.dar.support
Message-ID <[email protected]>
On 25/04/2021 11:04, Tobias Specht wrote:
> Hi Denis,

Hey Tobias!

>  
> I'm working a little bit on gdar again and I want to add the flat extract option "-f|--flat" of dar.
> I found the corresponding libdar api archive_options_extract.set_flat and I have a first draft.
> 
> My question is a little bit more in general about the flat extract option.
> As far as I understand, the option is meant to extract all files, regardless of the folder structure.
> Thats useful if I want to restore some files in a different directory, without the whole tree.

...more precisely it restores files in the directory pointed to by the
-R option.

> I was also thinking about the use-case, to extract a whole folder at a different location (without the upper tree structure).
> For example, we have the following folder structure:
> /
> /foo
> /foo/bar
> /foo/bar/file1.txt
> /foo/bar/file2.txt
> 
> And I want to extract the folder bar/ independently of its parent foo.
> 
> Is this possible with dar?

not actually.

> If not, do you think this would be worth thinking about?

The questions is then why not having saved the data with -R pointing to
foo for the archive to not contain the /foo/ part in any path files?

> 
> Best regards,
> Tobias
> 
> 

Cheers,
Denis
OpenPGP_signature (application/pgp-signature, 840 B) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.