by jwr · 4y ago · 0 comments
Dropbox has become a real pain over the years (I've also been a paid Dropbox customer for a long time):
* adding bloat and features that I don't want or need
* constantly nagging me for upgrades
* lying that the admin password is required (it isn't)
* consuming large amounts of CPU when anything changes anywhere in the filesystem
If Dropbox had a subscription plan where I could pay to get just the basic file sync functionality, with no nagging, no prompting, and optimized CPU usage, I would be happy to hand over my money. But it seems the company is run by the marketing team now.
I highly recommend syncthing as a very, very capable replacement.
> over the last week, syncthing has corrupted my git repository twice. I reported this as an issue, but the issue was immediately closed with an explanation I disagree with.
> I no longer trust syncthing until this gets resolved, unfortunately.
https://news.ycombinator.com/item?id=23660438
—
I would absolutely be syncing directories containing git repos, for better or worse
My takeaway was „never keep git repos in a system that does its own distributed versioning”. I just do git push around so my remotes are up to date. Git is sort of dropbox with a manual gearbox, after all (and more, but that’s not the point).
I’m really unsure that this is a kind of easily solvable problem for either dropbox or syncthing. Unless your syncing product gets smart enough to understand what a git repository is and how some files have to be checked in in lockstep, that is. Otherwise, expect race conditions.
https://github.com/anishathalye/git-remote-dropbox
For me, it solved all of the corruption problems with using Dropbox for git storage. In the end, I decided it was too heavy weight, and wanted to be able to clone my repo on machines that might not have anything other than "git" installed, but until I reached that point, I was a happy user of it.
I'm not aware of a similar tool for syncthing.
As an example problem-case, say your first device checks out branch A and your second device checks out branch B. Some files conflict, which is likely reasonably handled as any filesync application needs to handle conflicting updates. But any files that are changed in one and not in the other end up getting sync'ed over into the other, including inside your GIT directory, which will very likely lead to an illegal GIT directory state.
As a toy example, pretend that the .git internals require that at any given time, `.git/activebranch/` must contain exactly one file whose filename is the name of the active branch, and git maintains this invariant. By syncing changed files, any filesync utility would break this invariant by resulting in `.git/activebranch/` containing two files, due to each side seeing a new file that the other side needs to acquire. Depending on how such a problem might manifest in real life as a result of performing a file-based sync on two instances of a git directory, this could lead to your .git directory entering a state in which git doesn't know how to interpret it.
--
This isn't a syncthing problem as such, it's a problem of trying to use a file syncing application on the internal state of an application on two different machines with two different states, and expecting the result to be a valid state.
I think that we can narrow the problem down to the fact that git's internal state is represented in a way that is transparent to syncthing (a folder of files), that it will attempt to sync, but only partially succeed. If git's internal state was a single database file, you wouldn't get corruption, just a syncthing conflict file.
@jwr can you link the issue you reported?
The only major issue I had was performance on TrueNAS/FreeBSD, Syncthing tends to keep a lot of files open. Increasing maxfiles/maxvnodes fixed it. [0]
On a sidenote, what's the point of these limits if your entire system becomes unusable if you reach them?
Not offering reasonable storage for a reasonable price is a way to keep users that they don’t want away from their service.
Just like 1Password. They are extremely non subtle in pushing users that want local vault away from their customer base.
I don’t understand how this still hasn’t been addressed. On macOS at least (not sure about other platforms), rather than subscribing to filesystem events for the synced folders, it subscribes to FS events for literally everything and checks to see if each is relevant to the folders it should sync.
I love it, and turned on in Signal as well. Otherwise I'll forget it eventually.