This appendix describes an ExtraView command-line utility named DocumentImageMigration that moves fields with the display types of document and image from internal storage within the database, to the file system. The utility will typically be run with the support of doDocumentMigration.bat (Windows) or doDocumentMigration.sh (Linux).
By default, the contents of document and image fields uploaded to ExtraView are stored as binary objects in the database. The ExtraView Administrator has the choice to configure the system to store the uploaded field contents on the file system, where they will be accessible by the application server.
The program must be run stand-alone, and the ExtraView application server(s) should be stopped while the documents and images are being migrated.
To configure the storage options, log in to ExtraView with the Administrator role. These settings are shared with storing file attachments on the file system. Click on the Admin navigation button, then the System Controls tab, then select All Behavior Settings, and edit the following settings:
If the value of this setting is INTERNAL (the default value), then all attachments, documents and images are stored internally within the database. If the value is set to EXTERNAL, then all the attachments, documents and images are stored on the external file system.
Alternatively, you may provide a comma separated list of file extensions and then all files with these extensions are stored in the database while all others are stored externally in the file repository.
For example, if you set the value of this setting to txt, doc, docx, htm, html then files of these types will be stored within the database. This strategy leaves the files stored internally in the database as searchable by keywords, while image and video files with extensions such as jpg and mp4 are stored externally
Please note – if you change this setting, new attachments will be saved to the new location, and existing attachments will still reference the old location. You will need to ensure that the previous file path is still accessible by the ExtraView instance, or these existing attachments will not be available to end users.
Set up a separate backup method for this external storage as backing up your database will no longer backup the file attachments
The DocumentImageMigration utility is a Java program. This is run from Windows with the doDocumentMigration.bat file, and from Linux with the doDocumentMigration.sh file.
The migration command line utility is included in the ExtraView application package. It requires Java be installed on the application server to run. We provide shell and batch file scripts that you can use to run the utility.
If you have deployed ExtraView in a WAR/EAR file, you will need to set up an exploded directory to run this script. The scripts are located in the evj/WEB-INF/data folder on your application server.
Syntax:
You must provide one of the optional parameters. The meaning of the parameters is:
Edit the runDocumentMigration.bat file
Locate the lines
set JAVA_HOME=%1
set TOMCAT_HOME=%2
set EV_BASE=%3
replace %1 with your path to Java, e.g. D:ExtraView\java\jdk-1.4.2
replace %2 with your path to Tomcat, e.g. D:ExtraView\jakarta-tomcat-5.0.28
replace %3 with your path to ExtraView, e.g. D:ExtraView\jakarta-tomcat-5.0.28\webapps\evj
Save and exit the edit session.
Open a Command window in the evj\WEB-INF\data folder and type the following command:
runDocumentMigration "parameter"
where "parameter" is one of the options listed above.
Edit the runDocumentMigration.sh file
Locate the lines
TOMCAT_HOME=/usr/local/extraview/tomcat
JAVA_HOME=/usr/local/extraview/java
Set TOMCAT_HOME and JAVA_HOME to the correct paths for your installation.
Save and exit the edit session.
At the command prompt, type the following command:
sh runDocumentMigration.sh "parameter"
where "parameter" is one of the options listed above