Forums

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

Reindex after DB restore

Flavio Beck
Contributor
November 9, 2021

Hello.

 

I have created test instances many times along last years, basically like this guide

https://confluence.atlassian.com/adminjiraserver/restoring-information-from-a-native-backup-938847709.html

 

after restore all data (home and db) jira was used to start normally (like production) and reindex was not required.

 

This week I tried this, but jira is starting without any indexed issue.

JIRA

- jira prodution (7.10) is running as docker container.

backup and restore is just a rsync from jira_home directory

- database (postgres 9.5) docker container

I tried use pg_dump   and also pg_dumpall -> same result (no indexed issues)

 

Test:

I connected test instance to production DB and it worked perfectly (all issues found without reindex)

but

connecting test instance to a restored db (test) does not work, (no issues found)

 

any idea?

could be related to this workaround done?

https://jira.atlassian.com/browse/JRASERVER-63002

 

 

2 answers

1 accepted

1 vote
Answer accepted
Flavio Beck
Contributor
November 12, 2021

I've found the problem.

I use rsync to copy the home directory  (from production to test env), for some reason when running rsync while production is up, when I start the test server It identifies "file not found" in cache directory and clean up all indexes, so it requires re-index from scratch.

but,  running rsync after stop the production server, the test server starts with all indexes working fine. (reindex is not required)

 

It make sense, but I have done this many times along last years without stop production, and never lost index files before... 

 

anyway, it is solved.

thanks

0 votes
Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 10, 2021

Hi @Flavio Beck ,

Are issues not visible just using filters? If yes, run a reindex. My suggestion is to perform a reindexing from scratch (manually delete index folder from the server) because the process is quicker.

Regrads,

Fabio

Flavio Beck
Contributor
November 10, 2021

yes, reindex fix the problem, but I was really trying to understand what happened.

Today I cloned the DB VM and I connected the Jira (test) to this DB, and again, there are no indexed issues.

I mean, if I go to search, there is no results (it should have more than 2 millions issues)

If I index any project, so I can see that in search results.

 

But note this scenario..

DB -> it is a clone VM from production

JIRA - >  it runs as docker container in production (and for test as well), and I copied the home directory from production volume (it is the docker persistency volume). 

Same docker image of production.

 

it is the similar if I was trying to recreate the production container and lost the index.

(same DB and same persisted home volume)

it does not make sense to lost the index.

Suggest an answer

Log in or Sign up to answer