IBMi Deployment - Restore Command
![]() Hi - Is it possible to Modify and/or Customize the -> [ibmiRestorePackage] RST>>RSTOBJ SAVLIB(MYLIB) SAVF(MYBKUP/MYSAVF) DEV(*SAVF) OBJ(*ALL) OBJTYPE(*ALL) RSTLIB(MYLIB) To Add Parameters Such as ALWOBJDIF(*ALL) or ALWOBJDIF(*OWNER) Is this something I can Add to the Build Properties to change the Default Command - ? Thanks again for your Help -
|
4 answers
![]() Hi - Got it - If you have RDP for Power Systems you can Pull in the Java JAR File - com.ibm.teamp.ibmi.deployment.toolkit_XXX - Import it as an Archive - you then can look at the com/ibm/teamp/deployment/toolkit/taskdefs/IBMRestorePackageTask.class - In here is the Code and options available to add to the Deployment Definition Propeties -> 66 ldc_w <String "team.enterprise.deployment.additional.rstobj.params"> [296] 69 invokevirtual org.apache.tools.ant.Project.getProperty(java.lang.String) : java.lang.String [72] 72 astore 9 [additionalOptionsProp] 74 aload 9 [additionalOptionsProp] 76 ifnull 84 79 ldc_w <String " MBROPT(*ALL) ALWOBJDIF(*ALL)"> [298]
To use just add a STRING to the Properties - Name = team.enterprise.deployment.additional.rstobj.params - Value = ALWOBJDIF(*ALL) - Descriptipn = Allow Object Differences -
Very Cool - Now I can Deploy and it will ignore current owner if I wish - [ibmiRestorePackage] RST>>RSTOBJ SAVLIB(MYLIB) SAVF(BKUPLIB/MYSAVF) DEV(*SAVF) OBJ(*ALL) OBJTYPE(*ALL) MBROPT(*ALL) ALWOBJDIF(*ALL) RSTLIB(MYRSTLIB) * [ibmiRestorePackage] <<CPF370B - 10: SUPERMAN owns PGM CHWUSPRX2 in MYRSTLIB. * [ibmiRestorePackage] <<Cause . . . . . : PGM CHWUSPRX2 in library MYRSTLIB already exists on the system and is owned by SUPERMAN. SUPERMAN remains the owner although RTCBUILD owned the object at the time of the save operation, because the ALWOBJDIF parameter was specified as either *ALL or *OWNER. Recovery . . . : Change the object ownership (CHGOBJOWN command), if necessary. Thx Ed O.....:-) |
![]()
Hi Edward,
When adding the property team.enterprise.deployment.additional.rstobj.params you will have the RSTOBJ command have the parameters MBROPT(*ALL) ALWOBJDIF(*ALL) addded. It doesn't matter what value you set for team.enterprise.deployment.additional.rstobj.params those parameters are always added. This should work on IBM i 7.1 and V6R1 machines. Generally the issue encountered when using multiple machines is that the package is created on the higher version and it can't be restored to a lower version. In the package definition you need to specify for the Save File options TGTRLS. Kevin |
![]() Curently This works as expected with our V7R1 Servers - For some reason it will not function on our legacy V6R1 Servers - Eventaully they will be V7R1 - Running RTC 4.02 and RDP 8.5 -
Thx Ed O....:-)
|
![]() Hi Kevin - It works as expected on our Legacy V6R1 - It was my Bad - We did our upgrade to 4.02 and I had the older Bfagent running on the servers it was not working - Once I started the newer 4.02 Bfagent all worked Perfectly - I found it in the Log Files - Wrong Agent - * Buildfile: /QIBM/ProdData/RTC40/Build/jazz/buildsystem/buildtoolkit/scripts/enterprise/deployment/deploy.xmlCorrect Agent - * Buildfile: /QIBM/ProdData/RTC402/Build/jazz/buildsystem/buildtoolkit/scripts/enterprise/deployment/deploy.xml
Thanks Very Much - Again - Ed O.....:-)
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.