Cherrytree - problem and/or alternative

I have used Cherrytree for ages, but I have moved my data to a server and apparently it doesn’t like it’s files being anything other than local.

Has anyone experienced this and have a solution, or alternatively another app which does the same sort of thing (nested note-taking etc.)

Thanks

@KermitXYZ Hi, perhaps describe what you mean on another server and what is the issue you see with the files?

I would suspect the database etc is not being synced?
https://github.com/giuspen/cherrytree/issues/266
https://github.com/giuspen/cherrytree/issues/2872

Can you set a sym link to the directory on the server?
I used CherryTree but about 2 years ago I switched to Zim-Wiki which was much better suited for my needs. I keep all my data local but on a separate HD partition and Zim didn’t like it either. A sym link from /home/user/zim to /data/zim solved the problem. I backup normally from the /data/zim directory
Not sure if sym links work to a remote server though …

So, I had all my data on a local NVME, mounted at /mnt/data. I then moved it to a server. Server has a samba share. Workstation has the following in fstab:

//server/share    /mnt/data  cifs  etc...

I then access all my files from /mnt/data. This works perfectly for everything except my Thunderbird profile, and Cherrytree.

The Thunderbird profile I have locally, and Sync it to the server. This is not so simple for the Cherrytree files as there are many of them all in different directories for different projects.

The error is that when I try to save the file, I get an error:

xxx.ctb write failed - is file blocked by a sync program?

There is no sync program running, and if I copy the file to the local machine, I can open and save it fine, so the file itself is OK. It seems like Cherrytree just does not like the file being on a network share (even though mounted locally [if that is the correct terminology?] ).

This is a HUGE problem for me as I have so much data in Cherrytree files.

@KermitXYZ I suspect the database is pointing at location X and the files are at location Y. I would also surmise this is also the case for Thunderbird.

I wonder if there is a UUID recorded in the database for the data location.

If you mount the share as say /mnt/data_new and then symlink ln -s /mnt/data_new /mnt/data does this change the situation?

I use Qownnotes.
Notes are stored locally and versionned with git.
Maybe synchronised with a nextcloud server.

1 Like

I am not sure how that would help, as there is only the one file “example.ctb”

So how could the database and files be different?

OK, so I think I have a solution. There are two ways in which Cherrytree can save files. From Cherrytree website:



SQLite is a self-contained database and has a .ctb or .ctx extension when used with Cherrytree. Instead of loading the complete document at runtime, Cherrytree only accesses the tree structure and selected node. This makes opening your document faster but may slow functions such as searching and selecting nodes when they’re used for the first time in a session. Only modified nodes are rewritten upon saving, decreasing save time.

Performance loss with SQLite is lower than with XML, making it better suited for larger documents. The Save and Vacuum feature should be used periodically to keep SQLite files compact.

XML is a markup language and has a .ctd or .ctz extension when used with Cherrytree. These files are fully loaded at runtime, making searching and navigating through nodes faster, but slowing the initial load time. They are also completely rewritten upon saving, slowing the save process.

XML is more accessible and easier to convert to other file types but should not be used with large documents.


Changing from SQLite to XML and I am able to save the files on the share.

I still don’t fully understand the problem though - surely as far as the program is concerned, /mnt/data should be good enough for it to read/write OK?

@KermitXYZ file locking…

Add “nobrl” to your fstab options for the mount.

Ref: https://github.com/giuspen/cherrytree/issues/473

OK, so using mount options defaults,nobrlthe error changes to the following:

@KermitXYZ What about the nolock option?

Same error as above unfortunately.

@KermitXYZ Looks like you might need to stick with xml…

You could try adding your voice to https://github.com/giuspen/cherrytree/issues/2872 and the steps you have taken to date?

Hi Malcolm

Looks like XML it is. The last link you sent was actually myself asking the question, but zero replies to date.

Many thanks for all your help
Richard

I don’t use samba, so can’t really offer any more. Hopefully upstream will respond.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.