How to Backup and Restore SOI services using WSSSaServiceCmd

Document ID : KB000093190
Last Modified Date : 27/04/2018
Show Technical Document Details
Introduction:
The WSSamServiceCmd utility allows you to import and export services, escalation policies, and escalation actions.
Background:
This utility exports Service definitions and their associated CI's and relationships from the SA Store database into an XML file. The same xml file is used to import services back to the database
Environment:
SOI 3.x, 4.x
Instructions:
We need to run this command on the SOI manager Node. Before importing or exporting a service, generate an encrypted password by executing WSSamEncryptCmd command.

Syntax: WSSamEncryptCmd.bat <text to encrypt>

Once this is done, you can use the WSSaServiceCmd command to export and import a service.

WSSaServiceCmd -h<wsHostName:wsPort> -u<wsUsername> -p<encrypted wsPassword> -a<Export|Import> -s<Service InstanceID|*> -f<filename>

For example, 

Exporting a particular service:

WSSSAServiceCmd -hlocalhost:7090 -usamuser -p"EFbJeXR3zLsi9aPfOQ9FzRVOPPEUwCGxCWUFTNF4kxKD" -aImport -s"Service:servicename,WSMan New Service" -fc:/myServiceImport.xml

Importing a particular service:
WSSSAServiceCmd -hlocalhost:7090 -usamuser -p"EFbJeXR3zLsi9aPfOQ9FzRVOPPEUwCGxCWUFTNF4kxKD" -aImport -s"Service:servicename,WSMan New Service" -fc:/myServiceImport.xml

Additional Information:
Click the link below to view a video on how to back up and restore the services.
https://https://www.youtube.com/watch?v=ZIoUDZxKJE4&index=11&list=PLynEdQRJawmyMiyiQOvtT1pBQuc_3oCZz