Page tree
Skip to end of metadata
Go to start of metadata

Sometimes, you may need to clone a project. For example, you may need to clone a development project to use in production or clone a production project for testing purposes.

To clone a project, you can use the following methods:

  • Gray pages
  • API
  • Ruby SDK
  • CL Tool

Contents:

Objects Included in and Excluded from Cloning

When a project is cloned, the following objects are excluded from the export and are not cloned:

  • ETL processes (including both CloudConnect graphs and Ruby scripts)
  • ETL graphs
  • Schedules
  • Notifications

The objects that are cloned include, among others, metrics, reports, email schedules with their recipients, and so on. If you want some objects not to be in the newly cloned project, you need to remove them manually after the cloning process is completed. Alternatively, you can perform a partial export and import using API (see API: Export Part of a Project and API: Import Part of a Project) or the gray pages where you can choose to include or exclude specific data.

Project Database Limitations

Depending on what database your projects runs on, you can clone:

  • A project running on PostgreSQL to another PostgreSQL project
  • A project running on PostgreSQL to a project running on Vertica
  • A project running on Vertica to another Vertica project

You cannot clone a project running on Vertica to a project running on PostgreSQL. However, you can perform a partial export of reports or dashboards from Vertica to PostgreSQL.

Clone a Project via Gray Pages

To clone a project via the gray pages, complete the following steps:

  1. Export the project that you want to clone.
  2. Create a new project.
  3. Import the generated export to the newly created project.

Export the Project to Clone

This procedure assumes that you access your projects at https://secure.gooddata.com/.

If you are a white-labeled customer, replace secure.gooddata.com with your white-labeled domain in the procedure steps when needed.

Steps:

  1. Log in to the GoodData Portal at https://secure.gooddata.com/.

  2. While logged in to the GoodData Portal, go to the following link:

    https://secure.gooddata.com/gdc/md/<project-id>/maintenance

    where <project-id> is the ID of the project that you want to clone.
    The project maintenance page opens.

  3. Click export.
    The project export page opens.
  4. Depending on your requirements, select some or all export options to apply to the project clone.
  5. (Optional) In the Authorized users field, add users who would be authorized to manage the generated export and import it into a new project. Separate individual users with a line break. Adding authorized users helps when you are cloning a project between two domains. As a user exporting the project, you are authorized by default.
  6. Click submit.
    The export process starts.
    When the export is generated, the response similar to the following is displayed:
  7. Copy the value of the token keyword and save it for later. You are going to use it when importing the generated export to a new project.

After the export has been generated, you have approximately 24 hours to import the generated export into a new project.

Create a New Project

For information, see Create a Project.

When the new project is created, obtain its ID and save it for later. For more information, see Find the Project ID.

Import the Generated Export to the Newly Created Project

After the export has been generated, you have approximately 24 hours to import the export into a new project.

This procedure assumes that you access your projects at https://secure.gooddata.com/.

If you are a white-labeled customer, replace secure.gooddata.com with your white-labeled domain in the procedure steps when needed.

Steps:

  1. Log in to the GoodData Portal at https://secure.gooddata.com/.
  2. While logged in to the GoodData Portal, go to the following link:

    https://secure.gooddata.com/gdc/md/<project-id>/maintenance

    where <project-id> is the ID of the newly created project.
    The project maintenance page opens.

  3. Click import.
    The project import page opens.

  4. In the Import token field, paste or enter the value of the token that was generated during the export.
  5. Click submit.
    The import process starts. Depending on the size of the imported project, this process may take a while.
    When the import completes, the following response is displayed:

  6. Log in to the GoodData Portal, and verify that the content of the source project is available in the newly created project.

Clone a Project via API

Using the API to clone a project is particularly useful in Powered By GoodData environments, in which changes to one project must be applied across multiple projects.

Provisioning Projects via User Templates

You can provision projects from a single source project. After creating a project template from the source project, you can provision new projects by referencing the project template as the source for the new project. For more information, see Powered by GoodData Quick Start - Build Project Provisioning.

The project templates are deprecated and will stop working on May 15, 2019. Consider using Life Cycle Management instead (see Managing Projects via Life Cycle Management).

Projects provisioned from project templates do not include any users from the source project other than the one who created the project. Also, project data is excluded from the project template.

To have users and data cloned together with a project, clone the project via API.

Cloning a Project via API

This method is typically used for creating multiple clones of a single source project. Cloned projects include users and project data from the source project.

To clone a project via the API, complete the following steps:

  1. Export the project that you want to clone. See API: Export a complete project.
  2. Create a new project. See API: Create a project.
  3. Import the generated export to the newly created project. See API: Import a complete project.

Clone a Project via Ruby SDK

See the following examples of cloning projects:

Also, see how to work with a project interactively.

Clone a Project via CL Tool

The CL Tool (download from the Downloads page) supports project export and import commands. Both ExportProject and ImportProject work in project context.

You can create, use, or open a new project with the CreateProject, OpenProject, or UseProject commands in CL Tool.

To invoke the APIs via CL Tool, you must be logged in to the GoodData platform and be an administrator in each project.

Project Export Command

Syntax:

ExportProject(tokenFile="...", exportUsers="...", exportData="...", authorizedUsers="...")

The ExportProject command exports the project and (optionally) the project user references and the data of the project.

  • To export users from the source project, use exportUsers="true".
  • To export data from the source project, use exportData="true".
  • To add users who would be authorized to manage the generated export and import it into a new project, use the optional authorizedUsers parameter. Separate individual users with a comma. Adding authorized users helps when you are cloning a project between two domains. As a user exporting the project, you are authorized by default.

The exported project is stored in a protected storage area, to which you do not have direct access. Instead, you reference the project through the APIs via the token that is written to the tokenFile parameter.

Project Import Command

Syntax:

ImportProject(tokenFile="...")

The ImportProject command imports a previously exported project into a new empty project. The command needs the tokenFile file that contains a valid import token generated by the ExportProject command. The import tokens expire after 48 hours.

Example Scripts

Here is an example of the complete project cloning script:

# Open an existing project.
OpenProject(id="<your_project_md5>");
 
# Export the project with data and users. Save the import token to the importToken.txt file.
ExportProject(tokenFile="importToken.txt", exportUsers="true", exportData="true");
 
# Create a new empty project.
CreateProject(name="Clone");
 
# Import the project metadata, data, and users to the new project.
ImportProject(tokenFile="importToken.txt");