Now you already have a new shiny Tableau Server on Linux (and if you don’t, try it here )
Installing is one thing, administering it is another thing. So this post is dedicated for Backing & Restoring tableau server using the new tsm commands. Tableau Server 10.5 Beta 5 did not provide TSM web interface, so we can only use tsm CLI commands.
So open your bash terminal, and backup the server like this:
tsadmin@tsadmin-ts10beta:~$ tsm maintenance backup -f /home/tsadmin/Documents/ts105betabackup -d
An error occurred on the server generating the backup.
See ‘/home/tsadmin/.tableau/tsm/tsm.log’ for more information.
Bad request parameters: The specified path cannot be absolute.
Got an error, we cannot specify an absolute path. Why this happen ?
Because to do backup, we should use the default backup folder path, you can always change the default backup folder path using tsm but i will reserve it for another blog post on default folders used by tableau server (coming soon!)
So what is the default backup folder path ?
tsadmin@tsadmin-ts10beta:~$ tsm configuration get -k basefilepath.backuprestore
/var/opt/tableau/tableau_server/data/tabsvc/files/backups
I’m fine with the default backup folder, so let’s try backing up again.
tsadmin@tsadmin-ts10beta:~$ tsm maintenance backup -f ts105betabackup -d
8% – Starting the Active Repository instance.
16% – Waiting for the Active Repository to start.
25% – Installing backup services.
33% – Gathering disk space information from all nodes.
41% – Checking if sufficient disk space is available on all nodes.
50% – Backing up configuration.
58% – Backing up object storage data.
66% – Backing up database.
75% – Assembling the tsbak archive.
83% – Stopping the Active Repository if necessary.
91% – Waiting for the Active Repository to stop if necessary.
100% – Uninstalling backup services.
Backup written to ‘/var/opt/tableau/tableau_server/data/tabsvc/files/backups/ts105betabackup-2017-11-01.tsbak’ on the controller node (not the local directory).
-f / –file : set the backup file name (Required)
-d / –append-date: append the current date to the backup file name (Optional)
Linux backup file is a standard tableau backup file, you can restore it to your tableau server on windows and vice versa. It’s easy to migrate tableau server on windows to linux, just backup on windows, copy the tsbak file to linux and restore it.
So how do you restore tsbak file on Linux ?
tsadmin@tsadmin-ts10beta:~$ tsm maintenance restore –file ts105betabackup-2017-11-01.tsbak –restart-server
Restoring ‘ts105betabackup-2017-11-01.tsbak’…
Using server-side file name ‘ts105betabackup-2017-11-01.tsbak’
4% – Checking backup compatibility.
9% – Generating manifest.
13% – Disabling all services.
18% – Waiting for the services to stop.
22% – Installing restore services.
27% – Determining required files for individual nodes.
31% – Checking available disk space on all nodes.
36% – Transferring required files to remote nodes.
40% – Restoring data for services.
45% – Restoring database.
50% – Restoring data to object storage.
54% – Committing data for services.
59% – Committing restored data to database.
63% – Committing data to object storage.
68% – Deleting temporary backup file.
72% – Cleaning up restore data on all nodes.
77% – Uninstalling restore services.
81% – Enabling the services required for indexing.
86% – Rebuilding the search index.
90% – Enabling all services.
95% – Waiting for the services to start.The backup ‘ts105betabackup-2017-11-01.tsbak’ was successfully restored.
-f / –file : 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:/var/opt/tableau/tableau_server/data/tabsvc/files/backups/ (Required)
-r / –restart-server: restart the server after the restore (Optional)
Important notes:
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.
Let’s check if everything runs fine after the restart.
tsadmin@tsadmin-ts10beta:~$ tsm status -v
node1: localhost
Status: RUNNING
‘Tableau Server Gateway 0’ is running.
‘Tableau Server Application Server 0’ is running.
‘Tableau Server VizQL Server 0’ is running.
‘Tableau Server Cache Server 0’ is running.
‘Tableau Server Coordination Service 0’ is running.
‘Tableau Server Cluster Controller 0’ is running.
‘Tableau Server Search And Browse 0’ is running.
‘Tableau Server Backgrounder 0’ is running.
‘Tableau Server Data Server 0’ is running.
‘Tableau Server File Store 0’ is running.
‘Tableau Server Repository 0’ is running (Active Repository).
‘Tableau Server Administration Agent 0’ is running.
‘Tableau Server Administration Controller 0’ is running.
‘Tableau Server Service Manager 0’ is running.
‘Tableau Server License Manager 0’ is running.
‘Tableau Server Database Maintenance 0’ is stopped.
‘Tableau Server Backup/Restore 0’ is stopped.
‘Tableau Server Site Import/Export 0’ is stopped.
‘Tableau Server SAML Service 0’ is stopped.
‘Tableau Server hyper 0’ is running.
Everything works fine. Go try it.
Full tsm maintenance commands documentation:
http://onlinehelp.tableau.com/v10.5/serverlinux/en-us/cli_maintenance_tsm.htm
Enjoy today.
