Operating System - HP-UX
1833268 Members
2908 Online
110051 Solutions
New Discussion

recover backed up with fbackup

 
SOLVED
Go to solution
SUBRAMANYAM ANUPINDI_1
Frequent Advisor

recover backed up with fbackup

Hi,

Presently we are backing up our HP-UX rp5470 server manually using make_tape_recovery and fbackup for our deevlopment server. They are as follow :

make_tape_recovery -a /dev/rmt/0mn -I -v -x inc_entire=vg00

fbackup -f /dev/rmt/0mn -0 -u -g /var/adm/fbackupfiles/graph -I /tmp/backupindex.full

we have oracle databases on this server. We are shutting down them before we take backup.

Using make_tape_recovery i am backing up complete vg00 and all data on other mount points(except vg00) using fbackup.

1) Using above methods,I assume we can recover
from any type of failure including selected
directories/files from vg00 and other mount
points. If we can not in any type of
situation please let me know.

2) It may take a while to configure our omnibackup sofware. Is it safe to backup using method mentioned above without loss of data?

3) Any other type of backup is recommended other than fbackup ?

Thanks

S.Anupindi
12 REPLIES 12
Patrick Wallek
Honored Contributor

Re: recover backed up with fbackup

I would say that you have yourself covered very well.

Using both make_tape_recovery and fbackup is very smart. Since you are shutting down your Oracle DBs prior to running your fbackup you should definitely be covered with regards to your DBs.

The make_tape_recovery should cover you with regards to VG00.

So to answer you specific numbers:

1) As far as I can tell, you should be able to recovery from any type of failure.

2) Yes you should be very safe, especially since you are shutting down your Oracle DBs prior to fbackup.

3) None that I can think of. fbackup will handle files greater than 2GB in size so you should have no worries there.

A. Clay Stephenson
Acclaimed Contributor

Re: recover backed up with fbackup

As long as you are doing a "cold" database backup, your method will work. If I assume that you have OnlineJFS then there is another method that you can use to greatly reduce database downtime.

1) Shutdown database.
2) Create vxfs snapshot mountpoints (takes only a few seconds) for each of your Oracle filesystems
3) Restart database
4) Backup the snapshots
5) Umount the snapshots.

You get all of the safety of a cold backup with almost all the uptime of a hot hackup. You might even consider this to be your permanent solution in favor of RMAN.

By the way, it only takes an a few hours to get an OB2/DP cell configured. The part that is more time-consuming is setting up the pre-exec and post-exec scripts --- which are also the most time-consuming steps using any backup methodology. I think I would get OB2 going rather than having to invent the wheel twice.

If it ain't broke, I can fix that.
Bill Hassell
Honored Contributor

Re: recover backed up with fbackup

These two utilities are the best choices for built-in utilities on HP-UX. Using make_tape_recovery covers the possibility of losing the system completely (ie, smoke and rubble) -- assuming you are storing these backups offsite. However, it is very inconvenient to restore a file or directory from the m_t_r backup tape as it is a bootable backup tape. You would have to skip forward using mt and a no rewind device and then run pax or tar to find a file. pax or tar will read the entire tape as it restores any single file.

So I would modify your backup strategy to perform m_t_r once a week, then run two fbackup jobs, one for all the files on vg00, and the other for your database mountpoints. frecover has the ability to perform high speed searches. This would allow restoring a single file in a few minutes.


Bill Hassell, sysadmin
SUBRAMANYAM ANUPINDI_1
Frequent Advisor

Re: recover backed up with fbackup

Hi,

Thanks for the info. I am new to unix/HP-UX. I have question for Stephenson and Bill.

Stephenson
----------
1) For now we do not have OnlineJFS.I am not
clear on snapshot mountpoints.Is it just
copy(using cp) of oracle mount points to
some other mount point or something else.

2) I will be configuring Omnibackup soon.Is there any brief document on how to setup omnibackup ?

Bill
-----
1) Is it possible to put steps in sequence with commands on how to forwars using mt,find a file,restore it to disk.

2) If i am correct we cannot backup multiple backups on single tape using fbackup. Can you confirm ?



A. Clay Stephenson
Acclaimed Contributor
Solution

Re: recover backed up with fbackup

No, vxfs snapshots are not copies of existing filesystems -- that would certainly take more than a few seconds. A vxfs snapshot is a second mountpoint on an already mounted vxfsfilesystem.

Suppose we have a filesystem /u01 and we want to create a snapshot (e.g. /snapu01):

mount -F vxfs -o snapof=/u01 /dev/vg03/lvol1 /snapu01

That creates the snapshot. Notice the device /dev/vg03/lvol1. It is referred to as the snapshot buffer. The "snapshot" is actually a composite of unchanged blocks fronm the original filesystem plus those blocks which were changed (stored in their original state) taken from the snapshot buffer. Just before a block is changed for the first time in the original filesystem, its contents are copied to the snapshot buffer and a change bitmap is iupdated to indicte that that block was changed.

I don't know of an OB2 quickstart but the documentation is quite good. I was able to get a fully functional OB2 cell up and running long before I ever went to the OB2 class just by reading the documentation.

If it ain't broke, I can fix that.
Bill Hassell
Honored Contributor

Re: recover backed up with fbackup

Use a no-rewind, device, for example, /dev/rmt/0mn:

1. mt -t /dev/rmt/0mn rewind
2. mt -t /dev/rmt/0mn fsf 1
3. cd /directory-to-store-file
4. tar xvf /def/rmt/0mn path/file

NOTE: tar is very simplistic so you must type the file to restore exactly as it appears on the tape. That means no leading slash but show all leading directories or tar will go through the entire tape and do nothing and report nothing.


Bill Hassell, sysadmin
Bill Hassell
Honored Contributor

Re: recover backed up with fbackup

And for question #2, no fbackup specifically prohibits appending multpile backups on the same tape. As many (very sad) sysadmins will tell you, trying to save a few dollars on tape media by running multiple backups is a recipe for failure. fbackup, unlike tar, cpio, pax, dump, etc, always creates a table of contents for the entire backup on every tape. If fbackup allowed multiple backups, there would no longer be any accurate record of what was recorded on the tape. fbackup not only records the filenames and directories that were part of the backup run, but also records a searchmark index for high speed restores. And fbackup will not accidently let you destroy a previous tape in a multiple tape backup.


Bill Hassell, sysadmin
John Flanagan
Regular Advisor

Re: recover backed up with fbackup

I run a similiar situation to you but I also run my databases in archive log mode and I force a log switch once an hour during working hours.

My archive log files are compressed and coppied to another machine. In a worst case situation I should be able to recover my system to within 1 hour of the current working state.
SUBRAMANYAM ANUPINDI_1
Frequent Advisor

Re: recover backed up with fbackup

Hi Bill,

I missed few things here :

1) You mentioned to backup vg00 seperately above m_t_r.What are the implications if i backup vg00 on same tape as other mount points. Is it mandatory to backup vg00 sreperately ? If i do mentioned way i save one tape.

2) As provided earlier i am creating a index file when doing fbackup. I am not very clear in what way it is useful for restore ?

Darren Prior
Honored Contributor

Re: recover backed up with fbackup

Hi,

1) My opinion is that m_t_r is great for bringing back the OS after a disaster. Just capturing vg00 means that you can get the system back with (hopefully) a single tape. You can then get the latest data back from your fbackups, including the other vgs.

2) Having an index file can be helpful when you're trying to work out which tape a particular file is on. Having said that, it will take up disk space and you could use frecover -I to generate an index from the tapes when required. Of course if the whole system has been blown away and the only place you have the index files is on the system itself then it's not so useful! The version pulled back from the m_t_r tape may not be the latest index file.

regards,

Darren.
Calm down. It's only ones and zeros...
Bill Hassell
Honored Contributor

Re: recover backed up with fbackup

1. Backing up VG00 using m_t_r is for disastor recovery, that is, loss of the boot disk(s). This only needs to be done when major changes occur to the operating system such as a patch bundle or new hardware is added or removed (disks, tape, memory, I/O). Run m_t_r about once a month depending on the volatility of your hardware.

But run a separate tape using fbackup for file/directory retrieval. This backup will be used far more often than your m_t_r tape as you don't (hopefully) have disasters every week. fbackup can be used to bakcup everything VG00, VG01, etc and is the most effective method for this task. If everything fits on one tape, great. If not, fbackup is smart enough to pause and request another tape and not to record accidently over the first tape.

2. One of the featiures of commercial quality backup programs is the creation of a complete index that is stored at the front of each tape. You don't have to do anything special--it's automatic with fbackup. If you need an electronic copy, just run:

frecover -I /var/tmp/myindex -f /dev/rmt/0m

Now tar, cpio, dump, pax, etc have no index at all. Instead, you run the utility asking for a list of all the files and the entire tape is read (could require hours) to report on the headers that were found. fbackup can create a complete index in a few seconds. tar, cpio, dump, pax, etc can also have multiple backups on the same tape--you'll never know about these unless you keep very careful records. tar even has the ability to append the same files to a single backup and unlimited number of times. While this seems like it might be useful, to recover a particular version based on date requires a perfaectly accurate list of all backups and the dates they were taken. Then count the number of copies of the file needed to get to the desired version, start tar, watch carefully as tar reports each time it restores the same file, then once you see the desired quantity, quickly kill the process so a later version doesn't get restored--but not too quickly because you may not finish restoring all of the desired file. See how easy that is?

In other words, you don't ever want to dump multiple backups on the same tape and fbackup prevents this from happening. Another advantage of the fbackup index is that you can retrieve a random file from anyplace on the tape in just a few minutes. The reason is that the index contains a setmark reference for every 'n' number of files (controlled by the configuration file, 200 files by default). These setmarks can be scanned at 100times normal tape speed so to reach file number 2005, frecover will scan past 10 setmarks, then slow to normal speed and search for the 2005th file.

And finally, the index for a given backup session is created on *every* tape needed for the backup. Suppose there are 3 tapes needed. The first is completed and a second tape is inserted. As mentioned before, fbackup looks at the header on the tape to make sure it is not tape #1, then writes more files, and repeats until all the tapes are recorded. However, the index is a list of *all* the files that were originally requested. Since 'things happen' during the long backup process, some files may disappear and the index is updated on the current tape accordingly (file ##### not backed up - not found).

The index is also updated at the start of each tape to indicate what was stored on the previous tape and where this new tape starts. This is very crucial for fast retrieval. On the last tape, the index contains the history of all previous tapes. So to restore an artbitrary file, put the *LAST* tape in, run frecover and it will report the required tape ("insert volume 2...") in order to restore the file(s). So even with 3 tapes to create a complete backup, only a few minutes is needed to reload any random file.

Treat Omniback the same way as fbackup. It will create it's own index both on the tape as well in it's own database. Omniback (or fbackup) can NEVER be used to reload a dead or replacement server in a disaster situation because it require HP-UX to run. So treat the disaster portion as a seaprate, specialized task and the daily/weekly backup of files/directories as your regular backup strategy.


Bill Hassell, sysadmin
Ragesh V.K
New Member

Re: recover backed up with fbackup


After creating the tape, check it as below..


1. Check the tape contents by using below commands

· mt â f /dev/rmt/0mn rew
· mt â t /dev/rmt/0mn fsf 1
· tar â tvf /dev/rmt/0m

This should list the contents in this tape.


2. Also check whether the tape contains boot LIF contents. If the boot LIF contents are not copied in to the tape, you won't be able to boot through this tape.

· copy_boot_tape -u /dev/rmt/0mn -b -d /tmp/tape


It runs as below.

Rewinding tape /dev/rmt/0mn.
Extracting the boot area to /tmp/tape/bootimage.
14524+1 records in
14524+1 records out
Boot file contents.
volume ISL10 data size 281239 directory size 3 02/11/14 14:50:50
filename type start size implement created
===============================================================
ISL -12800 16 240 0 02/11/14 14:50:50
AUTO -12289 256 1 0 02/11/14 14:50:50
INDEX BIN 264 1 0 02/11/14 14:50:50
CONFIG BIN 272 34 0 02/11/14 14:50:50
HPUX -12928 312 880 0 02/11/14 14:50:50
INSTALL -12290 1192 26990 0 02/11/14 14:50:57
INSTALLFS -12290 28184 31744 0 02/11/14 14:51:03

Rewinding and ejecti