-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Seafile doesn't sync all objects in git repos #2677
Comments
Hello @allo- , seafile will ignore uploading temporary files generated on linux by default, ending with ~. If you have such files in your local directory, these files will not be uploaded. |
My problem are files in |
Hello @allo- , how did you upload this directory? When uploading through a browser, the system may ignore these hidden files of git. You can try to upload through the client. |
No, I am working with the repo in a synced folder. On the other computer, git always crashes when I added commits and when I look at the problem there are just files missing in the .git folder. When I create a tar of the With git clone I would have thought that hardlinks could be a problem, but the repo was not cloned on the same filesystem and after a new commit, the new objects are unique, so they are just regular files not linked to another file. I wonder if git creates them in another unusual way that Seafile doesn't always handle correctly. Maybe something like the files being created (too) fast after each other or created as temp file and then renamed? |
Hello @allo-, if the client does not upload the .git directory at all, it means that the client is working normally. This problem may be related to the working mechanism of git. .git is the metadata directory of git. Seafile client will only upload the current directory status to the server. Other clients may have synchronized an intermediate state. You'd better synchronize the git repository through the synchronization mechanism of git itself, and the .git directory does not need to be copied. |
It does upload most of it and I want it to upload it (yeah, there are better ways to push git data around ... still I want it for some versioned folders). I am not talking about a shallow clone, but a full repo inside the .git folder of the project, so not only metadata, but the full repository content. I am not aware of a blacklist that prevents syncing the git folder. If there is any it is not working very well and I would like to be able to turn it off. |
Hello @allo- , in my case, all the files under the .git directory can be uploaded normally. Can you provide a more complete test procedure? Or you can check seafile.log and events.log to see if there is an error during the upload process that prevents the corresponding file from being uploaded. |
I can check the logs next time again. I've never seen an error (like having the sync error indicator on the tray icon). I'll look into the logs next time I sync from the other location. Are there any specific tests I can do then? |
I've made a diff what's missing for a repo (difference between "find >files.txt" on both sides) and four objects are not synced:
The files are not different but completely missing on the side where the repository is broken. I think the files are not different from other objects in the repo. Maybe git writes the files in some way or sets timestamps that may be a bit in the past or similar problems that prevent the seafile client from detecting the change? |
Hello @allo-, which version of the client are you using? |
On the end where the new files exist (and weren't uploaded): 8.0.5 (Ubuntu) But I have the problems since a longer time with updates in the meantime and I think its only now the 8 -> 9 thing and may have happened in the other direction as well. Forcing a resync of the library successfully adds the missing files to the repo. The problem is, that I am on the wrong computer to force the resync when I notice that a git repo doesn't work because of missing files. |
Hello @allo- , I think 8.0.5 is an older version, and there may be some bugs in this version that are causing problems. Please upgrade to the latest version and see if you still have problems. |
It's from the Ubuntu Repos. I can upgrade next week to another version. |
Many times when I put a git repo into a Seafile library, Seafile does not sync all objects. When I backup the repo and compare it afterward, some files in the object store are completely missing. I do not have a seafile-ignore.txt file in the library and no other idea why the files are ignored. Syncing other folders works without missing files.
The text was updated successfully, but these errors were encountered: