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

Exit Print View

Updated: July 2017
 
 

Creating a Replication Action (CLI)

A replication action describes the project or share to be replicated, the replication target, the replication schedule, and data transfer properties such as enabling or disabling encryption of the network link.

  • If you are setting up remote replication for the first time, it may be useful to replicate a minimal amount of data to ensure the sync completes successfully. You can either replicate an empty project or choose not to replicate the snapshots in the project/shares.

  • If you are replicating a large data set and bandwidth is limited due to distance between source and target appliances, you can export the replication as described in Configuring Offline Replication (CLI).

  1. Navigate to the project or share, and enter action:
    host_source:shares PROJECT1/SHARE1 replication> action
  2. Display the properties.
    host_source:shares PROJECT1/SHARE1 action (uncommitted)> get
      Properties:
                   target = (unset)
                     pool = (unset)
                  enabled = true
               continuous = false
            include_snaps = true
            max_bandwidth = unlimited
                  use_ssl = true
  3. Set the properties for this action.

    See Replication Action Properties for a description of CLI properties.

    host_source:shares PROJECT1/SHARE1 action (uncommitted)> set target=repl_sys
                             target = repl_sys (uncommitted)
    host_source:shares PROJECT1/SHARE1 action (uncommitted)> set pool=pool-0
                                 pool = pool-0 (uncommitted)
    host_source:shares PROJECT1/SHARE1 action (uncommitted)> set include_snaps=false
                         include_snaps = false (uncommitted)
    host_source:shares PROJECT1/SHARE1 action (uncommitted)> set use_ssl=false
                           use_ssl = false (uncommitted)
    host_source:shares PROJECT1/SHARE1 action-000> schedule
    host_source:shares PROJECT1/SHARE1 action-000 schedule (uncommitted)> set frequency=day
                                frequency = day (uncommitted)
    host_source:shares PROJECT1/SHARE1 action-000 schedule (uncommitted)> set hour=23
                                     hour = 23 (uncommitted)
    host_source:shares PROJECT1/SHARE1 action-000 schedule (uncommitted)> set minute=05
                                   minute = 05 (uncommitted)
  4. Commit the new replication action.
    host_source:shares PROJECT1/SHARE1 action (uncommitted)> commit
  5. To view the properties of the newly created action, enter ls:
    host_source:shares PROJECT1/SHARE1 replication> ls
     Properties:             
          inherited = false
     Actions:
          TARGET                    STATUS     NEXT
         action-000  repl_sys       idle       manual
    
    host_source:shares PROJECT1/SHARE1 action-000> ls
     Properties:
                           id = a751dc0f-abcd-1234-6789-f5e8315eaffa
                       target = repl_sys
                      enabled = true
                   continuous = false
                include_snaps = false
                max_bandwidth = unlimited
                      use_ssl = false
                  compression = on
                  export_path = 
                        state = idle
            state_description = Idle (no update pending)
               export_pending = false
                      offline = false
                  next_update = Wed Sep 01 2016 23:05:00 GMT+0000 (UTC)
                    last_sync = Wed Sep 01 2016 10:24:05 GMT+0000 (UTC)
                     last_try = Wed Sep 01 2016 10:24:05 GMT+0000 (UTC)
                  last_result = success
  6. To view the ID of the newly created action, use the last command, which navigates to the node with the new action, combined with get id, which retrieves the action ID.

    The ID is used later to select the correct replication action node.

    host_source:shares PROJECT1/SHARE1 replication>last get id
                                   id =
        fb1bb3fd-3361-42e1-e4a1-b06c426172fb 
      

Related Topics