Skip to content

Sonatype Nexus 3 migration and cutover ​

Keep Nexus 3 online while Arka imports artifacts, reconciles permissions and checksums, and catches up on changes. Preserve repository names and paths. Rehearse native repository routes, OCI /v2/, and legacy /service/rest/v1/ independently before switching ingress, DNS, or the load balancer.

Five Nexus 3 cutover stages, from a live source through preflight, full import and reconciliation, incremental sync, and the CI readiness gate.Five Nexus 3 cutover stages, from a live source through preflight, full import and reconciliation, incremental sync, and the CI readiness gate.

1. Register the source and run preflight ​

In the Console’s Nexus Migration workspace, register a nexus3 source with a base URL Arka can reach. Give the source identity permission to enumerate repositories and assets, download binaries, and read security APIs and repository settings. Set SOURCE_ID to the source UUID and run the commands using an administrator profile on the target Arka instance.

bash
arkactl migration sources test "$SOURCE_ID" --json
arkactl migration preflight "$SOURCE_ID" --json
arkactl migration discover "$SOURCE_ID" --json

Check the source version, securityApiReadable, repositorySettingsReadable, and reported limitations. Verify Hosted, Proxy, and Group topology, member order, upstream URLs, and names. Keep the preflight evidence and sanitized read and write request samples with the cutover record.

2. Provision repositories and start full import ​

Dry-run preserve_topology and review each outcome and reason. For skipped_existing, read back the existing kind, format, upstream, and members before reusing it. Resolve unsupported or failed results individually. Preserve names where clients keep existing paths and grant anonymous read only where it was approved.

bash
arkactl migration provision "$SOURCE_ID" --mode preserve_topology --dry-run --json
arkactl migration provision "$SOURCE_ID" --mode preserve_topology --json
arkactl migration start --source-id "$SOURCE_ID" --source-repo maven-releases \
  --target-repo-id "$TARGET_REPO_ID" --cutover --json
arkactl migration jobs get "$JOB_ID" --json

Use the target repository UUID from provisioning and the job ID from the start response. Create a job for each repository in scope. --cutover enables governance reconciliation and an incremental watermark. Verify indexes regenerated by format drivers with the native client and review skippedGeneratedCount. If a job stops partway through, use arkactl migration resume "$JOB_ID" to resume from its saved token.

To serve through Nexus before switching writes, use pull_through_proxy and set pullThroughPersist: true. Freeze writes, complete reconciliation, then use arkactl repo promote "$TARGET_REPO_ID" to promote the Proxy to Hosted. Verify its final write policy.

3. Reconcile governance and retry failed items ​

bash
arkactl migration reconciliation "$JOB_ID" --json
arkactl migration reconciliation "$JOB_ID" --kind asset --status failed --json

Filter by kind, status, and repository in the Console or at GET /api/v1/migrations/jobs/{id}/reconciliation. Review all pages. Check user, role, privilege, and disabled-state mappings. Imported Nexus user passwords are omitted. Reissue credentials and replay both permitted and denied requests with least-privilege accounts. Check Portable CSEL path and format predicates, Routing Rule bindings, write policies, and Proxy and Group settings.

Unmappable JEXL or other ambiguous conditions are manual_required. Keep the gate closed while replacing those rules with equivalent Portable CSEL or removing obsolete grants. Then sync, reconcile, and replay allowed, denied, anonymous, and Group-member access. See security and proxy governance.

Fix failed item causes before retrying. Select exact IDs from the report. A completed import can still contain failed items.

bash
arkactl migration retry-failed "$JOB_ID" --kind asset --repository raw-hosted \
  --item-id "samples/retry-me.txt" --json
arkactl migration jobs get "$JOB_ID" --json
arkactl migration reconciliation "$JOB_ID" --kind asset --status failed --json

4. Sync changes and satisfy the CI gate ​

Use the saved watermark to sync changes. Supply --since with the expected RFC3339 watermark if the pipeline must reject a stale checkpoint. Review the watermark, counts, failures, and bytes. The watermark advances only after a verified sync. Freeze Nexus writes before the final sync.

bash
arkactl migration sync "$JOB_ID" --json
arkactl migration jobs get "$JOB_ID" --json
arkactl migration reconciliation "$JOB_ID" --json
arkactl migration verify \
  --source "$SOURCE_ID" \
  --source-repo maven-releases \
  --target-repo "$TARGET_REPO_ID" \
  --shadow-read 25 --strict-extra --json
arkactl migration cutover-check "$JOB_ID" --source-wide --json

Require readyForCutover: true with zero missingCount, checksumMismatchCount, and shadowReadFailed. --strict-extra also fails on extra target paths. Shadow reads can compare up to 100 samples. cutover-check --source-wide requires a nonempty list with every registered repository verified. Compare that list to the actual cutover scope. Archive the result, preflight evidence, and protocol replay outputs.

5. Replay legacy CI routes ​

The compatibility adapter is disabled by default and returns HTTP 404 when disabled. To enable it, roll out ARKA_NEXUS3_COMPAT_ENABLED=true. Inspect the status and routes with arkactl nexus3-compat --json or GET /api/v1/platform/compat/nexus3.

The Nexus compatibility ADR lists all 12 method and path combinations. Multipart uploads cover Raw, Maven (maven2 on the Nexus wire), npm, and PyPI. Verify response fields, cursors, redirects, statuses, and Basic or Bearer permissions with sanitized production samples. Re-query Arka for IDs and continuation tokens. Check write and delete semantics in isolated repositories, including shared object references and audit records. Move callers that need additional Nexus routes to the native API before cutover.

6. Switch traffic and prepare rollback ​

  1. Run both systems in parallel. Compare native reads, writes, and checksums on the repositories in scope. Shadow-read or shift a read-only cohort to Arka. Check HTTP 5xx, Proxy hits, object-store redirects, and critical CI.
  2. Freeze Nexus writes. Complete the final sync, checksum and governance verification, and source-wide gate. Keep Nexus readable, switch ingress, DNS, or the load balancer, and enable verified Arka writer identities.
  3. Before Arka writes start, rollback restores the original read endpoint. After writes start, freeze new writes on Arka before rolling back. Replay new publications to Nexus using the cutover record and asset.published audit events. Verify checksums and policies and reconcile overwrites and deletes before restoring Nexus writes.

The isolated live Nexus verification script covered a Nexus OSS 3.76.1 instance, retry after 502, fail-closed governance migration, CI gate, and a legacy CI base URL switch. It verified 3,376 assets by SHA-256 and recorded a 4.64-second incremental sync. See also the operations handbook.

Released under the Apache 2.0 License.