All Products
Search
Document Center

E-MapReduce:Use JindoTable to archive and unarchive tables or partitions in OSS

Last Updated:Mar 26, 2026

JindoTable provides two CLI commands — archiveTable and unarchiveTable — to change the storage class of Hive tables or partitions in Object Storage Service (OSS). Use these commands to move cold data to lower-cost storage classes (Archive, Cold Archive, or Infrequent Access) and restore it when you need access again.

Limit

This feature requires a Hive metastore to store metadata.

Archive tables or partitions

Use the archiveTable command to change the storage class of OSS data referenced by a Hive table or partition to Archive, Infrequent Access (IA), or Cold Archive.

Syntax

jindotable -archiveTable -t <dbName.tableName> -i/-a/-ca [-c "<condition>" | -fullTable] [-b/-before <before days>] [-p/-parallel <parallelism>] [-mr/-mapReduce] [-e/-explain] [-w/-workingDir <working directory>] [-l/-logDir <log directory>]

To view all available options, run:

jindotable -help archiveTable

Parameters

ParameterRequiredDescription
-t <dbName.tableName>YesThe table to archive, in database.table format. Supports both partitioned and non-partitioned tables.
-i / -a / -caYesThe target storage class: -a for Archive, -i for Infrequent Access (IA), or -ca for Cold Archive. When -i is specified, files already in Archive storage class are skipped.
-c "<condition>" / -fullTableNoThe scope of the operation. You must configure either -c "<condition>" or -fullTable. Use -fullTable to archive the entire table, or -c "<condition>" to filter by partition key. Common comparison operators are supported. For example, to archive partitions where the ds column (String type) is greater than d, use -c " ds > 'd' ".
-b / -before <before days>NoOnly archives tables or partitions created at least this many days ago.
-p / -parallel <parallelism>NoThe number of parallel archive operations.
-mr / -mapReduceNoUses Hadoop MapReduce instead of local multithreading.
-e / -explainNoRuns in explain mode: lists the partitions that would be archived without making any changes.
-w / -workingDir <working directory>NoThe working directory for a MapReduce job. Temporary files are created during the job and deleted automatically when it completes. Only applies when -mr is used.
-l / -logDir <log directory>NoThe directory for log files.

Unarchive tables or partitions

The unarchiveTable command supports two restore modes:

  • Permanent storage class change: Moves data to a different storage class (Standard by default, or IA or Archive as specified). Use this when you need long-term access.

  • Temporary restore: Use the -o option to temporarily make archived data accessible without permanently changing its storage class. The data reverts after the number of days specified by -d.

Syntax

jindotable -unarchiveTable -t <dbName.tableName> [-i/-a/-o/-cr] [-notWait] [-c "<condition>" | -fullTable] [-d/-restoreDays <restore days>] [-b/-before <before days>] [-p/-parallel <parallelism>] [-mr/-mapReduce] [-e/-explain] [-w/-workingDir <working directory>] [-l/-logDir <log directory>]

To view all available options, run:

jindotable -help unarchiveTable

Parameters

ParameterRequiredDescription
-t <dbName.tableName>YesThe table to unarchive, in database.table format. Supports both partitioned and non-partitioned tables.
-i / -a / -o / -crNoControls how data is restored. If not specified, the storage class changes to Standard. Options: -i changes to IA (skips Standard files); -a changes to Archive; -o temporarily restores archived data without changing its storage class (skips Standard, IA, and already-restored files); -cr checks whether all restore jobs are complete.
-notWaitNoExits immediately after submitting the restore request to OSS, without waiting for the operation to complete. By default, the command waits until the operation completes or times out after 10 minutes.
-c "<condition>" / -fullTableNoThe scope of the operation. You must configure either -fullTable or -c "<condition>". Use -fullTable to unarchive the entire table, or -c "<condition>" to filter by partition key. Common comparison operators are supported.
-d / -restoreDays <restore days>NoThe number of days to keep the temporary restore state when using -o. The default is 1 day. Applies to Archive and Cold Archive storage. Has no effect when changing the storage class from IA to Standard.
-b / -before <before days>NoOnly unarchives tables or partitions created at least this many days ago.
-p / -parallel <parallelism>NoThe number of parallel unarchive operations.
-mr / -mapReduceNoUses Hadoop MapReduce instead of local multithreading.
-e / -explainNoRuns in explain mode: lists the partitions that would be unarchived without making any changes.
-w / -workingDir <working directory>NoThe working directory for a MapReduce job. Temporary files are created during the job and deleted automatically when it completes. Only applies when -mr is used.
-l / -logDir <log directory>NoThe directory for log files.

Behavior notes

  • Storage class skip rules: When using -i with archiveTable, files already in Archive storage class are skipped. When using -i with unarchiveTable, files already in Standard storage class are skipped.

  • Temporary restore scope: The -o option applies only when restoring data from Archive or Cold Archive storage. It has no effect on Standard or IA data. Files that were previously restored are also skipped to prevent duplicate restore operations.

  • Restore duration: The -d parameter sets how long temporarily restored data (via -o) remains accessible. After the retention period, the data reverts to its original storage class. This applies to Archive and Cold Archive storage.

  • Default wait behavior: By default, unarchiveTable waits for the OSS restore operation to complete or times out after 10 minutes. Use -notWait to exit immediately after submitting the job, then use -cr to check the restore status later.

  • MapReduce working directory: When using -mr, the working directory specified by -w can be left blank. Temporary files created during the job are deleted automatically.