White Papers

Example scripts
42 Dell EMC SC Series: VMware Site Recovery Manager Best Practices | 2007-M-BP-V
# create a replay object from Volume_Name_x volume object
payload = {}
payload['Description'] = 'Replay of Volume_Name_x'
payload['ExpireTime'] = ‘60’ # in minutes, 0 = Never Expire
REST = '/StorageCenter/ScVolume/%s/CreateReplay' %
volList['Volume_Name_x']['instanceId']
completeURL = '%s%s' % (baseURL, REST if REST[0] != '/' else REST[1:])
json_data = connection.post(completeURL, data=json.dumps(payload,
ensure_ascii=False).encode('utf-8'), headers=header, verify=verify_cert)
#stdout = json.loads(json_data.text)
#print stdout
# logout from DSM instance
payload = {}
REST = '/ApiConnection/Logout'
completeURL = '%s%s' % (baseURL, REST if REST[0] != '/' else REST[1:])
print connection.post(completeURL, data=json.dumps(payload,
ensure_ascii=False).encode('utf-8'), headers=header, verify=verify_cert)
This REST API script connects to an SC Series system with an IP address 192.168.1.10, a username Admin,
and a password mmm. It then takes a snapshot of Volume_Name_x with a snapshot expiration set to 60
minutes.
A.2 CompCU script: TakeSnapshot.cmd
This is an example CompCU script that can be folded into an SRM recovery plan. It leverages the SC Series
command utility (CompCU) and takes a snapshot of the source replication system volume to make sure that
the most current snapshot is replicated to the DR site.
"C:\Program Files\Java\jre6\bin\java.exe" ^
-jar c:\scripts\compcu.jar ^
-host 192.168.1.10 ^
-user Admin ^
-password mmm ^
-c "replay create -volume 'Volume_Name_1' -expire 60"
"C:\Program Files\Java\jre6\bin\java.exe" ^
-jar c:\scripts\compcu.jar ^
-host 192.168.1.10 ^
-user Admin ^
-password mmm ^
-c "replay create -volume 'Volume_Name_2' -expire 60"
This CompCU script connects to an SC Series system with an IP address 192.168.1.10, a username Admin,
and a password mmm. It then takes a snapshot of Volume_Name_x with a snapshot expiration set to 60
minutes. The carrot (^) symbols in this script are used for line continuation and readability, but could be
excluded if the entire command is placed on one line.