How do I backup or export my Joplin notes from the iOS app?

Definitely so! I must admit that I'm not an expert when it comes to self-hosting so I can't do much more than quote the result of a quick search in this forum:

https://discourse.joplinapp.org/t/joplin-server-documentation/24026

Maybe others reading this have first-hand experience and can point to more detailed or more recent advice.