#!/bin/bash
LOGFILE=/var/log/backup.log
backup_source="/home"
backup_dest="/home/sean"
date=`date '+%d-%B-%Y'`
hostname=$(hostname -s)
filename="$hostname-$date.tgz"
echo "Backing Up your Linux System"
tar cvpzf $backup_dest/$filename $backup_source
LOGFILE="log-$date.log"
log(){
message="$@"
echo $message
echo $message >>$LOGFILE
}
log "$LOGFILE"
log | tee install.log
echo "Backup finished"
echo "$LOGFILE"
hie I'm trying append teh files i have backed up into log file. All i get is a blank logfile. This what i have so far