TIBCO Spotfire® Server and Environment - Installation and Administration

Migrating a database instance

Starting with version 11.4.0 of Spotfire Server, you can use command-line commands to migrate a Spotfire database instance or an action database instance from one to another.

About this task

These database migration actions are accessible only through the following command-line commands.
  • migrate-db: Migrates a Spotfire Server database from one database to another after deleting the contents on the target database.
  • migrate-action-db: Migrates an action database from one database to another. By default, the content of the source action database is added to the target action database.
These commands are designed to migrate an instance of Oracle or Microsoft SQL Server to a PostgreSQL instance; however, migration between other supported databases works. The commands allow migrations between Spotfire database instances with the same technical and schema versions.
Note: To use these commands, you need the Microsoft SQL an Oracle drivers; however, these operations are not supported with the bundled Microsoft and Oracle Data Direct drivers.

Before you begin

Note: If Spotfire Server is configured to authenticate with the source Spotfire database using Windows Integrated Authentication, then you must run the command as the same user that Spotfire Server authenticates as. Otherwise, the command tool cannot authenticate with the database.
  • Create a working backup of your Spotfire database.
  • You must have created the new Spotfire database, with the same version, in the database instance to which you are migrating.

If you are migrating a database for a Spotfire Server cluster, then you must update the bootstrap.xml files for all of the servers in the cluster. If the migrate-db command's flag --update-bootstrap is specified, then migrate-db updates the bootstrap.xml file for the server from which you are running the command.

Procedure

  1. Turn off all services that run toward the database from which you are migrating.
    Note: If you are migrating a database for a Spotfire Server cluster, turn off all servers in the cluster before performing the migration.
  2. Open a command line window.
  3. Browse to the directory <installation-directory>/tomcat/spotfire-bin.
  4. Run the appropriate command (either migrate-db or migrate-action-db, depending on your type of database), specifying the newly-created Spotfire database as your target database.
    Important: migrate-db deletes the contents of the target before migrating the entirety of the source database, so be careful when specifying the target database.

Example

The following example demonstrates migrating the Spotfire database from its current database engine to a target PostgreSQL database from a Linux system. (If you are on a Windows system, use the command config.bat.)

config.sh migrate-db --tool-password=tool_password 
--target-driver-class==org.postgresql.Driver 
--target-database-url=jdbc:postgresql://my_host_name:5432/my_postgresql_db 
--target-username=jdoe --target-password=my_target_pw