Ask a Question related to SCO, Design and Development.

  1. #1

    Default Re: Cron issue

    Chris Fowler <cfowler@linuxiceberg.com> wrote:
    >I'm setting up a backup script to be ran nightly by cron on a
    >fresh install of 5.0.7. All new equipment. When the backup
    >occurs I can see test being written to /tmp/coXXXXXXXX but when I
    >use the mail command to see cron output I only see a small subset of the
    >output of the command.

    >--------------------------------------------------
    >#!/bin/sh
    >START=`date +%s`
    >echo "Starting Backup at "`date +%H:%M:%S`" Please Wait...."
    >cd /
    ># Do a full backup
    >echo "-----------------------------------------"
    >find . -print | cpio -ocvO /dev/tape
    >END=`date +%s`
    >DIFF=`expr $END - $START`
    >echo "-----------------------------------------"
    >echo "Finished. Backup took $DIFF seconds to complete"
    >echo "Now ejecting Tape"
    >#tape /dev/xct0 unload
    >--------------------------------------------------
    >Below is all I see in mbox. This is the fist time I've seen
    >the problem so maybe I need to tweak something in /etc/default/cron
    >to allow the full output to be sent via email.
    Although you don't say so, I suspect you are depending upon the
    default cron behavior of sending stdout and stderr by mail?

    Instead, collect your data in a file and mail that
    at the end of the script. Don't generate any output for
    cron to mail.

    But again your script is insufficient and is not a good backup.

    --
    [email]tony@aplawrence.com[/email] Unix/Linux/Mac OS X resources: [url]http://aplawrence.com[/url]
    Get paid for writing about tech: [url]http://aplawrence.com/publish.html[/url]
    tony@aplawrence.com Guest

  2. Similar Questions and Discussions

    1. cron v anacron
      Newbie here, running Ubuntu 5.10. I understand cron and crontab, but crontab only runs /etc/cron.hourly, anacrontab runs /etc/cron.daily,...
    2. cron & leafnode
      * Richard G. Riley wrote in alt.os.linux.ubuntu: Here is mine in my root crontab root@gates-of-hell:/home/sinner # crontab -e
    3. cron job
      If the cron job run every 15 minute, it will fill up mail box. Does anyone has any idea. Thanks "Davide Bianchi" <davideyeahsure@onlyforfun.net>...
    4. rsh and cron
      I have Ultra 60 with Solaris 2.6, and the rsh always work fine, until recently I foud the rsh does not work on the Ultra 60. But I don't have any...
    5. cron
      Not specific to PHP really, but it all started with a simple PHP script I was automating... I've used cron/crontab on a zillion machines, and it...
  3. #2

    Default Re: Cron issue

    [email]tony@aplawrence.com[/email] wrote in message news:<bh0h9v$m7j$2@pcls4.std.com>...
    > Chris Fowler <cfowler@linuxiceberg.com> wrote:
    > >I'm setting up a backup script to be ran nightly by cron on a
    > >fresh install of 5.0.7. All new equipment. When the backup
    > >occurs I can see test being written to /tmp/coXXXXXXXX but when I
    > >use the mail command to see cron output I only see a small subset of the
    > >output of the command.
    >
    >
    >
    > >--------------------------------------------------
    > >#!/bin/sh
    >
    > >START=`date +%s`
    > >echo "Starting Backup at "`date +%H:%M:%S`" Please Wait...."
    >
    > >cd /
    >
    > ># Do a full backup
    > >echo "-----------------------------------------"
    > >find . -print | cpio -ocvO /dev/tape
    > >END=`date +%s`
    > >DIFF=`expr $END - $START`
    > >echo "-----------------------------------------"
    > >echo "Finished. Backup took $DIFF seconds to complete"
    #####---------------------------------------------------------------#####
    ##### Chris, insert program here to do bit-level verify ;-) #####
    ##### Regards, Dan #####
    #####---------------------------------------------------------------#####
    > >echo "Now ejecting Tape"
    > >#tape /dev/xct0 unload
    > >--------------------------------------------------
    >
    > >Below is all I see in mbox. This is the fist time I've seen
    > >the problem so maybe I need to tweak something in /etc/default/cron
    > >to allow the full output to be sent via email.
    >
    > Although you don't say so, I suspect you are depending upon the
    > default cron behavior of sending stdout and stderr by mail?
    >
    > Instead, collect your data in a file and mail that
    > at the end of the script. Don't generate any output for
    > cron to mail.
    >
    > But again your script is insufficient and is not a good backup.
    >
    > --
    > [email]tony@aplawrence.com[/email] Unix/Linux/Mac OS X resources: [url]http://aplawrence.com[/url]
    > Get paid for writing about tech: [url]http://aplawrence.com/publish.html[/url]
    Dan Martin Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139