Upgrade DoKS software

From DoKSwiki

Upgrade DoKS

  • Make sure you have a complete backup of the data:
    • Make a database dump, this is for real emergency cases. (for MySQL: mysqldump -u root -p [database name] > [path to dump file] can be restored by dropping and recreating the database and mysql -u root -p [database name] < [path to dump file])
    • Export fileformats, users, scripts, folders and records and make sure your export directory is not located in the build directory because this will be deleted.
  • Make a copy of your entire doks directory so you can still use this in case there is a problem. This copy can also be used to check how to adjust the configuration files.
  • Get the latest Software package of http://sourceforge.net/projects/doksproject
  • Delete all folders and files in your Doks directory except the build directory (in order to keep down-time to a minimum)
  • Copy all the files and folders from the new Doks package to your Doks directory.
  • Adjust the Configuration files (doks.properties, hibernate.properties, log4j.properties, auth.conf, doksmail.properties, oaicat.properties)
  • In case you made changes to the look and feel of your DoKS instance you have to get these changes out of your backup copy and put them in your new version. (style.css, Default.vm, structures.xml, choicetypes.xml, images, ... - it is the best to keep track of these changes so you don't get into too much trouble in case of further upgrades)
  • Open a command line window and go to the DoKS installation directory
  • Deploy (ant deploy)
  • Update your database schema if changes are made to structures.xml and choicetypes.xml (ant schemaupdate)
  • If viewCount and downloadCount are not yet in your version (i.e. you do not have a most popular records list) then set viewCount and downloadCount to 0: log in to the database and execute the queries update record set viewCount=0; and update record set downloadCount=0;
  • Restart tomcat
  • This should be all
  • You could recreate the search index