- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to capture fbackup return value
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2004 03:42 AM
10-21-2004 03:42 AM
I am writing a crontab script to do fbackup and at the end I want to alert my pager if the fbackup is successful or else. My log did not show any return code. Did I miss anything?
fbackup command looks like the following
#fbackup -0 -v -g PMgraph -f /dev/rmt/0m I bkuplist -V bkupvolume >fbackup.log
Thanks & any help appreciated.
Kelvin
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2004 03:49 AM
10-21-2004 03:49 AM
Re: How to capture fbackup return value
0 upon normal completion,
1 if it is interrupted but
allowed to save its state for possible restart
2 if any error conditions prevent the session from completing
Collect return type as,
fbackup -0 -v -g PMgraph -f /dev/rmt/0m I bkuplist -V bkupvolume >fbackup.log
returnvalue=$?
see fbackup man page for RETURN VALUE part.
HTH.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2004 03:58 AM
10-21-2004 03:58 AM
Re: How to capture fbackup return value
we cannot get fbackup execution return there.
We will be getting only return code of bkuplist there.
what is bkuplist there? It is it a script there.
HTH.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2004 04:08 AM
10-21-2004 04:08 AM
Re: How to capture fbackup return value
My typo error! The command should be
#fbackup -0 -v -g PMgraph -f /dev/rmt/0m -I bkuplist -V bkupvolume >fbackup.log
bkuplist is only capturing what I am backing up.
I think I can capture the return code by
putting
returnvalue=$?
Thanks.
Kelvin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2004 04:14 AM
10-21-2004 04:14 AM
Re: How to capture fbackup return value
Is there a way to capture fbackup messages for example:
fbackup(1417): cannot open the dates file /var/adm/fbackupfiles/dates for reading
fbackup(1004): session begins on Thu Oct 21 12:11:30 2004
fbackup(3203): volume 1 has been used 2 time(s)
fbackup(3024): writing volume 1 to the output file /dev/rmt/0m
1: / 2
2: /syb_bkup 4
3: /syb_bkup/abc 1
fbackup(1005): run time: 31 seconds
fbackup(3055): total file blocks read for backup: 7
fbackup(3056): total blocks written to output file /dev/rmt/0m: 31
I would like to see those fbackup(xxxx) messages recorded in my log file. How?
Thanks,
Kelvin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2004 04:26 AM
10-21-2004 04:26 AM
Solution# Start script
script /tmp/fbackup.log
# Fbackup
fbackup -0 -v -g PMgraph -f /dev/rmt/0m -l bkuplist -V bkupvolume
# Return code
ret=$?
# Script command exit
exit
Else, you can tee command as,
fbackup -0 -v -g PMgraph -f /dev/rmt/0m -l bkuplist -V bkupvolume | tee fbackup.log
Or simply, you can use as,
fbackup -0 -v -g PMgraph -f /dev/rmt/0m -l bkuplist -V bkupvolume 1>fbackup.log 2>&1
1>fbackup.log 2>&1 redirects all STDOUT / STDERR mode informations to that fbackuplog file.
HTH.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2004 06:04 AM
10-21-2004 06:04 AM
Re: How to capture fbackup return value
Thanks so much. My problems resolved.
Regards,
Kelvin