Back up Tableau Server data
Tableau Server on Windows now includes Tableau Services Manager (TSM), which replaces the Configuration Utility and the tabadmin command line tool. If you need help for an earlier version of Tableau Server, see the Tableau Help page.
Regularly backing up Tableau Server is an important step in proper administration and maintenance of your server. You can use the
tsm maintenance restore command to restore Tableau Server backups created using
tabadmin backup and
tsm maintenance backup. Database backups made in other ways, and virtual machine snapshots are not valid sources for restoring Tableau Server, so it is critical that you have an up-to-date backup.
Tableau Server data includes data extract files, as well as the Tableau PostgreSQL database, which contains workbook and user metadata, and configuration data. When you use TSM to create a backup, all of this data is saved in a single file with a .tsbak extension. If you are running a distributed installation of Tableau Server data from all the nodes is backed up.
The frequency of your backups depends on your environment, including how much use your server gets and how much and frequently the content and users change. Any changes or updates that happen after your backup will be lost if there is a system failure and you need to restore Tableau Server. The more activity there is, the more often you need to back the server up.
In addition to regular backups, you should always create a backup before upgrading to a new version of Tableau Server.
To help protect against data loss, after you create the backup, you should store the .tsbak file on a computer that is not a part of your Tableau Server installation.
tsm maintenance backup command to create a backup of the data managed by Tableau Server. This data includes data extract files and the Tableau PostgreSQL database, which contains workbook and user metadata.
Before backing up Tableau Server, verify that permissions are configured correctly for the following scenarios:
- Tableau Server installed on non-default drive: If you have installed Tableau Server on a non-default drive or folder, then you will need to manually configure permissions for the Network Service account. You may also need to configure additional permissions for the Run As service account. See Installing on non-system drive or in a different folder.
- Writing backup to a network drive: The Run As service account (by default, Network Service) must have write access to the network share where the backup files are written.
To back up server configuration data, use the tsm settings command. When you use the
tsm maintenance backup command, the current date is appended to the backup file:
tsm maintenance backup -f <backup_file> -d
For more information, see tsm maintenance backup.
You should always create a backup before upgrading Tableau Server. You can create a backup while Tableau Server is running and minimize the amount of time the server is unavailable during upgrade. The process for creating a pre-upgrade backup is the same as for creating regular backups, with one additional consideration for distributed installations.
Note: Uninstall Tableau Server from any nodes that you are not including in your new installation to avoid conflicts between the older nodes and the new installation.
If you back up often, you might want to create a script that performs the backup and related tasks for you. These tasks include:
Clean up files and folders before running the backup.
Running the backup itself.
Copying the backup file to a separate computer for safekeeping.
This section discusses
tsm commands you can use together to perform a backup and related tasks.
Note: TSM is a batch file. To run tsm commands in another batch file, use the
call command. For example "
call tsm maintenance ziplogs". Doing this will return control to the batch file. You also need to authenticate to TSM before issuing any commands. For more information, see tsm login.
For additional information about scripting TSM commands, see the Tableau Community Forums.
Remove log files and clear temporary folders
You can clean old Tableau Server log file and temporary files to reduce the time it takes to create a backup, and to ensure the backup file is as small as possible.
To clean log files older than a few days, run the following command:
Run the backup
Note: When backing up Tableau Server on Windows, the
NetworkService must have write access to the network share where the backup files are written. Otherwise, backup will fail.
To create the backup, use the
tsm maintenance backup command:
tsm maintenance backup --file <backup_file> --append-date
Note the following about the command:
--append-dateto the command to include the date in the backup file name.
By default the backup file is created in
. For more information, see tsm maintenance backup.
Copy the backup file to another computer
As a best practice, after the backup is created, copy the backup file to another location that is separate from Tableau Server.