How to Run TSM Commands in Tableau

Cody Schneider8 min read

If you're managing a Tableau Server, a little bit of command-line work goes a long way. The Tableau Services Manager (TSM) command-line interface (CLI) is your core tool for managing your server's configuration, maintenance, and topology. This guide will walk you through what TSM is for and how to use the most essential commands to manage your Tableau environment with confidence.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

What is Tableau Services Manager (TSM)?

Tableau Services Manager, or TSM, is the standard toolset for installing and configuring Tableau Server on both Windows and Linux. It was introduced in version 2018.2, replacing the older tabadmin utility. If you started with Tableau Server after 2018, TSM is the only management tool you've ever known. For long-time admins, it was a significant change that centralized most server management functions into a single, more robust tool.

You can interact with TSM in two ways:

  • TSM Web UI: A browser-based interface for common configuration and maintenance tasks. It’s great for visual checks and straightforward changes.
  • TSM Command-Line Interface (CLI): A powerful tool for granular control, automation, and performing tasks that aren't available in the web UI. This is what we'll be focusing on.

While the web UI is user-friendly, the TSM CLI is essential for scripting administrative tasks, automating backups, and accessing advanced configuration settings. Mastering it is key to becoming a proficient Tableau Server administrator.

Before You Begin: Accessing the TSM CLI

To run TSM commands, you need to be logged into the machine where Tableau Server is installed (or a node in a multi-node cluster) with an account that has administrative privileges.

First, open a command prompt or terminal session:

  • On Windows: Search for "Command Prompt," right-click it, and select "Run as administrator."
  • On Linux: Open a terminal session. Most TSM commands require sudo privileges or for you to be logged in as a user in the tsmadmin group.

Once your terminal is open, you need to navigate to the correct Tableau Server directory. By default, this is:

  • Windows: C:\Program Files\Tableau\Tableau Server\packages\bin.<version>\
  • Linux: /opt/tableau/tableau_server/packages/bin.<version>/

You'll see a directory corresponding to your build there, such as bin.20223.23.0118.0945. To save yourself some typing, it's often easiest to just navigate to the bin folder and execute commands from there using .\tsm on Windows or ./tsm on Linux.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Common TSM Commands You'll Use Constantly

TSM commands generally follow a tsm <category> <command> [options] structure. It might look intimidating at first, but once you learn a few key categories, it becomes very intuitive. The best way to learn is to see them in action.

Server Status and Control

These are the foundational commands for checking your server's health and bringing it online or offline for maintenance.

tsm status

This is your go-to command for a quick health check. It shows the status of each Tableau Server process.

tsm status

For more detailed output, use the verbose flag -v. This will show you the status of every process running on every node in your deployment.

tsm status -v

tsm start

As the name implies, this command starts the Tableau Server if it's currently stopped.

tsm start

tsm stop

This command cleanly shuts down the Tableau Server. It's the first step you should take before performing system maintenance, applying patches, or restoring a backup.

tsm stop

tsm restart

A convenient shorthand that stops and then starts the entire Tableau Server process. This is useful for when an immediate restart is needed after a minor configuration change.

tsm restart

Applying Configuration Changes

When you make changes using TSM, they aren't applied immediately. They are added to a "pending changes" queue. This allows you to make multiple changes at once and apply them all together, which can save time by minimizing server restarts. You'll likely use this in a two-stage process.

tsm pending-changes apply

This is a critical command. After you make a configuration change with a tsm configuration set or tsm settings import command, you must run this to apply the modifications. The server will likely restart as part of this process, so be prepared for some downtime.

tsm pending-changes apply

tsm pending-changes discard

If you've made a few changes but realize you made a mistake, you can use this command to clear the pending changes queue and revert to the last applied configuration.

tsm pending-changes discard
GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Configuration and Settings

These commands let you directly inspect and modify the deep configuration keys that control Tableau Server's behavior.

tsm configuration get

The get command lets you view the current value of a specific configuration key. This is a safe way to check up on a setting before you change it. You just need to know the name of the key.

For example, to check the session timeout value:

tsm configuration get -k vizqlserver.session.expiry.timeout

tsm configuration set

This is the corresponding command to change a configuration key's value. Following the get example, here's how you would change the VizQL session expiry from the default 30 minutes to 45 minutes.

tsm configuration set -k vizqlserver.session.expiry.timeout -v 45

Remember: After running this, you'll see a message reminding you to run tsm pending-changes apply to make it official!

Backup, Restore, and Maintenance

Taking care of your data is paramount. These maintenance commands are essential for disaster recovery planning and keeping your server tidy.

tsm maintenance backup

This command creates a complete backup of your Tableau Server data, including the PostgreSQL database repository and file store assets. You can specify a filename and location for the backup file.

tsm maintenance backup -f my-tableau-backup -d C:\Tableau\Backups

You should run this command regularly and store the resulting .tsbak file in a secure, separate location.

tsm maintenance restore

If the worst happens, this command is used to restore your server from a backup file. Important: You must first completely stop the server with tsm stop before initiating a restore.

tsm maintenance restore -f C:\Tableau\Backups\my-tableau-backup.tsbak

tsm maintenance cleanup

This command is useful for server housekeeping. It removes old log files, temporary files, and obsolete entries from the PostgreSQL database, which can help free up disk space and improve performance slightly.

tsm maintenance cleanup
GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Exporting Settings and Logs

When you need to migrate to a new server or get help from Tableau Support, these commands are invaluable.

tsm settings export

This exports your server configuration (topology, port settings, authentication settings, etc.) to a JSON file. This is a critical step before upgrading or migrating a server setup, as you can import this file to a new installation to easily replicate your environment.

tsm settings export -f C:\Tableau\Settings\my-server-settings.json

tsm maintenance ziplogs

If you encounter a strange error and need to open a case with Tableau Support, they will almost always ask for a log snapshot. This command gathers all relevant server logs from all nodes into a single, convenient .zip file.

tsm maintenance ziplogs -f C:\Tableau\Logs\my-support-logs.zip

Quick Tips and Best Practices

  • Use the Help Option: When in doubt, you can get help on any TSM command by adding --help to the end. For example, tsm maintenance --help will list all available maintenance commands.
  • Back Up Before Changes: Always run a tsm maintenance backup before making significant configuration changes or applying a server upgrade.
  • Run Remotely (With Care): You can configure TSM to allow remote administration from another machine. This requires enabling remote access and logging in with tsm login. It's powerful but only enable it if your network security policies allow it.
  • Keep Up with Pending Changes: Every few configuration changes you make, it’s a good habit to check the queue of pending changes before you apply them. Use tsm pending-changes list to see what you are about to confirm. This can prevent you from accidentally applying a setting you changed your mind on last week.

Final Thoughts

Working with the TSM command line opens up a whole new level of control and automation for Tableau Server administrators. While the Web UI is perfect for daily monitoring and simple tasks, the CLI is indispensable for scripting, troubleshooting, and in-depth configuration. Start with the basics like status and stop, get comfortable applying configuration changes, and you'll find it an invaluable part of your toolkit.

While managing a self-hosted Tableau environment often requires this kind of technical depth, we know that getting fast answers from your cloud platforms shouldn't feel like server administration. For times when you just need to connect to sources like Google Analytics, HubSpot, or Shopify and see what’s working, there's a simpler way. We built Graphed to be your AI data analyst - you connect your data in one click and use plain English to ask for the charts and dashboards you need. With a direct-to-the-source, always-on connection, you can finally focus on insights instead of setup.

Related Articles