Upload and Import a Backup Snapshot

Use these scripts to upload and import a backup snapshot into an Account Reconciliation environment.

Windows Sample Script

Create a file named importBackupSnapshot.ps1 by copying the following script. Store it in a local directory.
$inputproperties = ConvertFrom-StringData(Get-Content ./input.properties -raw)
$username="$($inputproperties.username)"
$passwordfile="$($inputproperties.passwordfile)"
$serviceURL="$($inputproperties.serviceURL)"
$snapshotName="$($inputproperties.snapshotName)"
$userPassword="$($inputproperties.userPassword)"

epmautomate login ${username} ${passwordfile} ${serviceURL}
epmautomate uploadfile ${snapshotName}.zip
epmautomate importsnapshot ${snapshotName} "userPassword=${userPassword}"
epmautomate deletefile ${snapshotName}.zip
epmautomate logout

Linux/UNIX Sample Script

Create a file named importBackupSnapshot.sh by copying the following script. Store it in a local directory
#!/bin/bash

. ./input.properties
export JAVA_HOME=${javahome}
${epmautomatescript} login "${username}" "${passwordfile}" "${serviceURL}"
${epmautomatescript} uploadfile "${snapshotName}.zip"
${epmautomatescript} importsnapshot "${snapshotName}" "userPassword=${userPassword}"
${epmautomatescript} deletefile "${snapshotName}.zip"
${epmautomatescript} logout

Sample input.properties File

To run the importBackupSnapshot scripts, create the input.properties file and update it with information for your environment. Save the file in the directory where importBackupSnapshot.sh or importBackupSnapshot.ps1 is stored.

Windows

username=exampleAdmin
passwordfile=examplePassword.epw
serviceURL=exampleURL
snapshotName=SNAPSHOT_NAME
userPassword=IDM_NEW_USER_PWD

Linux/UNIX

javahome=JAVA_HOME
epmautomatescript=EPM_AUTOMATE_LOCATION
username=exampleAdmin
passwordfile=examplePassword.epw
serviceURL=exampleURL
snapshotName=SNAPSHOT_NAME
userPassword=IDM_NEW_USER_PWD

Table 3-23 input.properties Parameters

Parameter Description
javahome JAVA_HOME location. For Linux/UNIX only.
epmautomatescript Absolute path of EPM Automate executable (epmautomate.sh). For Linux/UNIX only.
username User name of a Service Administrator.
password Password of the Service Administrator or the name and location of the encrypted password file.
serviceURL URL of the environment where you want to import the snapshot.
snapshotName The name of the snapshot from which artifacts and data are to be imported. This snapshot must already have been uploaded to the environment using the uploadFile command.
userPassword The default password that must be assigned to all new users created in the identity domain as a result of this snapshot import.

Running the Script

  1. Create importBackupSnapshot.ps1 or importBackupSnapshot.sh by copying the script from a preceding section.
  2. Create the input.properties file and save it in the directory where the runPreformattedBalances script is located. Contents of this file differs depending on your operating system. See Sample input.properties File.

    Make sure that you have write privileges in this directory. For Windows, you may need to start PowerShell using the Run as Administrator option to be able to run the script.

  3. Launch the script.
    • Windows PowerShell: run importBackupSnapshot.ps1.
    • Linux/UNIX: run ./importBackupSnapshot.sh.