I have written this script to run a system back up every night.
It outputs to a log. What do I need to add to the script so it gives me a date & time stamp every time the back up has completed.
Thanks in advance.
#!/usr/bin/ksh
LOGFILE=/mydir/newlog
# Rewind the tape
mt -f /dev/rmt1.1 rewind
# Do the backup
for x in / /usr /var /home
do
echo "Backing Up $x" >> $LOGFILE
backup -0 -u -f /dev/rmt1.1 $x
done
# End Message
echo "Backup Completed" >> $LOGFILE
# THE END
It outputs to a log. What do I need to add to the script so it gives me a date & time stamp every time the back up has completed.
Thanks in advance.
#!/usr/bin/ksh
LOGFILE=/mydir/newlog
# Rewind the tape
mt -f /dev/rmt1.1 rewind
# Do the backup
for x in / /usr /var /home
do
echo "Backing Up $x" >> $LOGFILE
backup -0 -u -f /dev/rmt1.1 $x
done
# End Message
echo "Backup Completed" >> $LOGFILE
# THE END