Introduction:To migrate these objects, you will need to use the combination of RESTman and the GMU tool, as there is no method with either GMU or RESTman to migrateOut and migrateIn in one command
A high level concept:
GMU tool to migrateOut then migrateIN the FOLDER
GMU tool RESTman option to export the Policy_Backed_Service into an xml file, then modify the file for import with RESTman
Step 1 MigrateOut source gateway FOLDER
GMU.bat migrateOut --argFile mcqst02-l21561.properties --folderName "/GatewayUtil" --dest GatewayUtil-2.xml
Running.....................
DoneStep 2 MigrateIn destination gateway FOLDER
GMU.bat migrateIn -z mcqst02-ssg930-1.portal2.properties --bundle GatewayUtil-2.xml --destFolder / --results results-GatewayUtil-2.xml
Running....
MigrateIn results saved in: results-GatewayUtil-2.xml
Migrate in successfulStep 3 GMU restman to find ID of the policyBackedService SOURCE Gateway
GMU.bat restman --argFile mcqst02-l21561.properties --method GET --path 1.0/policyBackedServicesStep 4 GMU restman to create XML for policyBackedService for that IDGMU.bat restman --argFile mcqst02-l21561.properties --method GET --path 1.0/policyBackedServices/1314bd5337aad12f3140898dbacb69a2 > clearaudit.xmlStep 5 Edit clearaudit.xml for GMU Before:
Running..
Status: 200 OK
Server: Apache-Coyote/1.1
Content-Length: 1334
Date: Tue, 30 Apr 2019 16:43:59 GMT
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<l7:Item xmlns:l7="http://ns.l7tech.com/2010/04/gateway-management">
<l7:Name>ClearAuidt</l7:Name>
<l7:Id>1314bd5337aad12f3140898dbacb69a2</l7:Id>
<l7:Type>POLICY_BACKED_SERVICE</l7:Type>
<l7:TimeStamp>2019-04-30T12:43:59.085-04:00</l7:TimeStamp>
<l7:Link rel="self" uri="https://mcqst02-l21561.lvn.broadcom.net:8443/restman/1.0/policyBackedServices/1314bd5337aad12f3140898dbacb69a2"/>
<l7:Link rel="template" uri="https://mcqst02-l21561.lvn.broadcom.net:8443/restman/1.0/policyBackedServices/template"/>
<l7:Link rel="list" uri="https://mcqst02-l21561.lvn.broadcom.net:8443/restman/1.0/policyBackedServices"/>
<l7:Resource>
<l7:PolicyBackedService id="1314bd5337aad12f3140898dbacb69a2" version="0">
<l7:Name>ClearAuidt</l7:Name>
<l7:InterfaceName>com.l7tech.objectmodel.polback.BackgroundTask</l7:InterfaceName>
<l7:PolicyBackedServiceOperations>
<l7:PolicyBackedServiceOperation>
<l7:PolicyId>1314bd5337aad12f3140898dbacb694f</l7:PolicyId>
<l7:OperationName>run</l7:OperationName>
</l7:PolicyBackedServiceOperation>
</l7:PolicyBackedServiceOperations>
</l7:PolicyBackedService>
</l7:Resource>
</l7:Item>
TO (AFTER)
<l7:PolicyBackedService xmlns:l7="http://ns.l7tech.com/2010/04/gateway-management">
<l7:Name>ClearAuidt</l7:Name> <l7:InterfaceName>com.l7tech.objectmodel.polback.BackgroundTask</l7:InterfaceName>
<l7:PolicyBackedServiceOperations>
<l7:PolicyBackedServiceOperation>
<l7:PolicyId>1314bd5337aad12f3140898dbacb694f</l7:PolicyId>
<l7:OperationName>run</l7:OperationName>
</l7:PolicyBackedServiceOperation>
</l7:PolicyBackedServiceOperations>
</l7:PolicyBackedService>
Step 6 GMU restman to post policy backed service DESTINATION Gateway
GMU.bat restman --argFile mcqst02-ssg930-1.portal2.properties --method POST --path 1.0/policyBackedServices --request clearaudit.xml
Running..
Status: 201 Created
Server: Apache-Coyote/1.1
Content-Length: 661
Date: Tue, 30 Apr 2019 16:57:10 GMT
Content-Type: application/xml
Location: https://mcqst02-ssg930-1:8443/restman/1.0/policyBackedServices/692204ae623fe2b2d690c30ac0bbf243
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<l7:Item xmlns:l7="http://ns.l7tech.com/2010/04/gateway-management">
<l7:Name>ClearAuidt</l7:Name>
<l7:Id>692204ae623fe2b2d690c30ac0bbf243</l7:Id>
<l7:Type>POLICY_BACKED_SERVICE</l7:Type>
<l7:TimeStamp>2019-04-30T12:57:10.193-04:00</l7:TimeStamp>
<l7:Link rel="self" uri="https://mcqst02-ssg930-1:8443/restman/1.0/policyBackedServices/692204ae623fe2b2d690c30ac0bbf243"/>
<l7:Link rel="template" uri="https://mcqst02-ssg930-1:8443/restman/1.0/policyBackedServices/template"/>
<l7:Link rel="list" uri="https://mcqst02-ssg930-1:8443/restman/1.0/policyBackedServices"/>
</l7:Item>