Storage Service Administration

Details on the administration of the Storage Service.

This task shows you how to:

To backup the Storage Service

Back up the Storage SQLite database as follows.

Before you begin: It is very important to backup your Storage Service data regularly.
  1. Go to <OP_INSTALLDIR>\datadir\storageService\storage.db.sqlite
  2. Back up the database.

Recommendations

The storage recommendations for OnePart are detailed below. By default the storage works with an SQLite engine and is therefore limited in terms of:

  • concurrent accesses, as each write action blocks the whole database,
  • scalability, when the number of entries is really big.

Before you begin: However, you can configure its JDBC connection to work with compatible databases (SQL Server, MySQL) if you need the storage to be more scalable. Tweaking the settings of the StorageService.xml file allows you to:
  1. Switch from SQLite to another RDBMS for storage backend.
  2. Change connection pooling parameters.
  3. Disable the internal locking mechanism for SQLite.
The Storage does not expose its settings in any GUI, instead you have to manipulate the <DATADIR>/config/360/StorageService.xml file directly.
Important: After each configuration change, you need to run the <DATADIR>/bin/cvcmd.sh applyConfig script and restart your Exalead CloudView instance.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<StorageService xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="">    
<StorageEngine className="com.exalead.cv360.storage.engine.jdbc.JdbcStorageEngine">        

<!-- The JDBC driver's class name -->        
<Parameter value="org.sqlite.JDBC" name="driver"/> 

<!-- JDBC connection string, vendor-specific -->        
<Parameter value="jdbc:sqlite:{dataDir}/storageService/storage.db.sqlite" name="connection"/> 

<!-- Tables are prefixed, useful if you are using the same database for many different applications -->        
<Parameter value="cv360" name="tablePrefix"/>       

<!-- Internal read/write synchronization, disable for performance gain. 
Tries to avoid potential file-system-level locking problems that can can occur if any of the following applies:  
 1. You are using SQLite over a networked file-system              
 2. You are using SQLite under Mac OS/X              
 3. You are using an old version of SQLiteIf none of the above applies you can safely disable this option. 
See http://www.sqlite.org/lockingv3.html for more details on this issue -->   

<Parameter value="true" name="synchronizedWrites"/>        
<!-- DB username / password -->      

<Parameter value="" name="username"/>        
<Parameter value="" name="password"/>        
<!-- The database connections are pooled, to avoid reconnecting every time. 
When using a non-SQLite RDBMS, You can tweak (increase) the settings below for a performance gain.
poolMaxActive: Max. num opened connections - Keep low for -->    

<Parameter value="1" name="poolInitialSize"/>        
<Parameter value="3" name="poolMaxActive"/>        
<Parameter value="2" name="poolMaxIdle"/>    
</StorageEngine>    
<RepushDocuments>false</RepushDocuments>
</StorageService>

To clear application or widget storage

  1. In Mashup Builder, select Application from the top left menu bar.
  2. Select Developer area.
  3. In the Actions pane, click Clear storage.

    A Clear storage dialog box opens.

  4. Either select:
    • the All application data radio button if you want to clear all data including widget data.
    • or the Specific widget radio button if you want to select and clear the data of a specific widget only. This can be useful to clear the stored data of a collaborative widget.
  5. Click OK.

To migrate the Storage Service

Before you begin: If you want to keep your user tags and preferences after a migration from SP3 to SP4, for example, then you must follow the migration procedure below.
  1. Stop both the old and new products.
  2. Go to <OLD_OP_INSTALLDIR>\datadir\storageService
  3. Back up the database file: storage.db.sqlite.
  4. Go to <NEW_OP_INSTALLDIR>\datadir\storageService
  5. Replace the storage.db.sqlite by the one of the previous OP version you just backed-up.
    • Note: In order for the storage service of the new instance to contain the data of the old one. You need to use the same connectors Ids & types in the old and the new instance, otherwise we won't be able to map old tags, etc... to new documents. Same problematic with user preferences, you need to use the same security sources & user ids.

Migration is now complete so you can restart your products.