I just set up the Calibre server on a Raspberry Pi, personally. My implementation is a bit different (my secondary library isn't in the cloud), and it sounds like you have more Linux experience than I do, so this shouldn't be a difficult project for you.
That said, #1 sounds the most like my setup. I have my master libraries on my Mac Mini, from which I do all my library maintenance. As for syncing, I am periodically using
FreeFileSync to one-way mirror my Mac libraries to an external drive, which I then disconnect from the Mac and connect to the RPi. This software scans the source directory, scans the destination directory, and only copies anything that is new/changed. I plan to only take the server offline long enough to do maybe a monthly sync.
This implementation is much more simple that what you're planning, but perhaps FreeFileSync could be of some use to you.