Operating System - OpenVMS
1748183 Members
3552 Online
108759 Solutions
New Discussion

Re: backup/compare - openvms 8.2-1

 
SOLVED
Go to solution
tl123
Occasional Advisor

backup/compare - openvms 8.2-1

Hi, I support the software on a system running Itanium servers on VMS8.2-1. My system is written mostly in Pascal with a number of .COM files. The files are stored in a hierarchical structure - master directory -> sub directories -> pascal/com files. The master directory being [source].

 

When we install a new software release, there is an automated process to cut a backup tape containing a saveset of the latest software -

 

$ backup/ver [source...]*.* tape:abc.bck/sav

 

What I would like to do is compare the tape contents with what is in my development area. I tried:

 

$ sd [source]

$ backup/compare tape:abc.bck [...]

 

This comes up with no errors as I guess backup is only comparing disk files with the same version on the tape. these have not changed - the changes have higher version numbers. I want to compare the latest version of the file on tape with the latest version of the file on disk. EG on tape I have:

 

xxx.pas;5

yyy.pas;9

 

On disk I have modified yyy.pas so the disk contains

 

xxx.pas;5

yyy.pas;9

yyy.pas;10

 

I know that the 2 copies of yyy.pas;9 are the same but I want to compare the latest versions (ie. ;9 on tape and ;10 on disk). Is there a qualifier to tell backup to look only at the latest version on tape and disk?

 

Thanks

 

12 REPLIES 12
Eberhard Heuser
Frequent Advisor

Re: backup/compare - openvms 8.2-1

One of those tricks that helps me:

 

x.y. selects the file x.y with the highest version number.

 

eberhard

Steven Schweda
Honored Contributor

Re: backup/compare - openvms 8.2-1

 
Bob Blunt
Respected Contributor

Re: backup/compare - openvms 8.2-1


I'm not clear what you want to fix or change here.  Does this not work:

> "$ backup/ver [source...]*.* tape:abc.bck/sav" ?

> "What I would like to do is compare the tape contents with what is in my development area. I tried:"

You ARE "comparing" the files you just put on tape to what is on the disk, "immediately" during the processing of the backup command.  Compare "just" lets you make the second pass to check the tape against the disk contents "later."

> $ sd [source]

> $ backup/compare tape:abc.bck [...]

> This comes up with no errors as I guess backup is only comparing disk files with the same version on > the tape. these have not changed - the changes have higher version numbers. I want to compare the     > latest version of the file on tape with the latest version of the file on disk. EG on tape I have:

> xxx.pas;5

> yyy.pas;9

> On disk I have modified yyy.pas so the disk contains

> xxx.pas;5

> yyy.pas;9

> yyy.pas;10

> I know that the 2 copies of yyy.pas;9 are the same but I want to compare the latest versions (ie. ;9 on    > tape and ;10 on disk). Is there a qualifier to tell backup to look only at the latest version on tape and      > disk?

Um, I don't think so...  BACKUP is, usually, going to try to compare the SAME files.  In other words, IMHO, you're trying to make backup do something that may not work.  You'd have to really dig into the innards of backup but in most cases what you "see" presented in the listings as being "in" a saveset is just for our benefit and the actual work done to record the file to tape is done using the file ID.  If, when you make the tape, you use disk:[source]*.*;0 as your source (backup disk:[source]*.*;0 tape:abc.sav/save) then backup will record the highest version.  BUT when you take the same tape later and try to compare the saveset containing [source]yyy.pas;9 *I* think it will look on disk for [source]yyy.pas;9 no matter what you do.  In essence "backup/compare abc.sav/save disk:[source]yyy.pas;0" will still compare yyy.pas;9 in the saveset to [source]yyy.pas;9 on disk.  You might try:

backup/select=(yyy.pas;9)/compare tape:abc.sav/save disk:[source]yyy.pas;10

but you won't have the benefit of "automatically" selecting the highest versions without A) knowing which files to force backup to compare and B) manually telling backup exactly what you want to compare.  IMHO this isn't really backup's intended purpose in life and other utilities might be better (like the DIFF utility).  You might also use some other qualifiers in your backup string to see if you're getting what you think you're getting.  Investigate using "/full" for instance...

bob


B Claremont
Frequent Advisor

Re: backup/compare - openvms 8.2-1

To actually compare the contents of a file in a backup save set on tape to the contents of a file on disk, you are going to need to restore the file on tape to disk.  Create a temporary directory on disk, pull the files you want off the tape, and use the DIFFERENCE command to run compares.

www.MigrationSpecialties.com
Steven Schweda
Honored Contributor

Re: backup/compare - openvms 8.2-1

 
Steven Schweda
Honored Contributor

Re: backup/compare - openvms 8.2-1

 
Bob Blunt
Respected Contributor

Re: backup/compare - openvms 8.2-1

Yes, BACKUP used in this manner will compare the highest version on disk to the versions you saved to a TAPE saveset in a previous operation without restoring to disk.

 

$ mount/for mka0:
%MOUNT-I-MOUNTED, TEST mounted on _CRLRFR$MKA0:
$ backup/rewind/verify/log dke100:[test]*.*;0 mka0:test.sav/save/ignore=label
%BACKUP-S-COPIED, copied DKE100:[TEST]SPAWN.MAR;1
%BACKUP-S-COPIED, copied DKE100:[TEST]TECO.MAR;1
%BACKUP-I-STARTVERIFY, starting verification pass at 26-JUL-2012 12:15:23.70
%BACKUP-S-COMPARED, compared DKE100:[TEST]SPAWN.MAR;1
%BACKUP-S-COMPARED, compared DKE100:[TEST]TECO.MAR;1
$ backup/rewind/COMPARE/log mka0:test.sav/save dke100:[test]*.*;0
%BACKUP-S-COMPARED, compared DKE100:[TEST]SPAWN.MAR;1
%BACKUP-S-COMPARED, compared DKE100:[TEST]TECO.MAR;1
$ edi/edt/nocommand dke100:[test]teco.mar
    1           .TITLE  TECO    VAX-11 TECO
*i ; New version for testing
    1           .TITLE  TECO    VAX-11 TECO
*exit
DKE100:[TEST]TECO.MAR;2 3614 lines
$ diff/par teco.mar ;-1
%DIFF-F-OPENIN, error opening SYS$COMMON:[SYSMGR]TECO.MAR; as input
-RMS-E-FNF, file not found
$ diff/par dke100:[test]teco.mar ;-1
-------------------------------------------------------------------------------
File DKE100:[TEST]TECO.MAR;2           |  File DKE100:[TEST]TECO.MAR;1
------------------- 1 ------------------------------------- 1 -----------------
 New version for testing               |
-------------------------------------------------------------------------------

Number of difference sections found: 1
Number of difference records found: 1

DIFFERENCES /IGNORE=()/PARALLEL-
    DKE100:[TEST]TECO.MAR;2-
    DKE100:[TEST]TECO.MAR;1
$ backup/rewind/COMPARE/log/full mka0:test.sav/save dke100:[test]*.*;0
%BACKUP-S-COMPARED, compared DKE100:[TEST]SPAWN.MAR;1
%BACKUP-E-VERIFYERR, verification error for block 1 of DKE100:[TEST]TECO.MAR;2
.

.

.

%BACKUP-E-VERIFYERR, verification error for block 247 of DKE100:[TEST]TECO.MAR;2
%BACKUP-S-COMPARED, compared DKE100:[TEST]TECO.MAR;2
$

 

The following compares only the selected file in the tape saveset to the highest version on disk:

 

$ backup/rew/compare/select=(teco.mar)/log mka0:test.sav/save dke100:[test]*.*;0
%BACKUP-E-VERIFYERR, verification error for block 1 of DKE100:[TEST]TECO.MAR;2
.

.

.

%BACKUP-E-VERIFYERR, verification error for block 247 of DKE100:[TEST]TECO.MAR;2
%BACKUP-S-COMPARED, compared DKE100:[TEST]TECO.MAR;2
$

 

John Gillings
Honored Contributor
Solution

Re: backup/compare - openvms 8.2-1

My worry with this question is it involves processing tape. I'd prefer a world without tape. I will concede that they're sometimes a necessary evil, but I draw the line at involving them in day to day processing! By all means write a bunch of files to tape (with verify), but to then read it back other than t restore is a waste of time and eats into the limited working life of the tape and the drive.

 

I'd recommend you have an area of disk set aside as your "stable" version of code. That is where you take your backup from, and you take a backup at any time there is a modification. Think of it as a cached copy of your backup tape. Make it read only to avoid accidental changes. Given this is your source code (text) how big can it be? How many cents will the extra storage be worth?

 

This then makes your issue of comparing the working copies with the backup copies much simpler and much faster, as all you need do is compare the two disks. It also means you have immediate access to the backups, reserving the tapes the tape for in-extremis situations (and freeing it up to be sent off site).  

A crucible of informative mistakes
tl123
Occasional Advisor

Re: backup/compare - openvms 8.2-1

thanks for the discussion and suggestions everybody. It looks like the way the software is currently stored rules out using backup to compare the files.

 

The solutions are therefore to maintain a production software tree and compare use DIFF to compare to the development tree or to backup the most recent version of each file when a release is finalised.

 

Just read John's response. Storing a stable copy of the software is a simple use of disk space but using tape means modifications to current procedures which is unnecessary so I plan to go down the disk path