Search:

Type: Posts; User: Trevor Burton; Keyword(s):

Search: Search took 0.04 seconds.

  1. Replies
    26
    Views
    2,534

    [SOLVED] Re: Getting script to run in cron

    Thanks to all of you for your help (and the bash tutorial link).

    Not only do I have a working backup, but I actually understand how it works.

    Many many thanks.

    I'll switch the thread to...
  2. Replies
    26
    Views
    2,534

    [SOLVED] Re: Getting script to run in cron

    Just tested this, and (fingers crossed!) I think it is all working.

    Fantastic!

    Could I just trouble you with a couple of queries, because while I am familiar in general with programming, I am a...
  3. Replies
    26
    Views
    2,534

    [SOLVED] Re: Getting script to run in cron

    I'm an idiot.

    The script didn't have execute permissions, and it called sudo.

    Have now fixed these and I'm experimenting - will report back.
  4. Replies
    26
    Views
    2,534

    [SOLVED] Re: Getting script to run in cron

    Thanks btindie.

    I've just tried mounting the backup drive in fstab, and it seems to work ok. Then I've put the backup script in trevor's crontab, but it doesn't work.

    the syslog shows

    Nov ...
  5. Replies
    26
    Views
    2,534

    [SOLVED] Re: Getting script to run in cron

    Right.

    I've also discovered how to mount the external drive at startup using fstab, so I don't even need to mount it in cron. Whether the permissions will be OK if it is mounted at startup I...
  6. Replies
    26
    Views
    2,534

    [SOLVED] Re: Getting script to run in cron

    I've had a thought.

    If this cron job ran from the user "trevor" (who owns the encrypted home folder )instead of "root" will it work OK?

    If so, my only problem is ensuring the external hard...
  7. Replies
    26
    Views
    2,534

    [SOLVED] Re: Getting script to run in cron

    Thanks CharlesA, that is a useful thing to share - it will take me some time to study it though.

    Here is the log from redirecting STDOUT and STDERR in cron


    Couldn't find Elrond, so am...
  8. Replies
    26
    Views
    2,534

    [SOLVED] Re: Getting script to run in cron

    OK, I'm trying to remember why I did the cron job as the root user. I think it was to avoid using sudo and the password issues that would cause if I ran it as "trevor". However, if I don't run it...
  9. Replies
    26
    Views
    2,534

    [SOLVED] Re: Getting script to run in cron

    OK, I think I got rid of sudo and put in the paths correctly, here is the script after my edits

    #!/bin/bash

    for i in `/bin/cat /proc/mounts | cut -d' ' -f2`; do
    if [ "$i" = "/media/Elrond" ];...
  10. Replies
    26
    Views
    2,534

    [SOLVED] Re: Getting script to run in cron

    Thanks CharlesA, will do the sudo thing (forgot to remove from the initial test script on my home area) - the loop is a bit stupid, but I was copying from something I found online. I'll try fixing it...
  11. Replies
    26
    Views
    2,534

    [SOLVED] Getting script to run in cron

    Hi everybody,

    Hoping you can help me with this one.

    Basic problem:
    I have a working bash script to do backup - it runs fine from the terminal. During the backup it makes a log file in my home...
Results 1 to 11 of 11