replacing index files with backups

jkj2001
Posts: 142
Joined: Fri Mar 29, 2002 1:39 pm

replacing index files with backups

Post by jkj2001 »

Hi,

We have a copy of our index files from last night in another location, and need to overwrite one of today's indexes with its day-old twin-- long story short, we were running a tsql "create index" command and had to kill it partway through for a variety of reasons.

Now, we've got an entry in SYSINDEX for that index, the usual index files (indexname.btr .tok, etc) and a lot of T00<<XYZ>> files. We'd like to overwrite the files with what we had from last night (slightly out of index, but oh well) and were wondering the best way to go about doing it, which files to delete and copy over, any system tables to watch out for, etc?

Thanks for any and all help, we're using your Solaris product, version 4.04.1067329099
jkj2001
Posts: 142
Joined: Fri Mar 29, 2002 1:39 pm

replacing index files with backups

Post by jkj2001 »

Slight correction; when I say "any system tables to watch out for" I'm referring to system table *entries*. We're not going to overwrite the system tables themselves.
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

replacing index files with backups

Post by mark »

You can delete all of the associated T files and files with the prefix of the indexname (indexname*). Then bring all files with the index prefix (indexname*) over from backup.
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

replacing index files with backups

Post by mark »

And you'll need to completely recreate that index at some point to get it properly sync'd with the table that may have changed since the backup.

If you want to avoid having no index you can create a new index with a different name. Then when it's complete drop the old one.
jkj2001
Posts: 142
Joined: Fri Mar 29, 2002 1:39 pm

replacing index files with backups

Post by jkj2001 »

Thanks for the tip.

I'm not sure I've done it 100% correctly-- I mean, I deleted the old files (T files and indexname*), then copied in the new ones. However, when I run a search on the field in question, it feels like it's linear. Slow.

So, I figured what the heck, and I ran my tsql "create index..." statement again, expecting it to tell me the index is already there, but what I got was a message saying the index is the index is "already being created", like it's still in-progress. Could that be affecting me here, and should I try something?

Thanks again for the help, I know this isn't 100% Thunderstone reccomended activity.
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

replacing index files with backups

Post by John »

What is the SYSINDEX entry for that NAME? Is is a METAMORPH or METAMORPH INVERTED INDEX? They TYPE field will indicate the type of index. The page at http://www.thunderstone.com/texis/site/ ... ables.html describes the types and what they mean. Had you dropped the index before the aborted create?
John Turnbull
Thunderstone Software
jkj2001
Posts: 142
Joined: Fri Mar 29, 2002 1:39 pm

replacing index files with backups

Post by jkj2001 »

It's a metamorph inverted index. I didn't drop the index before the aborted create. Instead, I tried creating it again after copying the backups over and unsuccessfully running a search, to see the message I'd get on screen.
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

replacing index files with backups

Post by mark »

The SYSINDEX entry probably has a lowercase letter for TYPE, change it to uppercase for it to be considered live instead of new-in-progress.
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

replacing index files with backups

Post by John »

EDITING SYSINDEX DIRECTLY IS NOT SUPPORTED.

What is the TYPE field for the SYSINDEX entry? Is there an entry? If you update the one with the NAME and FNAME being the name of your index to 'F' then Texis should recognize it.
John Turnbull
Thunderstone Software
jkj2001
Posts: 142
Joined: Fri Mar 29, 2002 1:39 pm

replacing index files with backups

Post by jkj2001 »

I'll try that-- thanks guys.

I know this advice is unsupported, no warranties implied, etc etc. Believe me, I don't like this anymore than you do! ;)
Post Reply