Solved

Doing a ufsrestore from a tape

Posted on 2011-03-18
9
854 Views
Last Modified: 2012-05-11
Can anybody help me restore from a tape please using ufsrestore?

I backed up my file systems as follows:

ufsdump 0cfu /dev/rmt/0n /
ufsdump 0cfu /dev/rmt/0n /var

I'm using ufsrestore -iv
I'm prompted to enter the Volume Name (default:/dev/rmt/0)
I enter /dev/rmt/0n here but it just keep displaying "Mount volume 3" & then repeats the above "Enter volume nane (default: /dev/rmt/0). Again I enter /dev/rmt/0n & get "Mount volume 4" then.

Can anybody tell me what I'm doing wrong here?

Thanks,
0
Comment
Question by:itwex
  • 4
  • 3
  • 2
9 Comments
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 35164470
What are you trying to do?

If you want to restore /var you must position the tape at the correct file.
This can be done via "mt fsf" or by using the "-s" flag of ufsrestore.

1)
mt -f /dev/rmt/0 rewind
mt -f /dev/rmt/0n fsf 1
ufsrestore ivf /dev/rmt/0n

2)
mt -f /dev/rmt/0 rewind
ufsrestore ivfs /dev/rmt/0n  2

wmp
0
 
LVL 77

Expert Comment

by:arnold
ID: 35165969
Your backup uses the c option. You have to locate all the tape cardridges that are part of this backup.
look in /etc/dumpdates for details on the backup.
Presumably you have an auto-load tape library.
0
 

Author Comment

by:itwex
ID: 35166239
Thanks for the replies; still looking for / & /var.

Here's exactly what I did:

ufsdump 0cfu /dev/rmt/0 /
ufsdump 0cfu /dev/rmt/0 /var
ufsdump 0cfu /dev/rmt/0 /opt
ufsdump 0cfu /dev/rmt/0 /export/home
ufsdump 0cfu /dev/rmt/0 /u1
ufsdump 0cfu /dev/rmt/0 /u2
ufsdump 0cfu /dev/rmt/0 /u3

mt fsf 0
ufsrestore -iv
ls
I have /opt here.

I repeat the mt fsf for 1,2,3,4 & have /export/home, /u2, /u3 & /u4.

I don't want to restore anything at this stage but I need to ensure that I have a complete backup of the Server & just can't locate the / or /var filesystems.
0
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
LVL 68

Expert Comment

by:woolmilkporc
ID: 35166273
Use

mt rewind

before ufsrestore
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 35166296
... and don't forget to use the "norewind" device for ufsdump

/dev/rmt/0n

else the cartdridge will be rewound at close and the next ufsdump will overwrite the previous one's data.
0
 

Author Comment

by:itwex
ID: 35166504
Okay, sorry should have mentioned above that I did used the norewind options - used /dev/rmt/0n each time.

I now did:

mt rewind
mt fsf 0
ufsrestore -iv
when I list everthing now I do have the contents of / & I see opt & var here but when I cd into those directories I cannot see any files in them. Any ideas on how I view those?

/, /var & /opt are all on /dev/dsk/c0t0d11 but on different slices.
0
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 125 total points
ID: 35166549
opt and var are only mountpoints under /.

mt rewind
mt fsf 1
ufsrestore -iv

should show you the contents of var

mt rewind
mt fsf 2
ufsrestore -iv

should show you the contents of opt

etc.
0
 
LVL 77

Assisted Solution

by:arnold
arnold earned 125 total points
ID: 35166635
As wmp pointed out your process is an append mechanism which means that you have to position the tape in the correct "file"

you can also do mt rewind
ufsrestore -ivs n
where n represents the file position you want to look at.
0 for /
1 for /var
.
.
6 for /u3
0
 

Author Closing Comment

by:itwex
ID: 35167081
Thanks for your help
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question