Ufsrestore


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Ufsrestore
# 8  
Old 12-12-2017
Not exactly sure (once again) of your question so I'll just write and hope it helps.

The VTOC is a table showing how the disk is sliced. It always pays to print out all VTOC's of production systems so you know how big each slice is. Of course, it doesn't matter if you configure a new disk with some or all bigger slices than the box that you are trying to recover, important thing is you don't want to restore a filesystem to a slice that is too small and run out of space during the restore and have to start again.

fmthard is just a special recovery command that will read a previously output VTOC file (these are straight ASCII so you can cat them) and create an identical VTOC on the new disk. So the slices are identical which is great but not much good if you are trying to deliberately install bigger slices.

You can manipulate the VTOC within the format command (always taking great care to ensure no slice overlaps another) and then write out that VTOC to the disk.

As far as disk labeling is concerned, usually for Solaris, disks have a SUN label and perhaps the one you have there already has that label on it from previous use. If format can't see a label or it doesn't recognise a label it will surely tell you.

Also, format has an expert mode:

Code:
# format -e

which will provide you with more options for things like labeling but also more options that you can screw up if you don't know what you are doing. Try it on your recovery machine first.

Hope that helps. If not, don't hesitate, post your specific questions. There's more than enough fire power on this forum to answer you.

Last edited by hicksd8; 12-13-2017 at 09:14 AM..
This User Gave Thanks to hicksd8 For This Post:
# 9  
Old 12-13-2017
Thanks again..

So I was able to make changes using
Code:
format

then
Code:
partition / print

on both machines, then making the new machine on match the old. However, everything was listed in gigabytes (rounded only to two decimal places), and I think the partitions are more fine grained than that. I had to massage the gigabytes at the 3rd decimal place a little, to make the cylinders and blocks look the same as the source machine.

Some of these are slightly smaller in gigabytes than the source. Will that be an issue? I'm thinking it won't unless the partitions are 100%full.

The
Code:
prtvtoc

s seem to match now.

Now what? Mount the NAS that has the
Code:
ufsdump

s?

Last edited by Stellaman1977; 12-13-2017 at 02:46 PM.. Reason: correction
# 10  
Old 12-13-2017
Well presumably you now have a disk slice that should contain the root operating system on the recovery machine.

Whilst still in single user (booted from the DVD) create a new ufs filesystem on that slice by:

Code:
# newfs /dev/dsk/<device> (eg, c0t0d0s0)

you can then mount this slice on /a

Code:
# mount /dev/dsk/<device> /a

you can now cd to it:

Code:
# cd /a

and do a ls -l and you should see just lost+found

Now if your dump file is via nfs you need to use ifconfig to manually plumb, then configure, then up the network interface. Plumb allows the OS to know the interface is there, configure means you set its ip address and subnet mask, and up means you activate that interface, after which you should be able to ping the nfs node.

Once you can do that you can mount the remote node filesystem handle under /mnt:

Code:
# mount -F nfs <ip address>:<nfs share handle> /mnt

After that you can ufsrestore the filesystem (ensuring you are still at the apex of your new empty filesystem).

Is that what you were asking?

Last edited by hicksd8; 12-14-2017 at 06:56 AM..
# 11  
Old 12-20-2017
Making progress.. Thanks again!

I'm up to plumb, configure, up and I've gotten mostly through it but on my cloned machine, when I
Code:
ifconfig -a

I see
Code:
UP,BROADCAST,NOTRAILERS,MULTICAST,IPv4

whereas my existing machine shows
Code:
UP,BROADCAST,RUNNING,MULTICAST,IPv4

How do I get rid of
Code:
NOTRAILERS

and add
Code:
RUNNING

Also- is it "up?" I never used
Code:
ifup

but did use
Code:
plumb up

Note- the machine is not currently hooked up to my switch.

Last edited by Stellaman1977; 12-21-2017 at 08:45 AM..
# 12  
Old 12-21-2017
You shouldn't need to worry about NOTRAILERS unless you are needing to route packets. I assume that your NFS node containing the ufsdump that you want to restore is on the same subnet??

So let's go through this briefly. You are booted from a distribution install media DVD and are in single user with a # (root) prompt. You now want to connect to your NFS node so you need a working network interface. Let's assume that you need to reach 192.168.1.99 and you are going to set this node's ip address to 192.168.1.11 Of course, you are not compelled to use the actual production ip address of the system, only anything that will allow you to restore your dump file. Once the restore is done, upon reboot the ip address it will come up on will be whatever the system was set to that the dump was taken of. However, ENSURE that the ip address you use for the restore does NOT clash with another system. Assuming you are sure that the ip address you are configuring is unique there's no danger in connecting it to your switch upfront; in fact it's beneficial because you can see immediate results on screen.

So here we go.....(I usually follow some commands with '&&' to display the updated config if successful). Let's assume the interface in question is a bge0......

Code:
# ifconfig bge0 plumb
# ifconfig bge0 192.168.1.11 netmask 255.255.255.0
# ifconfig bge0 up && ifconfig bge0
# ping 192.168.1.99

(Note: I know you are asking about Solaris 9. This will work on Solaris 8,9 & 10. Solaris 11 has a different network configuration system.)

Once you can ping your NFS store system you can issue your mount command to get access to your dump file. See one of my previous posts on this thread.

When I need to do this myself whilst executing DR I simply type in the above 4 commands one after the other in quick succession and the interface is up. If that doesn't work for you then tell me what happens (error message please).

Hope that helps.

Last edited by hicksd8; 12-27-2017 at 06:53 AM..
This User Gave Thanks to hicksd8 For This Post:
# 13  
Old 12-27-2017
Awesome.. OK I can ping the NAS. Trying:
Code:
# mount -F nfs <ip address>:<nfs share handle> /mnt

but do not know the handle. How can I find it? On the other machine I'm looking at
Code:
fstab

for it but several things look like they might be it.

Also, I really would like to get rid of
Code:
NOTRAILERS

if possible..

Thanks!
# 14  
Old 12-27-2017
Hmmmmm.......if you did the ufsdump from the production box then it's the same handle to recover to the new box. Somebody mounted the remote volume on the NAS to ufsdump to. What handle was used?

Code:
# showmount <NAS ip address>

should show you what the NAS is prepared to offer you but it might be more than one handle. Also, depending on what make of NAS, the NAS may require a password for the handle before it allows access.

Who manages the NAS?

Once mounted you should be able to change to that remote directory and list the files available which should include your dumpfile.

Remember to change back to the top of your new (empty apart from lost+found) filesystem before issuing the ufsrestore command.

Also, the NOTRAILORS won't be there once the system is fully restored and rebooted. It will look just like your production system (if it's on the same model hardware). I suggest that you put up with it for the relatively short time to complete the restore.

Last edited by hicksd8; 12-27-2017 at 11:59 AM..
This User Gave Thanks to hicksd8 For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Ufsrestore on Solaris 9

Good Morning, I'm running through a Solaris 9 ufsrestore process on a Sunblade 2500 that folks here helped me write a year ago. Here: https://www.unix.com/303011447-post11.html Hicksd8 tells me to # rm restoresymtable. I see this file in the other slices as well. Do I remove it from... (8 Replies)
Discussion started by: Stellaman1977
8 Replies

2. Solaris

ufsrestore T5240

Hi Friends we have sun T5240 server, we have taken ufsdump of this server remotely with scsi tapedrive, If we need to do ufsrestore means what we have to do, since T5240 has not having scsi port, any procedure is there? Regards Rajasekar (5 Replies)
Discussion started by: rajasekg
5 Replies

3. Solaris

How do you ufsrestore the fast way?

hi, on my sol9 box i create my backup using the below command: /usr/sbin/ufsdump 0uf /dev/rmt/0n /u1 /usr/sbin/ufsdump 0uf /dev/rmt/0n /u2 /usr/sbin/ufsdump 0uf /dev/rmt/0n /u3 /usr/sbin/ufsdump 0uf /dev/rmt/0n /u4 now on the new sol10 box, to restore i use this commands: cd /u1... (3 Replies)
Discussion started by: pinoy43v3r
3 Replies

4. Solaris

ufsrestore will not boot

hey all, i did a ufsdump/restore from a mirrored system and i'm not able to get the new system to boot off of the dump. system 1 is a v245 mirrored with disk suite. metadb's are in place d3 -m d23 d13 d33 1 d23 1 1 c1t1d0s3 d13 1 1 c1t0d0s3 d33 1 1 c1t2d0s3 d0 -m d20 d10 d30 1 d20 1... (3 Replies)
Discussion started by: em23
3 Replies

5. Solaris

What is volume in ufsrestore

Hi Gurus, Can you guys please explain what is volume in ufsrestore? Thanks (2 Replies)
Discussion started by: kumarmani
2 Replies

6. Solaris

ufsrestore

Hi , I accidentally deleted crontab entries and I need to restore back urgently ! we use a ufsdump with 0cfu option. I like to know how to restrore / retrieve to different location for crontab file only from the backup. Thanks. (4 Replies)
Discussion started by: skully
4 Replies

7. Solaris

Using ufsdump and ufsrestore

HI Gurus, I have a sunfire V445 server running SAP ECC 6.0 with an Oracle database on Solaris 9 (SunOS 5.9). I recently completed a ufsdump to tape of the following files:- /, /usr, /oracle, /export, /sapr3, I want to restore these files from tape onto a different server of the same... (5 Replies)
Discussion started by: charleywasharo
5 Replies

8. Solaris

ufsrestore?

I'm trying to restore a server from a backup tape. I've partitioned my drive, and I've run into a problem; After extracting everything from the tape, It seems as if only the directory structure is intact. Here are my steps: 1. booted from cdrom to single user mode boot cdrom -s 2. used... (3 Replies)
Discussion started by: ECBROWN
3 Replies

9. Solaris

ufsrestore

on sparc solaris 2.8 hosts, HOSTB, after changing to /dir1 need to: connect to tape drive on HostA. change directory to /dir0/dir1 on tape and restore everything under that path to /dir1 directory. could i get help?. (1 Reply)
Discussion started by: S26+
1 Replies

10. UNIX for Dummies Questions & Answers

ufsrestore -i

Hi there, I have a problem at the moment trying to restore a directory from a Super DLT tape with about 3 weeks worth of backups on it. I need to be able to get the last backup performed on this tape but using ufsrestore -i it only restores the first backup which is no good to me. There is... (4 Replies)
Discussion started by: gerwhelan
4 Replies
Login or Register to Ask a Question