From: CSBVAX::MRGATE!RELAY-INFO-VAX@CRVAX.SRI.COM@SMTP 5-AUG-1988 23:14 To: ARISIA::EVERHART Subj: NEWS Posting (to Newsgroup Moderator) Received: From KL.SRI.COM by CRVAX.SRI.COM with TCP; Thu, 4 AUG 88 22:43:26 PDT Received: from uunet.UU.NET by KL.SRI.COM with TCP; Wed, 3 Aug 88 13:02:32 PDT Received: from munnari.UUCP by uunet.UU.NET (5.59/1.14) with UUCP id AA09498; Wed, 3 Aug 88 14:00:39 EDT Message-Id: <8808031800.AA09498@uunet.UU.NET> Received: from ditmelb.oz by munnari.oz (5.5) id AA21215; Thu, 4 Aug 88 02:25:27 EST (from JOHNM@VAXC.CC.MONASH.EDU.AU for uunet!info-vax@kl.sri.COM) Received: from vaxc.cc.monash.edu.au by ditmelb.oz.au; Thu, 4 Aug 88 02:24 +1000 Date: Thu, 4 Aug 88 02:20 +1000 From: John Mann Subject: NEWS Posting (to Newsgroup Moderator) To: info-vax@kl.sri.COM X-Vms-To: in%"info-vax@kl.sri.com",JOHNM Path: vaxc!johnm From: johnm@vaxc.cc.monash.edu.au Newsgroups: comp.os.vms Subject: Re: VMS backup format Message-ID: <61@vaxc.cc.monash.edu.au> Date: 4 Aug 88 02:20:39 GMT References: <775@nmtsun.nmt.edu> Organization: Computer Centre, Monash University, Australia Lines: 90 In article <775@nmtsun.nmt.edu> hydrovax@nmtsun.nmt.edu (M. Warner Losh) writes: >I just pulled a program called from the archives called vmsbackup. It >was supposed to read vmsbackup tapes on a UNIX box. Ha! It doesn't >calculate the file sizes correctly for really big files. So, since >the source has very little in the way of documentation on what it is >doing, could someone please send me the format of a VMS-BACKUP save >set? I am running VMS 4.5. "vmsbackup" was originally written using the VMS V3.0 VAX-11 Utilities Reference Manual Appendix B "Backup Media Formats", and much experimentation. The author, John Carey, borrowed the copy on my bookshelf (name dropping :-). I don't think the format is described in more recent manuals. The description of the file format in the manual is incomplete, but a little experimentation (and reading of $XABFHCDEF) leads me to conclude that the EOF virtual block number is 32 bits long and is stored stored word swapped in the RMS record attributes field in the file. This suggests the following mod: *** vmsbackup.c_3.2 Fri May 22 10:41:37 1987 --- vmsbackup.c Wed Aug 3 23:54:08 1988 *************** *** 2,4 * ! * vmsbackup - version 3.2 - see README for more details * --- 2,4 ----- * ! * vmsbackup - version 3.3 - see README for more details * *************** *** 238,240 char *p, *q; ! short dsize, nblk, lnch; --- 238,240 ----- char *p, *q; ! unsigned short dsize, nblkh, nblk, lnch; *************** *** 300,301 #ifndef SWAP bcopy(&p[10], &nblk, sizeof(short)); --- 300,302 ----- #ifndef SWAP + bcopy(&p[8], &nblkh, sizeof(short)); bcopy(&p[10], &nblk, sizeof(short)); *************** *** 303,304 #else swap(&p[10], &nblk, sizeof(short)); --- 304,306 ----- #else + swap(&p[8], &nblkh, sizeof(short)); swap(&p[10], &nblk, sizeof(short)); *************** *** 306,308 #endif ! filesize = (nblk-1)*512 + lnch; #ifdef DEBUG --- 308,310 ----- #endif ! filesize = (nblkh*65536 + nblk-1)*512 + lnch; #ifdef DEBUG *************** *** 308,310 #ifdef DEBUG ! printf("nbk = %d, lnch = %d\n", nblk, lnch); printf("filesize = 0x%x\n", filesize); --- 310,312 ----- #ifdef DEBUG ! printf("nblkh = %d, nblk = %d, lnch = %d\n", nblkh, nblk, lnch); printf("filesize = 0x%x\n", filesize); >Many thanks for your time, >Warner Hope this helps, John Mann --- John Mann, Systems Programmer, Computer Centre, Monash Uni. VIC 3168, Australia Internet: johnm@vaxc.cc.monash.edu.au Phone: +61 3 565 4774 ACSnet: johnm@vaxc.cc.monash.oz