Use the following procedure to discard an entire archived dataset, or a portion of an archived dataset. Datasets are automatically pruned according to the existing retention policy, but they can also be pruned manually. This process may take several minutes to complete, depending on the size of the dataset and the amount of pruning required. Note that datasets can only be pruned when they are active.
hostname:analytics datasets> show Datasets: DATASET STATE INCORE ONDISK NAME dataset-000 active 1.27M 15.5M arc.accesses[hit/miss] dataset-001 active 517K 9.21M arc.accesses[hit/miss=metadata hits][L2ARC eligibility] ... dataset-005 active 290K 7.80M cpu.utilization
hostname:analytics datasets> destroy dataset-005 This will destroy "dataset-005". Are you sure? (Y/N) Y
A date before which all data is removed. If a date is not specified, then the default is the present date and time. Enter the date using this format: year-month-date.
The time before which all data is removed. If a time is not specified, then the default is 12:00 AM, or 00:00 in 24-hour notation. Enter the time in 24-hour notation, using this format: hour:minute:second.
The level of data that is removed. The granularity can be presented as one of the following: second, minute, or hour.
If minute or hour is specified, the lower level of data granularity is also deleted. For example, using the prune hour command also deletes the per-second and per-minute data.
Detailed datasets can be pruned on several levels to reduce the quantity of saved data, which allows you to archive only a portion of the dataset. For example, use a series of prune commands to keep a day's worth of per-second data, a couple weeks of per-minute data, and six months of per-hour data. See Example 4.
In the following example, only the granularity is specified. This example discards all per-second and per-minute data collected before 4:56 PM on April 2, 2012.
hostname:analytics datasets> select dataset-001 hostname:analytics dataset-001> prune minute This will remove per-second and minute data collected prior to 2012-4-02 16:56:52. Are you sure? (Y/N) YExample 2 Pruning by date
In the following example, only a date is specified. This example discards all per-second data collected before midnight on December 1, 2015.
hostname:analytics dataset-001> prune 2015-12-01 second This will remove per-second data collected prior to 2015-12-1 00:00. Are you sure? (Y/N) YExample 3 Pruning by date and time
In the following example, both a date and time are specified. This example discards per-second data collected at and before 12 PM on June 3, 2015.
hostname:analytics dataset-001> prune 2015-06-03 12:00:01 second This will remove per-second data collected prior to 2015-6-3 12:00:01. Are you sure? (Y/N) YExample 4 Pruning detailed datasets
The following prune commands keep a day's worth of per-second data, a couple weeks of per-minute data, and six months of per-hour data older than December 15, 2015.
hostname:analytics dataset-001> prune 2015-12-14 second hostname:analytics dataset-001> prune 2015-12-01 minute hostname:analytics dataset-001> prune 2015-6-01 hour