Rdiff backup problems

I used the rdiff backup solution described on the Linode Wiki

~~[http://www.linode.com/wiki/index.php/AutomatedRdiffBackup" target="_blank">](http://www.linode.com/wiki/index.php/Au … diffBackup">http://www.linode.com/wiki/index.php/AutomatedRdiffBackup](

It all works fine except for the daily cron run. I get this output from cron, however when I run the script from the command line, it works just fine.

Can anyone tell me what's going on.

Output from cron:

/etc/cron.daily/backup-rdiff:

run-parts: failed to exec /etc/cron.daily/backup-rdiff: Exec format error

run-parts: /etc/cron.daily/backup-rdiff exited with return code 1

The script I used is the exact same script that is on the wiki.

Thanks for any help

  • Robbert

4 Replies

Try adding "set -x" as the first line after "#!/bin/sh" in the shell script. This will output tracing information.

Michael

I put in the line, and it still outputs the exact same error message

  • Robbert

@rrijkse:

I put in the line, and it still outputs the exact same error message

  • Robbert

Did you ensure that they script is executable, using "chmod +x "?

Are you sure that the first line of your script is #!/bin/sh or whatever it is supposed to be (I haven't even read the script in question), and with no extra characters at all (aside from the -x that you may have added for diagnostic purposes)?

Have you tried running the script by hand, not from cron, just running it using the same exact command as you have in your crontab file? If so, what happens?

I had a space on the line that had: #!/bin/sh

I tested it and it worked, and the weird part was that when I ran in manually it worked.

Anyway, thanks a lot,

Robbert

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct