Transient Data Storage

From Swivel Knowledgebase
Jump to: navigation, search


Transient Data Storage Overview

From version 3.9.1 user and configuration data (Transient data) is stored separately from the Swivel application. Transient data includes Configuration files, data, XML repository, logs and reports are stored externally to the Swivel application.

Note this does not include java class files, such as those for transport classes or database drivers, these may need to be copied/moved/restored manually.


Prerequisites

Swivel 3.9.1 onwards


Transient Storage Guide

Transient Data Storage Default path

The data will be contained in folders within <user.home>/.swivel

In Linux based systems the default will be /home/<username>/.swivel

If Tomcat is run as a service in Windows then the transient data may be located in c:\.swivel

In Windows 7 the default will be c:\users\<username>\.swivel

Note: Windows naming of files. You cannot create file or folder in Windows Explorer starting with . but you can using the Windows command line. Create a folder swivel, then from the Windows command line use move swivel .swivel


Transient Data Storage Custom Path

Each Swivel instance from version 3.9.2 onwards may have a defined transient data storage path and this may be of use where several Swivel instances are installed on Tomcat.

The transient data storage can be modified at the time of install or modifying an existing installation.


Installation/upgrade transient data default storage path

To define the data storage path open the pinsafe.war archive and edit the file WEB-INF\web.xml, see below for what to edit. When Swivel is installed it will be installed with this transient data path. When upgrading from a version of Swivel prior to 3.9.1, the data will be copied from the pinsafe folder to the new transient data store.


Existing installation data default storage path

stop Tomcat

Edit the following file <path to Tomcat install>/pinsafe/WEB-INF/web.xml

For appliances this is /usr/local/tomcat/webapps/pinsafe/WEB-INF/web.xml

See below for what to edit.

The transient data should be copied from the old location to the new location.

start tomcat


Editing the Custom transient data storage Path

look for the following section:

   <env-entry>
 	<description>If non empty value, will be the root for all the data - takes precedence over default and environment variable</description>
     <env-entry-name>swivelHome</env-entry-name>    
     <env-entry-type>java.lang.String</env-entry-type>
     <env-entry-value></env-entry-value>
    </env-entry>
 </web-app>

change the line <env-entry-value></env-entry-value> to reflect the required path

Example 1:

   <env-entry-value>c:\Users\gfield\swivel</env-entry-value>

Example 2:

  <env-entry-value>c:\ProgramData\swivel</env-entry-value>


Appliance custom transient data store considerations

Ensure that the custom Transient data store is contained within an area that is backed up.


Transient Data Storage Custom Path system Environment Variable

Another option is to define a system variable for the transient data storage path. To use a different path:

Create an environment variable called SWIVEL_HOME and assign a path to it.

In Linux based systems for example:

 export SWIVEL_HOME="/home/swivel" 

In Windows 7: • Click Start, right-click Computer, and select Properties. Select Advanced System Settings. You might need to confirm a UAC prompt. Then, click the Environment Variables button. • Under System Variables click ‘New’ • Enter SWIVEL_HOME as the variable name then the desired path for the value

Note that the new location for these files can be seen near the bottom of the Swivel Administration Console Status page with the heading “Data Storage Root”.

Note also to ensure that any processes external to PINsafe, for example backup processes, point to the new external locations.


Appliance Transient Data Storage

The Swivel patches should handle the Transient data storage for Swivel appliances.

If this needs to be altered from the pre Swivel version 3.9.1 to the new Transient storage location edit /etc/profile.d/swivel.sh and change

export SWIVEL_HOME=/usr/local/tomcat/webapps/pinsafe/WEB-INF
to
export SWIVEL_HOME=/home/swivel/.swivel


What is the Data Storage Path

The Data storage path is where the transient data is stored. It can be seen from the Status page on the swivel Administration console. If you are unsure where the transient data is stored then viewing this location will give its location.


Data Storage Root.jpg


Testing

The transient data storage location is listed under the Status page.


Transient Data Storage Location.jpg


Known Issues

Troubleshooting

If the transient data storage path is not correctly listed then the left hand menus may be absent.


Error Messages

Error occurred copying application data: java.io.IOException: Destination '/usr/share/tomcat5/.swivel/data' directory cannot be created

This error has been seen in the catalina.out log file for a CentOS install. Change the permissions on the CATALINA_HOME variable to allow Tomcat to create and write to the folder.


Data Storage Root:\Users\gfield\swivel\

log4j:ERROR No output stream or file set for the appender named [null].

Warning: java.io.FileNotFoundException: \\Users\gfield\swivel\conf\config.xml (The network path was not found)

Incorrectly specified transient data storage.


java.lang.NullPointerException

com.swiveltechnologies.pinsafe.server.filter.AdminConsoleFilter.doInitialization(AdminConsoleFilter.java:201)

com.swiveltechnologies.pinsafe.server.filter.AdminConsoleFilter.doFilter(AdminConsoleFilter.java:118)

filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:125)

This can be seen in the administration console login page where the transient data storage path is incorrect