PDA

View Full Version : Shell script execution via cron in Plesk 8.3


wellscrambled
9th May 2008, 12:28 PM
This is driving me round the twist. I have a shell script to backup my httpdocs directory, which works perfectly well when executed in ssh. I can't for the love of money get it to blinking work via Plesk crontab function.

Here's the script:

#!/bin/bash
rm -R /private-backup/httpdocs/file-name2
mv /private-backup/httpdocs/file-name1 /private-backup/httpdocs/file-name2
cp -R /srv/www/vhosts/domain-name/httpdocs /private-backup/httpdocs/file-name1
exit 0

I have tried every command line I can think of in Plesk crontab under the server->root to no avail:

/private-backup/httpdocs/httpdocsbackup
/bin/httpdocsbackup
etc... etc...

I have used chmod +x httpdocsbackup and chmod 755 httpdocsbackup.
I have used echo $0 - comes back with -bash

This is all a bit new to me, but how difficult can it be to simply execute a script that works perfectly well in ssh, but do it via Plesk's crontab facility.....!!

Can anyone help please?

Thanks,

Nick

Using Plesk 8.3