Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JIRA MySQL binary file restore!

scmenthusiast August 28, 2012

Hello!

We are trying to restore JIRA database by incrementaly using binary log files,

While importing binary files it throws below error. Can you please advise if any clues or suggestions.

Some Back ground:

JIRA issue [ SWTEST-8 ] was created on 2012/08/01
JIRA Issue [ SWTEST-8 ] was deleted on 2012/08/01 21:10:00


We are trying to recover through MySQL latest binary log file as of 2012/08/01.

$ mysql -h localhost -u root -p jiradb < jiradb_2012-08-01_01h00m.Wednesday.sql

$ mysqlbinlog binlog.000064 --start-datetime='2012-08-01 01:00:00' --stop-datetime='2012-08-01 20:59:00' --database='jiradb' | mysql -h localhost -uroot -p jiradb

Enter password:

ERROR 1032 (HY000) at line 4493: Can't find record in 'cwd_user_attributes'

5 answers

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.
August 28, 2012

Ahh, good.

I'm a bit stuck on why it's asking you for a password from the CWD tables though - surely a restoration of a backup doesn't need an application password?

0 votes
scmenthusiast August 28, 2012

We are performing incremental restore on test environment! Once restore is done planning to re-create a JIRA issue on production by copying issue data from test environment.

While doing incremental restore it throws an error Can’t find record in table. just thought of checking if any clues or advices.

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.
August 28, 2012

Actually, you are doing the right thing in recreating the database as it was shortly before the delete, but you need to do it in a separate database instance to begin with, then you need to extract the data from the temporary database. Personally, I wouldn't actually bother to try to run a Jira against the temporary recovery database, I'd use SQL to drag the details out and re-enter the necessary information in the Live Jira (with a load of comments to indicate why the dates are off etc)

0 votes
scmenthusiast August 28, 2012

Thanks Nic for update. Can you please help us if any other way we can recover the deleted jira issue (though its created on same day) with previous day backup?

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.
August 28, 2012

I'm not exactly sure what you're trying to achieve here (get the issue SWTEST-8 back?) but it sounds like incremental recovery probably isn't the way to do it. (And I do hope you're doing it in a copy of the database, not the main one)

It looks like the user you're trying to use didn't exist at the time that you've recovered the data to though

scmenthusiast August 28, 2012

Thanks Nic for update. Can you please help us if any way we can recover the deleted jira issue on same day beside using mysql binlogs?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events