Updated on 2025-08-15 GMT+08:00

Importing and Exporting Object Metadata of Applications

You can export the object metadata in the current system to migrate and back up data. For example, you can migrate the old metadata to another environment or account for object consistency and compatibility. In this way, data can be migrated between different accounts or environments, avoiding repeated development and incompatible development.

Exporting Object Metadata

  1. Log in to the Huawei Cloud Astro Zero console and click Access Homepage. The application development page is displayed.
  2. In the upper left corner of the page, click and choose Environments > Environment Configuration.
  3. Choose Maintenance from the main menu.
  1. In the navigation pane, choose Application Maintenance > Objects > Object Metadata Export.
  1. On the displayed page, click New and set parameters as required.

    Figure 1 Configuring data export
    Table 1 Parameters

    Parameter

    Description

    Export Method

    Select a data export mode. Ordinary and Template are available. The default value is Ordinary.

    If you want to export the same objects, select Template to avoid repeatedly selecting the same objects during each export. That is, you can create a template in the template area and select the corresponding template to export the same objects.

    Export File Encoding

    File encoding format, which can be UTF-8 or GBK.

    Mode

    Execution times of the export task.

    • Once: Data is exported once immediately or at a specified time.
    • Multiple times (based on frequency): Data is exported regularly at a specified interval from a given time point.
    • By Cron Expression: Data is exported based on the configured Cron expression. A Cron expression is a time-based syntax used to specify the execution time, frequency, and interval of a scheduled task. A Cron expression consists of six fields: second, minute, hour, date, month, and day of the week. For details on the values for each field, see Table 2.

    Export Schema Immediately

    Whether to export data immediately. This parameter is available only when Mode is set to Once.

    First Export Time

    Time when the export will be executed for the first time. This parameter is available only when Mode is set to Once but Export Schema Immediately is set to False, or when Mode is set to Multiple times (based on frequency).

    Execute Frequency

    When Mode is set to Multiple times (based on frequency), you need to specify the export interval.

    Unit

    Export time unit. This parameter is available only when Mode is set to Multiple times (based on frequency).

    By Cron Expression

    If Mode is set to By Cron Expression, you need to set the Cron expression.

    Example:

    Description                         Expression
    Execute at 6:00 every day                 0 0 6 * * ?
    Execute at 0:00, 6:00, and 12:00 daily 0 0 0,6,12 * * ?
    Execute at 2:00 every Saturday         0 0 2 ? * SAT
    Trigger at 10:20 AM from Monday to Friday 0 20 10 ? * MON-FRI
    Table 2 Cron expression field values

    Field

    Allowed Value

    Allowed Special Character

    Second

    0–59

    Not supported

    Minute

    0–59

    * /

    Hour

    0–23

    - * /

    Date

    1–31

    - * ? /

    Month

    1–12

    JAN-DEC - * /

    Day of Week

    1–7

    SUN-SAT - * ? /

    Table 3 Supported special characters in a cron expression

    Character

    Description

    Example

    ,

    Used to specify additional values.

    1,3,4,7,8.

    *

    Used to select all values within a field.

    If the Minute field is set to *, an event is triggered every minute.

    ?

    Used to match any value of a field. However, it can be used only in the Date and Day of week fields because the two fields affect each other.

    To trigger a scheduled task on the 20th day of each month, regardless of the day of week, use the following format: 13 13 15 20 *?

    The 20th day is specified in the Date field, the last character of the Day of week field can only be a question mark (?) instead of an asterisk (*). If the last character is *, it indicates that the event is triggered on any day of a week, which is exclusive with the 20th day of the date field. In this case, the expression is incorrect.

    -

    Used to specify ranges.

    For the Hour field, the value ranges from 8 to 10, indicating that the incident is triggered every hour from 8:00 to 10:00.

    /

    Used to specify increments. An incident is triggered from the specified time and at a fixed interval.

    In the Hour field, */3 is equivalent to "every three hours". That is, an incident is triggered at the following time points in a day: 0, 3, 6, 9, 12, 15, 18, and 21.

  2. Set the export conditions and data, and click Export.

    • If Export Method is set to Ordinary, select the data category to export.
      • All objects: All objects will be exported.
      • Standard objects: Only standard objects will be exported.
      • Custom objects: Only custom objects will be exported.
      • Custom: The objects you specify will be exported.
    • If Export Method is set to Template, create a template or select an existing template.

      If you select multiple objects, you can configure public fields as filtering conditions. When the export task status is completed, you can click to download the file.

      • The data file will be available for 48 hours. Download it before it expires.
      • You can view the results or errors of data export tasks by choosing Global Elements > Scheduled Tasks > Execution History.

  3. In the dialog box that is displayed, click the confirm button to export data.

Importing Object Metadata

Compress the object metadata exported from Exporting Object Metadata into a .zip package and then import the package.

  1. Log in to the Huawei Cloud Astro Zero console and click Access Homepage. The application development page is displayed.
  2. In the upper left corner of the page, click and choose Environments > Environment Configuration.
  3. Choose Maintenance from the main menu.
  4. In the navigation pane, choose Application Maintenance > Objects > Object Metadata Import.
  1. On the displayed page, click New, drag the .zip file to be imported, and click Import.
  2. In the displayed dialog box, click the confirm button.

    Wait for one minute and then click in the Operation column. The import status will be updated. If the data import fails, view the failure cause in the email sent to you or on the import details page.

    You can view the results or errors of data import tasks by choosing Global Elements > Scheduled Tasks > Execution History.