Backup and Restore with External File Store

If your Tableau Server is configured to run File Store externally, the backup and restore process is different than if you were running File Store locally. This topic describes the process of backup and restore when:

Backup Strategies:

The backup strategy you use depends on your recovery plan. The snapshot backup process may or may not be sufficient as it only creates a backup of the File Store and repository data. There are other configurations and settings that you might need to do a full recovery. Here are some scenarios that illustrate where the snapshot backup may or may not be enough:

  • You maintain a standby Tableau Server to use in case your production Server is down. In this scenario, creating a snapshot backup and restoring it to your standby server on a regular schedule might be sufficient. Your backup schedule should be according to your recovery point objective.

  • You plan to use a new Tableau Server installation in case of a disaster, but don’t necessarily need to use the configurations and settings from your existing Tableau Server installation. In this case, you can install a new Tableau Server, and use the snapshot to restore the data.
  • You don’t have a standby Tableau Server, but want to be able to create a new Tableau Server installation using the configurations and settings from your existing Tableau Server and restore the data. In this scenario, you would need more than the snapshot backup to install a new Tableau Server. To do a full backup including all the configurations and settings, follow these instructions:

    1. Export topology and configuration data. This exports majority of Tableau Server and the topology. For more information, see Perform a Full Backup and Restore of Tableau Server
    2. Create a snapshot of the network share to create a backup of the File Store and Repository data as described earlier in the Backup and Restore with External File Store section of this topic.

    3. Document the settings that are not included in the export. These are settings like system user accounts, coordination serviced deployment configuration, customized settings, and such. For more information, see Perform a Full Backup and Restore of Tableau Server.

Tableau Server with External File Store

When you have External File Store enabled on your Tableau Server, you cannot use the tsm maintenance backup command to do a backup of the Tableau Server Repository and File Store Data. Instead, use the storage snapshot technology to create a point in time snapshot of your network share. However, before you can create the snapshot backup, you must first prepare Tableau Server for the snapshot backup and on completion resume Tableau Server normal processes.

When you have Tableau Server that is configured with External File Store but is using a local repository, Tableau Server backup operations include a backup of the Repository.

Creating a Snapshot Backup

Use the following steps to create a snapshot backup.

  1. Prepare for snapshot backup: Run the following command to create a repository backup file , and temporarily copy it to the network share. Server continues to operate normally during the backup process. Some internal processes will be paused during this time to ensure a consistent snapshot.

    tsm maintenance snapshot-backup prepare

    You should see a message that says 'Preparation for snapshot backup succeeded' to indicate that the preparation step is done.

    Check to make sure that the repository backup file was created on the network share.

    Note: The prepare step includes creating a backup file of the repository and KMS and Asset keys. If you are using a cloud solution for your encryption key solution, you will need access to the CMK used to decrypt the keys which is necessary for restore. For more information on encryption key solution with AWS, see AWS Key Management System. For more information on encryption key solution with Azure, see Azure Key Vault.

  2. Create a snapshot of the network share: Use the snapshot technology of your network attached storage to create a snapshot of the network share. This snapshot will include both the File Store data and the repository backup file that was created in the previous step.

  3. Complete the backup process: Run the following command to complete the backup process in restart the paused internal processes. This also removes the repository backup file that was copied to your network share.

    Check to make sure that the temporary repository backup file was removed from the network share.

Restoring a snapshot backup

The steps described below apply to both stand-alone and Tableau Server cluster.

  1. Stop Tableau Server. At the command prompt, run the following command:

    tsm stop

  2. Restore File Store data. Use the point in time snapshot that you want to recover to, and restore it to your shared file server. Once the restore is complete, Tableau Server is using the restored File Store data.

  3. Restore Repository Data. Use the following restore command to restore the repository data.

    tsm maintenance snapshot-backup restore

    Note: If you are using a cloud solution for your encryption key solution, make sure the server where the backup is being restored has decrypt access to cloud instance where CMK is deployed.

  4. Restart Tableau Server. At a command prompt, run the following command:

    tsm start

Tableau Server with External File Store and External Repository

When you have External File Store enabled on your Tableau Server, you cannot use the tsm maintenance backup command to do a backup of the Tableau Server Repository and File Store Data. Instead, use the storage snapshot technology to create a point in time snapshot of your network share.

When you have both External File Store and External Repository enabled, you have two options when you do your backup: You can either choose to backup the External Repository separately or include it as part of the initial Prepare step.

Here are some of the reasons why you may choose to back up the Repository separately:

  • Doing a backup of the Database instance of the External Repository separately can be faster, especially if you are using a cloud solution that allows for snapshot backup of the instance.
  • The size of the backup file impacts the time taken in the preparation step of the backup process since it has to be copied to the network share.

On the other hand the advantage of including the Repository backup as part of the Tableau Server backup for the following reasons:

  • Ease of backup management: By including the backup of the Repository, you are not having to do a separate backup and making sure that the backup is completed in the time that is necessary to keep the File Store and Repository backups in sync.
  • Restore: Restore operations have to be done separately and typically requires additional steps of creating a new instance and configuring the Tableau Server to use the new restored instance.

Option 1: Include Repository in the Backup

This option describes how to include Repository as part of the Tableau Server Backup process. If you prefer to create the backup file of the repository separately, see Backup and Restore with External File Store.

Create a Snapshot Backup

  1. Prepare for snapshot backup: Run the following command to start the process so you can take a snapshot backup of the network share. Some internal processes will be paused during this time to ensure a consistent snapshot, but Tableau Server continues to operate normally during the backup process. In order to make sure that the repository backup is included you must use the --include-pg-backup option.

    Note: Starting in 2021.1, if you have both External File Store and External Repository enabled, the prepare step no longer includes creating a backup file of the repository. If you are upgrading from a version earlier than 2021.1, and you have scripts to run or schedule your backups, and want to continue to include the repository backup, add the --include-pg-backup option in the prepare command as shown below.

    tsm maintenance snapshot-backup prepare --include-pg-backup

    You should see a message that says 'Preparation for snapshot backup succeeded' to indicate that the preparation step is done.

    Check to make sure that the repository backup file was created on the network share.

    Note: The prepare step includes creating a backup file of the repository and KMS and Asset keys. If you are using a cloud solution for your encryption key solution, you will need access to the CMK used to decrypt the keys which is necessary for restore. For more information on encryption key solution with AWS, see AWS Key Management System. For more information on encryption key solution with Azure, see Azure Key Vault.

  2. Create a snapshot of the network share: Use the snapshot technology of your network attached storage to create a snapshot of the network share. This snapshot will include both the File Store data and the repository backup file that was created in the previous step.
  3. Complete the backup process: Run the following command to complete the backup process in restart the paused internal processes. This also removes the repository backup file that was copied to your network share.

    tsm maintenance snapshot-backup complete

    Check to make sure that the temporary repository backup file was removed from the network share.

Restoring a Snapshot Backup

The steps described below apply to both stand-alone and Tableau Server cluster.

  1. Stop Tableau Server. At the command prompt, run the following command:

    tsm stop

  2. Restore File Store data. Use the point in time snapshot that you want to recover to, and restore it to your shared file server. Once the restore is complete, Tableau Server is using the restored File Store data.

  3. Restore Repository Data. Use the following restore command to restore the repository data:

    tsm maintenance snapshot-backup restore

    Note: If you are using a cloud solution for your encryption key solution, make sure the server where the backup is being restored has decrypt access to cloud instance where CMK is deployed.

  4. Restart Tableau Server. At a command prompt, run the following command:

    tsm start

Option 2: Backup Repository Separately

This option is recommended only when the host platform allows you to do snapshot backup. If you are using Azure as your host platform, we recommend using Option 1.

Create Snapshot Backups

  1. Prepare for snapshot backup: Run the following command to create a repository backup file , and temporarily copy it to the network share. Server continues to operate normally during the backup process. Some internal processes will be paused during this time to ensure a consistent snapshot.

    tsm maintenance snapshot-backup prepare

    Note that the Repository is not included in the backup in this case.

    You should see a message that says 'Preparation for snapshot backup succeeded' to indicate that the preparation step is done.

    Note: The prepare step includes creating a backup file of the repository and KMS and Asset keys. If you are using a cloud solution for your encryption key solution, you will need access to the CMK used to decrypt the keys which is necessary for restore. For more information on encryption key solution with AWS, see AWS Key Management System. For more information on encryption key solution with Azure, see Azure Key Vault.

  2. Create a snapshot of the network share: Use the snapshot technology of your network attached storage to create a snapshot of the network share. This snapshot will include both the File Store data that was created in the previous step.
  3. Create a backup of the repository: Use the backup technology of platform where you are hosting your external repository to create a backup.

    The backup of the network share and the repository must be completed within 3 hours and 30 minutes after completing the Prepare step. This is to make sure that the File Store and the Repository backups are in sync and for the restore to work properly.

    For more information on creating a snapshot of AWS DB instance, see Creating a DB snapshot.

    For more information on creating a backup of Azure DB instance, see Backup and Restore on Flexible Server (PostgreSQL 12 and later), Backup and Restore on Single Server (PostgreSQL 11 or earlier).

    Note: If you are using a cloud solution for your encryption key solution, make sure the server where the backup is being restored has decrypt access to cloud instance where CMK is deployed.

  4. Complete the backup process: Run the following command to complete the backup process in restart the paused internal processes. This also removes the repository backup file that was copied to your network share:

    tsm maintenance snapshot-backup complete

Restoring a Snapshot Backup

The steps described below apply to both stand-alone and Tableau Server cluster.

  1. Use the DB snapshot backup to your external repository. If you are using a cloud platform to host your Repository, typically this requires that you create a new DB instance to restore the backup. Following the steps described in these articles to create a new instance:

    AWS: Create a PostgreSQL DB Instance on AWS Relational Database Service (RDS)

  2. Create a configuration file for the new instance. Use instructions described in Step 1 of the Install Tableau Server with External PostgreSQL Repository topic.
  3. Stop Tableau Server. At the command prompt, run the following command:

    tsm stop

  4. If the restore of the external repository creates a new DB instance, use the following command to point Tableau Server to the new DB instance:

    tsm topology external-services repository replace-host -f <filename>.json -c <ssl certificate file>.pem

    The .json file is the configuration file you created in Step 2. The certificate file is the SSL certificate you downloaded from the new DB instance.

  5. Restore File Store data. Use the point in time snapshot that you want to recover to, and restore it to your shared file server. Once the restore is complete, Tableau Server is using the restored File Store data.

    Note: Some technologies require you to create a new network share when doing a restore. If this applies to your network attached storage, you can do your restore before stopping the Tableau Server. Also, If you are restoring the File Store data to a new network share, you must configure Tableau Server to use the new network share. For more information, see Configure Tableau Server to use a different external storage.

  6. Run the following command to restore the KMS and Asset keys:

    tsm maintenance snapshot-backup restore

    Note: If you are using a cloud solution for your encryption key solution, make sure the server where the backup is being restored has decrypt access to cloud instance where CMK is deployed.

  7. Run the following command to restart Tableau Server:

    tsm start

 

Who can do this

Tableau Server Administrators can backup and restore Tableau Server. In addition you must have permission to access and perform snapshot backups on the external storage.

Thanks for your feedback!