This a follow on from a previous problem.
(Thanks for the help kencunnigham)
I want to capture the output below to my $LOGFILE
bash# ./sys
backup: The date of this level 0 backup is Wed 27 Feb 11:07:06 2002.
backup: The date of the last level 0 backup is the epoch.
backup: Backing up /dev/rjnllv (/jnl) to /dev/rmt0.
backup: 0511-251 The file system is still mounted; data may not be consistent.
Use the umount command to unmount the filesystem; then do the backup.
backup: Mapping regular files. This is Pass 1.
backup: Mapping directories. This is Pass 2.
backup: There are an estimated 21426 1k blocks.
backup: Backing up directories. This is Pass 3.
backup: Backing up regular files. This is Pass 4.
backup: There are 21610 1k blocks on 1 volumes.
backup: There is a level 0 backup on Wed 27 Feb 11:07:06 2002.
backup: The tape is rewinding.
backup: The backup is complete.
However all I get is:
Now starting the backup /jnl Wed 27 Feb 11:07:06 2002
Now starting the backup /var Wed 27 Feb 11:07:56 2002
Backup Completed onWed 27 Feb 11:08:23 2002
the command I use is:
# Do the backup
for x in /jnl /var
do
echo "Now starting the backup $x `date`" >> $BACKUPLOG
backup -0 -u -f /dev/rmt0 $x
if [ $? -ne 0 ]; then
echo "backup aborted at `date`" >> $BACKUPLOG
exit 1
fi
I have tried using a -v flag but it does not like being used with -0 -u flags.
(Thanks for the help kencunnigham)
I want to capture the output below to my $LOGFILE
bash# ./sys
backup: The date of this level 0 backup is Wed 27 Feb 11:07:06 2002.
backup: The date of the last level 0 backup is the epoch.
backup: Backing up /dev/rjnllv (/jnl) to /dev/rmt0.
backup: 0511-251 The file system is still mounted; data may not be consistent.
Use the umount command to unmount the filesystem; then do the backup.
backup: Mapping regular files. This is Pass 1.
backup: Mapping directories. This is Pass 2.
backup: There are an estimated 21426 1k blocks.
backup: Backing up directories. This is Pass 3.
backup: Backing up regular files. This is Pass 4.
backup: There are 21610 1k blocks on 1 volumes.
backup: There is a level 0 backup on Wed 27 Feb 11:07:06 2002.
backup: The tape is rewinding.
backup: The backup is complete.
However all I get is:
Now starting the backup /jnl Wed 27 Feb 11:07:06 2002
Now starting the backup /var Wed 27 Feb 11:07:56 2002
Backup Completed onWed 27 Feb 11:08:23 2002
the command I use is:
# Do the backup
for x in /jnl /var
do
echo "Now starting the backup $x `date`" >> $BACKUPLOG
backup -0 -u -f /dev/rmt0 $x
if [ $? -ne 0 ]; then
echo "backup aborted at `date`" >> $BACKUPLOG
exit 1
fi
I have tried using a -v flag but it does not like being used with -0 -u flags.