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

nfs #536

Closed
minger0 opened this issue Dec 22, 2021 · 13 comments
Closed

nfs #536

minger0 opened this issue Dec 22, 2021 · 13 comments

Comments

@minger0
Copy link

minger0 commented Dec 22, 2021

Hello Jarun, thank you for buku! I am a new user, and I would like to use buku for sharing bookmarks on a local network via nfs. I use version 4.6. It has no -z option. For a buku --ai I get
DB file is being created at /mnt/Stephen/data/bookmarks.db.
...
[ERROR] database is locked
when it would be inserting the records. So the result is an empty bookmarks table. No journal file.
Following https://stackoverflow.com/a/52378465 I checked https://sourceforge.net/projects/locktests/files/, for which I get an all pass. (It does corrupt the db file.) This means that it should be possible. I tried both symlink, and the --db.
Would you share your opinion and make a suggestion what I should be doing to get it working?

@jarun
Copy link
Owner

jarun commented Dec 26, 2021

Can you create locally, and later move and symlink?

@minger0
Copy link
Author

minger0 commented Dec 27, 2021

It is an option, yes. The back side of it however is that I will not be able to add/remove bookmarks from the browser plugin either. It is then just read-only use.

@jarun
Copy link
Owner

jarun commented Jan 9, 2022

Why can't you add from the browser? The browser plugin should refer to the symlink and the changes should go to the actual file.

@minger0
Copy link
Author

minger0 commented Jan 9, 2022

My idea was that since the inserts to the db on nfs did not work in buku core, the browser plugin that triggers the same kind of inserts may not work either. But you are right, I will just try and let you know.

@minger0
Copy link
Author

minger0 commented Jan 9, 2022

Created locally. Moved. Symlinked.

buku -a https://ddg.gg search engine, privacy -c Search engine with perks
similar tags:
...
select: 
[ERROR] add_rec(): attempt to write a readonly database

Ok, has nottested with the browser plugin, but could that ever work if buku does not?

@minger0
Copy link
Author

minger0 commented Jan 16, 2022

Perhaps one step back.
How are we supposed to set up buku on a local network? Would it be that the bukubrow-host would need to run on the server that is giving the nfs right now?

@jarun
Copy link
Owner

jarun commented Jan 22, 2022

@rachmadaniHaryono can you please guide?

@rachmadaniHaryono
Copy link
Collaborator

It has no -z option

i think it should be -g instead of -z to enable debugging

buku/buku

Line 5269 in c7243ad

-g, --debug show debug information and verbose logs''')

unfortunately i have no experience on nfs

How are we supposed to set up buku on a local network? Would it be that the bukubrow-host would need to run on the server that is giving the nfs right now?

i assume so

other than that if you are using bukuserver, you can host it on 0.0.0.0 on computer on local network and access it by that computer ip 192.xxx.xxx.xxx

but that bukuserver is only working if you also have write permission which is your main problem on this issue

@jarun
Copy link
Owner

jarun commented Jan 22, 2022

Yes, I requested you to guide on the installation part only.

@rachmadaniHaryono
Copy link
Collaborator

Yes, I requested you to guide on the installation part only.

which installation? buku, bukuserver or bukubrow-host?

other than what listed on readme of both buku and bukubrow-host and also pipx installation of buku, i have no other idea on other os


another method i can think about is just to setup cron job to sync your buku database to nfs system

or setup alias so your computer will copy the database after every command

something like

alias buku-copy='(xclip -o -sel clip | xargs buku -a) && cp /path/to/local/database.db /path/to/nfs/database.db'

@jarun
Copy link
Owner

jarun commented Jan 22, 2022

How are we supposed to set up buku on a local network? Would it be that the bukubrow-host would need to run on the server that is giving the nfs right now?

@rachmadaniHaryono
Copy link
Collaborator

How are we supposed to set up buku on a local network?

i don't know if bukubrow host can be used on local network.

i recommend to ask on bukubrow host repo for that

but for bukuserver i said this before

other than that if you are using bukuserver, you can host it on 0.0.0.0 on computer on local network and access it by that computer ip 192.xxx.xxx.xxx

which just basically

  1. install buku on the computer that serve that nfs system
  2. run bukuserver run --host 0.0.0.0. you may have to change port number if it is used
  3. access it using that server ip from your computer browser 192.xxx.xxx.xxx

https://stackoverflow.com/questions/7023052/configure-flask-dev-server-to-be-visible-across-the-network

from that page

While this is possible, you should not use the Flask dev server in production. The Flask dev server is not designed to be particularly secure, stable, or efficient. See the docs on deploying for correct solutions.

@jarun
Copy link
Owner

jarun commented Mar 23, 2022

Closing as we have already shared a way to do this.

@jarun jarun closed this as completed Mar 23, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Apr 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants