Hi; I have the following in crontab -eu root: @daily /usr/local/bin/mysql-backup- daily.sh @weekly /usr/local/bin/mysql-backup-weekly.sh @monthly /usr/local/bin/mysql-backup-monthly.sh
[root@13gems globalsolutionsgroup.vi]# ls /usr/local/bin/mysql-* /usr/local/bin/mysql-daily.sh /usr/local/bin/mysql-monthly.sh /usr/local/bin/mysql-weekly.sh
These scripts worked on another server. The daily writes to: /usr/backup/database/mysql-backups/mysql-backup-dailys/ However, a day later, nothing is there. Please advise. TIA, Suzie
Susan Day wrote:
Hi; I have the following in crontab -eu root: @daily /usr/local/bin/mysql-backup- daily.sh @weekly /usr/local/bin/mysql-backup-weekly.sh @monthly /usr/local/bin/mysql-backup-monthly.sh
[root@13gems globalsolutionsgroup.vi http://globalsolutionsgroup.vi/]# ls /usr/local/bin/mysql-* /usr/local/bin/mysql-daily.sh /usr/local/bin/mysql-monthly.sh /usr/local/bin/mysql-weekly.sh
These scripts worked on another server. The daily writes to: /usr/backup/database/mysql-backups/mysql-backup-dailys/ However, a day later, nothing is there. Please advise.
Check that scripts are marked as executable (rx set).
-- Eero
On Sat, Nov 21, 2009 at 9:26 AM, Eero Volotinen eero.volotinen@iki.fiwrote:
Check that scripts are marked as executable (rx set).
Thought I'd done that, but no... Thanks, Suzie
Susan Day wrote:
On Sat, Nov 21, 2009 at 9:26 AM, Eero Volotinen <eero.volotinen@iki.fi mailto:eero.volotinen@iki.fi> wrote:
Check that scripts are marked as executable (rx set).
Thought I'd done that, but no...
Well, what happends if you run /usr/local/bin/mysql-daily.sh from commandline
You can also use strace or similar tools to debug scripts ..
-- Eero
On Sat, Nov 21, 2009 at 8:10 AM, Susan Day suzieprogrammer@gmail.com wrote:
Hi; I have the following in crontab -eu root: @daily /usr/local/bin/mysql-backup- daily.sh @weekly /usr/local/bin/mysql-backup-weekly.sh @monthly /usr/local/bin/mysql-backup-monthly.sh
[root@13gems globalsolutionsgroup.vi]# ls /usr/local/bin/mysql-* /usr/local/bin/mysql-daily.sh /usr/local/bin/mysql-monthly.sh /usr/local/bin/mysql-weekly.sh
These scripts worked on another server. The daily writes to: /usr/backup/database/mysql-backups/mysql-backup-dailys/ However, a day later, nothing is there. Please advise. TIA, Suzie
What do you see in /var/log/cron? Is the cron daemon running? Is it attempting to run the scripts?
Beyond that, it all depends on what tools are called from your backup scripts. Are all the tools even installed on the new server? Are all executable pathnames explicitly defined in the script? If not, then maybe the cron environment is lacking some things in the PATH. You also don't even say if the scripts work when run manually.
-- Jeff
On Sat, Nov 21, 2009 at 9:10 AM, Susan Day suzieprogrammer@gmail.com wrote:
Hi; I have the following in crontab -eu root: @daily /usr/local/bin/mysql-backup- daily.sh @weekly /usr/local/bin/mysql-backup-weekly.sh @monthly /usr/local/bin/mysql-backup-monthly.sh
[root@13gems globalsolutionsgroup.vi]# ls /usr/local/bin/mysql-* /usr/local/bin/mysql-daily.sh /usr/local/bin/mysql-monthly.sh /usr/local/bin/mysql-weekly.sh
These scripts worked on another server. The daily writes to: /usr/backup/database/mysql-backups/mysql-backup-dailys/ However, a day later, nothing is there. Please advise. TIA, Suzie
There are a couple things to check in no particular order for why this may not be working.
1. make sure that vixie-cron is installed. For minimal installation systems, it is not installed and must be added. Files in /etc/cron.* are not a sign that it's installed, as they are owned by another package. rpm -q vixie-cron to be sure.
2. Check for /etc/cron.allow or /etc/cron.deny interference. By default there won't be any, but if someone has hardened the system it's possible they've restricted things.
3. Cron doesn't use a full user PATH environment, so everything must be spelled out. Check the logs to see if cron is actually running the job and failing, Make sure that you either define your path or that the shell script explicitly calls everything it needs.
Susan Day suzieprogrammer@gmail.com wrote:
Hi; I have the following in crontab -eu root: @daily /usr/local/bin/mysql-backup- daily.sh @weekly /usr/local/bin/mysql-backup-weekly.sh @monthly /usr/local/bin/mysql-backup-monthly.sh
the above is looking for mysql-backup-[day|week|month]ly.sh
but the filenames below don't have "-backup" in their names.
[root@13gems globalsolutionsgroup.vi]# ls /usr/local/bin/mysql-* /usr/local/bin/mysql-daily.sh /usr/local/bin/mysql-monthly.sh /usr/local/bin/mysql-weekly.sh