this is the script im running a very simple script as you can see.
#!/bin/sh
# Tar backups written by Brent
#
cd /
echo "Tarring up usr/local/apache"
/usr/sbin/tar -zpcvf /var/coreosbkup/apache.`date +%Y.%m.%d.at.%H.%M.%S`.tgz /usr/local/apache
echo "Tarring up usr/local/mysql"
/usr/sbin/tar -zpcvf /var/coreosbkup/mysql.`date +%Y.%m.%d.at.%H.%M.%S`.tgz /usr/local/mysql
echo "Tarring up var/log"
/usr/sbin/tar -zpcvf /var/coreosbkup/varlog.`date +%Y.%m.%d.at.%H.%M.%S`.tgz /var/log
echo "Tarring up db/coreos"
/usr/sbin/tar -zpcvf /var/coreosbkup/db.`date +%Y.%m.%d.at.%H.%M.%S`.tgz /db/coreos
echo "Tarring up etc/init.d"
/usr/sbin/tar -zpcvf /var/coreosbkup/etc-initd.`date +%Y.%m.%d.at.%H.%M.%S`.tgz /etc/init.d
cd /var/coreosbkup
echo "Erasing the tape"
/usr/bin/mt -f /dev/rmt/0 erase
echo "Rewinding the tape"
/usr/bin/mt -f /dev/rmt/0 rewind
echo "Moving the tar files to tape"
/usr/sbin/tar cvf /dev/rmt/0n /var/coreosbkup/*.tgz
mt -f /dev/rmt/0 offline
echo "Removing tar files from system"
rm *.tgz
echo "Backup of /usr/local/apache - /usr/local/mysql - /var/log - /etc/init.d done"
Now ive tried explicit paths as you ..and i get the same result ..either it doesnt even work ...or it creates a emtpy tar file.
Now someone else had recommended that i add the following to my script..for troublshooting:
set -x
exec 1> mylog 2>&1
i did ..hopeing it would give me a clue in the "mylog" file ...the only thing that is in the "mylog" file after the sript runs in cron is
+exec <-- whats that mean ???
thanx for all and any help
Brent