Manual
1.Backup ↑ Back to Top
You should back up ScriptRunner on a regular basis to ensure a quick recovery of the system. The configuration settings and PowerShell reports are especially important. This information is located on $env:ProgramData\ScriptRunner\ on your ScriptRunner server. You can choose from the following options for regular backups:
- Snapshot of the ScriptRunner Server VM
- Windows Backup
- Third party backup software
Perform the following steps to create a manual backup:
- Verify that PowerShell processes of running actions on the ScriptRunner server are active. Open the Task Manager and check processes named
– SRXPSHost.exe
– Windows PowerShell
Note: Also pay attention to PowerShell processes of other programs and users. - Open PowerShell as administrator and stop the ScriptRunner service with Stop-AsrService.
Note: Make sure PowerShell is closed again. - Backup the directory $env:ProgramData\ScriptRunner\.
- If you have changed the default settings, backup the folder Script Library as well.
Note: You can view your settings in the Admin Web App under the Settings or Script Library main menu. - If changes have been made to the ScriptRunner Web Apps configuration files, backup the uri.js files and the /Custom/ folders in the following directories:
– $env:ProgramFiles\ScriptRunner\WebApps\AdminApp\
– $env:ProgramFiles\ScriptRunner\WebApps\DelegateApp\
– $env:ProgramFiles\ScriptRunner\WebApps\SelfServiceApp\
2.Restore ↑ Back to Top
To manually restore an installation, you need:
- Setup of the last installed version
- Backup of the configuration
- Backup of the Script Library
Follow these steps for the restore:
- Install the ScriptRunner service.
- Install the ScriptRunner Web Apps.
- (Optional) Set up https for the Web Server and for the ScriptRunner service.
- Open PowerShell as administrator and stop the ScriptRunner service with Stop-AsrService.
Note: Be sure to close PowerShell again. - Copy the complete $env:ProgramData\ScriptRunner\ directory from the reinstallation to a secure location.
- Copy the saved directory $env:ProgramData\ScriptRunner\ from the backup to $env:ProgramData\ScriptRunner\ on the ScriptRunner server.
- If changes have been made to the ScriptRunner Web App configuration file uri.js, copy it from the backup to the system, as well as the subfolders \Custom\.
- Open PowerShell as administrator and start the ScriptRunner service with Start-AsrService.
- Configure the ScriptRunner server and Connector settings with the ScriptRunnerSettings PowerShell module.
- Check the Admin Web App, that all items and reports are available.
Note: The stored credentials must be confirmed again with correct passwords.
3.Migration ↑ Back to Top
To move your ScriptRunner instance to another machine you need the following components:
- Setup of the current version
- Backup of the configuration
- Backup of the Script Library
- New license keys (server, user and connector licenses)
Perform the following steps for the manual migration:
Old machine
- Go to the server with the existing ScriptRunner installation
- Check if PowerShell processes of running actions are active on the ScriptRunner server. In Task Manager, check processes named
– SRXPSHost.exe
– Windows PowerShell
Note: Also check for PowerShell processes of other programs and users. -
Open PowerShell as administrator and stop the ScriptRunner service with Stop-AsrService.
Note: Be sure to close PowerShell again. - Go to the $env:ProgramData\ScriptRunner directory and save it.
Note: Place it in a temporary directory on the new machine - Save your Script Library, by default it is located under §env:ProgramData\ScriptRunner\ScriptMgr
Notes:
– Use the Get-AsrSettings cmdlet to view the path to the Script Library
– Put it in a temporary directory on the new machine
Note: Make sure the directories on the new server are structured correctly!
New Machine
/Installation
- Go to the new server
- Use the installation package to install the ScriptRunner Service
- Use the installation package to install the ScriptRunner Web Apps
- Log in to the ScriptRunner Admin App and check the functionality
Note: Also check the Windows Event Log for possible ScriptRunner errors. - (Optional) Set up https for the Web Server and for the ScriptRunner service.
- Activate your new license keys via PowerShell
- Configure the ScriptRunner server settings, especially
– Script library path (with Set-ASRSettings)
– E-Mail Notification Connector - Configure additional connectors with the PowerShell module ScriptRunnerSettings.
- Make sure that all necessary certificates for certificate-based authentication are also stored on the new server.
- (Optional) If you are using SSH, transfer the SSH key files as well.
/Transmitting the Configuration
- Open PowerShell as administrator and stop the ScriptRunner service with Stop-AsrService.
Note: Be sure to close PowerShell again. - Open the temporary directory of your Script Library and copy the structure completely into the configured Script Library directory.
- Open the temporary directory of your saved configuration.
- Copy the entire contents of the following directories to the subfolders of the same name
- $env:ProgramData\ScriptRunner\Service\Local\ResultFiles
- $env:ProgramData\ScriptRunner\Service\Settings\Params
- $env:ProgramData\ScriptRunner\Service\Settings\Repos
- (Optional for ISE Add-On) $env:ProgramData\ScriptRunner\Service\Staging
- (Optional for SSH) $env:ProgramData\ScriptRunner\Service\Settings\Store
- Open PowerShell as administrator and start the ScriptRunner service with Start-AsrService.
- In the Admin App, check that all items and reports are available.
Note: Also check the Windows Event Log for possible ScriptRunner errors. - Open the Admin App:
- Navigate to the Credentials section. You can see from the red markings which credentials require your password entry.
- Navigate to the Scripts| Cmdlets section and verify that all scripts are correctly read from the Script Library.
- Navigate to the Targets section. Check that your targets are complete.
- Navigate to the Queries section. Check the completeness of your queries.
Note: Pay special attention to red exclamation marks in scripted queries. - Navigate to the Actions section. Check the area for red exclamation marks.
- Use an action to test if the ScriptRunner service is working.
Note: Possible errors are stored in the Windows Event Log.