Archive and Recovery

Archive and recovery commands convert partitioned-table data files to IA (infrequent access) or ARCHIVE storage and retrieve archived files when needed. IA files can be read directly; ARCHIVE files must be retrieved first, and the retrieval progress is monitored with SHOW RESTORE STATUS.


In This Chapter

PageDescription
ARCHIVE TABLEArchive a specified partition of a partitioned table to IA, ARCHIVE, or STANDARD storage
RESTORE TABLE (Archive File Retrieval)Asynchronously retrieve archived files stored as ARCHIVE
SHOW RESTORE STATUSView the status of archive-file retrieval tasks

Common Operations

Archive a Partition

-- Low-frequency data that still needs to remain online ARCHIVE TABLE public.orders PARTITION (dt = '2026-08-24') SUBDIRECTORY 'ia/20260824/' STORAGE_CLASS = 'IA'; -- Data retained for a long time and rarely accessed ARCHIVE TABLE public.orders PARTITION (dt = '2026-08-25') SUBDIRECTORY 'archive/20260825/' STORAGE_CLASS = 'ARCHIVE';

ARCHIVE TABLE applies to the specified partition of a partitioned table. A successful command completes the archive operation but does not delete data from the source table.

Retrieve Archived Files

RESTORE TABLE public.orders SUBDIRECTORY 'archive/20260825/'; -- Retrieval is asynchronous. Wait until the status is RESTORED. SHOW RESTORE STATUS public.orders SUBDIRECTORY 'archive/20260825/';

Only ARCHIVE files support RESTORE TABLE. IA files can be read directly without retrieval.

DocumentDescription
ARCHIVE TABLEComplete syntax, parameters, and limitations for archiving partitions
RESTORE TABLE (Archive File Retrieval)Complete syntax and asynchronous processing details for retrieving archived files
SHOW RESTORE STATUSRetrieval status and status values
Partitioned TablesCreate and manage partitioned tables
Table VolumeView the Table Volume associated with a table and its files