Backup

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:

  1. 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.
  2. Open PowerShell as administrator and stop the ScriptRunner service with Stop-AsrService.
    Note: Make sure PowerShell is closed again.
  3. Backup the directory $env:ProgramData\ScriptRunner\.
  4. 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.
  5. 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\

Restore

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:

  1. Install the ScriptRunner service.
  2. Install the ScriptRunner Web Apps.
  3. (Optional) Set up https for the Web Server and for the ScriptRunner service.
  4. Open PowerShell as administrator and stop the ScriptRunner service with Stop-AsrService.
    Note: Be sure to close PowerShell again.
  5. Copy the complete $env:ProgramData\ScriptRunner\ directory from the reinstallation to a secure location.
  6. Copy the saved directory $env:ProgramData\ScriptRunner\ from the backup to $env:ProgramData\ScriptRunner\ on the ScriptRunner server.
  7. 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\.
  8. Open PowerShell as administrator and start the ScriptRunner service with Start-AsrService.
  9. Configure the ScriptRunner server and Connector settings with the ScriptRunnerSettings PowerShell module.
  10. Check the Admin Web App, that all items and reports are available.
    Note: The stored credentials must be confirmed again with correct passwords.

Migration

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

  1. Go to the server with the existing ScriptRunner installation
  2. 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.
  3. Open PowerShell as administrator and stop the ScriptRunner service with Stop-AsrService.
    Note: Be sure to close PowerShell again.
  4. Go to the $env:ProgramData\ScriptRunner directory and save it.
    Note: Place it in a temporary directory on the new machine
  5. 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

  1. Go to the new server
  2. Use the installation package to install the ScriptRunner Service
  3. Use the installation package to install the ScriptRunner Web Apps
  4. Log in to the ScriptRunner Admin App and check the functionality
    Note: Also check the Windows Event Log for possible ScriptRunner errors.
  5. (Optional) Set up https for the Web Server and for the ScriptRunner service.
  6. Activate your new license keys via PowerShell
  7. Configure the ScriptRunner server settings, especially
    – Script library path (with Set-ASRSettings)
    – E-Mail Notification Connector
  8. Configure additional connectors with the PowerShell module ScriptRunnerSettings.
  9. Make sure that all necessary certificates for certificate-based authentication are also stored on the new server.
  10. (Optional) If you are using SSH, transfer the SSH key files as well.

/Transmitting the Configuration

  1. Open PowerShell as administrator and stop the ScriptRunner service with Stop-AsrService.
    Note: Be sure to close PowerShell again.
  2. Open the temporary directory of your Script Library and copy the structure completely into the configured Script Library directory.
  3. Open the temporary directory of your saved configuration.
  4. 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
  5. Open PowerShell as administrator and start the ScriptRunner service with Start-AsrService.
  6. In the Admin App, check that all items and reports are available.
    Note: Also check the Windows Event Log for possible ScriptRunner errors.
  7. Open the Admin App:
    1. Navigate to the Credentials section. You can see from the red markings which credentials require your password entry.
    2. Navigate to the Scripts| Cmdlets section and verify that all scripts are correctly read from the Script Library.
    3. Navigate to the Targets section. Check that your targets are complete.
    4. Navigate to the Queries section. Check the completeness of your queries.
      Note: Pay special attention to red exclamation marks in scripted queries.
    5. Navigate to the Actions section. Check the area for red exclamation marks.
  8. Use an action to test if the ScriptRunner service is working.
    Note: Possible errors are stored in the Windows Event Log.
Suggest Edit