borg icon indicating copy to clipboard operation
borg copied to clipboard

archive: Store include/exclude instructions in metadata

Open sophie-h opened this issue 3 years ago • 4 comments

I was thinking that being able to look up what this archive should actually include could be a helpful feature.

  1. To find out what actually should be included/excluded in this archive.
  2. For clients to suggest to inherit the include/exclude from the latest archive while adding a backup to the client.

This would require collecting all the --pattern, --exclude, --exclude-from sources and to be exact also the --keep-exclude-tags, --exclude-if-present, --exclude-caches information and store them for each archive.

sophie-h avatar Jan 22 '22 17:01 sophie-h

@ThomasWaldmann This is very high on my wishlist. Does this need any conceptual considerations for 2.0 or is it rather independent?

sophie-h avatar Jul 17 '22 15:07 sophie-h

  • we already store the full commandline
  • reading stuff from files can result in a lot of data (could have 1 line per file * millions of files).

ThomasWaldmann avatar Jul 17 '22 15:07 ThomasWaldmann

  • we already store the full commandline

Yes, I'm already extracting some of the information from there. But if a backup is created with an --exclude-from file argument and the file was in /tmp that's not helpful.

  • reading stuff from files can result in a lot of data (could have 1 line per file * millions of files).

I'm not sure if you maybe misunderstood: I don't want to list all included/excluded files. I only want, for example, to combine the list of --excludes and the content of --exclude-file in the metadata. It would be fine to limit it to 1000 lines and indicate that there was more content.

sophie-h avatar Oct 07 '22 00:10 sophie-h

A patterns file, esp. with "full match" patterns can be simply a list of all files to backup, so it can be huge.

Not sure I want to have a feature that can not always work.

ThomasWaldmann avatar Oct 07 '22 10:10 ThomasWaldmann