The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Using ufsdump and ufsrestore charleywasharo SUN Solaris 5 03-18-2008 10:42 AM
Capture output to file and printer rdasari UNIX for Advanced & Expert Users 1 01-16-2008 03:57 PM
Capture scp output Tornado Shell Programming and Scripting 7 12-06-2007 10:16 PM
ufsdump/ufsrestore problem shorty UNIX for Dummies Questions & Answers 2 10-24-2007 05:24 PM
UFSDUMP & UFSRESTORE problems DGoubine UNIX for Advanced & Expert Users 9 02-21-2005 05:43 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 03-31-2008
Tornado's Avatar
Tornado Tornado is offline Forum Advisor  
Registered User
  
 

Join Date: Nov 2006
Location: Melbourne
Posts: 249
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.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:05 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0