3 Replies Latest reply on Jan 17, 2013 1:16 PM by Toby Erkson

    tabadmin backup command not working properly for filename parameter?

    Toby Erkson

      I'm testing the following batch code snippet:

      @ECHO OFF

      REM Adapted from http://kb.tableausoftware.com/articles/knowledgebase/server-maintenance

      SET sPath="C:\Program Files (x86)\Tableau\Tableau Server\backups\"

      ECHO.

      ECHO Stopping Tableau Server...

      tabadmin stop

      ECHO.

      ECHO Backing up Tableau Server...

      tabadmin backup --date %sPath%backup_QA

       

      Something appears to be wrong with how the backup command (last line of above code) accepts the filename input as I get this error:

      *** Permission denied - C:/Program Files (x86)/Tableau/Tableau Server/backups"backup_QA-2013-01-16.tsbak

       

      Notice the quotation mark inserted inbetween /backups"backup_QA. It appears that the backup command is inserting that.  Also, the error returned is inaccurate as it's not a permission issue, it's more of a "file or path doesn't exist" error.

       

       

      However, as a TEST, if I am explicit about the filepath then it works as it should.  This works:

      tabadmin backup --date "C:\Program Files (x86)\Tableau\Tableau Server\backups\backup_QA"

       

      Location of the --date parameter doesn't matter.  I already checked that possibility.

       

      I know that I've set up the variable correctly because the following line works perfectly:

      SET dDate=%DATE:/=%

      ...

      copy logs.zip %sPath%Tableau_QA_logs-%dDate:~-4%%dDate:~6,2%%dDate:~4,2%.zip

       

      My DOS coding is a little rusty so maybe I'm doing something wrong that I don't see?  Ideas?