File Retention on Expiry Policy

Use the file retention on expiry policy to automatically delete files after expiration or to place a hold on all retained files. The default setting is off, which does not apply any behavior after a file's retention expires, and the file remains on the system.

When set to delete, retained files are automatically deleted after expiration. The default file retention period must be a non-zero value. Optionally, set the property retention.period.deletegrace to the amount of time to delay automatically deleting the files.

When set to hold, the file's expiry date is extended indefinitely, and the retention.policy.onexpiry property must be changed to off or delete to be able to delete the file. Therefore, the hold setting is especially beneficial for files with legal holds.

If the retention.policy.onexpiry property is set to hold on a filesystem or project with mandatory file retention, the filesystem and project cannot be deleted, and the storage pool cannot be unconfigured. When viewing a pool's statistics, the number of held filesystems is displayed, along with the number of filesystems with mandatory retention.

Caution:

Mandatory file retention affects the filesystem, project, and storage pool. Carefully plan mandatory usage so that storage resources, especially pools and their associated drives, are not consumed for longer than necessary or overfilled.

The hold setting does not affect filesystems within a replication package nor does it affect the storage pool containing such replication packages. However, if a replication package containing a held filesystem is cloned, the replication package with the cloned and held filesystem is also held. Additionally, held filesystems in replication packages are not included the storage pool's held filesystems statistic.

To use the file retention on expiry policy, apply deferred update File Retention on Expiry, which is available in software version OS8.8.63 or later. For information on applying deferred updates, see Deferred Updates in Oracle ZFS Storage Appliance Customer Service Manual, Release OS8.8.x.

Systems with software releases earlier than OS8.8.63 and that have not accepted the deferred update cannot import storage pools that use this feature; also, datasets cannot be received with property retention.policy.onexpiry set to anything except off.

User authorization retentionOnexpiry is required to set property retention.policy.onexpiry. See Assign Authorizations to User Roles.