tsm maintenance

You can use the tsm maintenance commands to manage server maintenance tasks like creating regular backups or restoring Tableau Server from a previously created backup.

tsm maintenance backup

Creates a backup of the data managed by Tableau Server. This data includes the Tableau PostgreSQL database (the repository) which contains workbook and user metadata, and extract (.tde or .hyper) files. This data does not include configuration data. See Perform a Full Backup and Restore of Tableau Server.

Locating the repository (pgsql) and the File Store on the same node as the Administration Controller can reduce the length of time it takes to back up Tableau Server. The Administration Controller is usually on the initial node, unless you have had an initial node failure and had to move the controller to another node.

When the repository is co-located with the controller it eliminates or greatly reduces the need to compress and transfer data between nodes during the backup process. This is also true with the File Store, especially if your organization uses extracts heavily.

Synopsis

tsm maintenance backup --file <backup_file> [options] [global options]

Options

-d, --append-date

Optional.

Append the current date to the backup file name.

-f, --file <backup_file>

Required.

Write the backup to the specified file. An extension of .tsbak is automatically used. The file is written to the directory defined in the TSM basefilepath.backuprestore variable. By default:

C:\ProgramData\Tableau\Tableau Server\data\tabsvc\files\backups\

For more information about file paths and how to change them, see tsm File Paths.

-i, --description <string>

Optional.

Include the specified description of the backup file.

--skip-compression

Optional.

Create a backup without using compression. This results in a larger backup file but can reduce the amount of time it takes to complete the backup. If using this in a multi-node installation, we strongly recommend you have a File Store instance configured on your initial node.

-k, --skip-verification

Optional.

Do not verify the integrity of the database backup.

--override-disk-space-check

Optional.

Attempt to create a backup even when there is a low disk space warning.

-po, --pg-only

Optional.

Generates only the repository backup.

--request-timeout <timeout in seconds>

Optional.

Wait the specified amount of time for the command to finish. Default value is 1800 (30 minutes).

Examples

This example creates a backup called ts_backup-<yyyy-mm-dd>.tsbak in the <install dir>\ProgramData\Tableau\Tableau Server\data\tabsvc\files\backups\ folder:

tsm maintenance backup -f ts_backup -d

tsm maintenance cleanup

Deletes old log files and temporary files.

If you are running Tableau Server on a distributed deployment, run this command on the node that is running the Administration Controller (also referred to as the TSM Controller)process. By default, the controller is on the initial node in the cluster.

The purpose of this command is to create free space on the Tableau deployment by deleting old files. Therefore, running this command when the server is started will remove the majority of old content for this scenario. To remove current log files, then you must stop the server before running this command.

Note: This command was added in Tableau Server version 10.5.1 and some options were added in version 2018.1.

Synopsis

tsm maintenance cleanup [options] [global options]

Options

-a, --all

Optional.

Perform all cleanup operations with default retention values. Equivalent to running the cleanup command with the following options: -l -t -r -q.

--http-requests-table-retention <# of days>

Optional.

Delete http requests table entries older than this number of days. (Default: 7 days)

-l, --log-files

Optional.

Delete log files that are older than the retention-period. Files in the subdirectories under data\tabsvc\logs will be deleted.

--log-files-retention <# of days>

Optional.

Default: 1 (24 hours)

Delete logs older than this number of days. This command does not apply to temporary files.

-q, --http-requests-table

Optional.

Delete old http_requests table entries.

-r, --redis-cache

Optional.

Clear the Redis cache.

--request-timeout <timeout in seconds>

Optional.

Wait the specified amount of time for the command to finish. Default value is 1800 (30 minutes).

-t, --temp-files

Optional.

Delete all files and subdirectories in the following directories:

  • <install dir>\ProgramData\Tableau\Tableau Server\data\tabsvc\temp: Only directories that are storing files for expired (not running) sessions are deleted.

  • <install dir>\ProgramData\Tableau\Tableau Server\data\tabsvc\httpd\temp

  • <install dir>\ProgramData\Tableau\Tableau Server\temp

-v, --verbose

Optional.

Show details of what was cleaned.

Examples

This example cleans up all log files older than 2 days old:

tsm maintenance cleanup -l --log-files-retention 2

tsm maintenance reindex-search

Use the reindex-search command to rebuild the search index.

Synopsis

tsm maintenance reindex-search [global options]

Option

--request-timeout <timeout in seconds>

Optional.

Wait the specified amount of time for the command to finish. Default value is 1800 (30 minutes).

tsm maintenance restore

Restore Tableau Server using the specified backup file. Restoring a backup file does not restore any configuration data. See Perform a Full Backup and Restore of Tableau Server.

You can only restore from a backup that has the same type of identity store as the running server. For example, a backup from a server using local authentication can be restored to a Tableau Server initialized with local authentication, but a backup from a server using Active Directory authentication cannot be restored to a server initialized with local authentication.

Synopsis

tsm maintenance restore --file <file_name> [--restart-server] [global options]

Options

-ak, --asset-key-file <file_name>

Optional. Specify this option only if you are restoring from assets that were created by tabadmin on Tableau Server (versions 2018.1 and earlier).

Name of asset key file to restore from. The asset key file is created by the tabadmin assetkeys command. The file must be in the predefined backup/restore location on the server.

-f, --file <file_name>

Required.

Specifies the backup file to restore from.

The restore command expects a backup file in the directory defined in the TSM basefilepath.backuprestore variable. By default:

C:\ProgramData\Tableau\Tableau Server\data\tabsvc\files\backups\

For more information about file paths and how to change them, see tsm File Paths.

-k, --skip-identity-store-verification

Optional. Specify this option only if you are restoring from a backup file that was created by tabadmin on Tableau Server (versions 2018.1 and earlier).

Skip identity store verification. Specify this option if you are restoring a backup file that was created with the tabadmin backup --no-config command.

-po, --pg-only

Optional.

Restores only the repository.

-r, --restart-server

Optional.

Restart the server after the restore.

--request-timeout <timeout in seconds>

Optional.

Wait the specified amount of time for the command to finish. Default value is 1800 (30 minutes).

tsm maintenance send-logs

Upload the specified file to Tableau and associate it with a support case.

Synopsis

tsm maintenance send-logs --case <case_number> --email <contact_email> --file <path/to/file> [global options]

Options

-c,--case <case_number>

Required.

Support case number.

-e,--email <contact_email>

Required.

Contact email.

-f, --file <path/to/file>

Required.

Specifies the location and name of the log file archive to send.

--request-timeout <timeout in seconds>

Optional.

Wait the specified amount of time for the command to finish. Default value is 1800 (30 minutes).

tsm maintenance validate-resources

Validate workbooks and data sources for a site.

Synopsis

tsm maintenance validate-resources --site-id <site ID> [global options]

Options

-id,--site-id <site ID>

Required.

ID for the site whose resources you are validating.

-r,--repair

Optional.

Repair invalid resources.

--request-timeout <timeout in seconds>

Optional.

Wait the specified amount of time for the command to finish. Default value is 1800 (30 minutes).

 

tsm maintenance ziplogs

Use the ziplogs command to create an archive of Tableau Server log files.

Synopsis

tsm maintenance ziplogs [options] [global options]

Options

-a, --all

Optional.

Include all files except PostgreSQL data.

-d, --with-postgresql-data

Optional.

Include the PostgreSQL data folder if Tableau Server is stopped or PostgreSQL dump files if Tableau Server is running.

--description <string>

Optional.

Include the specified description of the archive file.

-f, --file <name>

Optional.

Specify a name for the zipped archive file. If no name is provided the archive is created as logs.zip. The file is written to the directory defined in the TSM basefilepath.log_archive variable. By default:

C:\ProgramData\Tableau\Tableau Server\data\tabsvc\files\log-archives\

For more information about file paths and how to change them, see tsm File Paths.

-i, --description <string>

Optional.

Include the specified description of the archive file.

-mi, --with-msinfo

Optional.

Include the msinfo32 report, with system information about OS, hardware, and running software.

-l, --with-latest-dump

Optional.

When any service crashes, Tableau Server generates a dumpfile. Set this option to include the most recent service crash dumpfile.If you do not set this option, then no dumpfile will be included in the resulting ziplog.

-m, --minimumdate <date>

Optional.

Earliest date of log files to be included. If not specified, a maximum of two days of log files are included. Format of date should be "mm/dd/yyyy".

-o, --overwrite

Optional.

For an overwrite of an existing ziplog file. If a file by the same name already exists and this option is not used, the ziplogs command will fail.

By default the file is written to:

C:\ProgramData\Tableau\Tableau Server\data\tabsvc\files\log-archives\

For more information about file paths and how to change them, see tsm File Paths.

--request-timeout <timeout in seconds>

Optional.

Wait the specified amount of time for the command to finish. Default value is 7200 (120 minutes).

-t, --with-netstat-info

Optional.

Include netstat information.

 

Global options

-h, --help

Optional.

Show the command help.

-p, --password <password>

Required, along with -u or --username if no session is active.

Specify the password for the user specified in -u or --username.

If the password includes spaces or special characters, enclose it in quotes:

--password "my password"

-s, --server <url_to_tsm>

Optional.

Use the specified address for Tableau Services Manager. The URL must start with https, include port 8850, and use the server name not the IP address, for example https://mytableauhost:8850. If no server is specified, https://<localhost | dnsname>:8850 is assumed.

--trust-admin-controller-cert

Optional.

Use this flag to trust the self-signed certificate on the TSM controller. For more information about certificate trust and CLI connections, see Connecting TSM clients.

-u, --username <user>

Required if no session is active, along with -p or --password.

Specify a user account. If you do not include this option, the command is run using credentials you signed in with.

 

Thanks for your feedback! There was an error submitting your feedback. Try again or send us a message.