matfish Posted October 23, 2008 Share Posted October 23, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/129764-hidden-cron/ Share on other sites More sharing options...
trq Posted October 23, 2008 Share Posted October 23, 2008 However I have never seen a crontab set up for it in Plesk. It was likely setup through crontab. But still no cron tab to check. I set up a cron tab manaully in plesk but the script still will not run. Can we see the script? And maybe your cron entry? Quote Link to comment https://forums.phpfreaks.com/topic/129764-hidden-cron/#findComment-672849 Share on other sites More sharing options...
matfish Posted October 24, 2008 Author Share Posted October 24, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/129764-hidden-cron/#findComment-673645 Share on other sites More sharing options...
corbin Posted October 24, 2008 Share Posted October 24, 2008 "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. Quote Link to comment https://forums.phpfreaks.com/topic/129764-hidden-cron/#findComment-673803 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.