I just configured Joplin Server at home and I have a question regarding how to back up everything. I am using the local file system to store the notes instead of the database. Is it enough to back up the folder, or I must back up the folder and the database?
Any recommendation or tip about backing up our notes is welcome.
In my experience it's best to backup on client side only. Consider your Joplin Server data as disposable. Joplin Desktop has built-in daily backup to JEX export. You can also continuously backup your JD .config/joplin-desktop with your favorite backup tool: Kopia, Borg, Syncthing, Time Machine etc.
I assume you are using a custom `STORAGE_DRIVER` to store content in your local file system instead of the default db.
Even if you do this, your db is still used to store very important metadata like relationship between note and notebook, note and tag etc. You should backup both db and folder.
If I were you, I would run a disaster recovery exercise early. I would first setup automated regular backups of both db and folder, but frankly it's tricky because there will always be a slight timing difference between both which would cause slight data inconsistency in case of disaster recovery. I would prefer to store everything in db for as long as possible.
Then do the exercise. Spawn a second joplin server, restore folder and latest db snapshot, turn it on. Create a new profile in your Joplin client and sync it. If you don't test it fully now and then, it won't work the day you need it. Good luck.
This is exactly my use case. I set it up with STORAGE_DRIVER to store notes in a folder from the host. My idea was to easily back up the notes, but as far as I see, we are depending on the database to restore our data.
I will do what you are suggesting and try to do the exercise of a disaster recovery. To be honest, if this is the case, I don’t see the point in using a local file system if you have a dependency with the DB; it’s easier to just back up the DB and don't complicate things backing up different storages.