Check out this thread:
https://www.mobileread.com/forums/sho...d.php?t=220950
There you can find a way to automatically shut down and restart the calibre server, when there is a need to update the books/database on the remote server.
There are plenty of sync tools to efficiently keep two directories synced. Just google "sync utility". I like rsync.