🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.sysadmin
Article #1310

Problem using 'dump' from cron

#1310
From: Steen H Hviid
Date: Thu, 12 Nov 1992 19:06
49 lines
2289 bytes
Thanks for all the responses on my plead for help on getting the cron to run my
backup script using the dump command.


It turned out to be very simple, I just needed to supply the full path to the
dump command, i.e. /etc/dump, I ought to have though of that.

My other problem with not being able to redirect the output from the dump 
command to a file was solved by doing the redirection in the entry in the 
/etc/crontab,
as in:

0 23 * * 1-5   root   /usr/local/bin/daily.backup  >/tmp/backup.last 2>&2
 
why that worked while I couldn't do redirect on the dump command itself, is
strange, but the above suits me fine.

Some responses wondered whether my dump parameters were ok, specifically that I
didn't specify the filesystem parameter. The manpages states which fileystem
is the default (/dev/rsd0a) under the FILES header.

The working 'dump' command is thus after several experiments:

/etc/dump 0fsd /dev/rst0 2750 640000

By the way, I am using an HP6400/2000 DAT drive, which is device /dev/rst0 

Original message:

>Hi Everybody,

>I have a problem, my script works absolutely fine when run interactively, and
>even in the background using nohup, but it fails when run by cron (as root).  

>It tells me that 'dump' terminated with error code 1.

>Also, I wanted to redirect the output from the dump command into a file, 
>which I would have the script mail to me if anything went wrong, but it doesn't
>like that either. If I redirect standard output, nothing appears there, if I 
>redirect error output, it complains about ambiguos redirection.
>I have tried in the crontab entry to redirect the output of the script to both
>a file and null with to no avail. 


Thanks for the responses

Steen
Computer Specialist
The Ohio State University
Technical Details
Message-ID: <1992Nov12.190607.23398@magnus.acs.ohio-state.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!caen!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!shviid

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.sysadmin
Path: arc1-ca.pugleaf.net!sparky!uunet!caen!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!shviid
From: shviid@magnus.acs.ohio-state.edu (Steen H Hviid)
Subject: Problem using 'dump' from cron
Message-ID: <1992Nov12.190607.23398@magnus.acs.ohio-state.edu>
Sender: news@magnus.acs.ohio-state.edu
Nntp-Posting-Host: top.magnus.acs.ohio-state.edu
Organization: The Ohio State University
Distribution: usa
Date: Thu, 12 Nov 1992 19:06:07 GMT
Lines: 50