Go to main content
Oracle® ZFS Storage Appliance Administration Guide, Release OS8.7.0

Exit Print View

Updated: July 2017
 
 

Configuring Automatic Snapshot Retention on a Target (CLI)

Use this procedure to set a different number of retained automatic snapshots on the replication target than what was set on the source appliance. Before performing this procedure, you must set a replication action on a project or share, and schedule automatic snapshots.

When performing this task, modify the replication action and the snapshot schedule from the appropriate project or share. If the replication action and snapshot schedule are set at different levels, edit the replication action at the same level where the schedule is configured, as shown in the following table:

Action
Snapshot Schedule
Modify automatic snapshot retention on:
Project level
Project level
Action configured at the project level.
Share level
Share level
Action configured at the share level.
Project level
Share level
Action visible at the share level. (Project-level action inherited by share.)
Share level
Project level
Action configured at the share level.

See Replication Automatic Snapshot Management for more information.

Before You Begin

Before configuring automatic snapshot retention on a target, you must first do the following:

  1. On the source appliance, go to Shares and select the appropriate project or share with the replication action and snapshot schedule.
    hostname:> shares select MyProject
    hostname:shares MyProject> select MyShare
    hostname:shares MyProject/MyShare>
    
  2. Enter replication, then enter show to display existing actions.
    hostname:shares MyProject/MyShare> replication
    hostname:shares MyProject/MyShare replication> show
    Properties:
                         inherited = false
    
    Actions:
    
                TARGET          STATUS     NEXT
    action-000  local           idle       Thu Jan 05 2017 12:04:00 GMT+0000 (UTC)
  3. Select the action for which you want to modify retention settings.
    hostname:shares MyProject/MyShare replication> select action-000
    hostname:shares MyProject/MyShare action-000>
  4. Enter autosnaps, then enter show to display snapshot schedules.
    hostname:shares MyProject/MyShare action-000> autosnaps
    hostname:shares MyProject/MyShare action-000 autosnaps> show
    Properties:
      autosnaps_retention_policies = independent
    
    Automatics:
    
    NAME           FREQUENCY      DAY             HH:MM KEEP
    automatic-000  hour           -                -:04    3
    
    
  5. Select the automatic snapshot schedule that you want to modify. Then use set keep= to set the number of automatic snapshots to be retained on the target.
    hostname:shares MyProject/MyShare action-000 autosnaps> select automatic-000
    hostname:shares MyProject/MyShare action-000 automatic-000> set keep=10
                              keep = 10 (uncommitted)
  6. Enter commit to save the changes, and enter show to verify that the keep property has changed.
    hostname:shares MyProject/MyShare action-000 automatic-000> commit
    hostname:shares MyProject/MyShare action-000 automatic-000> show
    Properties:
                         frequency = hour
                               day =
                              hour =
                            minute = 04
                              keep = 10
    

    Note -  Automatic snapshot retention for replication has special processing during reverse replication. For more information, see Replication Snapshot Management.