Data replication for Nexus 3 between on-premises and Azure cloud

Currently, I have a Nexus 3 deployed in an on-premises data center in a Kubernetes environment. The Maven data are stored in a Share Drive (NAS). I will deploy the application in Azure Kubernetes for High Availability to achieve auto failover purposes by replicating the data from NAS to Azure Files. My question is whether the Nexus deployed in Azure can be restored to the original configuration or be available to use during the disaster?

Yes, with a few important caveats. First, the state of your binaries isn’t only on the file system, Nexus Repository maintains a configuration and component index/metadata database. This must be backed up and replicated along with your binaries. In Repository OSS, this is an embedded database called Orient DB. For many Repository Pro installs, this is an external PostgreSQL database.

I wouldn’t normally recommend using an embedded OrientDB inside kubernetes. Kubernetes can shut down containers in a way that causes Orient to corrupt itself. If you want the benefits of stateless nodes in kubernetes, I would recommend Repository Pro with an external database.

For similar reasons, you should definitely not try and have multiple nodes with an embedded OrientDB database in each one pointing to the same binaries on desk. This is a recipe for serious mismatches between each node’s understanding of the set of components it’s managing, and the binaries actually available in the file system.

Given those caveats, having a disaster recovery site in Azure can indeed work, as long as the configuration is symmetrical from Repository’s perspective: the file system locations of the binaries, log files, the URLs for external resources like LDAP, remote repositories and so on should be identical.