Manage offline data archiving

更新时间:
复制 MD 格式

Configure offline data archiving to reduce storage costs for older data that does not require immediate analysis. You can enable, modify, and cancel archiving as needed.

Prerequisites

Product data backup is enabled. The archive period for stored data must be shorter than the backup period for device data in the instance. The minimum archive period is 1 month , and when you enable data backup, you must ensure that the backup period is greater than 1 month. For both the backup period and the archive period, one month is calculated as 30 days and one year is calculated as 365 days.

Limitations

  • Only the following types of offline data support archive storage. For a description of the storage tables, see Offline Data Storage Overview.

    • In a Time-series/Snapshot Table: Product Property Time-series Table and Product Event Table

    • In a Custom Storage Table: Partitioned Table and Time-series Table

  • Once archived, data cannot be queried for analysis in the SQL Data Service workbench. To analyze the data, you must first cancel the archive. For instructions, see Cancel archive below.

Example

If you need to back up 5 years of device data for an instance but only analyze data from the most recent year, set the backup period to 5 years and the archive period to 1 year. In this scenario:

  • Device data older than 5 years is automatically deleted.

  • Data from the most recent year is kept in standard storage.

  • Backed-up data between one and five years old is stored in archive storage.

    image

Billing

Archived data resides in archive storage and counts toward your total offline data storage space. The unit price remains the same, but the billable size is calculated as two-fifths of the size in standard storage.

Region

Billing (CNY/GB/month)

China (Shanghai), China (Beijing), China (Shenzhen)

0.2

Singapore, US (Virginia)

0.4

Example

For example, assume you have the following in the China (Shanghai) region: 1 GB of offline data in standard storage and 2 GB of offline data in archive storage.

In this case, the 1 GB of data in standard storage occupies 1 GB of billable space, and the 2 GB of data in archive storage accounts for 2/5 GB of billable space.

The total monthly cost for all offline data storage is: 0.2*(1+2/5)=0.28 CNY.

Enable archiving

Note

Archived data can also be exported. For instructions, see Export data tables.

  1. Log on to the IoT Platform console.

  2. On the Instance Overview page, find the target Enterprise instance and click the instance to open the Instance Details page.

  3. In the navigation pane on the left, choose DataService Studio > Data Storage.

  4. On the Data Storage page, click the Offline Storage tab.

  5. Click the Time-series/Snapshot Table or Custom Storage Table tab.

  6. In the data list, click the image icon in the Table Type column. Select Product Property Time-series Table , Product Event Table , Partitioned Table , or Time-series Table , and then click Confirm . Find the target storage table in the resulting list.

  7. In the dialog box that appears, select an archive period.

    Note that archived data is not directly available for analysis and must be restored first, which can cause a delay. The archive period cannot be longer than the data lifecycle period.

    Parameter

    Description

    Archive period selection

    Select a Duration unit and a Duration value. Currently, only Month is supported as the unit.

    Important
    • For Product Property Time-series Table and Product Event Table, the archive period's duration must be shorter than the instance's backup period; otherwise, archiving will fail.

    • For a Custom Storage Table, the Duration value for the archive period must be less than the table's data storage duration. Otherwise, archiving will fail and return an error.

    Archive data every day

    • Selected by default. A daily task is created to archive new data that meets the specified criteria.

    • Deselecting the Archive data daily checkbox creates a one-time archive task to save the data that currently meets the archiving conditions to the offline data archive storage.

  8. Click Confirm.

    While data is archiving, you can click Archive Progress in the Actions column of the storage table to view its progress.

View archive records

  1. On the Time-series/Snapshot Table or Custom Storage Table tab, find a storage table for which archiving is complete, and in the Actions column, click More > Archive Records.

  2. On the archive records page, select a Scheduling Date to view the corresponding records.

    The archive records are displayed in a table that includes the following columns: Time-series Table/Identifier, Run Type, Scheduling Date, Last Run Time, Last Run Duration, and Status. The Actions column provides options to View and Rerun.

  3. Click View in the Actions column for an archive record to see its details.

    The archive details page displays fields such as Time-series Table Name/Identifier, Scheduling Date, Last Run Time, Last Run Status (for example, Success), Run Type (for example, Console Trigger), Archive Time Period, and Last Run Duration. Below these fields are the Run Records list and the run log area. The log shows each Directed Acyclic Graph (DAG) node being processed in sequence, along with the final execution result (such as SUCCESS) and the elapsed time.

Modify archive

After archiving is enabled for a storage table, you can change the archive period or cancel it.

Change the archive period

  1. On the Time-series/Snapshot Table or Custom Storage Table tab, find a storage table for which archiving is complete, and click Change Archive in the Actions column.

  2. In the dialog box that appears, the Change Type is set to Change Period by default. Modify the Archive period selection and Archive data every day settings as needed.

    The Archive period selection includes the Duration unit and Duration value settings.

  3. Click Confirm.

Cancel archive

  1. On the Time-series/Snapshot Table or Custom Storage Table tab, find the archived storage table and click Change Archive in the Actions column.

  2. In the dialog box that appears, set the Change Type to Cancel Archive.

    A message appears indicating that all archived data will be restored, and data archiving will be stopped for this time-series data table. After restoration, the data returns to its original size, which is 2.5 times its size while archived. Before proceeding, confirm that you have enough available space for the restored data, and then click Confirm.

  3. Click Confirm.

After the archive is canceled, data moves from archive storage back to standard storage and is billed at its full size.