This page last changed on Jun 18, 2009 by rosie@atlassian.com.
Audience |
People who are upgrading from pre-JIRA 3.6.x to post-3.7, and cannot use the recommended 'XML backup/restore' upgrade method because it would take too long. |
Background
In general, there are two ways to upgrade JIRA's database, both of which are described in the Upgrading JIRA document:
- XML backup/restore (recommended) — doing a full XML export and import into the new database.
- Connect JIRA to a copy of your old database — connecting the new JIRA to the old database, and letting it automatically upgrade the database tables.
In 3.7.x, the 'Connect JIRA to a copy of your old database' method will not work. If you point JIRA 3.7.x to an older database, JIRA will print a warning and refuse to do anything. This is because a large number of database schema changes were made between 3.6 and 3.7 (see JIRA 3.7 Database Schema Changes) and these changes are too great for JIRA's database engine to upgrade automatically.
So, the vast majority of users should follow the XML backup/restore method described in the Upgrading JIRA document.
However, there are a handful of users with large installations, for which a full export/import is impractical as it takes a relatively long time. These users may need to use the 'Connect JIRA to a copy of your old database' method — This page is intended for these users. We have provided SQL scripts for each database, which will make the required changes to a 3.6.x database so it can be upgraded without a full export/import.
 | These scripts will only work on JIRA 3.6.x databases (they refer to a table only added in 3.6). If you are upgrading from an earlier release, please:
- Download JIRA 3.6.5 Standalone
- Back-up your database, and create a copy to be upgraded to 3.7.
- Configure it to point to your 3.7 copy of the database
- (optionally) Edit atlassian-jira/WEB-INF/classes/jira-application.properties and set jira.autoexport=false to speed up the process.
- Start JIRA Standalone. By watching the logs (atlassian-jira.log or logs/catalina.out, you will see JIRA automatically upgrading tables to the 3.6.x format.
- Proceed with the instructions below.
|
 | If you are using HSQLDB with JIRA, you must follow the 'XML backup/restore' instructions in the Upgrading JIRA guide, as simply copying the .script file will not work. The format of the .script file has changed between the HSQLDB versions, and therefore, copying the .script file will result in the following error on startup. |
DB2 upgrade notes
- Shutdown your JIRA instance
- Perform a backup of your DB2 database: db2 backup database sample to /home/db2/backups
- Download the following script db2_3.7_migration.ddl and modify the connect statement within the file
- Execute the script using the following command: db2 +c -t -v -f db2_3.7_migration.ddl
If you see errors like:
This is OK, it simply means that the inner SQL query did not return any data to be inserted into the new temporary table. This can occur if you are not using certain features in JIRA.
- Point your new instalation of JIRA 3.7 at your DB2 database and watch for any errors during the statup sequence.
- If you see any other errors please contact support for further assistance.
PostgreSQL 8+ upgrade notes
- Shutdown your JIRA instance
- Perform a backup of your PostgreSQL database pg_dump -d database name > backup filename.sql
- for example pg_dump -d jiradb > jiradb_365_14112006.sql
- Download the following script postgres_3.7_migration.sql
- Execute the script using the following command: psql -Ujirauser -v schema_name=public -d jiradb -f postgres_3.7_migration.sql
- Where -U is the username, -v is the name of your schema -d is the database -f is the location of the script file
- Point your new instalation of JIRA 3.7 at your database and watch for any errors during the startup sequence.
- If you see any errors please contact support for further assistance.
Oracle 10g upgrade notes
- Shutdown your JIRA instance
- Perform a backup of your Oracle database. There are multiple strategies here, so we will leave this up to your DBA.
- Download the following script oracle_3.7_migration.sql
- Connect to SQL*Plus and execute the following script:
- If you see any errors please contact support for further assistance.
- Point your new instalation of JIRA 3.7 at your DB2 database and watch for any errors during the statup sequence.
Microsoft SQL Server upgrade notes
- Shutdown your JIRA instance
- Perform a backup of your SQL Server database: osql -U username -P password -Q "BACKUP DATABASE db_name TO DISK = backup_path_and_filename"
- for example osql -U sa -P secret -Q "BACKUP DATABASE jiradb TO DISK = 'C:\MyBackup.dat'"
- Download the following script sqlserver_3.7_migration.sql
- Execute the script: osql -U username -P password -d db_name -i mssql_3.7_migration.sql
- for example osql -U sa -P secret -d jiradb -i sqlserver_3.7_migration.sql
- If everything goes well the following should be displyed
- Point your new instalation of JIRA 3.7 at your SQL Server database and watch for any errors during the statup sequence.
Sybase upgrade notes
- Shutdown your JIRA instance
- Perform a backup of your SQL Server database
- for example using isql tool
- Download the following script sybase_3.7_migration.sql
- Execute the script: osql -U username -P password -D db_name -i sybase_3.7_migration.sql
- for example osql -U sa -P -D jiradb -i sybase_3.7_migration.sql
- If everything goes well the following should be displyed
- Point your new instalation of JIRA 3.7 at your Sybase database and watch for any errors during the statup sequence.
MySQL upgrade notes
- Shutdown your JIRA instance
- Perform a backup of your MySQL database: mysqldump --opt db_name > db_name.sql
- for example mysqldump --opt jiradb > jiradb_before37.sql
- Download the following script mysql_3.7_migration.sql
- Execute the script: mysql --user=username --password=password db_name < mysql_3.7_migration.sql
- for example mysql --user=root --password=password jiradb < mysql_3.7_migration.sql
- Point your new installation of JIRA 3.7 at your MySQL database and watch for any errors during the statup sequence.
Attachments
|
Name |
Size |
Creator (Last Modifier) |
Creation Date |
Last Mod Date |
Comment |
|
 |
sybase_3.7_migration.sql |
0.5 kB |
Dylan Etkin |
Sep 20, 2006 |
Sep 20, 2006 |
|
|
 |
mysql_3.7_migration.sql |
0.7 kB |
Dylan Etkin |
Sep 20, 2006 |
Sep 20, 2006 |
|
|
 |
sqlserver_3.7_migration.sql |
12 kB |
Jed Wesley-Smith |
Mar 22, 2007 |
Mar 22, 2007 |
|
|
 |
db2_3.7_migration.ddl |
4 kB |
Justin Koke |
Oct 18, 2006 |
Oct 18, 2006 |
|
|
 |
oracle_3.7_migration.sql |
0.7 kB |
Justin Koke |
Oct 18, 2006 |
Oct 18, 2006 |
|
|
 |
postgres_3.7_migration.sql |
0.9 kB |
Justin Koke |
Oct 18, 2006 |
Oct 18, 2006 |
|
|
|