Skip to main content
NetApp Knowledge Base

How can the retention period of SnapLock Enterprise WORM files be extended in ONTAP, and what considerations apply

Views:
157
Visibility:
Public
Votes:
0
Category:
snaplock
Specialty:
DP
Last Updated:

Applies to

  • ONTAP 9
  • SnapLock Enterprise
  • SnapLock Compliance
  • WORM (Write Once Read Many) files
  • NFS environments
  • SnapMirror

Answer

Supported methods

  • ONTAP CLI
    • vol file retention set -file (Diagnostic privilege required)
    • Example: volume file retention set -file /vol/test_vol_01/test.txt -retention-time 1789462800
      • The -retention-time' value must be specified as a Unix epoch time (in seconds). For example, 1789462800 corresponds to 2026-09-15 18:00 JST.
      • The retention period can only be extended to a date/time later than the current expiry.
      • Command behavior:
        • If successful, there is no output; the prompt returns immediately.
        • If the specified retention time is earlier than the current expiry, the following error appears:
          Error: command failed: The resulting expiry time due to the specified retention period is earlier than the current expiry time.
  • REST API

PATCH /api/storage/snaplock/file/{volume.uuid}/{path}

  • ZAPI

snaplock-set-file-retention

  • Event-Based Retention (EBR)
    • Available from ONTAP 9.3 and later
    • Recommended for bulk retention extensions
  • Access time update
    • touch -a -t
    • Updates file access time (atime), which can extend retention

Requirements and limitations

  • Supported on both SnapLock Enterprise and SnapLock Compliance volumes
  • Retention can only be extended
  • EBR requires SnapLock administrator privileges and a secure connection
  • For files with Unspecified Retention Time (URT), Absolute Retention Time (ART) can only be set through ZAPI or REST API
  • EBR policies cannot be applied to files under Legal Hold
  • Extended retention cannot be reverted

NFS considerations

  • ONTAP 9.10.1 and later support timestamps beyond year 2038 for NFSv3
  • NFSv4 is recommended when retention periods extend beyond 2038

Application impact

  • touch -a -t modifies only the atime attribute and does not change file contents
  • Reading a WORM file does not update atime
  • Applications that rely on atime for auditing, backup, tiering, or archival workflows should be reviewed before extending retention through atime updates

SnapMirror considerations

  • Source and destination volumes must use the same SnapLock mode
  • SnapLock retention settings are replicated during SnapMirror transfers
  • The SnapMirror policy must be MirrorAllSnapshots
  • Retention extensions on the source are propagated at the next replication update

Best practice

  • Verify the current retention period before making changes: vol file fingerprint
NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.