Migrating HDFS data to HDFS end to end

Deploy Cloudera Migration Assistant, register clusters, and run an HDFS to HDFS migration using Cloudera Replication Manager replication.

This end-to-end workflow combines deployment, platform preparation, discovery, and workload steps. Detailed reference procedures are reused from the Administrator and Migration guides.

Figure 1. Migration flow

Cloudera Migration Assistant migration flow

Verify supported platforms and migration paths in Supported platforms and migration paths before you start.

Phase 1 — Deploy the CMA Master and CMA Agents

    1. Download both CSD files to the /opt/cloudera/csd/ directory on the Server host.
      wget -P /opt/cloudera/csd/ https://archive.cloudera.com/cma/version/csd/CMA_MASTER-version-build.jar
      wget -P /opt/cloudera/csd/ https://archive.cloudera.com/cma/version/csd/CMA_AGENT-version-build.jar
      automatically detects the CSD files.
    2. Change the ownership of the CSD files.
      chown cloudera-scm:cloudera-scm /opt/cloudera/csd/CMA_MASTER-version-build.jar /opt/cloudera/csd/CMA_AGENT-version-build.jar
    3. Restart for the changes to take effect.
      systemctl restart cloudera-scm-server
    4. Log into .
    5. Restart the Cloudera Management Service.
    6. Go to Hosts > Parcels.
    7. Click Parcel Repositories & Network Settings.
    8. Add the Remote Parcel Repository URL for .
      https://archive.cloudera.com/cma/version/parcels/
    9. Click Save & Verify Configuration to commit the change.
    10. Click Close.
      You are redirected to the Parcels page.
    11. Search for , and click Download to download the parcel to the local repository.
    12. After download completes, click Distribute to distribute the parcel to all clusters.
      Figure 2. Distribute the parcel

      Parcels page showing parcel distribution
    13. Click Activate to activate the parcel.
    14. Click OK when confirmation is required.
    15. Click Clusters in the left navigation pane.
    16. Select Add Service from the drop-down menu to the right of your cluster.
    17. From the list, select the service type to add, then click Continue. The single parcel provides two service types: CMA_MASTER (central control node) and CMA_AGENT (cluster-side executor).

      The Add Service wizard opens.

      Figure 3. Add service

      Add Service wizard showing service types
    18. Assign the service roles to the hosts where Python 3.11 and JDK 17+ are installed, and click Continue.
    19. Review service configurations and click Continue. At minimum, set OAuth2 client credentials (cma_client_secret, cma_agent_client_secret). If the is on a different cluster from the , also set Gateway URL (cma_gateway_url).

      The first run of the service starts. When the command finishes, the service is added to the cluster.

      Figure 4. service started

      showing service first run completed
    20. Repeat steps 16–19 to add the other service type if needed (for example, add CMA_AGENT after CMA_MASTER, or vice versa).
    21. Go back to the cluster homepage, open the service page, and click the Server UI tab to open the UI.
      Figure 5. landing page

      web UI landing page after parcel deployment
    22. Set the service dependency to none in the service configuration in Cloudera Manager because Cloudera Manager cannot discover the Master automatically across clusters.
    23. Set the Gateway URL to cma_gateway_url in the service configuration.
      curl -sk https://<master-host>:8093/api/agent/config

    Phase 2 — Configure Cloudera Replication Manager on the target cluster

      1. Enable the HDFS to Ozone flag on the Server host.
        For HDFS to Ozone migrations, requires the CMF_FF_API_H2O_REPLICATION feature flag to be enabled. Without this flag, the API endpoints for HDFS to Ozone replication are not available.
        1. Append the following line to /etc/default/cloudera-scm-server on the Server host:
          export CMF_FF_API_H2O_REPLICATION=true
        2. Restart the Server.
          sudo systemctl restart cloudera-scm-server
        3. Wait for to become available again on port 7180 before proceeding with the setup.
      2. Register the instance in the UI to allow to locate and communicate with the replication service.
        1. In the Web UI, go to Settings.
        2. Go to the App Access section.
        3. Configure your connection fields using one of the following validation methods:
          • If has already detected a service on one of the registered clusters, select it from the Suggestions drop-down list to auto-fill the form.

          • Manually enter your target replication parameters in the following fields:
            • App URL — The full URL of the REST API, including protocol, host, and port, for example, https://rm-host.example.com:9011.

            • App username — The username for authenticating with the API.

            • App password — The password for authenticating with the API.

        4. Click Save and Push to Agents.

      Phase 3 — Register source and target clusters

        1. In on the source cluster, select Add Service and select CMA_AGENT.
        2. Configure the required properties.
          Table 1. configuration properties
          Property Description
          cma_gateway_url URL of the Gateway, for example, https://master-host:8093. Required when the is on a different cluster than the . The agent uses this URL to discover the Master host, gRPC port, and Auth Server URI automatically through the discovery endpoint (GET /api/agent/config). When connecting from a different cluster, set the service dependency to none in .
          cm_username administrator user name.
          cm_password administrator password.
          cma_user_home Home directory for the cma-agent user, for example, /var/lib/cma-agent.
        3. Set cma_gateway_url when the is on a different cluster than the .
        4. Start the service.
        5. Wait for the agent to connect to the and finish the registration automatically.

        Phase 4 — Scan clusters

          1. Navigate to the Clusters page and click the cluster you want to scan.
            Figure 6. Clusters page

            Clusters page
          2. On the cluster detail page, find the Scanning section, which lists the available scan types for your cluster. Click the configuration icon on the right side of the scan type you want to trigger.
            Figure 7. cluster scanning

            cluster scanning
          3. In the scan configuration drawer, configure the scan parameters (for example, scan path, scan type, scan depth) and click Scan Selected.
            Figure 8. scan configuration

            scan configuration
          4. The scan starts and the status changes to Initializing. Track scan progress by clicking the Commands tab, which shows a badge with the number of active commands.
            Figure 9. scan in progress

            scan in progress
          5. On the Commands tab, expand a command to view its Output Log, Error Log, and Configuration.
            Figure 10. scan commands

            scan commands

          Phase 5 — Create collections (optional)

            1. Click the + icon next to Collections in the sidebar.
            2. In the Collection Details drawer, enter a Collection name and select a Color for identification.
              Figure 11. create collection

              create collection
            3. Click Create.

              The new collection appears in the sidebar with 0 items.

            4. Browse the data tree to find the items you want to migrate. Click folder names to navigate deeper into the hierarchy.
            5. Select items using the checkboxes next to each item.
            6. Click the collection icon that appears on the selected item row.
            7. In the Add/Remove Collections popup, check the collections you want to assign the item to.
            8. Click Apply.
              Figure 12. assign to collection

              assign to collection
            9. Click a collection name in the sidebar to view its contents. The data browser switches to show only the items assigned to that collection.
              Figure 13. view collection

              view collection

            Phase 6 — Run the migration workload

              Step 1 — Scan the source cluster (HDFS)

              1. Open Clusters, then select the source cluster.
              2. Click Start Scanning.
              3. Select Hdfs data scan.
              4. Optional: Constrain the scan path, for example, /tmp or /user, to shorten runs on massive namespaces.
              5. Click Scan selected and watch the progress drawer until completion.

                After success, Discovery lists HDFS trees with sizing and ownership snapshots.

              Step 2 — Scan the target cluster (HDFS)

              1. From Clusters, open the target cluster.
              2. Click Start Scanning.
              3. Select Hdfs data scan.
              4. Click Scan selected and wait until the status turns green.

                HDFS hierarchies populate inside Discovery afterward.

              Step 3 — Create a migration plan

              1. Go to Plans.
              2. Click Create Plan.
              3. Set Name, select the source HDFS cluster, and the target HDFS cluster.
              4. Complete the wizard (Create) and land on the plan detail surface.

              Step 4 — Map HDFS directories to HDFS paths on the Data tab

              The Data tab displays source HDFS on the left and target HDFS on the right.

              1. Go to Plan > Data.
              2. On the target side, browse to the parent directory that should receive migrated data.
              3. On the source side, go to the parent directory that contains data you want to migrate.
              4. Hover the directory and click Copy. persists a structural mapping.
              5. Switch to the Review view any time to view a list of your current structure mappings.
              6. Repeat the mapping workflow for additional directories whenever you broaden scope.

                You can map each directory to separate target prefixes or combine them under shared parents. The layout must meet the requirements for your tenancy model.

              Step 5 — Create and run an execution

              1. Open Execution.
              2. Select Create Execution.
              3. Complete the steps in the configuration wizard (General, Scope, Review), and then click Finish.
              4. Open the execution dashboard and trigger Run All.

                During execution the following stages occur:

                • Policy creation registers policies mapping HDFS prefixes to destination HDFS paths.

                • Data replication invokes DistCp-style transfers governed by settings.

                • Verification – tracks step health until completion (COMPLETED or FAILED statuses per step).

              Step 6 — Verify the migration

              1. Confirm that the execution steps display COMPLETED.
              2. Inspect HDFS paths inside Discovery on the target cluster.
              3. Optional: Validate migrated paths using the HDFS CLI on the target cluster.
                hdfs dfs -ls /path/to/migrated/data