Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exclude big files? #902

Closed
niksfirefly opened this issue Apr 13, 2016 · 9 comments
Closed

exclude big files? #902

niksfirefly opened this issue Apr 13, 2016 · 9 comments

Comments

@niksfirefly
Copy link

Is there a way to exclude big files (bigger/smaller --than-size) with borg create?

@ThomasWaldmann
Copy link
Member

No (not yet?).

See also: jborg/attic#330

@niksfirefly
Copy link
Author

ok I assume it is not on roadmap list?

@ThomasWaldmann
Copy link
Member

it has not been assigned to a milestone yet.

if you want to help, you could try the workaround suggested in the linked ticket.
if it works well. we maybe do not need the feature.
if it doesn't work well, tell us why - this might be a reason to add this feature.

@edgewood
Copy link
Contributor

edgewood commented Apr 15, 2016

This would be a good place to use --files-from (on my phone and can't find the ticket #, but it's been discussed recently).

@enkore
Copy link
Contributor

enkore commented Apr 15, 2016

#841

@cbothamy
Copy link

The solution linked in the ticket obviously works.

However, I'd rather have all the excluded files directive at one single place, and it's quite uneasy to have to run another process and rely on a temporary file before running borg. (also, the find -size syntax is quite clumsy, for example try find /home -size -1M ...).

I have a small 50 lines patch that extends patterns.py and adds the possibility to exclude files based on filesize and optionnally file extension.

If anybody is interested, I can add tests for this new directive, and forward the diff to the mailing list.

@n-st
Copy link
Contributor

n-st commented Oct 7, 2017

Picking this back up because I have another slightly different use case (→ #3097).

The workaround will cause a significant performance penalty on anything beyond tiny datasets (anything larger than your RAM, I'd guess) and, more importantly. introduces a race condition between generating the file list and actually processing the files.

We're already looking at the files' stat during processing, so theoretically we'd only need two new arguments in argparse, an "x MB"-to-"n bytes" conversion and an if condition in do_create (near the existing check for one_file_system).

I'd vote for using the same option names and syntax as rsync (--min-size=42K / --max-size=123M) as it is easy to understand for the user and easy to parse for the program (easier than find's -size or the --exclude-by-size '>=15M' from the attic bug report, at any rate).

@ThomasWaldmann ThomasWaldmann added this to the 1.1.x milestone Dec 31, 2017
@varac
Copy link

varac commented Jan 6, 2018

Thx for assiging this to a milestone, looking forward to it!

@ThomasWaldmann
Copy link
Member

superseded by #4102.

@ThomasWaldmann ThomasWaldmann removed this from the 1.1.x milestone Oct 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants