I'm really sorry to hear that Enrico - that sucks. For what it's worth, I was able to reproduce this with TiddlyWiki 5.1.22 without a server like Apache or Nginx in front of TiddlyWiki:
$ npm install tiddlywiki@latest $ ./node_modules/.bin/tiddlywiki --version 5.1.22 $ ./node_modules/.bin/tiddlywiki wiki --init server Copied edition 'server' to wiki $ ./node_modules/.bin/tiddlywiki wiki --listen port=9091 $ cat tw.log syncer-server-filesystem: Dispatching 'save' task: $:/StoryList Serving on http://127.0.0.1:9091 (press ctrl-C to exit) $ curl -s -w "%{http_code}\n" -H 'X-Requested-With: TiddlyWiki' -X PUT -d '{"title":"test1","text":"abc123"}' http: //localhost:9091/recipes/default/tiddlers/test1 204 $ cat wiki/tiddlers/test1.tid created: 20200628215555511 modified: 20200628215555511 title: test1 abc123 $ curl -s -w "%{http_code}\n" -H 'X-Requested-With: TiddlyWiki' -X PUT -d '{"title":"test2","text":"def456"}' http: //localhost:9091/recipes/default/tiddlers/test2 204 $ cat wiki/tiddlers/test2.tid created: 20200628215557534 modified: 20200628215557534 title: test2 def456 $ chmod 400 wiki/tiddlers/test1.tid $ curl -s -w "%{http_code}\n" -H 'X-Requested-With: TiddlyWiki' -X PUT -d '{"title":"test1","text":"abc123\n\nupdate"}' http: //localhost:9091/recipes/default/tiddlers/test1 204 $ curl -s -w "%{http_code}\n" -H 'X-Requested-With: TiddlyWiki' -X PUT -d '{"title":"test2","text":"ghi789"}' http: //localhost:9091/recipes/default/tiddlers/test2 204 $ cat tw.log syncer-server-filesystem: Dispatching 'save' task: $:/StoryList Serving on http://127.0.0.1:9091 (press ctrl-C to exit) syncer-server-filesystem: Dispatching 'save' task: test1 syncer-server-filesystem: Dispatching 'save' task: test2 syncer-server-filesystem: Dispatching 'save' task: test1 Sync error while processing save of 'test1': Error: EACCES: permission denied, open '/tmp/tw-test/wiki/tiddlers/test1.tid' syncer-server-filesystem: Dispatching 'save' task: test1 Sync error while processing save of 'test1': Error: EACCES: permission denied, open '/tmp/tw-test/wiki/tiddlers/test1.tid' syncer-server-filesystem: Dispatching 'save' task: test1 $ cat wiki/tiddlers/test2.tid created: 20200628215557534 modified: 20200628215557534 title: test2 def456 $ cat wiki/tiddlers/test1.tid created: 20200628215555511 modified: 20200628215555511 title: test1 abc123 I think what happened is that Node accepts the change and puts it on an in-memory queue for saving, but it fails to process the queue. Since it accepted the change from the browser, the browser things everything is fine, so it doesn't show the traditional popup, and haschanged[] will come up empty. I'm going to try to reproduce this with Git HEAD, and see if I can submit a fix for Jeremy to look at. -Rob On Sunday, June 28, 2020 at 7:47:44 AM UTC-5, Enrico wrote: > > Hi, > I am writing to figure out whether I could have done something to prevent > this pretty bad data loss into which I incurred yesterday, so it does not > happen again. > > *My tiddlywiki setup* > I run the node.js tiddlywiki5 as a systemd service on a virtual private > server. > It's served from a public IP address (protected by username/password > login). > Apache webserver acts as a proxy between the outside world and the > `tiddlywiki --serve` process. > `tiddlywiki -version` prints "5.1.22". > > > *What happened* > Some days ago I copied over some tiddlers from another tiddlywiki, > restarted the tiddlywiki service, checked that I could access old as well > as new tiddlers, and happily went along with my life. > At some point, the server process started printing errors that I > absolutely did not notice (100% my fault for not checking my server logs > for a few days). > Here's the error message that was printed in a loop, always about the "Eye > Divers" tiddler: > > vultr.guest tiddlywiki[22081]: syncer-server-filesystem: Dispatching > 'save' task: Eye Divers > vultr.guest tiddlywiki[22081]: Sync error while processing save of 'Eye > Divers': Error: EACCES: permission denied, open > '/home/tiddlywikirunner/tiddlyme/tiddlers/Eye > Divers.tid' > > When I finally noticed these errors, yesterday, I copied the content of > the "Eye Divers" tiddler to my clipboard and restarted the tiddlywiki > service. > Result: *all tiddlers that I have created in the past few days have been > lost*. It turns out that the problem with the "Eye Divers" tiddler > prevented the tiddlywiki process from saving any new tiddler to disk. > > *The problem* > The main problem is that I had no way to know that all those tiddlers were > never saved to disk: > > - the browser interface displayed no error whatsoever > - the icon that shows "Status of synchronization with the server" > displayed everything was fine, and lit up every time I edited or created a > new tiddler > - the error message printed by the tiddlywiki server only referred to > a specific tiddler, that I took care to copy somewhere else before > restarting the server > > To me it seems like I really had no way to know that restarting the > tiddlywiki server would have caused such a dramatic data loss. > Even if I had noticed earlier, was there any way to "force" the tiddlywiki > process to flush to disk all tiddlers that were created and that were in > the process' memory only? > > Any suggestion is appreciated, I like tiddlywiki but I need things to be > reliably synced to the disk that I back up nightly. > Cheers, > Enrico > -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/c159bcf0-d846-4d2d-8157-1ecc65525e71o%40googlegroups.com.

