Results 1 to 6 of 6

Thread: Help to set up a simple backup cron job

  1. #1
    Join Date
    Oct 2007
    Beans
    11

    Help to set up a simple backup cron job

    Hi

    OK, I must be doing something elementary wrong. I'm trying to set up a simple backup script with cron.

    In "crontab -e" (and sudo crontab-e - I tried both) I enter "0 22 * * * /home/USERNAME/.backup.sh", with the hope that it will run the script at 10pm each day. The srcipt work fine if I run in a terminal. Any ideas why it won't work? It's bound to be something obvious....

    Cheers

  2. #2
    Join Date
    Nov 2008
    Beans
    479
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Help to set up a simple backup cron job

    If you do a simple
    Code:
    * * * * * touch /tmp/test
    #
    does it create/update the /tmp/test file?
    5127d464-4548-4993-a138-f546f2fd2a33

  3. #3
    Join Date
    Oct 2007
    Beans
    11

    Re: Help to set up a simple backup cron job

    cheers

    Just tried...didn't work
    ??

  4. #4
    Join Date
    Nov 2008
    Beans
    479
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Help to set up a simple backup cron job

    What does /var/log/syslog has to say about this? When you change your crontab via crontab -e, it should be logged there, as well as any jobs that have been run.

    For instance
    Code:
    Jun  8 13:06:15 lucid-lean crontab[21930]: (arrange) BEGIN EDIT (arrange)
    Jun  8 13:06:23 lucid-lean crontab[21930]: (arrange) REPLACE (arrange)
    Jun  8 13:06:23 lucid-lean crontab[21930]: (arrange) END EDIT (arrange)
    Jun  8 13:07:01 lucid-lean cron[826]: (arrange) RELOAD (crontabs/arrange)
    Jun  8 13:07:01 lucid-lean CRON[22068]: (arrange) CMD (echo)
    Jun  8 13:07:01 lucid-lean CRON[22067]: (arrange) MAIL (mailed 1 byte of output but got status 0x0001#012)
    Jun  8 13:08:01 lucid-lean CRON[22228]: (arrange) CMD (echo)
    Jun  8 13:08:01 lucid-lean CRON[22226]: (arrange) MAIL (mailed 1 byte of output but got status 0x0001#012)
    5127d464-4548-4993-a138-f546f2fd2a33

  5. #5
    Join Date
    Oct 2007
    Beans
    11

    Re: Help to set up a simple backup cron job

    Cheers

    ....i'll get back to you

  6. #6
    Join Date
    Oct 2005
    Location
    Al Ain
    Beans
    8,426

    Re: Help to set up a simple backup cron job

    Put the script in /etc/cron.daily

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
  •