> I have a 486 running FreeBSD 2.1.5 which has no tape device. I
> would like to back up this machine via the network to my Sparcstation
> running Solaris 2.5.
> DUMP: Protocol to remote tape server botched (code "rmt: Command not
4.4BSD made one big mistake wrt. to all this remote dump stuff.
According to the new filesystem layout, they moved out the old rmt(8)
utility from its traditional place under /etc to the new location
under /usr/sbin. That's ok.
However, they now noticed the dilemma: /sbin/rdump needs to reference
rmt(8) on the _remote_ machine. The path used to be hardcoded as
/etc/rmt there, but this was now no longer appropriate for a 4.4BSD
machine. Moving this path to /usr/sbin/rmt would have broken remote
dumping to other systems though. Hence they made the `wise'
decisision to no longer encode any path there, in the hope the remote
side would successfully lookup the name along $PATH. As you can see,
it often doesn't.
FreeBSD has now finally reverted everything as it ought to be, in the
understanding that the (undocumented but historic) rmt protocol can
only work by using /etc/rmt. Any system must be expected to symlink
its real rmt(8) into /etc.
However, this change on the side of dump(8) has only been made in
2.2-current, not in the 2.1.x branch. The patch is fairly simple
though. The second diff below allows to override the remote side's
rmt(8) location from the env variable RMT.
--- pathnames.h 1994/05/26 06:34:03 1.1
#define _PATH_LOCK "/tmp/dumplockXXXXXX"
-#define _PATH_RMT "rmt"
+#define _PATH_RMT "/etc/rmt"
RCS file: /home/cvs/src/sbin/dump/dumprmt.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -u -r1.1 -r1.2
--- dumprmt.c 1994/05/26 06:34:04 1.1
register char *cp;
+ register const char *rmt;
static struct servent *sp = NULL;
static struct passwd *pwd = NULL;
rmtpeer = ++cp;
tuser = pwd->pw_name;
+ if ((rmt = getenv("RMT")) == NULL)
+ rmt = _PATH_RMT;
rmtape = rcmd(&rmtpeer, (u_short)sp->s_port, pwd->pw_name, tuser,
- _PATH_RMT, (int *)0);
+ rmt, (int *)0);
size = ntrec * TP_BSIZE;
if (size > 60 * 1024) /* XXX */
Never trust an operating system you don't have sources for. ;-)