Keep your library on your local drive and do a one way sync to Dropbox. calibre does not play nicely with network/NAS/cloud file systems and you will eventually end up with a corrupted library.
See I am getting errors with my calibre library on a networked drive/NAS? in the calibre FAQs.
If you search on this forum, you will find quite a bit of advice on using Library maintenance to recover from some library corruption issues. I would suggest you copy your library back to your computer, add it as a library in calibre (Switch/create library, use the previously existing library at the new location) and then run Check library on it.