IN THIS ARTICLE
Outlines how to set an expiration at a specified time to automatically delete a snapshot
- Qumulo Core 2.5.1 or above
- Command line (CLI) tools installed via API & Tools tab
NOTE: Qumulo Core version 2.6.6 added UI support for deleting snapshots. See Snapshots: Per-Directory Snapshots for reference.
When you create a snapshot via the qq CLI, you can specify either the time to live or the time (in UTC) at which to delete the snapshot.
Here’s an example of creating a snapshot that expires on January 31, 2017 at midnight UTC:
qq snapshot_create_snapshot --expiration 2019-12-31T00:00:00Z
- The output of the command will result in:
Below is an example of creating a snapshot that expires in one year:
qq snapshot_create_snapshot --time-to-live 12months
- The output will include a timestamp correlating to the specified time to live:
NOTE: All times are expressed in UTC.
If you don’t specify an expiration time or time to live, the snapshot will never be automatically deleted.
To change or remove the expiration on existing snapshots, you can use the snapshot ID from the UI. Note that the snapshot ID is the five digit number that is featured at the beginning of the path string (ex. 63040_test homedir_test).
Use the specific Snapshot ID with the command:
For example, to set the snapshot to never expire you would use the following command:
qq snapshot_modify_snapshot -i SNAPSHOT_ID -e ''
To have the snapshot expire in a specific amount of time in the future (1 hour, 1 month, 1 year, etc), you can use the following command:
qq snapshot_modify_snapshot -i SNAPSHOT_ID -t [months,weeks,days,hours,minutes]
You should now be able to successfully set the expiration on a snapshot using QQ CLI
Like what you see? Share this article with your network!