FreeKB - CA Technologies Gateway Migration Utility - Exporting an Entity (migrateOut)
CA Technologies Gateway Migration Utility - Exporting an Entity (migrateOut)

Home > Search


This assumes you are familiar with the basic usage of the Gateway Migration Utility and that you are using an arguments file with an encoded password to connect to your API Gateway.

 


Migrate out all

The migrateOut command is used to export a service, policy, and/or folder from an API Gateway. The -all option can be used to export every entity (service, policy, cluster wide properties, certificates, et cetera) to an XML file.

./GatewayMigrationUtility.sh migrateOut
-argFile example.properties
-defaultAction NewOrExisting or NewOrUpdate
-all
-dest all.xml

 


Migrate out a single service or policy

If you want to export a single service or policy, you will need to specify the name or ID of the service, policy, or folder. If you don't know the name or ID, you can get the name or ID in the API Gateway.

 

In this example, the service with ID 77f8759353276b5da9bf5f505e5caf31 is exported into a file named example.xml. The -test option is optional, and will run a test to know if the migrateOut will be successful or fail without actually performing the migration.

./GatewayMigrationUtility.sh migrateOut
-argFile example.properties
-defaultAction NewOrExisting or NewOrUpdate
-service 77f8759353276b5da9bf5f505e5caf31
-dest example.xml

 

In this example, the policy with ID b04f1d5eccc9f7828b1127515218b814 is exported into a file named example.xml.

./GatewayMigrationUtility.sh migrateOut
-argFile example.properties
-defaultAction NewOrExisting or NewOrUpdate
-policy b04f1d5eccc9f7828b1127515218b814
-dest example.xml

 

The -defaultAction option is used to determine the action that will be used.

  • NewOrExisting - If the service, policy, or folder exists in the target API Gateway, the service, policy, or folder will not be updated. 
  • NewOrUpdate - If the service, policy, or folder exists in the target API Gateway, the service, policy, or folder will be overwritten by the XML.

 

The exported service, policy, or folder will be stored in a file (example.xml in this example). The XML file will be used when importing the service, policy, or folder into the API Gateway. The XML file contains instructions on how to execution the import. 

There are two main sections to the XML. One section is <l7:References> and the other is <l7:Mappings>. The <l7:References> section contains the details of what is being imported. The <l7:Mappings> section contains the instructions on how to execute the import. For example, consider the following XML. This will instruct migrateIn to import the policy named Example into the target API Gateway.

<l7:References>
    <l7:Item>
        <l7:Name>Example</l7:Name>
        <l7:Id>1ff7053efd965ce6c0793af77548337e</l7:Id>
    </l7:Item>
</l7:References>

<l7:Mappings>
    <l7:Mapping action="NewOrExisting" srcId="123456" srcUri="https://example.com/restman/1.0/policies/1ff7053efd965ce6c0793af77548337e" type="POLICY"/>
</l7:Mappings>

 

Once migrated out, you would next migrateIn.



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter f8f51 in the box below so that we can be sure you are a human.




Comments