HP-UX Filesystem backup/restore?

:confused:

Hi Guys,

I'm not new to UNIX but I am new to HP-UX. I have a proven backup and restore procedue using cpio on Solaris, however, the filesystem structure appears to be different on HP. Can anybody help me with the following questions?

1) What is the best method for performing a full UNIX backup on HP-UX? backup/fbackup/cpio?

2) I am using vxfs on HP 10.20 on a K-Class 9000. Which filesystems need to be backed up? I can see that /tmp appears as a logical volume like the other filesystems, does /tmp need to be backed up?

3) Can anybody point me in the direction of a proven restore procedure as I am not sure which filesystems are auto-mounted on boot of HP-UX and whether or not a bootblk has to be built?

Note: I have searched this site and the docs.hp site to no avail, so I apologise if this is obvious to everyone.

Thanks in advance.

A good backup for the OS can be made using the make_recovery
command. An example of execution is:

 make_recovery -AC -d /dev/rmt/0m 

This command come with the Ignite, see the man page.

Regards. Hugo.

First, yes /tmp is just a regular filesystem on HP-UX. I don't think it need to be backs up. In fact, it really needs a cron job to clear it out.

Some physical volumes are boot physical volumes and they a BDRA (boot data reserved area) which is outside of any logical volume. The BDRA is similiar to a boot block, but more grandiose.

You need some way to recover from the loss of your boot disk. One way is to just re-install the OS, that will recreate the BDRA. Some people have a second boot disk.

I disagree with Hugo about Ignite. I wouldn't use it for true backups. But the make_recovery command will build a bootable tape. And when you boot the bootable tape, it can restore your boot disk. It is a great way to recover from the loss of your boot disk. I have also used it to clone a system.

What program you use for backups is really a matter of opinion. I dislike cpio. HP's fbackup is actually really great. HP says it is intended for system with 1 GB or less. But what they really mean is that if you have a GB or more, they want to sell you a copy of their OmniBack product.

Regarding your mount question.

There is a /etc/fstab which contains all of the filesystems are mounted at boot time.

The filesystems that are OS related are / , /var, /opt , /tmp, /usr , /stand

Regarding your mount question.

First let me say Welcome to HPUX and they have a great website for troubleshooting www.itrc.hp.com, click on the Search button.

There is a /etc/fstab which contains all of the filesystems are mounted at boot time.

The filesystems that are OS related are usually in the root Volume Group. vg00. Here is a sample from one of my boxes, an N-class.

dev/vg00/root 258048 59277 186406 24% /
/dev/vg00/stand 199381 43184 136258 24% /stand
/dev/vg00/var 1638400 1229543 384245 76% /var
/dev/vg00/usr 1638400 649486 927158 41% /usr
/dev/vg00/opt 1024000 497291 493825 50% /opt
/dev/vg00/home 307200 8289 280271 3% /home

The one filesystem that should be new to you is /stand, this is where your kernel is built and resides. Notice that the filesystem type is "hfs". HPUX kernels MUST reside on an hfs filesystem. I have 11.i boxes that are still hfs for the kernel. I had recently asked about if the kernel would ever be able to exist on a vxfs filesystem. They basically told me not for a while yet.

Whatever other filesystems that are in /etc/fstab should be considered to be backed up, as long as they are not NFS mounted from another box on your box. If they are it will appear as the following.

hostname: /some/dir/mounted /some/dir/mounted nfs rw,suid 0 0

If you can list your mounted filesystems with out breaking any company rules, give us a look...

If you company is buying the software, I would suggest Veritas NetBackup over Omniback or any other utility.

If you only have fbackup, it will serve well to backup your box.

/stand must be "hfs". is there any reason for that?

When a HP 9000 boots, the first thing that happens is firmware called pdc (processor dependent code) starts to run. Pdc can read files from a lif formatted area (the BDRA mentioned above). It will find a program called ISL and load it into core. ISL (independent system loader) is used for HP-UX and other HP os'es. It can load other lif area programs into core and run them. And there is a standalone program called "hpux" which is loaded into core by isl. The hpux loader must locate the kernel and read it into core. This means that the hpux loader must completely understand the filesystem by itself. So far it only understand hfs. My guess is that HP wants vxfs to settle down and become stable before they will add vxfs to the hpux loader. Rewriting the hpux loader to add vxfs is not a trivial task...

See the man pages for pdc(1M), isl(1M), hpux_800(1m).

Guys,

thanks for all the replies. Apologies for not getting back sooner.
You have all been very helpful.

Out of interest I have been using Ignite make_recovery and make_tape_recovery (on 11.00), basically for convenience. This has also allowed me to use the backups to clone new systems (which I have had to do quite alot). Moreover, it has been very easy to script Ignite to schedule regular backups out of hours.

However, I do intend to start looking at fbackup as I have heard good reviews about that also.

Thanks again :wink: