|
Capture ufsdump/ufsrestore output
Hi Guys,
I want to log ufsdump , ufsrestore output, but my redirections don't work.
I have a script that runs a bunch of ufsdump and ufsrestore commands that I want to capture the output for.
One stage of the script looks like this:
Code:
echo "******************* Stage 1 ***************************" > ${BASE}/migration/copyfs
ufsdump 0f - /dev/rdsk/c6t600015D000236B00000000000000052Cd0s6 | (cd /a/home; ufsrestore rf - ) >> ${BASE}/migration/copyfs 2>>${BASE}/errors/copyfs.home.error
date >> ${BASE}/migration/copyfs
Errors get logged OK:
Code:
# head ${BASE}/errors/copyfs.home.error
Warning: ./lost+found: File exists
Warning: ./admin: File exists
Warning: ./admin/louc: File exists
Warning: ./admin/louc/KEEP: File exists
Warning: ./admin/louc/KEEP/local_RC_scripts.20020404: File exists
Warning: ./admin/louc/KEEP/etc-20020404: File exists
Warning: ./admin/louc/db2_scripts: File exists
Warning: ./admin/louc/db2_scripts/CREATION_IGSA_CRM81DEV: File exists
Warning: ./admin/louc/RELEASE: File exists
Warning: ./admin/louc/RELEASE/SCCS: File exists
#
But my copyfs log is missing info. It looks like this:
Code:
# head ${BASE}/migration/copyfs
******************* Stage 1 ***************************
Tuesday April 1 12:56:10 EST 2008
******************* Stage 2 ***************************
Tuesday April 1 12:56:10 EST 2008
******************* Stage 3 ***************************
Tuesday April 1 12:56:10 EST 2008
******************* Stage 4 ***************************
#
The info that is missing, gets echoed to the screen when the script is run instead of going into the copyfs file.
Code:
# ./copyfs.sh
DUMP: Date of this level 0 dump: Tue 01 Apr 2008 12:55:43 PM EST
DUMP: Date of last level 0 dump: the epoch
DUMP: Dumping /dev/rdsk/c6t600015D000236B00000000000000052Cd0s6 (server01:/home) to standard output.
DUMP: Mapping (Pass I) [regular files]
DUMP: Mapping (Pass II) [directories]
DUMP: Writing 32 Kilobyte records
DUMP: Estimated 1070824 blocks (522.86MB).
DUMP: Dumping (Pass III) [directories]
DUMP: Dumping (Pass IV) [regular files]
DUMP: 1070782 blocks (522.84MB) on 1 volume at 20449 KB/sec
DUMP: DUMP IS DONE
#
Any help is appreciated.
|