Jump to content

Recommended Posts

Hi there, after the great help of my last post ... I'm back again!

 

For a while now I have had a database backup script (.sh) running (not set up by myself) running every night and placing a backup on the server. However I have never seen a crontab set up for it in Plesk.

 

Anyhoo - recently the backups have stopped working for no reason - no change on the server. But still no cron tab to check. I set up a cron tab manaully in plesk but the script still will not run.

 

Its fine if I run it manually in SSH?

 

Any ideas

 

Many thanks

Link to comment
https://forums.phpfreaks.com/topic/129764-hidden-cron/
Share on other sites

Hi there, thanks for your reply. Sorry I have had to remove some of the information below for security reasons!

 

mysql_back.sh (this works when run in SSH)

#!/bin/bash
today=`date '+%Y_%m_%d'`

mysqldump [DBname] -h[iPAddress] -P[Port] -u[user] -p[Password] > /var/lib/mysql5dumps/$today.sql

 

Is this what you mean by listing the crontab?

0       2       *       *       *       /shell_scripts/domain.co.uk/mysql5_backup.sh

 

Many thanks

 

Link to comment
https://forums.phpfreaks.com/topic/129764-hidden-cron/#findComment-673645
Share on other sites

"For a while now I have had a database backup script (.sh) running (not set up by myself) running every night and placing a backup on the server. However I have never seen a crontab set up for it in Plesk."

 

 

Chances are, it was setup under a different user in Plesk.  (Unless of course you're logged in as root.  Then you should see everything.)

 

 

 

 

 

 

 

So it works in SSH but not as a crontab?  Make it log in the crontab and see what is going wrong.

 

 

0      2      *      *      *      /shell_scripts/domain.co.uk/mysql5_backup.sh > /some/where/log.log

 

 

Also, you might want to make the crontab happen sooner so you don't have to wait a day ;p.

 

http://en.wikipedia.org/wiki/Cron#crontab_syntax

 

 

Right now it looks like it's running at 2AM.

Link to comment
https://forums.phpfreaks.com/topic/129764-hidden-cron/#findComment-673803
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.