From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,7d5de733cb396882 X-Google-Attributes: gidf7344,public X-Google-Thread: 115614,7d5de733cb396882 X-Google-Attributes: gid115614,public X-Google-Thread: 1164f8,7d5de733cb396882 X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1992-07-15 05:01:00 PST Xref: sparky comp.os.vms:12272 comp.sys.dec:4040 comp.unix.aix:7857 Newsgroups: comp.os.vms,comp.sys.dec,comp.unix.aix Path: sparky!uunet!sun-barr!ames!elroy.jpl.nasa.gov!nntp-server.caltech.edu!SOL1.GPS.CALTECH.EDU!CARL From: carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick) Subject: Re: Remote Backups: VMS->AIX Message-ID: <1992Jul15.172024.18409@cco.caltech.edu> Sender: news@cco.caltech.edu Nntp-Posting-Host: sol1.gps.caltech.edu Reply-To: carl@SOL1.GPS.CALTECH.EDU Organization: HST Wide Field/Planetary Camera References: <1992Jul15.163444.24269@fcom.cc.utah.edu> Date: Wed, 15 Jul 1992 17:20:24 GMT In article <1992Jul15.163444.24269@fcom.cc.utah.edu>, tdownard@victoria.utah.edu (Tammy L Downard) writes: >I am attempting to back up a VAX/VMS filesystem over the network to a tape >drive on an RS6000. I have been unable to find a way of accessing a remote >tape device using BACKUP. Does anyone know of a way to do this? Any help >would be appreciated. Create a DECnet object (I call it NETBACKUP on my system) pointing to the executable created from the following program. Then do the backup to NODE::"0=NETBACKUP". Note: You'll have to change MUA0 to the name of the appropriate tape drive on your system. #include iodef #include descrip #include stdio #include mntdef #include dmtdef long STAT; #define ckstat(x) if(((STAT = (x)) & 7) != 1) MY_EXIT(STAT, fd) test() { long blksiz; long flags = MNT$M_MESSAGE | MNT$M_OVR_IDENT; struct { unsigned short buflen, itmcod; unsigned long bufadr, retadr; } itmlst[] = { { 4, MNT$_BLOCKSIZE, &blksiz, 0 }, { 4, MNT$_DEVNAM, "MUA0", 0 }, { 4, MNT$_FLAGS, &flags, 0 }, { 0, 0, 0, 0 } }; $DESCRIPTOR(devnam, "SYS$NET"); char buff[32767]; char tmp[512]; unsigned short chan; struct { unsigned short stat; unsigned long count; unsigned short fill; } iosb; FILE *fd; ckstat(SYS$ASSIGN(&devnam, &chan, 0, 0)); ckstat(SYS$QIOW(0, chan, IO$_READVBLK, &iosb, 0, 0, buff, 32767, 0, 0, 0, 0)); ckstat(iosb.stat); sprintf(tmp, "mrs=%d", iosb.count); blksiz = iosb.count; ckstat(SYS$MOUNT(itmlst)); if((fd = fopen("MUA0:NETBACKUP.SAV", "w", "rfm=fix", tmp)) == 0) SYS$EXIT(1); while(1==1) { write(fileno(fd), buff, iosb.count); ckstat(SYS$QIOW(0, chan, IO$_READVBLK, &iosb, 0, 0, buff, 32767, 0, 0, 0, 0)); ckstat(iosb.stat); } }; MY_EXIT(stat, fd) long stat; FILE fd; { $DESCRIPTOR(devnam, "MUA0"); fclose(fd); SYS$DISMOU(&devnam, DMT$M_NOUNLOAD); SYS$EXIT(stat); } -------------------------------------------------------------------------------- Carl J Lydick | INTERnet: CARL@SOL1.GPS.CALTECH.EDU | NSI/HEPnet: SOL1::CARL Disclaimer: Hey, I understand VAXen and VMS. That's what I get paid for. My understanding of astronomy is purely at the amateur level (or below). So unless what I'm saying is directly related to VAX/VMS, don't hold me or my organization responsible for it. If it IS related to VAX/VMS, you can try to hold me responsible for it, but my organization had nothing to do with it.