Operating System - HP-UX
1819825 Members
3142 Online
109607 Solutions
New Discussion юеВ

fbackup and multiple 'save sets'

 

fbackup and multiple 'save sets'

I have a script to do Oracle hot-backups which uses the typical approach of putting the tablespace in backup mode and copying out the datafile.

The copy was originally a simple cp to another directory but as time went by we moved to tar uvf /dev/rm/0m

That worked fine until we hit the 2Gb limit for files imposed by tar. From what I can see cpio and pax are no better at handling large files.

I know fbackup can handle them as we do cold backups at the week-end and I have done successful restores to a stand-by server.

What I really need to be able to do during the hotbackups is to replace

tar uvf with
fbackup -0 -f -i single-file

Is that possible or is fbackup designed to store only a single session/save-set on a tape and expects the -i or -g to be a comprehensive list of files to back-up as opposed to being the latest in a long list so to speak.

Will fbackup session 2 overwrite the file saved during session 1 (different file names) or will it append it to the end of the tape after the contents of session 1.
7 REPLIES 7
Hoefnix
Honored Contributor

Re: fbackup and multiple 'save sets'

I think it can be done by using a no rewind device:
fbackup -0 -f /dev/rmt/0mn -i single-file.

I did not test this but that is normaly used to write multiple volumes on a tape.
use mt -t /dev/rmt/0mn fsf <1...6> to put tape in place.

Re: fbackup and multiple 'save sets'

Hi Peter

I tried that

fbackup -i file1 -f /dev/rmt/0mn
fbackup -i file2 -f /dev/rmt/0mn

mt -f /dev/rmt/0m rew

frecover -r -f /dev/rmt/0mn

it brought back the second file backed-up a second attempt at frecover complained about unrecognised volume header. :-(

So it looks like from this that the second fbackup overwrote the first.
John Palmer
Honored Contributor

Re: fbackup and multiple 'save sets'

fbackup ALWAYS rewinds the tape and overwrites the contents.

An alternative is to pipe fbackup into dd, something like:

fbackup ... -f - ... | dd of=/dev/rmt/?mn bs=128k

Or you can download GNU tar from here
http://hpux.connect.org.uk/hppd/hpux/Gnu/tar-1.13.25

Regards,
John
Darren Prior
Honored Contributor

Re: fbackup and multiple 'save sets'

Hi,

fbackup should not be used with no-rewind devices as it is not designed to write multiple backups to one tape. This is mentioned in the fbackup man page.

Was there a special reason for putting multiple tarballs onto a single tape? I can see it means you have to physically store less tapes, but tapes aren't that expensive (especially compared to the value of the data on them.)

You could use incremental backups, but these will use a separate tape for each backup, ie:

full backup of your data dir - tape 1
incremental backup - tape 2
incremental backup - tape 3 (the difference between the current data dir and the tape 2 backup.)
and so on...

I have seen a case where someone used fbackup to write to a backup file rather than a tape, then used dd to write multiple backup files onto a tape. There were problems, and I'm of the belief that where backups are concerned you want to minimise the problems. ;-)

regards,

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

Re: fbackup and multiple 'save sets'

indead Darren I checked the man page and tells not to use no-rewind devices for fbackup (sorry for the suggestion).
Then the GNU-tar can then be an option.

Re: fbackup and multiple 'save sets'

Thanks for the information

I have downloaded gnu-tar and installed it onto the test box, and will give it a whirl.
Michael Schulte zur Sur
Honored Contributor

Re: fbackup and multiple 'save sets'

Hi,

what about this?
You substitute the tar with:
echo filename >> filelist
and at the end you use:
fbackup -0f /dev/rmt/0mn `awk '{printf("-i %s ",$0)}' filelist`

just curious,

Michael