Joplin server on a PI5 and power failures/lower disk writes

Operating system

Linux

Joplin version

3.3.13

Sync target

Joplin Server

What issue do you have?

I have set up a Joplin Server on a Pi5 with postgres as the database and I was wondering about power failures and corruption. It is writing to a Fat32 SD card, and of course if doing a sync is occuring during a power failure I am betting there will be corruption of the database. Is there any way to minimize this? Or recover from it? Or is the system robust enough not to worry about it?

I currently have it in my home directory in docker/joplin where my compose file is as well. I assume backing up that folder is all I need to do to have a copy of everything should it go sideways?

I also turned off heartbeats in the Joplin server admin settings to cut down on the number of writes to the SD card, is there anything else I should/could turn off to lower the writes further? And I assume turning off the heartbeats isn't a issue?

1 Like

For sure a power failure wouldn't cause any corruption so you shouldn't have to worry about this. Usually database corruption happens when the disk itself is failing so maybe an advise would be to use a quality disk. And also backups of course

Thanks Laurent, that is wonderful news. I hope to move from the SDCard to a SSD eventually which has a lot more durability. But I was careful to get a quality card first.

With regard to backups, did I have it right and just backup/copy the docker/joplin folder to another drive and restore that if needed? Of course doing
Docker compose down
first.

It depends on the storage. By default, the server saves data to an SQLite file within the image I think, so you'd need to backup that SQLite file. If you use Postgres, you need pg_dump. Basically you only need to backup the database