Enabling Automatic File Retention

You can configure automatic file retention on a retained ZFS file system by setting the retention.period.grace property value to a non-zero integer. When enabled, any file that has not been modified for the grace period is retained automatically for the default retention period.

Note that when you enable automatic file retention, you cannot later disable it.

Also, you cannot increase the retention.period.grace property value after you enable automatic retention.

Dataset and pool protections are extended automatically upon each write and upon each mount. The new retention period becomes the current date and time plus the retention.period.grace property value and the retention.period.default property value. This action presumes that the file just written must be retained.