Operating System - HP-UX
1830355 Members
2262 Online
110001 Solutions
New Discussion

Excluding files when recovering from bootable tape?

 
SOLVED
Go to solution
Server operation
Occasional Contributor

Excluding files when recovering from bootable tape?

Is there a way to restore a server using a bootable tape excluding data that is written
on the tape? I know how to repartition etc
but how to decrease the amount of data to be restored from tape ?
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: Excluding files when recovering from bootable tape?

The only way i know to exclude data thats restored from the tape is to exclude it from being on the tape.

when make_tape_recovery is run there are commands to inlclude and exclude volume groups. Thats about as fine as the control can be exerted.

/opt/ignite/bin/make_tape_recovery -Av -x inc_entire=vg00

This includes only vg00 from the tape, excluding all other data.

Volume groups not included in the tape will not be touched when the restore is done.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Bernhard Mueller
Honored Contributor
Solution

Re: Excluding files when recovering from bootable tape?

Hi,

obviously the prefered way would be to cut a new tape with exactly those file you want.

One option is to use a copule of "-x include=/filesysX" or "-x exclude=/path_to/fileXYZ" statements in make_tape_recovery.

But actually make_tape_recovery also has -p for preview, which allows you to start the process, then edit /var/opt/ignite/recovery/latest/flist containing the files that will go into the tar archive on the tape and then, resume cutting the recovery tape.

See man make_tape_recovery.

If that is not feasible because you have a tape but not the machine anymore, the workaround would require some free disk space where you would extract the tar archive from the tape, delete what you do not want and re-write the rest to tape

Caution: use mt and a *no-rewind* device to move to the right tapefile to replace, else your valueable tape will be lost!

mt -f /dev/rmt/0m rewind
mt -f /dev/rmt/0mn fsf 1
cd /big_empty_temp_dir
tar xvf /dev/rmt/0m
.... rm -r unwanted_dir
mt -f /dev/rmt/0m rewind
mt -f /dev/rmt/0mn fsf 1
tar cvf /dev/rmt/0m *

Note that this does not change your config, only what will be restored.

Regards,
Bernhard



Server operation
Occasional Contributor

Re: Excluding files when recovering from bootable tape?

Thanks a lot.
The "mt exercise" helped a lot!

Jonas