Monday, February 15, 2010

Copying a Pentaho Report Repository Manually

Copying a existing report repository is an easy way to create another repository for use with a test or development database. It can also be a way to create a production repository from an erstwhile development version.

These are the steps I used on Linux:
  1. Copy the repository

    cp -r repo-prod repo-dev

  2. Edit the index.properties file in repo-dev and change the name property to give it a different name than the original.

  3. Change the data source name to match the development one in each xaction file
    find . -name '*.xaction' | xargs sed -i 's/data-prod/data-dev/g'

  4. Change the repository name in xaction files that have sub-actions
    find . -name '*.xaction' | xargs sed -i 's/repo-prod/repo-dev/g'

  5. Change the image paths in the report design .xml files. cd into the directory first
    find . -name '*.xml' |xargs sed -i 's|/old/prefix/|/new/prefix/|'


No comments:

Post a Comment