I am trying to run a script from /var/www/backups/scripts and when i try tell it to zip up a file i get the below error,
I can confirm that /var/www is the home dir and that the scripts work when ran manually though putty but just not though a script.
I'm using the below code to run the zip
#!/bin/bash
unset PATH
#USER VARS
HOMEDIR=~/
BACKUP_TARG_DIR=~/sites/backups/auto
BACKUP_TEMP_NAME=tempBackupFile.tar
BACKUP_TARG_FILE=/var/www/back
DATE=`/bin/date '+%Y-%m-%d'`
echo `/bin/pwd`;
tar -zcvf test.rar /var/www/backups/scripts/tryThis
#cd /var/www
#scp "tempBackupFile.tar" 217.41.51.14:~/testfile.rar;
#tar -zcvf $BACKUP_TEMP_NAME $BACKUP_TARG_FILE;
echo "SITE-"$DATE;
below is the output i get
/var/www/backups/scripts
./autoBackup.bash: line 18: tar: No such file or directory
SITE-2011-09-05
Any one have any ideas as this is killing me, all I can think of is its something to do with where the bash script is being run from.
taris not installed?