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

Change default value of --min-change to 1 #37

Closed
jmidgren opened this issue Mar 28, 2020 · 2 comments
Closed

Change default value of --min-change to 1 #37

jmidgren opened this issue Mar 28, 2020 · 2 comments

Comments

@jmidgren
Copy link

jmidgren commented Mar 28, 2020

I'm not sure I got the exact meaning of this flag, but let me give an example so that you can see if my concerns are justified :-).

If I have a ZFS dataset for my /etc folder and I change a single byte in a small configuration file, then I assume the number of bytes written to register this change will be a very low number. Consequently the dataset will not be considered changed and no snapshot be made. This would mean that I have to remember to set this option to ensure all minor (but perhaps crucial) changes are backed-up.

Wouldn't the safe default for this option thus be 1 rather than 200000 (as with the methods that handle this internally in the python code)? Then you would not risk missing small but important changes to go unnoticed. This option is still very valuable of course, depending on the kind of data the dataset holds it may be great to avoid making snapshots for small changes, but it seem reasonable that users explicitly ask for this behavior than the other way around.

I saw the discussion in #33, and since the number 200000 is still rather arbitrary, 1 also seems like a reasonable default due to the clear distinction between 0 (no changes at all) and 1 (an ever so small change).


BTW, I really love this project! I have been looking for similar solutions but none have taken it all the way in the sense that this solution does.

@psy0rz
Copy link
Owner

psy0rz commented Mar 29, 2020

First of all: Thanks for trying zfs-autobackup. :)

Indeed the 200000 is what we use to backup Proxmox datasets. If a proxmox dataset has been replicated from another node, its important for us to recognize this and not backup the dataset again. However, for some reasons there often are small changes that should be ignored.

I briefly looked into this, but i couldnt find out why this was happening. (probably something prox does?) So thats why i choose this arbitrary number, keeping in mind that surely more data changes normally. I never considered things like /etc directories that only have small changes.

When i changed it from hardcoded to configurable, i should have also made it 1 instead of that arbitrary 200000. I will do that now and i will adjust the example for proxmox to reflect this.

@psy0rz psy0rz closed this as completed in bcf73c6 Mar 29, 2020
@jmidgren
Copy link
Author

jmidgren commented Apr 1, 2020

Ah, that makes sense. I'm glad you chose to change it though!

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

2 participants