- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: fbackup script question
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
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
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
тАО06-20-2008 05:09 PM
тАО06-20-2008 05:09 PM
After the database has been shutdown, the fbackup command runs / executes and immediately (before the backup to tape is complete), then the db starts and a backup of my online database is put to tape.
Anyone have any idea how I can get the database start command to wait for fbackup to finish.. I tried "if" fbackup without sucess.
Thanks in advance for any scripting techniques / idea to accomplish this.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-20-2008 05:42 PM
тАО06-20-2008 05:42 PM
Re: fbackup script question
Not sure what you have tried. In simple code:
mydbscript shutdown
fbackup ...
mydbscript startup
fbackup will not return until it is finished, so mydbscript startup will run at the right time. Now the above will work correctly so I suspect that there is something different that you are doing.
> fbackup command runs / executes and immediately (before the backup to tape is complete)
This is very abnormal -- unless you run fbackup ... & where the & character runs fbackup in the background (never recommended). When you put a process into the background, the scheduling of fbackup returns immediately while fbackup continues to run. While you could write some monitoring code, why bother? Just run fbackup normally and run your
Your fbackup command line should look like this:
fbackup -g graph-file -v -c config-file -f /dev/rmt/some-tape
Your graph-file would contain i /dirpath1 and e /dirpath2, etc to define the actual backup path(s). Repeat i and e as required.
Your config file should look like this:
Contents of the config-file:
============================
blocksperrecord 4096
records 64
checkpointfreq 4096
readerprocesses 6
maxretries 5
retrylimit 5000000
maxvoluses 200
filesperfsm 2000
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-20-2008 05:56 PM
тАО06-20-2008 05:56 PM
Re: fbackup script question
What you describe is what I expected, so I thought that maybe fbackup spawned a subprocess or something. Maybe the fbackup command just isn't executing so it goes to the next step..
The script looks like this.
su - oracle -c $ORABIN/stop_database.sh
/var/adm/fbackupfiles/daily_fbackup.sh >>$LOGFILE
su - oracle -c $ORABIN/start_database.sh >>$LOGFILE
# more daily_fbackup.sh
#!/usr/bin/sh
# HPM Daily FBACKUP Tape creation script
mt -f /dev/rmt/0m status
/usr/sbin/fbackup -v -g /var/adm/fbackupfiles/hpm_daily.graph -f /dev/rmt/0m
Sorry about the formatting. I gues there must be something about my fbackup command that keeps it from running. I never really used the config file, but find the graph files helpfull.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-20-2008 07:02 PM
тАО06-20-2008 07:02 PM
SolutionThat's is the problem. You are not running fbackup but a script. While the script seems to contain simply:
> mt -f /dev/rmt/0m status
> /usr/sbin/fbackup -v -g /var/adm/fbackupfiles/hpm_daily.graph -f /dev/rmt/0m
I would not use this extra script at all as it complicates the process without adding value. Change your primary script to use the mt and fbackup commands directly. And unless you are using (very old) reel to reel tapes, you need to use a config file. It will improve performance from 30-100%.
So your backup script would look like this:
su - oracle -c $ORABIN/stop_database.sh
mt -f /dev/rmt/0m status
/usr/sbin/fbackup -v -g /var/adm/fbackupfiles/hpm_daily.graph -f /dev/rmt/0m >> $LOGFILE
su - oracle -c $ORABIN/start_database.sh >>$LOGFILE
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-20-2008 07:04 PM
тАО06-20-2008 07:04 PM
Re: fbackup script question
I pulled the fbackup command from the batch file and entered it directly into the script. I think it will work better that way. How did you decide on the parms for the config file ? especially the blocksperrecord and records.
the man page lists these as the defaults on this system as.
blocksperrecord 16
records 16
checkpointfreq 256
readerprocesses 2 (maximum of 6)
maxretries 5
retrylimit 5000000
maxvoluses 100 chgvol /var/adm/fbackupfiles/chgvol error /var/adm/fbackupfiles/error filesperfsm 200
Each value listed is also the default value, except chgvol and error, which default to null values.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-21-2008 06:17 AM
тАО06-21-2008 06:17 AM
Re: fbackup script question
Today's tape drives are very fast and require a constant stream of data to avoid resync cycles. Modern tape drives cannot stop and start instantly but instead are designed to run continuously. If the data is delayed due to competing activity on the disks, the drive stops, backs up and once more data arrives, takes a running start to resync and continue -- a very long cycle with zero throughput.
These values are the values needed for DDS, DLT, LTO and any modern tape drive.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-21-2008 09:50 PM
тАО06-21-2008 09:50 PM