← Back to list

Exporting Projects on Cloud Pak for Data Using cpd-cli export-import: A Comprehensive Guide

supported services RStudio, Watson Studio, Decision Optimization, Watson Pipelines, Synthetic Data, Data Replication, Data Refinery, SPSS…

Farsin Ahammed · 2024-12-06 11:38 · 0 claps · 1.7 min read
#import-export #cpd-cli #cloud-pak-for-data #ibm-watson
Open on Medium ↗

Exporting Projects on Cloud Pak for Data Using cpd-cli export-import: A Comprehensive Guide

supported services RStudio, Watson Studio, Decision Optimization, Watson Pipelines, Synthetic Data, Data Replication, Data Refinery, SPSS, Watson Machine Learning, and watsonx.ai

Exporting projects in Cloud Pak for Data (CPD) can be incredibly useful for various purposes, such as migrating projects to a new CPD cluster or maintaining a backup. This guide walks you through the export process using the cpd-cli export-import utility, covering prerequisites, configuration steps, and detailed commands.

Prerequisites

Before you start the export process, ensure the following:

  1. Install cpd-cli Command Utility If you haven't installed cpd-cli, follow the guide: A Step-by-Step Guide to Installing the Cloud Pak for Data Command Line Interface (cpd-cli).
  2. Create a Profile Set up a CPD CLI profile by referring to this guide: How to Create a Profile in Cloud Pak for Data Command Line Interface (cpd-cli).
  3. Prepare Persistent Volume Claims (PVCs) Ensure the required PVCs are created. Refer to IBM’s official documentation: Preparing to Use the Export-Import Utility.
  4. Initialize the Export-Import Utility Follow the setup process outlined here: Export-Import Init.

Steps to Export a Project

1. Set Environment Variables

Define the following variables for your export operation:

PROFILE=test-profile
PROJECT_CPD_INST_OPERANDS=test_namespace
EXPORT_NAME=export_test1

2. Get the Project ID

  1. Log in to the Cloud Pak for Data dashboard.
  2. Navigate to the project you wish to export.
  3. Retrieve the Project ID from Manage > General > Project ID.

3. Create the export.yaml File

This YAML file specifies the project and its assets to export. Replace the guids field with your project ID. project ID look like “5fc338a9-xxxx-xxxxx-xxxxx-f9072a79835c”

catalog-api-aux:
  # exportspec specifies which assets to export
  exportspec: '{
    "project": {
      "container_specs": [
        {
          "guids": [
            "5fc338a9-xxxx-xxxxx-xxxxx-f9072a79835c"
          ],
          "all_assets": true
        }
      ]
    }
  }'

4. Initiate the Export

Run the following command to create the export:

cpd-cli export-import export create $EXPORT_NAME --component catalog-api --values export.yaml --profile=$PROFILE -n=$PROJECT_CPD_INST_OPERANDS

5. Monitor Export Status

Check the status of the export operation:

cpd-cli export-import export status $EXPORT_NAME --profile=$PROFILE -n=$PROJECT_CPD_INST_OPERANDS

Status: Succeeded: Proceed to download the exported file.

Status: Failed: Debug or retry the export (see Tips section below). using “cpd-cli export-import export logs $EXPORT_NAME — profile=$PROFILE -n=$PROJECT_CPD_INST_OPERANDS”

6. Download the Exported File

Once the status is Succeeded, download the .tar.gz file:

cpd-cli export-import export download $EXPORT_NAME --profile=$PROFILE -n=$PROJECT_CPD_INST_OPERANDS

You can now use this .tar.gz file to import the project into a different cluster or as a backup.

Tips for Failed Exports

If an export fails and you want to retry using the same name, delete the existing export:

cpd-cli export-import export delete $EXPORT_NAME --purge --profile=$PROFILE -n=$PROJECT_CPD_INST_OPERANDS

메타데이터
post_id
fc42e671e636
slug
exporting-projects-on-cloud-pak-for-data-using-cpd-cli-export-import-a-comprehensive-guide-fc42e671e636
url
https://medium.com/@farsin28/exporting-projects-on-cloud-pak-for-data-using-cpd-cli-export-import-a-comprehensive-guide-fc42e671e636
canonical_url
https://medium.com/@farsin28/exporting-projects-on-cloud-pak-for-data-using-cpd-cli-export-import-a-comprehensive-guide-fc42e671e636
author_url
https://medium.com/@farsin28
status
ok
fetched_at
2026-07-21 19:44:04