I setup CLI client to synchronize with a folder that is on a NAS share(mounted with CIFS).
Changes (create, delete folders/files) that I do on the NAS share directly are not synced with Seafile server.
However, changes that I do using say Seafile app on the phone or Web app get synchronized fine and I see these changes in the NAS share.
If I stop CLI client and start it, prior changes made on the NAS share directly then get synced to Seafile
I mean, I could create a cron job to stop and start the CLI client every so often, but that is a pretty silly solution.
Any help?
File changes are not reported to the seafile client if the filesystem is on a CIFS network drive. This is a system limitation! This problem is also present with the seafile GUI.
Thank you very much for this! That makes sense.
I wish there was a CLI command to specify this. Unfortunately, I cannot install GUI on a headless server as I’d assume it would require some sort of basic xwindows?
Very useful information nevertheless.
Yes, but you don’t need to run a local X windows if you are coming from another linux client with a running X. Simply install the GUI and login from a host running X with “ssh -X $headlesshost” and start the GUI.
I honestly never used the -X option. Thanks for that!
Just tried it and got GUI to come up. That said, it displays a whole lotta symbols instead of readable letters and I cannot input anything. I think I need to configure something in the options I pass via SSH.
Thanks Germeier. That did it!
Now, changes that are done directly on NAS share getting picked up and updated on the library!
You are my hero.
The question now is, whether it is possible to specify this “sync interval” somewhere in the config files without going through the below trouble as it does not look like a sane solution.
I’ve documented what I had to do to make it work from the very beginning. Here it is:
Assumptions:
-OS: CentOS 7.3.1511
-seafile 6.0.6 installed and running
-NAS is mounted using CIFS and located in /mnt/nasshare
ssh into the server running seafile
add repo for seafile CLI/GUI for CentOS7 client from here
install cli client yum install seafile
initialize seaf-cli client to create config file(~/.config/Seafile) as well as specify where to store client data seaf-cli init -d /opt/seaf-client
start seaf-cli client seaf-cli start
create library to sync with this client seaf-cli create -s http://x.x.x.x:8000 -n LibraryTest -u username@email.com -p password
list the library id I just created to sync with this client (a long alphanumeric number) seaf-cli list
sync above library with this the NAS share (using library id) seaf-cli sync -l 645gf65g-f87g-454e-gb54-76fcg5y8b524 -s http://x.x.x.x:8000 -d /mnt/nasshare/seafile/ -u username@email.com -p password
stop seaf-cli client seaf-cli stop
install seafile-client-qt (GUI) from repo in step 1 yum install seafile-client-qt
Install xauth for X11 forwarding yum install xauth
reconnect via SSH now with X forwarding options ssh -X -A root@x.x.x.x
attempting to run seafile-applet launches the GUI but I cannot type anything in in the fields, the fonts are all messed up and there are errors on the CentOS side.
after a bit of reading, I did the following yum install qtcreator export QT_XKB_CONFIG_ROOT=/usr/share/X11/xkb qtcreator
Now running seafile-applet launches the GUI client and I am able to type but the fonts are still messed up
as per germeier’s direction, I copied below fonts from my linux machine (Linux Mint 17) to CentOS into the same path /usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf /usr/share/fonts/truetype/liberation/LiberationSans-Regular.ttf /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf
CentOS did not have truetype/dejavu, truetype/liberation folders so I had to create them
launch seafile-applet again
Now I am able to type and actually see what I am typing.
Specified my server, and connected successfully.
specify sync interval as per this, I went with 60 seconds.
close GUI client
start seaf-cli seaf-cli start
All done. I tested and it indeed worked as intended. More testing needed tho.
Please feel free to correct and suggest a different method of doing this.
Once again, Germeier, thank you so very much for lending a hand!
An easier (but still “hacky”) way to do this should be:
→ sqlite3 seafile/Seafile/.seafile-data/repo.db
SQLite version 3.11.0 2016-02-15 17:29:24
Enter “.help” for usage hints.
sqlite> INSERT INTO “RepoProperty” VALUES(‘$REPOID’,‘sync-interval’,‘$SECONDS’);
sqlite>
or change the value
UPDATE “RepoProperty” SET value = ‘$SECONDS’ WHERE repo_id = ‘$REPOID’ AND key = ‘sync-interval’;