Personally, every so often or before upgrading Joplin I make a JEX backup of every note and resource.
This post explains: