Good Afternoon.
This one has me scratching my head.
I have a Sybase data server running on a HP-UNIX host.
I've created a script that backups up the databases on the Sybase server.
When executed MANUALLY, the script runs fine.
Before doing the backups, the script deletes the earliest backup from the directory.
BUT....
When I use cron the execute the script, PROBLEMS !
The script is as follows: (just a few lines)
#!/bin/sh
. /sybase/STG_12.0/SYBASE.sh
START_DT=`date`
export START_DT
echo "Start: $START_DT"
cd /sybase/backups/stage/dumps
# Remove the earliest backups from the directory
OLDCMSPRODFILE=`ls -lt cms_prod_dump.*|tail -1|cut -c60-84
export OLDCMSPRODFILE
rm $OLDCMSPRODFILE
etc....
When the script is run via cron I get the following:
/sybase/backup/stage/scripts/CMS_STG_BACKUP[4]: date: not found.
Start:
/sybase/backup/stage/scripts/CMS_STG_BACKUP[13]: ls: not found.
/sybase/backup/stage/scripts/CMS_STG_BACKUP[13]: tail: not found.
/sybase/backup/stage/scripts/CMS_STG_BACKUP[13]: cut: not found.
/sybase/backup/stage/scripts/CMS_STG_BACKUP[15]: rm: not found.
etc....
Any ideas ??
JRW
This one has me scratching my head.
I have a Sybase data server running on a HP-UNIX host.
I've created a script that backups up the databases on the Sybase server.
When executed MANUALLY, the script runs fine.
Before doing the backups, the script deletes the earliest backup from the directory.
BUT....
When I use cron the execute the script, PROBLEMS !
The script is as follows: (just a few lines)
#!/bin/sh
. /sybase/STG_12.0/SYBASE.sh
START_DT=`date`
export START_DT
echo "Start: $START_DT"
cd /sybase/backups/stage/dumps
# Remove the earliest backups from the directory
OLDCMSPRODFILE=`ls -lt cms_prod_dump.*|tail -1|cut -c60-84
export OLDCMSPRODFILE
rm $OLDCMSPRODFILE
etc....
When the script is run via cron I get the following:
/sybase/backup/stage/scripts/CMS_STG_BACKUP[4]: date: not found.
Start:
/sybase/backup/stage/scripts/CMS_STG_BACKUP[13]: ls: not found.
/sybase/backup/stage/scripts/CMS_STG_BACKUP[13]: tail: not found.
/sybase/backup/stage/scripts/CMS_STG_BACKUP[13]: cut: not found.
/sybase/backup/stage/scripts/CMS_STG_BACKUP[15]: rm: not found.
etc....
Any ideas ??
JRW