Operating System - HP-UX
1754320 Members
2684 Online
108813 Solutions
New Discussion юеВ

How to recover file system from tape ?

 
Kenn Chen
Advisor

How to recover file system from tape ?

I have tar my file system into tape and how could i restore the file system from tape. pls exlain in detail. thanks.
Cyber Zen
4 REPLIES 4
eran maor
Honored Contributor

Re: How to recover file system from tape ?

Hi

if you want to restore the system file systems of your system it will be a bit more diff.

for this you need to install ignite on yuor system and then run make_recovery on your systemanf then boot to the tape that you did the make_recovery and then to choose the option to restore the system .

if you are taring a file system to a tape ( a regular file system ) you just need to tar it back to te file system with the command

tar -xvf /dev/rmt/0m /new_fs

do you mean restoring your system ?
or a reguler file system
love computers
Tim D Fulford
Honored Contributor

Re: How to recover file system from tape ?

-1- Make tape read only by moving tag to one side. (optional)
-2- Put tape in drive (say /dev/rmt/0m)
-3- Check contents of tape:
# tar tvf /dev/rmt/0m
Note if the tape has saned the information with absolute paths (eg /home/mys) or relative paths (myfs/).
-4- If tape is OK & does indeed contain the information you require
-5- If you want to restore onto a blank filesystem make sure it is mounted & that it has enough space. say /home/myfs, e.g
# bdf
:

/dev/vg01/myfs /home/myfs ... 0% uesd
-6- extract the tape
If you have absolute paths then
# tar xvf /dev/rmt/0m /home/myfs
If you have relative paths
cd /home
# tar xvf /dev/rmt/0m myfs

There are some other issues
* Are you restoring a filesystem ontop of an old or is it an entirely new one?
* is the filesystem on the pate the same name as the one you want? (e.g. stored on tape as /home/myfs but you want /usr/anofs)
* Do you already have a filesystem called the same thing on the tape?

Cheers

Tim
-
Jay Newman
Frequent Advisor

Re: How to recover file system from tape ?

The most important question is, were any files on that file system busy when you performed the backup?
If it was application data, were all the users logged out and (preferably) any database servers shut down?
If it involved O/S file systems such as root, /var, /usr and so on, I agree that Ignite (free download from HP) is your best tool. I used it last year for disaster recovery testing on an entirely different hardware platform, and it worked great! The best part is, you can make a clean backup of your operating system (everything on volume group vg00) without any down time.

Another alternative is to use fbackup or tar when in single user mode.
I only like using tar when I need to port files between different operating systems; it simply is not very good at making sure you have a clean backup of files that are currently in use.
"Success is defined by getting up one more time than you fall down."
John Bolene
Honored Contributor

Re: How to recover file system from tape ?

With tar it is an all or nothing restore.

If you used tar -cf /dev/rmt/0m /filesystem
then use
tar -xf /dev/rmt/0m /filesystem
to restore.

Omniback is a much better solution and you can restore just one file or subdirecory from the tape backup.

Otherwise use make_tape_recovery for backup.
It is always a good day when you are launching rockets! http://tripolioklahoma.org, Mostly Missiles http://mostlymissiles.com