Backup Script using fbackup command Help Needed.


 
Thread Tools Search this Thread
Operating Systems HP-UX Backup Script using fbackup command Help Needed.
# 1  
Old 02-24-2009
Backup Script using fbackup command Help Needed.

Hi Friends,

I'm new to unix, I have the below script which takes regular backup. Now if fbackup fails I get the below messages in my log as
fbackup(3047): could not open output file /dev/rmt/0m
fbackup(3019): would you like to enter a new output file?
fbackup(3004): writer aborting
fbackup(1002): Backup did not complete : Reader or Writer process exit
Backup ENDED @ Thu Feb 19 17:02:47 CST 2009

Now alogwith these messages in the log, I also want a message to be thrown in the cosnole of the root user, incase the fbackup fails. Please help me to modify the script.

Its a bit urgent, please friends help.


#! /bin/ksh
myname=$(whoami)
if ([ $myname = root ])
then
echo 'BE SURE TO SHUTDOWN MONITROL APPLICATION'
# echo 'unmounting cdrom'
# echo 'Doing the backup'
echo 'Backup STARTED @ ' `date`
/bin/nice /etc/fbackup -f /dev/rmt/0m -i / -I /opt/monitrol/tmp/Index.full
echo 'Backup ENDED @ ' `date`
rcp -p -r /opt/monitrol/tmp/Index.full root@pmsmtv:/opt/Index.mix
# echo 'mounting cdrom'
# echo 'Done with the backup - '
else
echo '*** You MUST be ROOT to do a backup ***'
echo ' (because you need permission to read ALL files)'
echo ' '
echo ' '
fi

Thanks,

Avik.
# 2  
Old 02-24-2009
The simplest way is to grep for any error message in the log file and print the message accordingly. Pls let me if you need the syntax.
# 3  
Old 02-24-2009
Try to add 6 lines script.

/bin/nice /etc/fbackup -f /dev/rmt/0m -i / -I /opt/monitrol/tmp/Index.full
if [[ $? != "0" ]]
then
echo "Tape errorrrrrrrrr!!"
echo 'Backup ENDED @ ' `date`
exit 0
fi

echo 'Backup ENDED @ ' `date`
# 4  
Old 02-24-2009
Thanks for your reply. But I'm actually looking how to redirect the fbackup steps into a sperate file.
# 5  
Old 02-24-2009
Thread closed!
Continue here : fbackup problem
And please follow the rules
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help Needed for creating the folder by checking today's date and, take backup using rsync command

How to create a shell script to create a folder by using the today's date to take backup using rsync command on every evening around 7 pm. Kindly help. Thanks. To be more precise, I want to create a script which matches the today's date with server's date format, if matches then creates the... (2 Replies)
Discussion started by: bakula10
2 Replies

2. Shell Programming and Scripting

Help with Backup Shell Script for Network Device Configuration backup

HI all, im new to shell scripting. need your guidence for my script. i wrote one script and is attached here Im explaining the requirement of script. AIM: Shell script to run automatically as per scheduled and backup few network devices configurations. Script will contain a set of commands... (4 Replies)
Discussion started by: saichand1985
4 Replies

3. Shell Programming and Scripting

Unix Script or command Needed

Hi, I am new to Shell Scripting. I need to pick the files from one directory and place them in another directory based on time stamp.It should pick the files if the files is not accessed for 1 hour. Can any one please help me how to work on this. Thanks in Advance. Regards, Prakash (1 Reply)
Discussion started by: kvrprakash
1 Replies

4. HP-UX

HP-UX Full System Backup with fbackup

Hello, I'm still new in HP-UX backup and I want to do a FULL BACKUP of HP-UX server to TAPE device. After reading on several forums and posts, i have list down several steps on how to do a full backup on HP-UX with fbackup. I would like the gurus here to comment/advise on the steps below 1)... (4 Replies)
Discussion started by: miskin
4 Replies

5. UNIX for Dummies Questions & Answers

Help needed to backup files.

Hi guys , I m writing a script which will backup a particular folder and its content to a different location. this script needs to be run every weekend. But my problem is how would i apply logic such that the previous backup folder is only deleted if and only if the current backup is... (1 Reply)
Discussion started by: pinga123
1 Replies

6. Shell Programming and Scripting

Help needed with backup shell script

Hi, I'm develpoing a shell script which takes backup for an Oracle database. Requirement is, the script should exit when it find another instance of the same script being run on the server. I'm not able to perform the check using the shell script name using ps command. when i use ps command... (3 Replies)
Discussion started by: senthil3d
3 Replies

7. HP-UX

HP-UX 10.20 fbackup? restore help/guidance needed

Hello, We've recently had a multiple hardrive failure in our legacy HP9000. Now the drives are repaired and the filesystems are recreated, I went to restore the last of the database tables from our dds3 backup, but cannot. Here's what's going on: BTW, I'm an absolute novice w/ HP-UX The... (5 Replies)
Discussion started by: jastuart
5 Replies

8. Programming

Host command NOT getting executed in Hot backup script.

Hi All, i have problem in the following Sql Script. problem is : HOST (!) command is not getting executed.pls de-bugg this HoTBackup Script...... Most urgent...! Thank You very Much !! SQL> set serveroutput on SQL> set trimspool on SQL> set line 500 SQL> set head off SQL> set feed off... (4 Replies)
Discussion started by: user__user3110
4 Replies

9. HP-UX

fbackup endind with wraning how to check on a script fbackup is good

Hi, I am writing a script that is doing a fbackup during the night and before it shutdown the database then run the fbackup then at the end before restarted the data base, I would like to check the status that the fbackup is fine but I always have warning (about socket: fbackup(1102): WARNING:... (2 Replies)
Discussion started by: touny
2 Replies

10. HP-UX

Backup using fbackup

Dear All, We have Universe database on HP-UX Servers, when we take back on DDS3 it completes around 48 Gb data on just one tape. As per DDS media specs it can hold upto 24 GB compressed data. How it is managing more than double data..? (3 Replies)
Discussion started by: Kashif Raees
3 Replies
Login or Register to Ask a Question