Professional Web Applications Themes

Cron issue - SCO

Chris Fowler <cfowlerlinuxiceberg.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/coXX 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 ...

  1. #1

    Default Re: Cron issue

    Chris Fowler <cfowlerlinuxiceberg.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/coXX 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]tonyaplawrence.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. #2

    Default Re: Cron issue

    [email]tonyaplawrence.com[/email] wrote in message news:<bh0h9v$m7j$2pcls4.std.com>...
    > Chris Fowler <cfowlerlinuxiceberg.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/coXX 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]tonyaplawrence.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

Similar Threads

  1. cron v anacron
    By Dean DeBruin in forum Ubuntu
    Replies: 12
    Last Post: March 23rd, 04:51 AM
  2. cron job
    By cljlk in forum Linux / Unix Administration
    Replies: 1
    Last Post: April 2nd, 06:50 PM
  3. rsh and cron
    By cljlk in forum Linux / Unix Administration
    Replies: 2
    Last Post: November 14th, 03:20 PM
  4. cron
    By Richard Lynch in forum PHP Development
    Replies: 0
    Last Post: August 15th, 05:14 PM
  5. cron does no restart
    By BBCONS GmbH in forum AIX
    Replies: 4
    Last Post: August 1st, 01:16 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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