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
Syncing an existing file will change its inode #2845
Comments
No. Syncthing always creates a new file, copies as much data from local and the rest from remote, and if it is sure the new file is correct, the old file is deleted and the new file is moved/renamed. |
... Which gives you atomic file updates. |
Yes. This is as intended. We never alter a file in place, for good and bad. There's a discussion (somewhere, I can't find it right now) and an idea (https://github.com/syncthing/syncthing/wiki/In-Place-Updates) for how to do in place updates, but this is not in the roadmap for now. In any case it would seldom be as clean as a straight append of data to a file to make your |
Why don't you just use -F, which follows file name and not inode? I don't think asking to change syncthing to work around deficiencies of tail is the right way to go. |
@AudriusButkevicius Please, don't get me wrong. I'm not asking for a change on Syncthing, I just wondered if there was an existing way to do that. Btw, I've pointed the downsides of using But that's a minor case for me, no worries. Syncthing is an awesome tool! Great job! :) |
Thank you all guys for the explanation! 😄 |
When a file is synced from an origin, its inode changes.
This means if I'm running an
tail -f
on that file, it will break. If I'm runningtail -F
, the whole file content is prompted.Is there any possible way to force Syncthing to preserve the file inode?
Version Information
Syncthing Version: v0.12.20
OS Version: Mac OS X Yosemite (running Syncthing in a Docker container)
The text was updated successfully, but these errors were encountered: