Downloads (PDF, HTML & XML formats)
[FishEye Knowledge Base]
Documentation for FishEye 3.0.x. Documentation for other versions is available too.
To switch to a PostgreSQL database, install PostgreSQL and follow the steps below. When they are used together, FishEye and Crucible share the same external database.
Please note that during the migration of database servers, the FishEye/Crucible instance will not be available to users or to external API clients.
.jar
file from the PostgreSQL website and copy the .jar
file to your FISHEYE_INST/lib
directory (create the lib/
directory if it doesn't already exist). Move the existing JDBC .jar
file to another location (and back it up). Restart FishEye/Crucible to have it pick up the new driver.Create a new database user (replacing 'username' and 'password' with the appropriate values):
$ psql > create user username password 'password';
Create a UTF-8 database and make the newly created user the owner:
> create database crucible ENCODING 'UTF-8' OWNER username;
Make sure the user has full access to the database:
> grant all on database crucible to username;
In order to migrate to a different database backend, you must create a backup of sql data, configure the database and finally import the data via a backup restoration process. This can be done from either the FishEye/Crucible administration console, which streamlines the process, or via the command line tool which FishEye/Crucible provides.
Database
page in FishEye/Crucible's Administration console.To log in to the Admin area, you can either:
HOSTNAME
is the name of the server on which you installed Fisheye.Once logged in as an administrator you can also get to the Admin area by clicking your user menu in the FishEye/Crucible header, and choosing Administration.
PostgreSQL
from the database Type..jar
file in the classpath (by placing the .jar
file in FISHEYE_INST/lib
). Also, ensure that the database user can log in to the database from the machine that FishEye/Crucible is running on and that all the required privileges are present.sql
data from the FishEye/Crucible instance. Information on how to create a backup can be found at Backing up and restoring FishEye data / Backing up and restoring Crucible data.Run the following command from the bin
directory in FISHEYE_INST:
$ ./fisheyectl.sh restore --sql \ --file /path/to/backup.zip \ --dbtype postgresql \ --jdbcurl jdbc:postgresql://hostname/dbname \ --username crucible \ --password password
2 Comments
John Harrison
Two thoughts with this.
Firstly, not being very familiar with PostgreSQL, it would have been nice to realise beforehand that I could have created a new tablespace for crucible. We already had a separate one for our JIRA database, but these instructions created the database straight in the global tablespace.
Secondly, I got this:
Unable to connect to PostgreSQL database jdbc:postgresql://localhost:5432/crucible: org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host "127.0.0.1", user "fisheye", database "crucible", SSL off Couldn't connect to the database
Same from the command line:
$ psql -h localhost -U fisheye -d crucible
psql: FATAL: no pg_hba.conf entry for host "127.0.0.1", user "fisheye", database "crucible", SSL off
My colleague showed me I needed to add these entries to get it to work:
$ sudo su - postgres
Edit /var/lib/pgsql/data/pg_hba.conf to add the fisheye entries below:
# local is for Unix domain socket connections only
local all postgres ident
local all jira password
local all fisheye password
# IPv4 local connections:
host all jira 127.0.0.1/32 password
host all fisheye 127.0.0.1/32 password
# IPv6 local connections:
host all jira ::1/128 password
host all fisheye ::1/128 password
Then reload config without taking down PostgreSQL:
-bash-3.2$ pg_ctl reload
server signaled
Then test:
$ psql -h localhost -U fisheye -d crucible
Password for user fisheye:
psql (8.4.7)
Type "help" for help.
crucible=> \q
Then I was able to carry on with the migration.
Anonymous
This happens because you create a user BEFORE having the role and if the user does not having the role, it fails.
If you follow this tutorial, at the end, please add
sudo -u postgres psql -c "ALTER USER username PASSWORD 'yourpassword';"