Skip to main content

EPM Automate Migrating large Snapshots using: copysnapshotfrominstance


Create a simple script to manage your migration process between environments. This script will give you peace of mind that, no matter how large your Snapshots grow, you can effortlessly migrate them across environments.

Key benefits:
  • The migration of Snapshots can be scheduled,
  • The command can handle large Snapshot sizes,
  • Significantly faster than manual Download / Upload process,
  • Less risk of storing sensitive Snapshots locally,
  • Less storage space required locally.


Points to note:
  •         A separate command importsnapshot could be used to Import the Snapshot, if desired.
  •         The Snapshot will be copied from the Migration area in the Source environment to the Target Environment
  • The source password will need to be encrypted, whereas this is not a requirement for the target password


Here are the building blocks for your script:
1.       Set Variables
 I use the following variables in my script:
 -  Location of epmautomate.bat file
               SET %EPMAUTOMATE% = "C:\Oracle\EPM Automate\bin\epmautomate.bat"
           -  User friendly name of Target Environment (for renaming Snapshots)
         SET %EPBCS_TARGET_ENV% = PREPROD
      -  URL of Target Environment
         %TARGET_URL% = https://planning-a12345.pbcs.em1.ukg.oraclecloud.com
       - Domain ID of Target Environment
        %TARGET_ID_DOMAIN% = a12345
     -   Username for Target Environment
               SET %TARGET_USER% = EPMTargetUsername
            -   Password or encrypted password file
         SET %TARGET_PASSWORD_FILE% = C:\Scripts\PreProdPassword.epw
       - URL of Source Environment
        %SOURCE_URL% = https://planning-a54321.pbcs.em1.ukg.oraclecloud.com
     -  Domain ID of Source Environment
        %SOURCE_ID_DOMAIN% = a54321
     -  Username for Source Environment
        %SOURCE_USER% = EPMSourceUsername
            -  Location and name of password encryption file which will be created within script
        %SOURCE_PASSWORD_FILE% = C:\Scripts\ProdPassword.epw

2.       Login to Target Environment
 The password provided via an encrypted file here, but this is optional.

call
%EPMAUTOMATE% login %TARGET_USER% %TARGET_PASSWORD_FILE% %TARGET_URL% %TARGET_ID_DOMAIN%

3.       Prompt for Password of User for Source Environment
 The user must be a Service Administrator.

           echo Username = %SOURCE_USER%
set /P SOURCE_PASSWORD=Please enter EPM Automate password:

The Source Password must be encrypted. Instead of prompting for the password, you can maintain an encrypted password file using a separate script and set SOURCE_PASSWORD_FILE as a variable in the beginning of the script.


4.    Prompt for Snapshot Name
This prompt will appear in the command line window. The response will be saved in the SNAPSHOT_NAME variable. This Snapshot will be copied from Source to Target.

set /P SNAPSHOT_NAME=Please enter the name of an existing Snapshot to be migrated. Use double quotes:

Alternatively, set SNAPSHOT_NAME as “Artifact Snapshot” or any desired Snapshot name without prompting.


5.       Rename Snapshot in Target Environment
Use the RenameSnapshot command, if necessary, to rename Snapshots in the target environment. For example, if you are copying the Artifact Snapshot from the Production environment to Pre-Production, you will need to rename the Artifact Snapshot in Pre-Production to avoid overwriting it. 
Renaming the Snapshot in the Source Environment would require a separate set of login / logout commands.
Keep clear naming conventions such as FullSnapshot_PreProd_Date.

          call %EPMAUTOMATE% renamesnapshot "Artifact Snapshot"                                            ArtifactSnapshot_%EPBCS_TARGET_ENV%_%DATE:/=-%


6.       Encrypt password
This is compulsory.  The copysnapshotfrominstance command requires an encrypted password file.

         call %EPMAUTOMATE% encrypt %SOURCE_PASSWORD% PASSWORDKEY               %SOURCE_PASSWORD_FILE%

I set the Password Key as any random word.

7.       Copy Snapshot from Source Migration to Target Migration
(Does not import the Snapshot)

          call %EPMAUTOMATE% copysnapshotfrominstance %SNAPSHOT_NAME%                %SOURCE_USER% %SOURCE_PASSWORD_FILE% %SOURCE_URL%                            %SOURCE_ID_DOMAIN%

8.       Delete encrypted password file – Optional

          del %SOURCE_PASSWORD_FILE% /q

9.       Logout

call %EPMAUTOMATE% logout

Comments

Post a Comment

Popular posts from this blog

Transfer of Smart List Values to Members in Calculation Manager

  This blog features instructions for retrieving and transforming a Smart List entry (stored against a dimension member) into a member name to be used within a calculation script. This member name is in a valid format for use with cross dimensional operators. This functionality is particularly useful for Staff Costing models. It can be used to retrieve a grade or payscale point from a staff member and lookup its relevant base salary. I came across this trick when writing a calculation script that would pass through each employee in a Staff Cost model and retrieve their pay scale point – a Smart List value – and then transform this into a member in order to retrieve the corresponding base pay associated to that pay scale point. Pay scale points are members in my ‘Employee’ dimension. Upon configuration of the pay scale Smart List, I selected ‘Create from Members’. This is compulsory in order for the trick to work! I have attached this Smart List to a member in the Metric...

Connecting to multiple Oracle Cloud Environments

Connect to multiple EPBCS environments via Smart View Shared Connections XML Switching environments, changing domains, logging in, logging out… Why not save valuable time by creating a Smart View environments short-cut? Here’s how! First, gather the following details for each environment that you would like to add to your drop-down list: 1. Environment URL (PBCS/EPBCS) :  Recently provisioned environments: https:// epm-exampleDoM .epm. exampleDC. oraclecloud.com/HyperionPlanning/SmartView Environments provisioned before 2020: (If unsure, check your web URL - does it start with planning or epm, match URL) https://planning- exampleDoM .pbcs. exampleDC .oraclecloud.com/HyperionPlanning/SmartView                (where Domain name = exampleDoM and Data centre = exampleDC) 2. Chosen Shortcut Name : ie. Finance PBCS Production Tip 1: Other Oracle Provider Types I have only included the PBCS connection as an...

Clear target data in Oracle EPM - ERP integrations using a Data Exchange Clear Region