-
-
Notifications
You must be signed in to change notification settings - Fork 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
Error when importing notebook with sub-notebooks #597
Comments
That's most likely the issue. If you change the sync folder without copying the notes files to it (eg. all the .md files and the .resources dir), Joplin does what's logical: since there's no data in the new folder, it assumes that everything has been deleted and proceeds to also delete everything locally. So when you change the folder, make sure to also move all the files in it. If it's a different issues though, please describe steps by steps how you got this bug.
Here it's fine if it's a bug, otherwise for general user support it might be better to post on the forum https://discourse.joplin.cozic.net (you can login with your GitHub account) |
Hmm, I don't think i did any changes to the sync folder when it happened... I was mocking about after it happened to try and find what was going on and that was when I found that by changing the sync folder it deleted my notes. I will try to find a way to replicate it somehow. How Joplin treats an empty sync folder sounds really dangerous to me. The mechanics of detecting if a note is really deleted or not should really be stated explicitly and not assumed by an empty sync folder! It is a very fragile system, the way it works now it sounds like. Also, it should be a waste bin in the database, so that deleted notes can be recovered if deleted by mistake, either by the system or user. It could perhaps have some sort of janitor routine that removes deleted notes after x days. Another problem i described was the exporting/importing of a database not managing to pass over sub folders. I have attached two images, to illustrate before and after. The same goes for both JEX and RAW export. Thanks for your prompt responses. I am committed to using Joplin now, and am exited to see it develop further! |
The behaviour is correct actually, for example if you sync with an empty dir with rsync along with the I agree however that it might be unexpected and, as a general rule, the filesystem sync is more for advanced users (originally it was just a tool for testing/debugging but since some people found it useful I've made it available) so it needs to be used with care.
Yes that's been suggested a few times, I think there's an open issue about it. In the meantime, it's recommended to keep a backup of your notes. You can automate this with a cron and the joplin CLI. eg |
Ok, thanks for the clarification. |
btw: I wrote a small shell script for joplin CLI to speed up note taking in terminal, not sure if it is something people would appreciate or not, anyway, here is the link |
It looks like there's indeed an issue when exporting notebook with sub-notebooks. I've renamed the issue and tagged as bug to keep track of it. |
Seems nice! If the user doesn't specify a notebook, to which notebook will the note go? Maybe something to mention in the help page. Posting it on the forum is fine. @foxmask has also been developing a tool called Jong to create notes from RSS feeds. |
Thanks! |
Hey Laurent, don't forget to update the CLI app!
|
Indeed I completely forgot to update and just noticed that my backup script has been broken for a month because of this. That should now be fixed so please give it another try . |
Hi, works now when importing my "test notebooks", but when trying to import my actual notes I get:
|
Do you have a JEX file that allows replicating this issue? |
Hi Laurent, I did another update of both the desktop and cli programs (I think I might have been to early on the ball after your last update when updating through "npm install"), and now it actually imports the notebooks without crashing (hurrah! ), however, the sub-folders have swapped places in some instances... I will post a file in not to many days. If it is the database that is corrupt, it seems weird to me that it is not "washed clean" after doing an export/import in the desktop app, then exporting and trying to import in the cli app... Another thing regarding the reason for starting this thread in the first place: When I updated to the lates appimage and ran it, the database came up just fine, but then, when it synced with my local sync folder, all the notes disappeared. The files were in the sync folder still (and due to the testing I am doing, I always back up my work anyway, so I had backups) I ran an "import raw folder" from the sync folder, and my notes all came back in their right places. Is this not weird behavior? The two releases was 1.0.99 and 1.0.103. |
Sorry that it took so long to get to it, had to try to remove my personal stuff from the (growing) database as well. After replacing almost all the entries with numbers and letters one can also more easily see that there is something fishy going on. Attached the jex file exported from latest joplin appimage, imported in latest cli build (installed with npm). Hope it makes sense to you what might be happening |
Closed as duplicate |
Operating system
Application
Hi, I am experiencing a really troublesome bug when syncing to filesystem in 1.0.69.
I am trying to sync between my laptop and android phone using syncthing. I first experienced this when I was doing my first tests with joplin, but after the initial difficulties it started working and I just presumed I had done something wrong with the setup initially. So I moved all my notes over to Joplin from my previous system (a bunch of txt files in different folders), convinced Joplin was the way to go. It worked and I got my notes synced on my phone as well.
A couple of hours ago I was doing some changes to my notes, and when I hit sync, ALL my notes disappeared! I quickly went offline with my phone and managed to save it from being auto synced. I got an adb backup of the database from my phone and pasted it to my .config/joplin-desktop folder and changed the name. Got my notes back in the correct folder and sub folder structure (but the colours of my Joplin install are all inverted).
I can replicate the removal of all my notes by setting up a new sync folder in settings, press sync, then change sync folder and hit sync again.
I am trying to export/import the notes to start over fresh with a new database file, but the export or import functions does not keep all my notes (they are all plain text, nothing fancy), and the notebook/sub-notebook structure is gone, also some of the notebooks go missing.
The terminal app simply crashes and stays broken after trying to import a jex file. I have to delete the .config/joplin folder (probably just the database, though) to get it to run again.
This is my first post on GitHub, so pardon if I am not doing things right... Should I post new issue tickers for every bug/issue I encounter?
this is the log from the desktop app:
log.txt
this is a printout from terminal after attempting to import jex file:
cli-output.txt
The text was updated successfully, but these errors were encountered: