2.11.2 Upgrading
2.11.2.1 Daisy installation review
In case you're not very familiar with Daisy, it is helpful to identify the main parts involved. The following picture illustrates these.

There is the application directory, which is simply the extracted Daisy download, and doesn't contain any data (to be safe don't remove it yet though).
Next to this, there are 3 locations where data (and configuration) is stored: the relational database (MySQL), the repository data directory, and the wiki data directory. The Daisy repository and the Daisy Wiki are two independent applications, therefore each has its own data directory.
The text between the angle brackets (< and >) is the way we will refer to these directories further on in this document. Note that <DAISY_HOME> is the new extracted download (see later on), not the old one.
2.11.2.2 Make a backup
(blah blah)
2.11.2.3 Stop your existing Daisy
Stop your existing Daisy, both the repository server and the Daisy Wiki.
2.11.2.4 Download and extract Daisy 2.2
If not done already, download Daisy 2.2 from the distribution area (Sourceforge). For Windows, download the zip or autoextract.exe (not the installer!). For Unix-based systems, the .tar.gz is recommended. The difference is that the .zip contains text files with DOS line endings, while the .tar.gz contains text files with unix line endings. When using non-Linux unixes such as Solaris, be sure to use GNU tar to extract the archive.
Extract the download at a location of your choice. Extract it next to your existing Daisy installation, do not copy it over your existing installation.
2.11.2.5 Update environment variables
Make sure the DAISY_HOME environment variable points to the just-extracted Daisy 2.2 directory.
Note that when you start/stop Daisy using the wrapper scripts, you don't need to set DAISY_HOME, though you do need to update or re-generate the service wrapper configuration (see next section).
How this is done depends a bit on your system and personal preferences:
- it might be that you set the DAISY_HOME variable each time at the command
prompt, in which case you simply continue to do this but let it now point to the
new location:
[Windows] set DAISY_HOME=c:\path\to\daisy-2.2
-
[Linux] export DAISY_HOME=/path/to/daisy-2.2
- in Windows, it might be set globally via the System properties
- it could also be that you renamed the Daisy 2.1 directory to something that doesn't contain the version number (such as simply "daisy"), in which case you can leave the DAISY_HOME setting alone and just rename the daisy directories.
2.11.2.6 Updating the repository SQL database
Execute the database upgrade script:
cd <DAISY_HOME>/misc mysql -Ddaisyrepository -udaisy -ppassword < daisy-2_1-to-2_2.sql
On many MySQL installations you can use "root" as user (thus specify -uroot instead of -udaisy) without password, thus without the -p option.
2.11.2.7 Start Daisy
Start Daisy as usual, using the
2.11.2.8 Reinstall review workflow
As the result of an incompatible API change in Daisy, you need to reinstall the sample workflows. Of course, if you have not used workflow and don't ever plan to use it, you can skip this.
In case you're wondering, the problem is more specifically situated in the use of Version.setState() in the review workflow.
Reinstalling the sample workflows is simple:
Log in to Daisy in the role Administrator, go to the Administration console, select "Manage process definitions" (Below workflow) and select "Reinstall sample workflows".
Previous