7 Replies Latest reply on Mar 15, 2016 9:46 AM by kartikkumar.parmar.0

    Tableau server Backup

    kartikkumar.parmar.0

      Hi Can u suggest me how to do backup and backup scedual in external hard drive or in Sandboxie,i know about tabadmin backup commend but if u guide me so its really big help for me.

      thanks

        • 1. Re: Tableau server Backup
          Derrick Austin

          Hey Kartikkumar,

           

          You simply need to run the tabadmin command from a .bat file (Or Powershell) on a set schedule.

           

          tabadmin backup [FilenameAndPathHere]

           

          With a little scripting, you can also do date formatting in this script to add multiple files and remove old files.

          • 2. Re: Tableau server Backup
            Jeff Strauss

            This is how we do it:

            Step 1: We delete the previous night backup.

            del G:\TableauBackup\*.tsbak /Q

             

            Step 2: Backup atomoic command on primary server.  By adding the -d flad, it appends the date so that it looks like this.  tableau_backup-2016-03-11.tsbak

            tabadmin backup G:\TableauBackup\tableau_backup.tsbak -d

             

             

            Step 3: The G drive is a drive on our server, but then for DR we copy it via ROBOCOPY.

            ROBOCOPY /NP G:\TableauBackup \\xxxx.int\tableaubackup\ORD-INSIGHTS_cluster *.tsbak

            • 3. Re: Tableau server Backup
              Brian Coggon

              Hi Kartikkumar,

               

              It looks like Derrick and Jeff were able to help you with your question!

               

              Is there anything else we can help with via this thread?

               

              Cheers,

              Brian

              • 4. Re: Tableau server Backup
                Toby Erkson

                Here's a batch script I made.  You will need to change the sPath variable (line 6) to your server location that the backup file will be saved to.  We have applications stored on the D: drive, OS on the C: drive, for our VM servers.

                @ECHO OFF
                REM QA
                REM  by Toby Erkson, April 2015
                REM  Adapted from http://kb.tableausoftware.com/articles/knowledgebase/server-maintenance
                REM  No inputs required.
                SET sPath=\\backupServer\tableau
                SET sLogPath=D:\Application\Tableau\Scripts\script_logs
                SET sLogFileName=backup.log
                SET dDate=%DATE:/=%
                
                ECHO.
                ECHO. >> %sLogPath%\%sLogFileName% 2>&1 
                ECHO ----- BEGIN Daily %dDate:~-4%-%dDate:~4,2%-%dDate:~6,2% %TIME% ----- >> %sLogPath%\%sLogFileName% 2>&1 
                ECHO Backing up Tableau Server...
                ECHO Backing up Tableau Server... >> %sLogPath%\%sLogFileName% 2>&1
                tabadmin backup %sPath%\daily_backup_PROD_%dDate:~-4%-%dDate:~4,2%-%dDate:~6,2%.tsbak >> %sLogPath%\%sLogFileName% 2>&1
                SET /a EL=%ERRORLEVEL%
                IF %EL% EQU 0 GOTO Success
                
                :Failure
                    ECHO.
                    ECHO Backup failed.
                    ECHO Error number: %EL%
                    ECHO Backup failed. >> %sLogPath%\%sLogFileName% 2>&1
                    ECHO Error number: %EL% >> %sLogPath%\%sLogFileName% 2>&1
                    GOTO End
                
                :Success
                    ECHO.
                    ECHO Backup succeeded.
                    ECHO Backup file saved to in directory %sPath%
                    ECHO File name is daily_backup_PROD
                    ECHO Backup succeeded. >> %sLogPath%\%sLogFileName% 2>&1
                    ECHO Backup file saved to in directory %sPath% >> %sLogPath%\%sLogFileName% 2>&1
                    ECHO File name is daily_backup_PROD.tsbak >> %sLogPath%\%sLogFileName% 2>&1
                
                :End
                REM Remove the two below REMs if running manually so you can see the output.
                REM ECHO -- Pause --
                REM PAUSE
                ECHO Backup operation finished.
                ECHO ----- END Daily %dDate:~-4%-%dDate:~4,2%-%dDate:~6,2% %TIME% ----- >> %sLogPath%\%sLogFileName% 2>&1
                REM The /b will return our error level
                EXIT /b %EL%
                

                 

                You will need to set up your Windows Task Scheduler to have it execute the batch script whenever.  Here's when ours fires off:

                Naturally you will need to have a process to delete old files.  When the backup is 3 days old (or older) it gets deleted.  For our PROD server the period is 5 days.

                • 5. Re: Tableau server Backup
                  kartikkumar.parmar.0

                  could you help me out for task scheduler i mean to say how to add schedule in task

                  thanks a lot for help

                  • 6. Re: Tableau server Backup
                    Derrick Austin

                    It's built into the Windows OS.

                    Schedule a task - Windows Help

                     

                    Start -> Search -> Task Scheduler

                    1 of 1 people found this helpful
                    • 7. Re: Tableau server Backup
                      kartikkumar.parmar.0

                      thanks

                       

                      On Tue, Mar 15, 2016 at 11:14 AM, Derrick Austin <