How to connect to multiple buckets and sync data between them

what do you mean exactly by “the bucket sometimes down”? If the bucket is down, it’s probably true for other buckets in the same node (node failure rather than a strange bucket-level failure, in which case as @shiv4nsh stated what you probably need is node-level replication to ensure availability of your data.
Have a look at replica configuration.

Note: The Java SDK can optionally even read from a replica directly rather than waiting for the ops to failover a node in trouble.