Editing a Snapshot Retention Policy (CLI)
Editing a Snapshot Retention Policy (CLI)
Use the following procedure to edit a snapshot retention policy for a filesystem, LUN, or
project. Snapshot retention policies are included in automatic snapshot schedules.
1.
Go to shares and select the project or share.
hostname:> shares select myproject
hostname:shares myproject> select demo_share
hostname:shares myproject/demo_share>
2.
Enter snapshots automatic.
You can use the list command to view a list of the automatic snapshot schedules for this share
or project.
hostname:shares myproject/demo_share> snapshots automatic
hostname:shares myproject/demo_share snapshots automatic> list
Properties:
convert = false
Automatics:
NAME FREQUENCY DAY HH:MM KEEP
automatic-000 hour - -:02 4
3.
Select the schedule you want to edit.
hostname:shares myproject/demo_share snapshots automatic> select automatic-000
4.
Set the keep property to the number of snapshots you want to retain for this
schedule.
Set the keep property to the number of snapshots you want to retain for this schedule (for half-
hourly and hourly snapshots, this value is capped at 48 and 24, respectively). When the number
of snapshots exceeds the number you specify, the oldest snapshots will be deleted first.
You can set keep=0 to set no retention policy. In this case, automatic snapshots from that
schedule are kept forever (except for half-hourly and hourly snapshots, which are capped at 48
and 24, respectively).
hostname:shares myproject/demo_share snapshots automatic-000> set keep=4
keep=4 (uncommitted)
5.
Enter commit to save the change.
hostname:shares myproject/demo_share snapshots automatic-000> commit
450 Oracle ZFS Storage Appliance Administration Guide, Release OS8.6.x • September 2016