Restoring database (MS SQL 2008) back to what it was after installation to start from scratch...

Sam Alexander November 3, 2011

A few days ago I installed Jira on Windows Server 2008 and MS SQL Server 2008 then immediately did a backup. I then started running some test imports and basically just experimented with the system. Now I'm ready to start over and hopefully do a clean import of our task data, but when I restored the backup I made after the initial install it still shows all the users, projects, etc. I tried reindexing the cache thinking that could be it, but the reindex gives a java error.

So how can I basically start over? Is there a way to clear out the cache completely so it can rebuild it from scratch? Or do I have to uninstall and reinstall? I can't imagine that's the only way, but please advise.

Thanks.

Sam Alexander

1 answer

0 votes
Nic Brough -Adaptavist-
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 3, 2011

There's a significant difference between a "cache" and an "index". Jira actually has a number of caches, mostly in memory, but you have no direct control over them. Not that you really care - most of them are cleared simply by stopping and restarting it. There is some persistent caching done in application servers, but it's rare that you need to think about them.

The index is a different matter - that's a slab of files on the disk. You really do need that to work properly, because Jira won't really work at all without it.

The good news is that clicking "re index" always fixes the index. This is because it effectively drops the entire thing and rebuilds it from the data in the database from a completely clean start.

The bad news is that if clicking "reindex" doesn't fix your cache, you've propably got quite a serious problem. Your java error may tell us what the problem is.

If you really do want to forcibly clean the index, then stop Jira, delete (recursively) all the files under the "index" directory in "jira home", and restart it and click re-index again. I've never found this fixes anything better than the plain "re-index", but you did ask ;-)

Sam Alexander November 3, 2011

Thanks for the info... I guess I should've done the databsae restore while the service was stopped because I just stopped and restarted the service without deleting anything on the filesystem, and now it's working fine. All the test data I imported in along with users, projects, etc are now gone. So I should be good.

Take care,

Sam

Suggest an answer

Log in or Sign up to answer