Configuring a Binary Storage Provider

By default, Jive SBS stores binary content (uploaded documents, images, and so on) in the application database. Communities with very large datasets might find, however, that storing binary content data in a location outside the database is a more efficient and scalable solution. With this in mind, the application supports other locations for binary content and provides a means for migrating from the application database.

You can migrate content to one of the included storage providers (a DBMS or file system). You can also migrate to yet another storage provider if the provider supports access via Jive's storage provider API (for example, you might use the Amazon S3 provider, currently in beta).

Using a File System Location

You can migrate binary content storage to a file system location as long as the location is always available to the application.

When you migrate storage to the file system provider, the path you specify must be a local directory you have mapped to a mountable location.

On Linux, for example, you can map a local directory by adding the mapping to the /etc/fstab file on the machine that hosts Jive SBS (or on each node in the cluster). This means that the location will be mounted whenever the machine or node is started. In the following example, the /jive directory on the server at "server" is a mountable location mapped to the local /jive_binaries directory.

# device      mountpoint             fs-type     options       dump          fsckorder
server:/usr/local/jive_binaries  /jive_binaries    nfs          rw            0    0

Given this example, you'd specify the local /jive_binaries directory as the location for binary content. The application would use that location to reach the mount point at server:/usr/local/jive_binaries.

Note: In a cluster, the mapped location is required to be common to all cluster members and reflect the same remote mount point.

Using a Database

When you use another database for binary content storage, you specify a JNDI name corresponding to the database. During migration to the new provider, the application will create the database tables needed.

In a cluster, the JNDI name must be the same on each node where you configure an instance to use the provider.

Migrating to a Different Provider

You can use the admin console to migrate to another storage provider for binary content. You might want to migrate your binary storage provider if:
  • You want to use one of the other providers included with the application. For example, you might want to use a file system provider instead of the JDBC provider enabled by default.
  • You want to use the provider you're currently using, but change how you're using it. For example, you might want to use a different database for the JDBC provider or a different file system location for the file system provider.
Note: The providers included with the application will serve most needs. But if these don't meet your needs, you can also implement your own provider class by implementing the com.jivesoftware.eos.StorageProvider interface. To add the new provider, you'll need to make sure that the provider class is on the application classpath before migrating.
Here are a few things to keep in mind about the migration process:
  • During the migration any new binary content will be stored in both the current and the new storage provider. Once the migration has completed successfully the system will switch over to the new provider.
  • If any errors occur during migration the system will revert back to the current storage provider settings to allow the system to continue to function normally. Errors will be logged (see Getting Application Logs for more on logs). When you've addressed the errors, start over with migration.
  • Keep in mind that binary content caching is disabled during migration. This might cause increased load on both the current storage provider as well as the application in general.
  • Large binary datasets (over, say, 20 or 30 gigabytes) might take a few hours to migrate.
  • When configuring a file system provider, you'll specify a namespace. The namespace helps ensure that data is isolated for the application instance it belongs to. So, for example, if you had multiple instances (such as an internal and an external instance), you could use the same storage server while giving the storage provider for each instance a different namespace.
    Note: Be sure to use a different namespace and path for each application instance you configure a provider on. If you don't, you're likely to see conflicts resulting from shared binary data.
Before you migrate to a different provider, be sure you've done the following:
  • Backed up your current storage provider's backing store.
  • Run a successful migration already on a backup of this system.
  • Made sure that you're not running the migration tool during a busy period.
To migrate to a different provider, use the following steps:
  1. In the admin console go to the Storage Provider page.
  2. Click Migrate to another storage provider.
  3. Choose one of the following options to specify the provider you want to migrate to:
    • From the Registered Providers box, select the provider you want to migrate to.
    • In the Class Name box, enter the fully-qualified class name of a provider class that implements com.jivesoftare.eos.StorageProvider. For example, if you're using the Amazon S3 provider, the class is com.jivesoftware.eos.s3.S3StorageProvider.
  4. Click Continue.
  5. Enter details as follows for the provider you've chosen:
    • For the file storage provider:
      1. Enter a namespace that will correspond to binary data for this application instance.
      2. Enter a path to a local directory that's mapped to a mountable location. See "Using a File System Location" for more information.
      3. Click Continue.
      4. Read the notes and confirm that the settings shown are the values you specified.
      5. To delete binary content from the current source storage after migration, select the Delete binary content... check box.
      6. Click Start Migration to start the process.
    • For the JDBC storage provider:
      1. Enter a namespace that will correspond to binary data for this application instance.
      2. Enter the JNDI name for the database you're migrating to.
      3. Click Continue.
      4. Read the notes and confirm that the settings shown are the values you specified.
      5. To delete binary content from the current source storage after migration, select the Delete binary content... check box.
      6. Click Start Migration to start the process.
    • For a custom provider:
      1. Enter a namespace that will correspond to binary data for this application instance.
      2. Enter values as needed to configure the provider. These values will be specific to your storage provider class.
      3. To delete binary content from the current source storage after migration, select the Delete binary content... check box.
      4. Click Start Migration to start the process.

    Use the status bar to keep track of the migration's progress. The console will display a message when migration is complete.