The workspace backup and restoration feature is used for code migration between workspaces. This topic describes how to back up and restore a workspace.
On the DataStudio page, click the icon in the lower-left corner. The Setup page appears on the right.
- On the Backup tab, you can compress the node code, node dependencies, resources, and functions in a workspace into one package.
- On the Restore tab, you can restore a workspace to its original scheduling configurations. After the workspace is restored, all nodes in the workspace are saved but not committed.
Go to the Workspace Backup and Restoration tab
- Log on to the DataWorks console. Find the required workspace and click Data Analytics.
- Click the icon in the lower-left corner. The Setup page appears on the right.
- In the top navigation bar, click Workspace Backup and Restoration.
Back up the workspace
- Only workspace administrators can export backups and restore data from backups on the Setup page. For more information about how to go to the Setup page, see Setup.
- Workflows and node groups of earlier versions cannot be backed up. We recommend that you use workflows of the latest version for data analytics.
- A node that is backed up to a path in a workspace will override the original node with the same name in the path. We recommend that you create another workspace to restore data.
- Data in tables is not backed up when you back up a workspace. You can synchronize
the table data in the following ways:
- Click the Data Source page and configure a MaxCompute connection. Then, create a sync node to back up the data. icon in the upper-right corner. Go to the
- In Workspace A, execute the DDL statement
create table select * from Workspace B.Table nameto migrate the data.
- Go to the Backup tab. Then, click Create Backup in the upper-right corner. tab. Click the
- In the Create Backup dialog box, set the Method and Version parameters.
- MethodYou can set the backup method to Full Backup or Incremental Backup.
Note If you use the incremental backup method, make sure that the dependencies between incremental sync nodes are correct. Otherwise, the workspace may fail to be restored. We recommend that you set this parameter to Full Backup.
- Full Backup: backs up all the node code, node dependencies, resources, and functions in the workspace.
- Incremental Backup: backs up all the new or modified nodes from the timestamp that is specified by the Start Timestamp parameter to the current time.
Valid values are Public Cloud, Apsara Stack V3.6.1 - V3.8.1, and Apsara Stack < V3.6.1.
- After the configuration is completed, click Create.
Restore the workspace
- Go to the Restore tab. Then, click Restore in the upper-right corner. tab. Click the
- In the Restore dialog box, click Select File.
Note You can upload the compressed package that you previously backed up to the workspace.
- After the configuration is completed, click Restore.
- In the Set Compute Engine Mapping dialog box, set the Compute Engine Instances of Target Workspace parameter.
If the workspace that you backed up contains multiple compute engines, the system scans all compute engine instances during restoration. The system restores only nodes of the existing compute engines in the workspace to be restored. In this case, you must configure the mappings between the compute engines in the source and destination before you restore the destination workspace.Note
- If the workspace to be restored does not contain a compute engine type such as E-MapReduce, or no instance is available for the compute engine type, nodes of this engine type are not restored.
- The custom node types vary based on the region. Therefore, you must also configure the mappings between the custom node types in the source and destination. For example, you must configure the mappings for the existing custom node types such as Hologres development node, Data Lake Analytics node, AnalyticDB for MySQL node, and AnalyticDB for PostgreSQL node.