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 one supported database to another supported database. The CLI commands allow migrations between Spotfire database instances with the same technical and schema versions. When there is a difference in latency in the databases ( greater than 5ms), then run the command on a computer with as low latency as possible to the destination database.

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.
  • If you are using an Oracle database, then first download a supported database driver and place the file (ojdbc*.jar) in the directory <installation files dir>/tomcat/custom-ext.
  • 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.

config migrate-db 
--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

If you are migrating a database to Microsoft SQL Server for Spotfire Server 12.3 or later, then see the article Upgrading to 12.3 and later: Fixing Microsoft SQL Server JDBC driver-related issues.