# Migrating from Self-Hosted to Sonatype Cloud

Organizations running self-hosted Sonatype Lifecycle can migrate to Sonatype Cloud. Migration is Sonatype-led and involves transferring existing data, reports, and configuration.

## Overview

Migration from a self-hosted deployment to Sonatype Cloud is performed by Sonatype. The process includes transferring existing data, such as database contents and reports, to a new Sonatype Cloud instance. During cutover, customers update network routing or integrations to direct traffic to the SaaS environment.

## Migration Process

The migration process includes the following four phases:

| Phase          | Customer Actions                                                                                          | Sonatype Actions                                                   |
|----------------|-----------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------|
| **Prepare**    | Identify integrations, configuration, and assess data size; review authentication and replace local user accounts with users from your identity provider, if required. | Engage migration process and prepare data transfer method.         |
| **Data Transfer** | Provide access to the required data, upload the data using the method provided by Sonatype, and plan the cutover window.  | Provide a secure data transfer method and access details.   |
| **Migration**   | None                                                                                                      | Perform data migration, configure the Sonatype Cloud tenant, set up SSO, and prepare the Sonatype Cloud environment for cutover. |
| **Cutover**     | Update integrations to point to the Sonatype Cloud URL; verify data.                                   | Enable access to the Sonatype Cloud instance.                   |

## Prerequisites

Before starting migration, ensure you have:

- Access to your IQ Server data and configuration.
- Ability to create a database backup.
- Access to your IQ Server data directory (for example, report data, scan data, and database files).
- A data transfer method available as instructed by Sonatype.
- An identity provider configured if replacing local users.

## Data Required for Migration

Sonatype requires access to existing data, including the following:

- **Database backup**
  - H2 database: `sonatype-work/clm-server/data/` directory
  - PostgreSQL database: database dump file

- **Application data**: sonatype-work/clm-server/ directory contents, including:
  - `report/` — scan reports
  - `scan/` — scan data
  - `sboms/` — SBOM files

### What Is Not Migrated to Sonatype Cloud

Use this section to understand which self-hosted data and configuration are not migrated to Sonatype Cloud.

| Item                      | What to expect                                                                                       |
|---------------------------|------------------------------------------------------------------------------------------------------|
| Base URL                  | Sonatype Cloud uses a new URL. Update integrations to point to the new URL during cutover.         |
| Local users               | Local user accounts are not migrated. Configure users through your identity provider before cutover. |
| Anonymous access          | Anonymous access is not available in Sonatype Cloud.                                               |
| Authentication configuration| Self-hosted authentication configuration (LDAP, SAML, OIDC/OAuth2, Crowd) is not migrated. Configure authentication for Sonatype Cloud. |
| Mail server configuration  | Mail server configuration is not migrated. Email delivery is managed by Sonatype Cloud.            |
| Proxy server configuration | Self-hosted proxy server configuration is not migrated.                                             |
| JIRA configuration        | Self-hosted JIRA configuration is not migrated.                                                    |
| Product license           | Self-hosted license configuration is not migrated. Licensing is managed by Sonatype Cloud.         |
| Organization and application icons | Organization and application icons are not migrated.                                          |
| Audit JSON                | Audit JSON is not migrated.                                                                          |

### Managed by Sonatype

The following capabilities are managed by Sonatype and are not customer configurable.

| Item                    | What to expect                                                                                       |
|-------------------------|------------------------------------------------------------------------------------------------------|
| Server configuration     | Server-level configuration is managed by Sonatype.                                                 |
| Administrative operations | Administrative operations, such as database backup, restore, schema migration, and maintenance tasks, are managed by Sonatype. |
| Built from Source        | Built from Source is not supported in Sonatype.                                                  |
| Labs                     | Labs features are not supported in Sonatype.                                                      |

## Data Transfer Steps

1. **Contact Sonatype**  
   Contact your Sonatype account team or [Sonatype Support](https://support.sonatype.com/) to initiate the migration process. Sonatype will provide instructions for transferring your data.

2. **Prepare Data Transfer Access**  
   Follow the instructions provided by Sonatype to prepare the required access for data transfer.

3. **Receive Transfer Details**  
   Sonatype will provide the connection details required to transfer your data.

4. **Connect to Transfer Endpoint**  
   Use the provided connection details to access the data transfer endpoint.

5. **Connect to SFTP Server**  
   Upload the following:
   - Database backup  
     - For H2: data directory  
     - For PostgreSQL: database dump file  
   - Application data from your IQ Server data directory:
     - report/
     - scan/
     - sboms/

6. **Notify Sonatype**  
   After the upload is complete, notify Sonatype to proceed with migration.

## After Data Transfer

Sonatype performs the following:

1. Database migration
2. Tenant configuration
3. SSO configuration (if applicable)

Migration duration varies based on the amount and condition of the data and any compatibility issues identified during migration.

You will be notified when your Sonatype Cloud instance is ready.

## Cutover

After migration completes, redirect traffic to your Sonatype Cloud instance using one of the following approaches. Update the following integrations as applicable:
- CLI URL settings
- IDE plugin configurations
- CI/CD pipeline configurations
- SCM integrations

## Verification

After cutover, verify the following:
- Log in to your new Sonatype Cloud instance.
- Verify your applications and organizations are present.
- Confirm reports and historical data are accessible.
- Run a test scan to verify functionality.

## Get Started

Contact your Sonatype account team or [Sonatype Support](https://support.sonatype.com/) to begin your migration assessment.
