4 Replies Latest reply on Jul 20, 2018 6:19 AM by suman kumar

    backup of tableau workbooks

    Roshan Bisnath

      Tableau 10.5

      Windows

       

      Hi Team,

       

      I am planning to create a backup of tableau workbooks.

      I have checked the link

      Back Up Tableau Server Data

       

      tabadmin ziplogs -l -n -f

      what does l, n and f mean?

       

      tabadmin cleanup

       

      how do I know how many days to keep logfiles?

       

      Run the backup

      timeout /t 90

      if tabadmin status != 'RUNNING' then <code_to_email_an_alert>

       

      what will be the code to send email after backup completes on Windows?

       

      Regards,

       

      Roshan

        • 1. Re: backup of tableau workbooks
          suman kumar

          Hi,

          tabadmin commands

          ziplogs

          Creates an archive (.zip) containing Tableau Server log files, without removing the log files themselves. If you are running a Tableau Server cluster, log files from worker servers are included in the archive that's created. You can specify the file name and location. If you don't provide a file name, the archive is called logs.zip . If you don't include a path, the file is saved in the \bindirectory. Saving an archive file to a UNC path is not supported.

          Examples

          Create an archive in the Tableau Server bin directory named logs.zip:

           

          tabadmin ziplogs

           

          Create an archive in the Tableau Server bin directory named mylogs.zip:

           

          tabadmin ziplogs mylogs.zip

           

          Create an archive in the Tableau Server bin directory named mylogs.zip that includes logs dated January 31, 2014 up to the present, excluding earlier logs:

           

          tabadmin ziplogs -d 01/31/2014 mylogs.zip

           

          Option (short)Option (long)ArgumentDescription
          -n--with-netstat-infoInclude information about the server environment in the .zip file.
          -p--with-postgresql-dataInclude data from Tableau Server's PostgreSQL database. If Tableau Server is stopped, make a copy of the pgsql\data folder. If Tableau Server is running, get the data as binary dump files.
          -l--with-latest-dumpLimit the included log files to only the most recent ones to help reduce file size. By default, the 10 most recent log files are included.
          -f--forceOverwrites the existing log file of the same name.
          -d--minimumdate[mm/dd/yyyy]Log files with this date, up to the present, are included in the .zip file. Logs dated earlier are excluded from the file. If not specified, up to seven days worth of data is included.
          -a--allInclude all log files in the .zip file. Data from Tableau Server's PostgreSQL database is still excluded.

           

          Please mark helpful for Ziplog question if you get help from this.

          1 of 1 people found this helpful
          • 2. Re: backup of tableau workbooks
            suman kumar

            You can start with this for Email Alert.

             

            $emailTo = "user1@email.com,user2@example.com" # Separate by comma for multiple email addresses $emailCC = "user3@email.com,user4@example.com" # Separate by comma for multiple email addresses $emailFrom = "sender@email.com"

            $emailFromDisplayName = "Auto Email Notification"

            $smtpServer = "smtp.yourserver.com"

            $smtpPort = 0 # 0 = not in use

            $enableSSL = $false

            $useDefaultCredentials = $true # Set to $false for Network Credentials

            $username = "" # Provide this when $useDefaultCredentials = $false

            $password = "" # Provide this when $useDefaultCredentials = $false

            $useHTML = $true

            • 3. Re: backup of tableau workbooks
              Roshan Bisnath

              Hi,

               

              thanks Suman

               

              If I schedule the script to run on Windows using Task scheduler, what will be the syntax used for the email part? What should I use instead of the '$'

               

              tabadmin ziplogs -l -n -f

              copy logs.zip <path_and_filename>

              tabadmin backup <backupfilename> -d -v

              copy <original_backup_path_and_name> <other_location_path_and_name>

              tabadmin cleanup

              timeout /t 90

              if tabadmin status != 'RUNNING' then <code_to_email_an_alert>

               

               

              $emailTo = "user1@email.com,user2@example.com" # Separate by comma for multiple email addresses

              $emailCC = "user3@email.com,user4@example.com" # Separate by comma for multiple email addresses

              $emailFrom = "sender@email.com"

               

               

              $emailFromDisplayName = "Auto Email Notification"

               

               

              $smtpServer = "smtp.yourserver.com"

               

               

              $smtpPort = 0 # 0 = not in use

               

               

              $enableSSL = $false

               

               

              $useDefaultCredentials = $true # Set to $false for Network Credentials

               

               

              $username = "" # Provide this when $useDefaultCredentials = $false

               

               

              $password = "" # Provide this when $useDefaultCredentials = $false

               

               

              $useHTML = $true

               

              Another thing is that I cannot locate tsmadmin file in the bin folder. Please advise

              C:\Program Files\Tableau\Tableau 10.2\bin

               

              Thanks,

               

              Roshan

              • 4. Re: backup of tableau workbooks
                suman kumar

                Give me two Days, I'll send you whole PowerShell Script of Email Alert for Server Status.