Restore previous notes DB?

I sync my gnotes using pCloud. Recently gnote crashed, and when I re-opened it all my notes were gone. When I look at the sync folder, it looks like older versions of the notes are possibly kept (the folders labeled 0, 1, 2. See screenshot…). Is there some way to restore older versions?

This is rather frustrating, as I really like the application and have been using it for work. It is rather painful if all my notes are gone, and I don’t feel like I can trust the application with my data now. As an alternative I’ve been using Joplin (bonus - can access on my phone), but it’s a much heavier app than gnote. Sometimes I just want an app that opens instantly and does just enough!

1 Like

Tracked in:

Yikes, that is unfortunate.
Start by looking into that manifest.xml. Based on it’s size the number of notes should not be particularly big, though I see from folder you’ve been syncing quite a bit, could be that the file in root is corrupted.
Each folder should have a folders in it containing notes an manifest file, the last one should have a manifest that’s identical to one in the root.
Gnote itself should have a manifest in it’s config directory (for regular install it’s ~/.config/gnote, you use flatpak, it seems to be ~/.var/app/…/config

New gnote launch (no manifest in config) should be able to sync notes as long as the manifests are correct.

If you do tests on that, please either run gnote from terminal to capture output (maybe journalctl -t gnote would give you log from last run too?).

I’m interested in any errors you can spot.

Oh, and I didn’t ask: whattype of sync do you use? (local folder or web one).

If you look at gnote’s data folder (when not using the flatpak version, it would be ~/.local/share/gnote/), you might be able to restore your note files from your “0” or “1” folders from your screenshot above (I’m just guessing).

This is what a normal gnote data folder looks like:

I looked in 0, 1, etc folders and in each one I have subfolders labeled 100, 101, 102 etc… And in each of those there are *.note files. So you’re suggesting I should move the *.note files into the top level of the Gnote_sync directory?

I’ve only glanced at the contents of this folder before and thought it always had this structure. But I’m likely misremembering then…

Make a backup of all this before doing anything.

As you can see in my screenshot, the folder structure is flat here, but I don’t have such a thing as a “gnote_sync” folder, so I don’t know what you need to do exactly. You probably only need to grab stuff from one of those numbered folders. You could compare between those folders using Meld to figure out what is the latest / correct version.

Those folders contain your note history. Each folder contains new and updated notes since previous sync.
A new instance of Gnote should be able to take notes from sync folder. Make sure you don’t have gnote process running (it can be a background process), Rename gnote folders in data and config folders (~/.local/share/gnote and ~/.config/gnote) then launch and sync.

1 Like