On the server, if you're using Joplin Server, you only need to backup the Postgres data for example using pg_dumpall or any other method.