• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

Shell script execution via cron in Plesk 8.3

W

wellscrambled

Guest
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
 
Back
Top