This section explains how to use the
qq fs_file_modify_lock
command.For more information, see How File Locks Work in Qumulo Core in the Qumulo Administrator Guide.
Examples
Note
The following operations require Write ACL permissions for the file and a role with the
The following operations require Write ACL permissions for the file and a role with the
FS_FILE_LOCK_WRITE
role-based access control (RBAC) privilege.To Enable Locking for a File
Run the fs_file_modify_lock
command, specify the path to the file, and use the --enable-legal-hold
flag. For example:
qq fs_file_modify_lock \
--path /path-to/my-file \
--enable-legal-hold
To Disable Locking for a File
Run the fs_file_modify_lock
command, specify the path to the file, and use the --disable-legal hold
flag. For example:
qq fs_file_modify_lock \
--path /path-to/my-file \
--disable-legal-hold
To Set a Retention Period for a File
Run the fs_file_modify_lock
command, specify the path to the file, and then specify a timestamp in the ISO 8601 UTC format followed by Z
. For example:
qq fs_file_modify_lock \
--path /path-to/my-file \
--retention-period 2024-08-14T23:37:48Z
Alternatively, you can set the retention period in years or days. For example:
qq fs_file_modify_lock \
--path /path-to/my-file \
--days 3
Description
Modify a retention period or legal hold on a file.
Usage
qq fs_file_modify_lock [-h] (--path PATH | --id ID) [--enable-legal-hold | --disable-legal-hold] [--retention-period RETENTION_PERIOD | --retention-days RETENTION_DAYS | --retention-years RETENTION_YEARS]
Flags
Flag Name | Required | Description |
---|---|---|
--path
|
No | File path |
--id
|
No | File ID |
--enable-legal-hold
|
No | Set a legal hold on the file. |
--disable-legal-hold
|
No | Unset a legal hold on the file. |
--retention-period
|
No | Set the retention period for a file lock. |
--retention-days
|
No | Set the retention period for a file lock to the specified number of days from now. |
--retention-years
|
No | Set the retention period for a file lock to the specified number of years from now. |