Everybody who replied suggested that I should redirect the input & output
of the dump command.
ballisti@ifh.ee.ethz.ch also send me two script file to do the backup.
Kevin.Sheehan@uniq.com.au also suggested patching the kernel so that it
will recognize the tape drive.
I decide to patch the kernel to solve the problem once and for all, the
files to patch are /sys/scsi/targets/st_conf.c and
/sys/scsi/targets/stdef.h.
I decided to patch the kernel because the default tape drive definition
will not run in buffered mode.
With the patched kernel, there are no more warning messages and all my
backup job can run off cron ( which does mail the stdout output to me,
but for some reason, does not catch the warning message )
many thanks to the following for replying.
Kevin.Sheehan@uniq.com.au
ballisti@ifh.ee.ethz.ch
sdr@rdga3.att.com
raoul@MIT.EDU
rjcronin@uop.com
Mark.Hickey@ov.com
sunrise!don@rambone.psi.net
-wai
-- the Original question is as follows --
>
> I am trying to use cron to back up my filesystem at night to a
> old Tandberg QIC tape drive ( using dump and tar ).
>
> The problem is that dump or tar will fail if I run them from
> cron, the message given by dump is something about unable to write to
> "/dev/tty"
>
> However, if I run dump or tar from the console, the operation will
> succeed, although I will get the following warning on the console
>
> Jan 18 08:59:46 prang vmunix: st0:Generic Drive, Vendor=<TANDBERG>
> Jan 18 08:59:46 prang vmunix: Unknown type- assuming 0.25 inch cartridge
> Jan 18 08:59:46 prang vmunix: Fixed record length (512 byte blocks) I/O
>
> If I do the first backup after the system boot from the console, all
> the subsequent backup run by cron will work.
>
> Since I would like to automate the backup process as much as possible, I
> would like to know is there any work-around for this problem ??
>
> The system is a SS10 running 4.1.3
>
> Thanks
>
> -wai
>
>
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:10:14 CDT