Restoring with no Revmedia (AREV Specific)
At 21 DEC 2006 08:02:39AM C Mansutti wrote:
Clients are clever aren't they.
You tell them to back up - you put on back up routines. Then when the Hard drive crashes and they haven't backed up for a year - it's your fault.
Anyway - can someone confirm/deny my assumptions.
Hard drive crashed
Data recovered by specialist recovery firm.
Lots of Rev files - looks like all the ones I need for the data.
However, no Revmedia for that folder.
The year old backup has a revmedia on it.
If I copy the restored rev files on top of the year old backup and try and open any table I get header/readnext gfe.
Is it a fair assumption that they are FUBAR?
Is it a fair procedure to overwrite the rev files, providing that the revmedia still points to the same file names (no new indexes were created over the year) or does the revmedia do more than just point?
Answers on a Christmas card….
TIA
Claude
At 21 DEC 2006 11:57AM Victor Engel wrote:
The REVMEDIA is just a pointer in most cases. It also contains MFS information, but that likely wouldn't change either.
If your REVMEDIA is out of sync, you can make dummy records in order to inspect the data. Suppose, for example, a directory listing of the restored directory showed a file named REV67890.LK but a LISTMEDIA/LISTVOLUME command on that volume did not show such a filename. You could add one manually.
Attach the REVMEDIA file:
ATTACH volumename REVMEDIA if you are logged to the SYSPROG account. If you are logged to an account other than SYSPROG, you will need to set a qfile to it.
EDIT REVMEDIA DUMMY*account_name
On the first line, enter REV67890 and save.
Now you can attach the DUMMY file. Inspect it, and you can probably determine what the file really is. Do the same thing, using the real name instead of DUMMY. Now you have the REVMEDIA file updated to point to the DOS file.
Before doing any of this, if you don't know how the REVMEDIA file works, read up on it first to make sure you understand it all.
At 21 DEC 2006 12:26PM Warren Auyong wrote:
The REVxxxxx should not change unless you recreated the file for some reason (deleted, resized, whatever). Index files shouldn't change either unless you remove the index and put it back on. Adding an index to an already indexed file should not change the REV no. of the !file.
Of course any files added since the backup will not be in the revmedia file, you would have to add an entry into the revmedia file for these. You should also increment the counter in the REVMEDIA record (I think that's the id)
That said, using and old REVMEDIA file is possible, if a file had been renumbered due to the above then you will get an error. The other possibility is that the pointers could somehow have gotten out of sync so that a dictionary pointer is linked to a datafile or a datafile points to the wrong file (AP file is pointing to CUSTOMER data). This shouldn't happen unless there was a massive change for some reason (or you restored the revmedia file from the wrong volume).
Do a LISTMEDIA on the volume in question and compare the REV numbers to a list of REV files in the folder. It should be obvious from that if things are way out of whack.
If you post an email address, I can send you a copy of my "CLEAN-ACCOUNT" utility which will check the REVMEDIA file and the associated folder and will flag REVMEDIA entries that have no associated DOS (REVxxxxx) file and DOS files that have no REVMEDIA entries.