Simple Backup location in Snap

Hi all,

I thought I'd mention here in advance of possible future needs; the location of the defaulted-SimpleBackup plugin in the unofficial Snap package of Joplin.

Joplin usually would default this to $HOME/JoplinBackup. When running in the Snap, this implicitly becomes $HOME/snap/joplin-desktop/current/JoplinBackup. The technical reason for this is that this folder and it's twin below are the only places a snap is guaranteed to be able to write when running with highest confinements enabled, access to $HOME is technically optional.

However, that exact folder has a quirk. It's a symbolic link to the version of the snap in use by revision name, e.g, 92, 99, 120, any unique integer. When snaps update, they copy and paste the old version into a new folder and cut off access to the old one, allowing you to roll back updates more cleanly, in Joplin; this could be a database migration failure where there's no undo, but the snap would have a copy of the database and program files as they were pre-update, convenient!

The simple problem then is, anything in that folder doubles up (and maybe more, if users change their settings). Not only would it backup the binary format, it'd end up backing up the export/Jex format too. A 5GB notebook would suddenly become 10GB with one days backup and then 20GB with the next application update.

So, long story short, where's the Simple Backup folder in the snap?

$HOME/snap/joplin-desktop/common

Because this folder doesn't have the behaviour of the current folder above. common is intended for unversioned data, like our export, that doesn't need to be factored into the normal revision strategy. This way, an extra 5GB of storage used is exactly that, and not doubled up by however many copies of the snap you might happen to have.

And yes, you can change it elsewhere still.

4 Likes