borgbackup / borg

Deduplicating archiver with compression and authenticated encryption.
https://www.borgbackup.org/
Other
10.76k stars 734 forks source link

`ls`-like file view or `borg list --depth` to limit subdirectory recursion #8268

Open mlell opened 1 week ago

mlell commented 1 week ago

Have you checked borgbackup docs, FAQ, and open GitHub issues?

I have checked the issue tracker for "borg list depth" and "borg list single folder" but to no avail. The documentation on "borg list" does not mention anything except --exclude. The FAQs do not mention this problem.

Is this a BUG / ISSUE report or a QUESTION?

ISSUE

... well a wishlish item kinda....

Your borg version (borg -V).

borg 1.4.0

Operating system (distribution) and version.

Rocky Linux 9

Hardware / network configuration, and filesystems used.

Four NUMA nodes, Intel(R) Xeon(R) CPU E7-4890, NFS-attached network disks

How much data is handled by borg?

500GB

Full borg commandline that lead to the problem (leave away excludes and passwords)

not applicable

Describe the problem you're observing.

If i have a backup I sometimes want to get an overview by browsing it similar to what I would do with cd and ls -- go into a directory, then see what's inside. With borg list, I always get a list of each and every subfolder and their files. I have found no argument like the -max-depth of the find utility to see only the direct contents of a folder.

It might be possible to cook up something with --exclude, but that takes forever, it probably lists the whole backup and filters afterwards.

Am I using this tool wrong as I seem to be the only one with this relatively simple problem? If you think it is worthwhile to add a borg ls or borg list --depth 1, that would be awesome!

Can you reproduce the problem? If so, describe how. If not, describe troubleshooting steps you took before opening the issue.

not applicable

Include any warning/errors/backtraces from the system logs

no errors

infectormp commented 1 week ago

Why don't you use the borg mount command and then any of the find\list etc commands on the mounted archive?

mlell commented 1 week ago

Hi, thanks for taking a look on this. I am not the administrator of the machine and fuse is not available here. The lighter system requirements of using a plain text shell would make things much easier for me.

ThomasWaldmann commented 6 days ago

https://borgbackup.readthedocs.io/en/stable/usage/list.html

You can maybe use the PATH argument or the patterns to list a specific folder or paths matching the pattern.