home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / next / sysadmin / 6450 < prev    next >
Encoding:
Text File  |  1992-11-12  |  2.2 KB  |  63 lines

  1. Newsgroups: comp.sys.next.sysadmin
  2. Path: sparky!uunet!caen!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!shviid
  3. From: shviid@magnus.acs.ohio-state.edu (Steen H Hviid)
  4. Subject: Problem using 'dump' from cron
  5. Message-ID: <1992Nov12.190607.23398@magnus.acs.ohio-state.edu>
  6. Sender: news@magnus.acs.ohio-state.edu
  7. Nntp-Posting-Host: top.magnus.acs.ohio-state.edu
  8. Organization: The Ohio State University
  9. Distribution: usa
  10. Date: Thu, 12 Nov 1992 19:06:07 GMT
  11. Lines: 50
  12.  
  13. Thanks for all the responses on my plead for help on getting the cron to run my
  14. backup script using the dump command.
  15.  
  16.  
  17. It turned out to be very simple, I just needed to supply the full path to the
  18. dump command, i.e. /etc/dump, I ought to have though of that.
  19.  
  20. My other problem with not being able to redirect the output from the dump 
  21. command to a file was solved by doing the redirection in the entry in the 
  22. /etc/crontab,
  23. as in:
  24.  
  25. 0 23 * * 1-5   root   /usr/local/bin/daily.backup  >/tmp/backup.last 2>&2
  26.  
  27. why that worked while I couldn't do redirect on the dump command itself, is
  28. strange, but the above suits me fine.
  29.  
  30. Some responses wondered whether my dump parameters were ok, specifically that I
  31. didn't specify the filesystem parameter. The manpages states which fileystem
  32. is the default (/dev/rsd0a) under the FILES header.
  33.  
  34. The working 'dump' command is thus after several experiments:
  35.  
  36. /etc/dump 0fsd /dev/rst0 2750 640000
  37.  
  38. By the way, I am using an HP6400/2000 DAT drive, which is device /dev/rst0 
  39.  
  40. Original message:
  41.  
  42. >Hi Everybody,
  43.  
  44. >I have a problem, my script works absolutely fine when run interactively, and
  45. >even in the background using nohup, but it fails when run by cron (as root).  
  46.  
  47. >It tells me that 'dump' terminated with error code 1.
  48.  
  49. >Also, I wanted to redirect the output from the dump command into a file, 
  50. >which I would have the script mail to me if anything went wrong, but it doesn't
  51. >like that either. If I redirect standard output, nothing appears there, if I 
  52. >redirect error output, it complains about ambiguos redirection.
  53. >I have tried in the crontab entry to redirect the output of the script to both
  54. >a file and null with to no avail. 
  55.  
  56.  
  57. Thanks for the responses
  58.  
  59. Steen
  60. Computer Specialist
  61. The Ohio State University
  62.  
  63.