Taking a Snapshot (CLI)

Use the following procedure to take a manual snapshot of a filesystem, LUN, or project, and to specify the retention policy setting. A manually set retention policy, which is especially beneficial for legal holds, has no specified duration, and the snapshot cannot be deleted until the off option is manually set. A snapshot with a set retention policy within a share also protects the share and project containing the snapshot. However, filesystems, LUNs, and other snapshots within the share can be modified or deleted. Snapshot retention holds are preserved when moving the snapshot to another system via remote replication, NDMP (zfs format), or cloud snapshot backup (zfs format). However, retention holds cannot be added to original remote replication snapshots nor original NDMP snapshots.

To use the snapshot retention hold feature, apply deferred update "Support for Snapshot Retention." For information about deferred updates, see Deferred Updates in Oracle ZFS Storage Appliance Customer Service Manual, Release OS8.8.x.

The following user role authorizations are required to take a manual snapshot and to set a retention policy:

  • Take a manual snapshot: takeSnap

  • Set a retention policy: retainSnap

To release a hold so a snapshot can be deleted, a user with the releaseSnapRetention authorization must set the retention policy to off. For information on editing authorizations for a role, see Editing Authorizations for a Role (BUI). For information on editing the retention policy, see Editing a Snapshot Retention Policy (CLI).

To schedule automatic snapshots at regular intervals and to specify the retention policy setting, see Scheduling Snapshots (CLI).

  1. Go to the share or project you want to snapshot.
    1. To take a snapshot of a project, go to shares and select the project.
      hostname:shares> select myproject
      hostname:shares myproject>
    2. To take a snapshot of a filesystem or LUN, go to shares and select the project containing the share, then select the share.
      hostname:shares> select myproject
      hostname:shares myproject> select demo_share
      hostname:shares myproject/demo_share>
  2. Enter snapshots.
    hostname:shares myproject/demo_share> snapshots
  3. Use the snapshot command followed by the name you want to give the new snapshot. To set a retention hold, use the r option after the snapshot command.

    The retention hold option can be set by a user with the retainSnap authorization. It sets a retention policy for this snapshot for an unspecified hold duration, the retentionpolicy property is set to unlocked, and the snapshot cannot be deleted.

    hostname:shares myproject/demo_share snapshots> snapshot -r demo_snap