Operating System - OpenVMS
1752623 Members
4115 Online
108788 Solutions
New Discussion юеВ

How to modify a backup save set

 
SOLVED
Go to solution
Wim Van den Wyngaert
Honored Contributor

How to modify a backup save set

To test the backup utility, I would like to see how it reacts when there is a data corruption. After modifying 1 character with TPU and doing set file/at=rfm=fix, backup/list reports an empty save set (no errors). But the contents of the file is not exactly the same because tpu reorganized it.

How can I modify only 1 character (no program writing please) ?

How is backup reacting when there is a error caused by a corruption (crc check fail, should recalculate based upon /group=10) ? T.i. which messages are given (I didn't find any with help/mes backup) ?

Wim
Wim
11 REPLIES 11
Karl Rohwedder
Honored Contributor

Re: How to modify a backup save set

There is a 'Virual File Editor' VFE availale (check comp.os.vms using Google), which can be used to block-edit a file preserving its attributes.
Karl Rohwedder
Honored Contributor
Solution

Re: How to modify a backup save set

Sorry for replying to myself:

On the latest freeware CD is a utility called DIX, a screen oriented edit utility for binary files, may be you can use that one.
Wim Van den Wyngaert
Honored Contributor

Re: How to modify a backup save set

I modified lots of characters of the data and got the message (while doing backup)
"1 error recovered by redundancy group".

When I modified too much I got the message
"block iof x.sav lost due to unrecoverable error" and "software header CRC error".

I am however impressed by the amount of data I could change. But wonder what the format is.

Wim

Wim
Jan van den Ende
Honored Contributor

Re: How to modify a backup save set

Wim,

I don't have an answer about your editting, but maybe I can answer your underlying question.
Back in the time of DSA devices, before SCSI, the tape units WOULD give you any data behind an error, be it parity or CRC.

Tapes used to be relatively expensive, an you needed A LOT of them, so as long as they were usable they WERE used.

If BACKUP encountered tape errors (be it on reding OR ON WRITING (with verify), the whole operation finished nicely, with a final message:
nnnnn RECOVERABLE ERRORS.

Back in 1990 I worked at a site that did have IBM, Bull, and VMS. They had (long since) discovered, that tapes refused by IBM and Bull functioned quite happily on VMS, so we ONLY got the old tapes. Most of them showed (not always) RECOVERABLE ERRORS.

I even introduced a schema to 'clean out' the worst ones: each backup report had to be specifically checked for the errors, and as soon as the number reached THREE digits, the saveset was still OK, but the tape was marked for replacement, and the next time it was due for overwriting, it was destroted and replaced.

If you get REALLY many errors, BACKUP will take longer, and use (much) more CPU, but that is all there is to it.

Now we "only" have to convince the SCSI device and/or driver builders that we DO have an interest in any data past a parity error....


hth


Jan
Don't rust yours pelled jacker to fine doll missed aches.
Wim Van den Wyngaert
Honored Contributor

Re: How to modify a backup save set

Jan,

I checked all log files of all backup and found no "recoverable" errors. I guess the drives are handling it. They must be because some frequently used Unix tools don't have any built-in raid.

DEC should have made more publicity of this feature.

Wim
Wim
Ian Miller.
Honored Contributor

Re: How to modify a backup save set

PATCH/ABSOLUTE is a binary file editor available on all VMS systems and works on data files just fine. TECO can also be used to edit binary files.

I don't know how DLT (which most of my backups use) drives react to unreadable tapes. I have had reason to be greatful to BACKUP's abilties with 10+ year old mag tapes.
____________________
Purely Personal Opinion
Wim Van den Wyngaert
Honored Contributor

Re: How to modify a backup save set

Ian,

Patch is VAX only or is it freeware ?

In any case, DIX works fine.

But if you don't have the "recover" messages, I think it was the drive that did all the corrections.

Wim
Wim
Ian Miller.
Honored Contributor

Re: How to modify a backup save set

for information on the VMS backup file format you may be interested in this partial implementation of VMSBACKUP.
ftp://ftp.lp.se/free-vms/
____________________
Purely Personal Opinion
Hein van den Heuvel
Honored Contributor

Re: How to modify a backup save set

On the VMS Freeware under RMS_TOOLS I have a little (Macro) program called ZAP.
It is intended to help you repair INDEXED files, and has some (minimal) smarts to format buckets to support that.

However, it will happily change any file, including backup savesets.

The ZAP tools works by reading a select 'bucket' into memory.
You then manipulate the data in the buffer with the debugger (giving support for date, float, and so on).
Finally write back the changed buffer.



>>> How can I modify only 1 character (no program writing please) ?

Is a dcl script a program? :-)
The following is based on my 'fix_saveset.com':

$IF p1.EQS."" THEN INQUIRE p1 "Save set file name ?"
$IF f$search(p1).EQS."" THEN EXIT
$
$vbn = 12
$byte = 34
$value = 56
$
$save_lrl = f$file(p1,"LRL")
$save_mrs = f$file(p1,"MRS")
$save_rfm = f$file(p1,"RFM")
$WRITE SYS$OUTPUT " RFM was ", save_rfm, -
", MRS = ", save_mrs, ", LRL = ", save_lrl, "."
$SET FILE /ATTR=(RFM=FIX, MRS=512, LRL=512) 'p1 ! Easier for DCL
$
$OPEN/READ/WRITE file 'p1
$int_as_string[0,32] = vbn
$READ/KEY=&int_as_string file record
$WRITE SYS$OUTPUT "byte value was : ", f$cvsi(byte*8,8,record)
$record[byte*8,8]=value
$WRITE/UPDATE/SYMBOL file record
$CLOSE file
$SET FILE /ATTR=(RFM='save_rfm', MRS='save_mrs', LRL='save_lrl') 'p1


fwiw,
Hein.