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 at 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20091121/adaef22b/attachment-0003.html>
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 at 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 8:10 AM, Susan Day <suzieprogrammer at 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 at 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, > SuzieWhat 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 at 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 at 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, > SuzieThere 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. -- During times of universal deceit, telling the truth becomes a revolutionary act. George Orwell
Susan Day <suzieprogrammer at 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.shthe above is looking for mysql-backup-[day|week|month]ly.sh but the filenames below don't have "-backup" in their names.> [root at 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-- Spiro Harvey Knossos Networks Ltd 021-295-1923 www.knossos.net.nz -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: not available URL: <http://lists.centos.org/pipermail/centos/attachments/20091123/518cc898/attachment-0003.sig>