Data Backup and Recovery

SnapCreator Powershell Module - Custom Action Paramters?

CHMOELLER
3,238 Views

Hey guys,

 

I am trying to use the SnapCreator Powershell Toolkit (4.1.7.0) to initiate a SnapCreator Workflow of "custom" type but find myself unable to properly supply it with the required paramters.  I need the "custom" type for restore and rollforward-recovery of IBM Domino Databases I backup using SnapCreator.

So far I use the "snapcreator.exe" on the SnapCreator serverto start the recovery which (so that the Domino admins don't have to log on to the SC server) I start  via remote powerhell execution ... not very nice.

 

This is an example of how I call snapcreator.exe for a rollforward recovery on a database (some information changed for obvious reasons)

 

 

snapcreator.exe --user XXXX --passwd XXXX--profile domino --config dominoserver --policy daily --action custom --params snapname=dominoserver-daily_20160101000000 datapath=<path_to_\restore\johnwayne.nsf> restoretype=su2m restoretime="01/26/2016 02:54:02" disablereplication=y --verbose --debug 

 

which works just fine.

 

Next how I tried with the Toolkit. They all initiate a workflow in Snapcreator - however none of the Parameters in $params are passed (checked by comparing the SnapCreator logsfiles, they paramters appear in the scnapcreator.exe call but are missing when called by powershel) so obviously the rollforward doesn't work.

 

I'm starting the workflow with:

 

 

Start-ScWorkflow -Action custom -ProfileName domino -ConfigName dominoserver -Parameters $params

 

 

 

where I have tried these for $params

 

$params = @{"policy" = "daily"; "params" = "snapname=dominoserver-daily_20160101000000 datapath=<path_to_\restore\johnwayne.nsf> restoretype=su2m restoretime=""01/26/2016 02:54:02"" disablereplication=y"; }

$params = @{"--policy" = "daily"; "--params" = "snapname=dominoserver-daily_dominoserver-daily_20160101000000 datapath=<path_to_\restore\johnwayne.nsf> restoretype=su2m restoretime=""01/26/2016 02:54:02"" disablereplication=y"; }

both without success.


Any hints would be greatly appreciated!


Regards

Chris

 

1 ACCEPTED SOLUTION

asulliva
3,218 Views

I would try putting each of the parameter values into it's own hash table element...

 

$profile = "domino"
$config = "dominoserver"

$parameters = @{
    "policy" = "daily"; 
    "snapname" = "dominoserver-daily_20160101000000";
    "datapath" = "<path_to_\restore\johnwayne.nsf>";
    "restoretype" = "su2m";
    "restoretime" = "01/26/2016 02:54:02";
    "disablereplication" = "y";
}

Start-ScWorkflow -Action CUSTOM_PLUGIN_OPERATION -ProfileName $profile -ConfigName $config -Parameters $parameters

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

View solution in original post

2 REPLIES 2

asulliva
3,219 Views

I would try putting each of the parameter values into it's own hash table element...

 

$profile = "domino"
$config = "dominoserver"

$parameters = @{
    "policy" = "daily"; 
    "snapname" = "dominoserver-daily_20160101000000";
    "datapath" = "<path_to_\restore\johnwayne.nsf>";
    "restoretype" = "su2m";
    "restoretime" = "01/26/2016 02:54:02";
    "disablereplication" = "y";
}

Start-ScWorkflow -Action CUSTOM_PLUGIN_OPERATION -ProfileName $profile -ConfigName $config -Parameters $parameters

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

CHMOELLER
3,158 Views

Andrew,

 

awesome, that works like a charm (I guess CUSTOM_PLUGIN_OPERATION was a good tip as well). This will make the process so much nicer.

 

Thank you!

Public