Atomic saving (i.e. per tiddler)

Is there a way to save changes on a per tiddler basis? Meaning, send from the browser to the saving back-end only the changed tiddlers and not the whole notebook.

Here’s what’s happened to me quite recently. I was accessing my notebook remotely, served by WebDAV through TailScale. For some reason, probably a flaky wireless connection or something to do with TailScale, my connection was interrupted while saving, having made changes only on a single tiddler.

When I got home and tried to access the notebook directly, I found out it was truncated beyond repair. Of the usual 5.7MB of its size, the file was only ~600kb and not usable at all. Thankfully I had a backup and I could restore it.

Is there a different configuration I could have used to avoid something like this? Would serving via Node.js, maybe with the lazy-all option, made it more robust while saving?

I host the Node version of TW on a hosting service and it only sends changes to the server, whenever a change is made, so that’s certainly an option just not sure how feasible in your case.

The Node.js setup does change tiddlers only. But you have to be able to maker your server secure.

There is no need to use lazy-loading, if you want to be sure to save reliably. In the contrary.

If you use docker by any chance, this is the image + docker-compose.yml I’m using (I’m using the folder / atomic tiddler saving option as well):

version: "3"
services:
  tiddlywiki:
    image: "nicolaw/tiddlywiki:latest"
    container_name: tiddlywiki
    network_mode: "bridge"
    restart: always
    ports:
      - "5750:8080" # host:container
    volumes:
      - /your/TiddlyWiki/folder:/var/lib/tiddlywiki  
    environment:
      - TZ=Europe/Vienna
      - TW_PASSWORD=passw0rd
      - TW_USERNAME=admin
      - TW_DOCKERUID=1029 #host linux user uid
      - TW_WIKINAME=mywiki

To get it up and running, just type into the terminal console in the folder with the above file:

sudo docker-compose up -d

hope this helps

1 Like