VMware Cloud Community
Phillo
Contributor
Contributor

vSphere 5.1 SSO Multisite backup script

Hi,

I've recently upgraded to vSphere 5.1 in a multisite configuration and one of the oustanding tasks i'm left with is to automate the backup and restore of the SSO database to keep everything in sync.

I'm fairly new to the whole scripting thing but I've had a go and seem to almost be there but I just can't get the script to carry the password over when running the repl_tool.  Can anyone show me the error of my ways?

The command i'm using is as follows:

$cmd = "export -fc:\sso_backup\sso_backup.dat -uadmin@system-domain -ppassword"

start-process repl_tool.cmd -verb runas -args "$cmd"

It launches the cmd window and displays the "Start executing full data export" then the cmd window closes and doesn't create the backup file.

if I run the following:

$cmd = "export -fc:\sso_backup\sso_backup.dat -uadmin@system-domain"

start-process repl_tool.cmd -verb runas -args "$cmd"

I am prompted for the password and once entered it runs successfully so it appears that the -ppassword isn't being carried over.

Any help would be much appreciated as the strands of hair on my head are dwindling. :smileyconfused:

Phill

Reply
0 Kudos
3 Replies
LucD
Leadership
Leadership

Did you already try like this

$cmd = 'export -fc:\sso_backup\sso_backup.dat -uadmin@system-domain -ppassword' 
Start-process
repl_tool.cmd -Verb runas -Args $cmd


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
Phillo
Contributor
Contributor

Hi LucD,

Yeah i've tried that with no luck.

Reply
0 Kudos
edwardm007
Contributor
Contributor

Have you found a resolution to this?  I have tried the same command using windows batch file and it fails.  Even when entering manually I am not able to successfully pass the password parameter.  Is this a bug in the command?

Reply
0 Kudos