Skip to main content

Using Replicated Blob Stores

Nexus Repository provides a mechanism to override specific blob store attributes using environment variables used during the Nexus Repository startup. Use this mechanism to override the blob store bucket name attribute to point to a replica.

NEXUS_BLOB_STORE_OVERRIDE='{"blob-store-name": {"s3": {"bucket": "bucket-name"}}}'

The NEXUS_BLOB_STORE_OVERRIDE environment variable contains a JSON object with the properties to remap your blob store location.

The environment variable only updates the blob store configuration in the Nexus Repository database and does not modify the contents of the blob store. The blob store override environment variable does not copy contents between blob stores. Replicating blob stores is outside the scope of this feature.

You may use the override to modify several blob stores:

NEXUS_BLOB_STORE_OVERRIDE='{"blob-store-1": {"s3": {...}}, "blob-store-2": {"s3": {...}}, "blob-store-3": {"s3": {...}}}'

You may modify several attributes for each blob store:

NEXUS_BLOB_STORE_OVERRIDE='{"nxrm-blob-store": {"s3": {"bucket": "nxrm-bucket-stage", "region": "us-east-2"}}}'

The attributes available for override are defined for the blob store configuration in the Nexus Repository database. The most common attributes for each environment are as follows:

  • AWS S3
    NEXUS_BLOB_STORE_OVERRIDE='{"blob-store-name": {"s3": {"bucket": "bucket-name"}}}'
    bucket 
    region
    prefix 
    accessKeyId 
    assumeRole 
    sessionToken 
  • Azure
    NEXUS_BLOB_STORE_OVERRIDE='{"azure-blob-name": {"azure cloud storage": {"containerName": "container2"}}}'
    containerName
    accountName
    accountKey
  • GCS
    NEXUS_BLOB_STORE_OVERRIDE='{"gcp-blob": {"google cloud storage": {"prefix": "/my-prefix", "region": "us-central1", "bucketName": "bucket-nxrm"}}}'
    bucketName 
    region
    prefix 
  • File
    NEXUS_BLOB_STORE_OVERRIDE='{"file-blob-name": {"file": {"path": "backup-path"}}}'
    path