Cloning a Snapshot in a Replication Package (CLI)

Note:

Cloning is a licensed feature. For details, refer to the "Oracle Software License Agreement ("SLA") and Entitlement for Hardware Systems with Integrated Software Options" and the appropriate Licensing Information User Manual for your product.

Note:

Snapshots within a replication package can be temporary. It is possible for a replication snapshot to be destroyed by replication updates, to accommodate new snapshots from the source. Therefore, this procedure recommends disabling replication updates for the package before cloning the replication snapshot.

Use the following procedure to clone a replication snapshot within a replication package.

  1. Go to shares replication packages and enter list to display the available replication packages.
    hostname:> shares replication packages
    hostname:shares replication packages> list
    Packages:
    
    ID          STATE DATA_TIMESTAMP      SOURCE     DATASET
    package-005 idle  2019-04-28 22:28:08 sor1       data1
    package-004 idle  2019-04-28 15:44:38 sor1       data1
    package-003 disbl 2019-04-27 23:46:20 sor1       data1
    package-002 idle  2019-04-27 23:14:10 sor1       data1
    package-001 idle  2019-04-17 17:27:05 sor2       data2
  2. Select the package that contains the share you want to clone.
    hostname:shares replication packages> select package-005
  3. Suspend replication updates for the replication package.

    This action disables replication updates for a package entirely, which cancels any ongoing updates and causes new updates from the source appliance to fail.

    1. Enter set enabled=false.
      hostname:shares replication package-005> set enabled=false
                             enabled = false (uncommitted)
    2. Enter commit.
      hostname:shares replication package-005> commit
  4. Select the project that contains the share you want to clone.
    1. Enter show to display the project name.
      hostname:shares replication package-005> show
      Properties:
                                  id = 7e184188-2738-432b-f304-123412341234de
                                  ...
                                  ...
                                  ...
      
      Projects:
                                 proj1
    2. Select the project.
      hostname:shares replication package-005> select proj1
  5. Select the share you want to clone.
    1. Enter show to display the available shares.
      hostname:shares replication package-005 proj1> show
      Properties:
                          aclinherit = restricted
                                   ...
                                   ...
                                   ...
      
      Shares:
      
      Filesystems:
      
      NAME             SIZE   ENCRYPTED     MOUNTPOINT
      share1           36K    off           /export/share1
      share2           36K    off           /export/share2
    2. Select the share.
      hostname:shares replication package-005 proj1> select share1
  6. Select the snapshot you want to use to clone the share.
    1. Enter snapshots.
      hostname:shares replication package-005 proj1/share1> snapshots
    2. Enter list to display the available snapshots.
      hostname:shares replication package-005 proj1/share1 snapshots> list
      Snapshots:
      .rr-e1401958-9f7b-47bf-8245-fa116972d26f-cb
      .rr-e1401958-9f7b-47bf-8245-fa116972d26f-ec
      .rr-e1401958-9f7b-47bf-8245-fa116972d26f-f2
      .rr-e1401958-9f7b-47bf-8245-fa116972d26f-f3
      .rr-e1401958-9f7b-47bf-8245-fa116972d26f-f4
      .rr-e1401958-9f7b-47bf-8245-fa116972d26f-f5
      
      Children:
                              automatic => Configure automatic snapshots
    3. Select the snapshot you want to clone.
      hostname:shares replication package-005 proj1/share1 snapshots> select .rr-e1401958-9f7b-47bf-8245-fa116972d26f-cb
  7. Clone the snapshot.
    1. Use the clone command, followed by the name of the project in which you want to create the clone, and the name for the clone.
      hostname:shares replication package-005 proj1/share1@.rr-e1401958-9f7b-47bf-8245-fa116972d26f-cb> clone proj_name clone1
    2. Use the get command to view properties.
      hostname:shares proj_name/clone1 (uncommitted clone)> get
      Properties:
                          aclinherit = restricted (inherited)
                             aclmode = discard (inherited)
                               atime = true (inherited)
                            checksum = fletcher4 (inherited)
                         compression = off (inherited)
                              copies = 1 (inherited)
                             logbias = latency (inherited)
                          mountpoint = /export/clone1 (inherited)
                               quota = 0 (default)
                            readonly = false (inherited)
                                    ...
                                    ...
                                    ...
    3. Use the set command to adjust properties.
      hostname:shares proj_name/clone1 (uncommitted clone)> set mountpoint=/export/clone_mountpoint_name
                          mountpoint = /export/clone_mountpoint_name (uncommitted)
    4. Use the commit command to commit the changes and create the clone.
      hostname:shares proj_name/clone1 (uncommitted clone)> commit
      hostname:shares replication package-005 proj1/share1@.rr-e1401958-9f7b-47bf-8245-fa116972d26f-cb>
  8. Re-enable replication updates for the replication package.
    1. Enter cd / to return to the top level.
      hostname:shares replication package-005 proj1/share1@.rr-e1401958-9f7b-47bf-8245-fa116972d26f-cb> cd /
    2. Enter shares replication, then use select and the package name.
      hostname:> shares replication
      hostname:shares replication> select package-005
    3. Use set enabled=true to re-enable replication updates to the package. Then enter commit to save the changes.
      hostname:shares replication package-005> set enabled=true
                             enabled = true (uncommitted)
      hostname:shares replication package-005> commit
  9. Check your specified project destination to see the clone.
    1. Enter cd / to return to the top level.
      hostname:shares replication package-005> cd /
    2. Use shares select with the project you used for the clone destination.
      hostname:> shares select proj_name
    3. Enter show to list the shares, and look for the cloned share.
      hostname:shares proj_name> show
      Properties:
                          aclinherit = restricted
                             aclmode = discard
                                    ...
                                    ...
                                    ...
      
      Shares:
      
      Filesystems:
      
      NAME                     SIZE   ENCRYPTED     MOUNTPOINT
      clone1                   1K     off           /export/clone_mountpoint_name

      Note:

      After a replication package snapshot is cloned, it can no longer be destroyed by replication updates from the source.