How can I export MVMA projects and objects like connections, filters and MQ event rules from one installation to another? |
MVMA don't have an option to import the WMQ connections using the MVMA GUI. However, if you are using MVMA9.1 Fixpack B or later, you can use the JavaScript API. MVMA 9.1Fixpack B has introduced a new JavaScript, namely 'importExportAdmin.js', which can be leveraged for this requirement. The same file has been attached to this KA. Check out the documentation here: https://docs.bmc.com/docs/pages/viewpage.action?spaceKey=bmcmainframe&title=%28ID+1193%29+Technical+bulletin%3A+MainView+Middleware+Administrator+9.1.00.B+Fix+Pack+is+now+available Importing and Exporting MVMA Administrative Items: The MVMA JavaScript API was enhanced to include a sample script importExportAdmin.js that allows exporting projects including their associated connections, filters and MQ event rules from an MVMA installation. The script allows exporting these entities either into a destination MVMA installation directly or alternatively to an intermediate file which then can be imported into another MVMA installation. You'll need to extract one the zip / tar+gunzipped files present under the API directory. Extract the latest file, as only that will have the JavaScript. Once extracted, this runadmin.sh should be under <MVMA_Install_Dir>/api/admin-js-api/bin directory if not already present. To see usage information for the script run it with the --help option from a console opened to the directory the MVMA JavaScript API was extracted to: On Windows: admin-js-api\bin\runadmin.bat examples\importExportAdmin.js --help On Linux: ./bin/runadmin.sh examples/importExportAdmin.js --help Examples (Adjust the slashes and runadmin extension as per Windows or Linux, below examples are for Windows): * To retrieve all projects, connections and filters including their properties from a remote MVMA installation from the console output run the following command on Windows admin-js-api\bin\runadmin.bat examples\importExportAdmin.js --source_host localhost --source_port 8443 --source_username <MVMA_admin> --source_password <password> --dry_run * To just get a quick overview and a list of the names of the administrative items available for export in an MVMA installation run the following command on Windows: admin-js-api\bin\runadmin.bat examples\importExportAdmin.js --source_host localhost --source_port 8443 --source_username <MVMA_admin> --source_password <password> --show_supported_items * To export these entities to a file run admin-js-api\bin\runadmin.bat examples\importExportAdmin.js --source_host localhost --source_port 8443 --source_username <MVMA_admin> --source_password <password> --export_data_to_file mvma_admin_export.txt * To import these entities from a file run, you'll need to specify destination MVMA details like the hostname/port, user Id & password etc. admin-js-api\admin-js-api\bin\runadmin.bat examples\importExportAdmin.js --dest_host <New_MVMA_Host> --dest_port 8443 --dest_username <new_MVMA_Host_Username> --dest_password <Password> --import_data_from_file mvma_admin_export.txt --projects "*" --wmq_connections "*" In the same command, you may add the following options, if they are part of your export file. [--wildcard_filters "PATTERN"]: A name pattern of the Wildcard or Logical Filters the operation should include, default is all (*) [--properties_filters "PATTERN"]: A name pattern of Properties Filters the operation should include, default is all (*) [--ems_connections "PATTERN"]: A name pattern of EMS Connections the operation should include, default is all (*) If you want to give a certain name postfix, additionally use this argument: [--name_postfix "STRING"]: An option for changing the postfix that will be added in case of creating item that already exists on the destination, by default it is the current timestamp (Important) You can also try and override the entities if they already exist in your destination: [--override_same_name_items]: An option for overriding items (filters, connections, event rules and projects) if they already exists in the destination MVMA installation. Note: Once you generate the export file, check if the MVMA version is present in the first few lines. If it's not there, you may get errors like these: ERROR:The property "version" is not defined in mvma_admin_export.txt ERROR:Verify the file is a source data file! If the version is not available, then simply edit the mvma_admin_export.txt file and add the MVMA fixpack version like this & save the file, then retry the above import command: { "version": "9.1.00.F", <your export file's content> } In this example, the MVMA9.1 fixpack version was F. It could be B or later in your environment. |