https://manual.calibre-ebook.com/faq...backup-calibre
Best way to to avoid problems with backup is to stop and close calibre first. Some files like metadata.db for the actual used library are locked by a running calibre.
Beside your library/libraries folders save the config directory to your backup and you will be fine.