Migrating to the Native Disaster Recovery Service

If you have Private Cloud Appliance environments set up for disaster recovery using Oracle Site Guard, you have the option to migrate to the native Disaster Recovery Service as soon as the systems have been upgraded or patched to appliance software version 3.0.2-b1261765 or later.

First, ensure that both environments are running the minimum required appliance software version. A first-generation disaster recovery setup cannot operate as the standby of a system running the newer native DR service, or the other way around. As soon as a peer connection has been established, first-generation DR configurations can no longer be used, but you can migrate them to the native DR service.

Collecting Oracle Site Guard DR Plans

To extract the DR plan data from Oracle Site Guard, you need the get_em_plan.sh script, and a valid user name and password for the Oracle Enterprise Manager database schema. During appliance upgrade or patching, the script is saved to the directory /var/lib/pca-foundation/scripts.

  1. Log in to the system that runs the Oracle Enterprise Manager database, where the data from the Oracle Site Guard plugin is stored.

  2. Copy the get_em_plan.sh script to this system. Run the script from the command line and specify an output file. The data is stored in CSV format.

    Note:

    To retrieve the plan data for a single DR configuration, add its name to the end of the command, separated by a space.

    $ ./get_em_plan.sh em_plan_data.csv
  3. When prompted by the script, enter the database user name and password.

    The DR plan data is retrieved from the database and saved to the *.csv output file you specified.

  4. Copy the *.csv file before logging out.
Switching to the Native DR Service

Before converting the first-generation DR plans, you must set up peering between both systems, and activate the native DR service.

  1. Ensure that an active peer connection exists between the primary and standby appliance. See Establishing a Peer Connection.

  2. Activate the native DR service by updating the existing service configuration. The serial number of the peer system is a required parameter.

    PCA-ADMIN> drNativeUpdateService peerSerialNumber=<peer_serial>
Converting to Native DR Plans

You can import the DR plan data from Oracle Site Guard into the native DR service using the Service CLI.

  1. Ensure that the *.csv output file with the DR plan data from Oracle Site Guard is in a location that the DR service pod can access.

  2. Create DR plans from the *.csv file with the create DrPlan command.

    For each DR configuration that matches a record in the *.csv file, the DR plans are converted and saved in the native DR format.

    Syntax (entered on a single line):

    create DrPlan
    drPlanDataFile=<csv_file_name>
    configsToMigrate=["all"|"config_id_1,config_id_n"]
    • To convert DR plan data for a subset of DR configurations from the CSV file, specify the IDs of the required configurations:

      PCA-ADMIN> create DrPlan drPlanDataFile=/home/admin/em_plan_data.csv \
      configsToMigrate="config1_id, config2_id, config3_id"
        JobId: 146c6422-cd82-4ecf-9e5f-a99acfc9baab
        Data: DrPlan id: null::null. Successfully started job for plan creation using /home/admin/em_plan_data.csv
    • To convert all DR plans for all matching DR configurations from the CSV file:

      PCA-ADMIN> create DrPlan drPlanDataFile=/home/admin/em_plan_data.csv configsToMigrate="all"
        JobId: 862b045a-c4f6-4f8c-8130-9d9b487bd363
        Data: DrPlan id: null::null. Successfully started job for plan creation using /home/admin/em_plan_data.csv
  3. Use the job ID to check the status of the operation you started.

    PCA-ADMIN> show Job id=862b045a-c4f6-4f8c-8130-9d9b487bd363
    Data:
      Id = 862b045a-c4f6-4f8c-8130-9d9b487bd363
      Type = Job
      Associated Work Request Id = 8671211c-68b3-426e-aa7c-d93d9ffb32e4
      Done = true
      Name = CREATE_TYPE
      Progress Message = Plan migration succeeded.
      Run State = Succeeded
      Transcript = Created job CREATE_TYPE
      Username = admin
      WorkItemIds 1 = id:08cb4f9a-575b-4536-b832-b85948c90212  type:WorkItem  name:

    Use the work request ID to display more details.

    PCA-ADMIN> drGetJob jobId=8671211c-68b3-426e-aa7c-d93d9ffb32e4
    Data:
      Type = drplan_migration
      Job Id = 8671211c-68b3-426e-aa7c-d93d9ffb32e4
      Status = finished
      Result = succeeded
      Message = job successfully retrieved
      Response =
        config_id: b51a51ac-043e-4b6d-ab29-20f86d905e81: plan_name: fo1 status: success
        config_id: b51a51ac-043e-4b6d-ab29-20f86d905e81: plan_name: sw1 status: success
        config_id: b51a51ac-043e-4b6d-ab29-20f86d905e81: plan_name: pfo1 status: success
  4. To confirm that the DR plans have been added, use the drListPlan command.

    PCA-ADMIN> drListPlan drConfigId=b51a51ac-043e-4b6d-ab29-20f86d905e81
    Data:
      id                                          Plan Name   Operation  
      --                                          ---------   ---------  
      b51a51ac-043e-4b6d-ab29-20f86d905e81::fo1   fo1         failover
      b51a51ac-043e-4b6d-ab29-20f86d905e81::sw1   sw1         switchover
      b51a51ac-043e-4b6d-ab29-20f86d905e81::pfo1  pfo1        postfailover
  5. Modify the DR plans as required. For details, see Working With Disaster Recovery Plans.