I need to know how to bring a database back from an export.

Samuel Yontz February 4, 2018

After a reboot of the server Jira will not start. The postgresql error is PANIC:  could not locate a valid checkpoint record.

 

At this point I have spent hours trying to fix with no luck. Can someone tell me how to dump the current database data to I can get it online and then if the Application Data\export folder has what I need to bring it completly back up. The reason I am trying to do this is the server crashed and restarted and the backup drive wont let me do a restore. it is a usb drive and everytime i try to do a restore it is showing the files and locked. Really strange issue. At this point iff the export folder has what I need I would like the proess to start over and import.

1 answer

0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 4, 2018

Start by running the postgres reset tool - have a look through https://www.postgresql.org/docs/9.6/static/app-pgresetxlog.html (but in short, pg_resetxlog <data directory> will tell you if there's something broken and then you'll need to do some reading depending on the result). 

If you want to just start again, have a look in <jira home>/export for .zip files - these are regular xml exports of Jira which can be used to load all your data into an empty Jira.

Samuel Yontz February 4, 2018

Here is what that command gives me 

 

The database server was not shut down cleanly.
Resetting the transaction log might cause data to be lost.
If you want to proceed anyway, use -f to force reset.

 

I have the export zip files but do not know how to use them. Do you have instructions?

Samuel Yontz February 4, 2018

I made a backup of the files and then ran the -f version of the command and now I get this but it does not stay running. 

 

2018-02-04 18:47:50 CST LOG: database system was shut down at 2018-02-04 18:47:40 CST
2018-02-04 18:47:50 CST FATAL: could not access status of transaction 44791227
2018-02-04 18:47:50 CST DETAIL: Could not open file "pg_clog/002A": No such file or directory.
2018-02-04 18:47:50 CST LOG: startup process (PID 7552) exited with exit code 1
2018-02-04 18:47:50 CST LOG: aborting startup due to startup process failure

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 5, 2018

You'd need to be asking about repairs on a postgres forum I'm afraid, this is beyond what I've seen.

For the export files though, it is moderately easy.  Get a new Jira up and running (make sure it is the same version as the old one), with a single admin user, place the export file into <new jira home>/import and go to admin -> backup and restore -> restore from xml

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events