This is probably a simple one, but, I need to ask it anyway:
I'm attempting to schedule a backup of our tableau servers. The script will run from our batch scheduler (Tidal) and use powershell to run a batch script on the 'remote' tableau server.
The PS call (with server/user names changed to protect the innocent):
Invoke-Command - ComputerName <TABLEAUSERVER> -ScriptBlock {E:; ./TableauBackup.cmd "E:\Tableau Backups\testPSRemote.bak" -Credentials <USER>
The script, TableauBackup.cmd, is exceedingly simple:
tabadmin stop
tabadmin backup %1
tabadmin start
tabadmin warmup
If I log into the server using the credentials for <USER> and run the command file from the command line, all is well. Everything works like it should and comes right back up.
However, when I run it remotely via Powershell and use the same user, The tabadmin stop works, and it backup begins, but, it fails after attempting to clean the http_request entries from the database.
I get the following error:
*** The driver encountered an unknown error: org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
It promptly then shuts down all components. After that the tabadmin start command attempts to run and I get an error that the FlexNet Library could not be initialized. I'm guessing this is a result of the backup choking.
After all of this, I can log into the server and run tabadmin start and all is well.
Any help would be appreciated.
Russell, thanks for posting! I'm familiar with DOS but not PowerShell...but I want to learn it. It's good to know this info because if I tried I'd be hopelessly lost.
BTW, here's my batch file I created for my backups (last post by me) --> http://community.tableau.com/message/199064#199064
I am using Windows Scheduler to run my backups locally.