From: carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick)
Subject: Re: Remote Backups: VMS->AIX
Date: Wed, 15 Jul 1992 17:20:24 GMT [thread overview]
Message-ID: <1992Jul15.172024.18409@cco.caltech.edu> (raw)
In-Reply-To: 1992Jul15.163444.24269@fcom.cc.utah.edu
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.
next prev parent reply other threads:[~1992-07-15 17:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1992-07-15 16:34 Remote Backups: VMS->AIX Tammy L Downard
1992-07-15 17:20 ` Carl J Lydick [this message]
1992-07-16 14:17 ` Dan Watts
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox