Tableau Version Control is here to make your life easier
By: Chimed Altandush
Tags: Git, Tableau, Dataviz, Tableau Server

If you are a Tableau server admin or interact with your Tableau admin, then the chances of you desperately crying out for their help over some accidental action is a quiet common possibility. Currently, retrieving just one workbook or select few items from a Tableau backup is time costly and counter-productive work. Imagine having to move the entire box that will take you five hours to move from your storage into your room just to get two items. Pretty rough huh? That is what Tableau admins currently have to go through in order to restore workbooks from a backup, but there is little more hassle to that too. Let me explain:

Currently, Tableau uses the all-or-nothing backup system when it comes to backing up your workbooks. What that means is that there is no way we can individually backup workbooks but in bulk that can only be then restored as a bulk. That translates to having to restore the entire backup into a test server then retrieve the workbooks that are needed. Depending on the size of your backup, this process takes a total of staggering 12–15 hours to complete. This gruesome process is required surprisingly often since people accidentally delete workbooks or older version is needed for various reasons. Tableau currently do have their own version of version control, however it is not the most optimal option. It also deletes all previous versions along with its newest version if accidentally deleted.

Luckily for you Tableau admins, we have a solution that would make your life easy and make others happy by getting that precious workbook in a fraction of the time than it normally takes to retrieve. We make this possible by running a version control on all the workbooks on the production server. The version control will scan all the workbooks and only backup the ones that have been modified since the previous backup (meaning it doesn’t waste time backing up something that hasn’t been changed since the last backup). Best of all, it will keep all the old versions as well! More importantly, you would have an ability to individually restore desired workbooks without having to go through the old all-or-nothing way. This saves a tremendous amount of time for all parties involved and adds the convenience of being able to access old workbooks at any given time. Lastly, this is an open-source tool, and you can sprinkle this amazingness into your life now if you’d like! Or if you have any questions so far, reach out to us at contact@starschema.com.

HOW IT WORKS:

Without our Version Control

With our Version Control

Let’s take a deeper dive into the technical side of things so you can install it on your server. Here is all you need to get started:

It’s an Open Source tool!

tool! Requires Python 3.7 or later version

You would need git command line installed and configured

command line installed and configured The script use Tableau Server Client library in Python to interact with the Tableau Server REST API

Ready to get started? Let me walk you through the steps:

Clone the git from here

Once you cloned the files then open the README.md which will walk you through the configuration part

which will walk you through the configuration part After the configuration is done then all you have to do is run the python script tableauBackup.py along with the required arguments

along with the required arguments You can schedule the script to run periodically by utilizing the Windows Scheduler or crontab(1)

Tableau Server Client library allows us to makes this process possible with less than 100 lines of code. Using TSCL, we can login to Tableau server, iterate through all the sites, iterate through each workbook and data source within the site, download the .xml of each workbook and data source, and back them up to git.