For a successful and complete backup, you need to stop Plex server. Otherwise you’ll end up with a damaged primary database file in your backup.
This script is attempting to solve this problem: PSA: Script to back up and restore Plex app data on a Windows system