2.9.3 Upgrading
2.9.3.1 Before starting
Shutdown Daisy (the Repository Server, the Daisy Wiki, and the OpenJMS server)
Make
daisy-backup-tool -b -d $DAISYDATA_DIR -l $DAISY_BACKUP_DIR -o $DAISY_HOME/openjms -a additional-entries.xml
The '-a additional-entries.xml' is not required to make a backup, but if
specified you can backup daisywiki specific files. If you want to backup these
files you must first create the addition-entries.xml file, an example can be
found in the
2.9.3.2 Upgrade blobstore to hierarchical format
The blobstore structure has changed from being flat to being hierarchical, therefore a conversion must be made. Luckily there is a tool that will convert your existing data to the correct format. It can be executed by running the following command :
<DAISY_HOME>/bin/daisy-blobstore-convertor <path-to-blobstore>
This should be quite a painless procedure but seeing the delicate nature of
this operation it might be wise to create a
2.9.3.3 Run database upgrade script
cd <DAISY_HOME>/misc mysql -Ddaisyrepository -udaisy -p<password> [then on the mysql prompt] \. daisy-1_4-to-1_5_M1.sql
2.9.3.4 Create pubreqs directory and update myconfig.xml
In the daisy data directory, create a new empty subdirectory called pubreqs (all lowercase). This directory becomes thus a sibling of the blobstore, indexstore, conf and logs directories.
Then open the following file in a text editor:
<daisy data dir>/conf/myconfig.xml
And add the following as a child of the root <targets> element (the order of this and the other <target> elements does not matter)
<target path="/daisy/extensions/publisher/publisher">
<configuration>
<repositoryUser login="internal" password="defaultpwd"/>
<publisherRequestDirectory>/somewhere/pubreqs</publisherRequestDirectory>
</configuration>
</target>
Change the value of the password attribute to the same value as the password attribute on the other <repositoryUser> elements in the same file.
Change the content of the <publisherRequestDirectory> to contain the absolute path to the new pubreqs directory you just created.
2.9.3.5 Add headless option for repository server
If you are using the service wrapper or another custom startup script, you
should add the java.awt.headless parameter, e.g. in
wrapper.java.additional.4=-Djava.awt.headless=true
If you don't do this, image thumbnail generation will fail.
2.9.3.6 Update classpath for Jetty 5
If you are using the service wrapper or another custom startup script for the
Daisy Wiki, note that Daisy now ships with Jetty 5. For the wrapper, this means
the classpath has changed. See the updated
2.9.3.7 Copy over the old configuration
- Copy <OLD_DAISY_HOME>/openjms/config/openjms.xml to <NEW_DAISY_HOME>/openjms/config/openjms.xml
- Copy <OLD_DAISY_HOME>/daisywiki/webapp/daisy/sites/* to <NEW_DAISY_HOME>/daisywiki/webapp/daisy/sites (without the cocoon subdir)
- In <NEW_DAISY_HOME>/daisywiki/webapp/WEB-INF/cocoon.xconf,
adjust the following passwords with the values you can find in
<OLD_DAISY_HOME>/daisywiki/webapp/WEB-INF/cocoon.xconf:
- Adjust the password for openjms user (if not left to default): <credentials password="openjms" username="admin"/>
- Adjust the password for "internal' user: <cacheUser login="internal" password="defaultpwd"/>
- Adjust the password for the "registrar" user: <registrarUser login="registrar" password="defaultpwd"/>
- If you created any document type-specific stylesheets, you can copy them over also. Same applies for other resources (e.g. skins).
- If modified, copy <OLD_DAISY_HOME>/daisywiki/webapp/daisy/external-include-rules.xml to <NEW_DAISY_HOME>/daisywiki/webapp/daisy/external-include-rules.xml
Edit <DAISY_HOME>/openjms/bin/setenv.(sh|bat), uncomment the line defining the CLASSPATH and put the MySQL driver in the CLASSPATH, which can be found at (substitute <DAISY_HOME> by its actual location):
<DAISY_HOME>/lib/mysql/jars/mysql-connector-java-3.1.7-bin.jar
2.9.3.8 Start the servers
Start OpenJMS, the Daisy Repository Server, and the Daisy Wiki.
If necessary, first update the DAISY_HOME and OPENJMS_HOME variables to point to the location of the new Daisy version.
2.9.3.9 Upgrade Daisy Wiki schema
Run the daisy-wiki-init script to update the Daisy Wiki schema types:
cd <DAISY_HOME>/install daisy-wiki-init
Run daisy-wiki-init (for ImageThumbnail etc.)
2.9.3.10 [optional] Image thumbnail generation
Daisy 1.5 can generate image thumbnails and extract their width and height to store them in fields of the Image document type. If you want to do this for all your current images, you can do so by running a document task. For this, first make sure you're logged in as Administrator, then go to the Document Tasks screen (the link is in the user menu) and create a new document task. Select the documents using the query:
select name where documentType = 'Image'
You might first want to try this with one document to see if everything is OK.
Then go to the next screen, and use the following script:
var document = repository.getDocument(variantKey, true);
document.setField("ImageWidth", new java.lang.Long(0));
document.save();
This script "touches" the document by setting a field to a dummy value. Otherwise, the document wouldn't be changed and no save will be performed.
Previous