There are 2 approaches to backups and it depends on your setup.
client side
Simple export
It is easy to export your notes. While you don't want to do that daily, it is a good strategy on first installs to do a manual export after "big changes" and until you have a better solution. Keepo reading.
Plugin
Many mentioned the Simple Backup plugin
above and this is definitely utltra simple to setup so this is IMO the first thing to put in place, no matter what is your plan and setup. This will at least protect your data for the time being. Ideally, your backup target is not the same disk/raid array than where you joplin client is installed. The best option is to use a NAS, an external hard drive, etc... or have some automation to fetch this local backup and move it away from the same disk.
server side
Here things become more complicated due to the number of options Joplin supports.
Cloud backup excl. joplin-server
If you use a cloud
backend, you shoud ensure of proper backup of that. Some NAS like the Synology ones offer a cloud backup
solution that fetches data from our cloud accounts and backs it up locally.
joplin-server
Here again, it depends...
It depens how your joplin-server is setup.
If ALL your data lands in a postgresql db, you need to backup your postgres database and there are plenty of guides usually based on a cronjob to create a dump and delete older backups.
if your data is split between a database and filesystem, I feel like stating the obvious but those will both need to be backed up and kept together as you will need the FS backup matching the DB backup.
Word of caution
Most of us know it but how many do it... A backup is ONLY a backup if you tested a restauration of it... That means wiping your data and restoring your last backup to see how it goes.
I ran into an issue I mentioned here while doing this so you may want to test the restore with a seond profile&account to avvoid "polluting" your main account.