Exporting project data for migration

Learn about exporting data from the source target.

Perform the following validation checks before the export activity:
  • Check if the user exists and is authorised to migrate the project.
  • Check if the rsync custom Runtime is available in the Source Runtime Catalog.
  • Check if the machine to be used has sufficient disk space available to download the project.
  1. Create the export-config.ini file inside the <home-dir>/.cmlutils directory.
  2. Create a section for each project in the export-config.ini file, where you can include project-specific configurations. Place the common configurations shared across projects in the DEFAULT section.
    Example export-config.ini file:
    [DEFAULT]
    url=<Source-Workspace-url>
    output_dir=~/Documents/temp_dir
    ca_path=~/Documents/custom-ca-source.pem
    username=user-default
    apiv1_key=default-dummy-key
    
    [Project-A]
    username=user-1
    apiv1_key=user1-api-key
    
    [Project-B]
    username=user-2
    apiv1_key=user-2-api-key
    
    [Project-C] # Uses [DEFAULT] configuration as it doesn't have specific configuration
    The following configuration details are used in the example file:
    • username: This is the username of the user who is migrating the project, which is a mandatory element.
    • url: This is the source workbench URL, which is a mandatory element.
    • apiv1_key: This is the source API v1, Legacy API key, element, which is mandatory.
    • output_dir: This is a temporary directory on the local machine where the project data or metadata is stored. This is a mandatory element.
    • ca_path: This is the path to a Certifying Authority (CA) bundle to use, in case Python is not able to pick up the CA from the system and the SSL certificate verification fails. This issue might occur with MacOS. this is an optional element.
  3. If you want to skip certain files or directories during the export, create the .exportignore file at the root of the source project, that is, /home/cdsw. The .exportignore file follows the same semantics as that of .gitgnore file.
  4. Export the Project by running the following command:
    cmlutil project export -p "Project-A" 
    or
    cmlutil project export -p "Project-C"
  • A folder with the Project name is created in the (~/Documents/temp_dir) output directory. If the project folder already exists, the data will be overwritten.
  • All the Project files, artifacts, and logs corresponding to the Project are downloaded to the Project folder.
  • The export metrics JSON is created and contains information related to the exported Project.