---
title: "oz0 retention held"
description: "Usage and flags for oz0 retention held."
canonical_url: "https://docs.oz0.ai/reference/cli/oz0/retention/held"
---
# oz0 retention held

> Usage and flags for oz0 retention held.

For: Operators and developers looking up a command.

While a legal hold holds, the edge copies each closed job's Temporal history into the database before Temporal's retention deletes it, as Temporal holds it: encrypted with the tenant's key when payloads are encrypted, as they are by default in a cluster. Each copy is an audit entry (retention.hold.copied). Without --job it lists them, for the tenant's admins.

With --job and --run it downloads one into the folder --out: history.json, Temporal's JSON history (what temporal workflow show --output json writes, and what the SDKs' replayers read), and the External Storage payloads it refers to under payloads/, which needs the content permission and is an audit entry. Large retained copies download in bounded verified parts into a new or empty directory.

--captures shows pending, partial and failed preservation with its retry timing, so missing content is not mistaken for a complete copy. Payloads decode through the edge's codec endpoint for those who may see them.

## Usage

```bash
oz0 retention held [flags]
```

## Flags

<table>
<thead>
  <tr>
    <th>
      Flag
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        --captures
      </code>
    </td>
    
    <td>
      bool
    </td>
    
    <td>
      
    </td>
    
    <td>
      list preservation progress and failures, without job content (at most 128 per page)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --job
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      
    </td>
    
    <td>
      the job whose copy to download
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --json
      </code>
    </td>
    
    <td>
      bool
    </td>
    
    <td>
      
    </td>
    
    <td>
      print JSON instead of a table
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --limit
      </code>
    </td>
    
    <td>
      int32
    </td>
    
    <td>
      <code>
        100
      </code>
    </td>
    
    <td>
      list at most this many, newest close first
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --out
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      
    </td>
    
    <td>
      the output folder; choose a private parent because temporary files are staged beside it
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --page-token
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      
    </td>
    
    <td>
      with --captures, continue from the previous page's token
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --run
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      
    </td>
    
    <td>
      its run, as the list names it
    </td>
  </tr>
</tbody>
</table>

## Inherited flags

<table>
<thead>
  <tr>
    <th>
      Flag
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        --context
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      <code>
        $OZ0_CONTEXT or &lt;config dir>/orchestrator-zero/context.json
      </code>
    </td>
    
    <td>
      CLI context file written by server init
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --log-level
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      <code>
        info
      </code>
    </td>
    
    <td>
      log level: debug, info, warn or error
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --tenant
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      <code>
        default
      </code>
    </td>
    
    <td>
      the tenant
    </td>
  </tr>
</tbody>
</table>

See [all `oz0` commands](https://docs.oz0.ai/reference/cli/oz0) and the [global flags](https://docs.oz0.ai/reference/cli/oz0#global-flags).


## Sitemap

See the full [sitemap](https://docs.oz0.ai/sitemap.md) for all pages.
