sofasurfer
March 22nd, 2009, 06:50 AM
EDIT: First off let me say that the subject line SHOULD say "I can NOT see the problem".
Now, on with my problem...
I created the script and it worked fine. Now, all of a sudden I get the "tar: Cowardly refusing to create an empty archive".
I am running it with "sudo".
Can anyone see the problem?
DOW=`date +%a` #current day of week.. Mon, Tue
FULLBACKUPFILE=$DOW"fullarchive.1.tar" #full backup name
INCBACKUPFILE=$DOW"incarchive.2.tar" #incremental backup name DIRECTORYNAME=/home/terry #directory being backed up
#Full weekly backup
cd /
if [ $DOW = "Sun" ]; then
echo backing up $FULLBACKUPFILE
tar cf $FULLBACKUPFILE --listed-incremental=/snar $DIRECTORYNAME
fi
The "echo" command works but the "tar" command must be giving the problem.
Now, on with my problem...
I created the script and it worked fine. Now, all of a sudden I get the "tar: Cowardly refusing to create an empty archive".
I am running it with "sudo".
Can anyone see the problem?
DOW=`date +%a` #current day of week.. Mon, Tue
FULLBACKUPFILE=$DOW"fullarchive.1.tar" #full backup name
INCBACKUPFILE=$DOW"incarchive.2.tar" #incremental backup name DIRECTORYNAME=/home/terry #directory being backed up
#Full weekly backup
cd /
if [ $DOW = "Sun" ]; then
echo backing up $FULLBACKUPFILE
tar cf $FULLBACKUPFILE --listed-incremental=/snar $DIRECTORYNAME
fi
The "echo" command works but the "tar" command must be giving the problem.