View Single Post

   
  #1 (permalink)  
Old 02-16-2008, 05:08 AM
Arby
 
Posts: n/a
Default Redirection of cpio's messages

OS: SCO Osr 5.0.7 with Maintenance Pack 5

I'm trying to,write a Bourne script that I can use to backup files. I hope
to redirect cpio's verbose output to a file, for later comparison with an
earlier file that contains the filenames that I wish to backup. In the
following script, cpio send its verbose outrput to the console, instead of
to the file named "backnames". Can anyone tell me why?

TIA,
Arby

# Remove backup status file
echo Bad Backup > /tmp/backup_status
echo > Daily
echo Daily > backnames
find /usr/myapp/db/* -depth -print >> backnames
echo "User requested a Daily backup." > /tmp/backnames

# Perform the backup
# Increased block i/o size from 1024 to 64 kB and media size to 79 GB: RB

cat backnames | cpio -ocaBv -C65536 -O/dev/mt \
-K7990000 > /tmp/backnames

# -K7990000 \
# -M "Please insert tape %d and then press RETURN: " > /tmp/backnames


# Compare /tmp/backnames to backnames. If a good backup, they'll match.
# (excluding media errors, of course.)
. . . etc


Reply With Quote