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

Allow to ignore file by size #330

Open
cljoly opened this issue Jul 25, 2015 · 5 comments
Open

Allow to ignore file by size #330

cljoly opened this issue Jul 25, 2015 · 5 comments

Comments

@cljoly
Copy link

cljoly commented Jul 25, 2015

It would be great to be able to ignore file by their size, like this

attic create /somewhere/my-repository.attic::Monday ~/Documents --exclude-by-size '>=15M'

to exclude file superiors to 10Mo.

We can do it now with a combination of --exclude-from and find command, but that force to read everything twice, which can be very long.

@ThomasWaldmann
Copy link
Contributor

sounds nice. i already had a usecase like follows for such a feature:

imagine a really slow connection between a production server and its (remote) backup-repo server.
you are creating the initial backup and you want to backup most files (small, but important, like documents) rather quickly (and skip the big, less important stuff).

So, one would do multiple backup runs with increasing "exclude size" (and finally not exclude by size any more). By doing that, backing up your big unimportant files won't delay you small important files backup.

@dragetd
Copy link

dragetd commented Nov 17, 2015

I know this usecase and had it myself before. But implementing this as a feature in attic/forks would be violating the KISS principle IMHO.

Especially as long as you can generate exclude-files with a simple 'find /home/foo -size +1000k' …

I would say it is not needed in attic/forks.

@ThomasWaldmann
Copy link
Contributor

@dragetd good idea. :)

@cljoly
Copy link
Author

cljoly commented Nov 20, 2015

@dragetd @ThomasWaldmann

Using a find command before running attic forces to read the data structure once and then when once again with attic.

It's a problem in my opinion with big set of data in mind.

I understand that KISS principles are an important concern, but performance is a quite important one too.

@n-st
Copy link

n-st commented Oct 7, 2017

Also worth noting that separating listing and processing the files will create a race condition: if you generate an exclusion list, you might backup files that were created in the meantime, but should be excluded based on your criteria. On the other hand, if you generate an inclusion list, you will miss all new files that were created between the listing and processing stage.

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

4 participants