I'm surprised to discover there's no official way to change the location of the database (I'm on Windows).
I have my data backed up from various locations on my drive and I want to put my database in one of them. Without data backup, anything that's in Joplin should be considered expendable, which isn't what I want.
About Backup, normally you'd sync to somewhere, like another drive, ex: S:\Joplin or a Network drive like \MyServer\Backup\Joplin.
This way, the sync keeps a permanent backup.
I don't know if you can change in a config the local folder on Windows (which one, 7, 8.1, 10?) - but if you really want this you could use a Junction to link the local .config folder to another drive... Again, how to set it up depends the Windows version.
But IMHO the easiest is the filesystem sync - see above.
Thanks! You're very certainly right @tessus - and I do use export to JEX (but I also backup the sync folder)
But anyway it wasn't the OP's question, in fact.
Edit: I could restore the local folder even if I'd loose everything on one PC as I've the same app and config on a few PCs (syncing to a network drive), so I just would have to restore the local .config from another PC. I guess, anyway...
today I ran into the same issue as the thread starter. And after I found your profile switch solution I posted it here so other people like me could find it more easily
In my case I don't want to have the user data in $HOME/.config (linux) - because in this location I store configuration data only. The .config directory doesn't contain any sensitive data - and I want to keep it that way.
Therefore I like to have all my private user data at another location. That location is encrypted with another security key and other backup intervals (and locations) apply.
If you remove the --profile switch I have to workaround this by symlinking .config/joplin-desktop to my secure user data location. That would be an ugly solution.
P.S.: IMHO it would be better if the database location can be configured in Joplin's settings.