Sponsored Content
Full Discussion: Ufsrestore
Top Forums Shell Programming and Scripting Ufsrestore Post 303008722 by hicksd8 on Tuesday 5th of December 2017 06:07:40 AM
Old 12-05-2017
Normally when a disaster recovery (DR) is performed, there is nothing already installed on the system ie, bare metal. So starting with a mirror image already installed is unorthodox. Also, if the image is old there may be files on there which have now been deleted from the system, etc.

To avoid me having to repeat, read this from one of my post some time ago: (couldn't get a link to work for whatever reason so cut and paste used)

Quote:
Right then, I get the question; there could be many answers and every professional could have a different opinion. You asked for ideas to be shared so here goes.

The scenario I've faced many times is that I have a very big system with lots of non-root filesystems and tons of storage. Minimum down time is critical but suddenly the system won't boot. I just want to get the system on its feet so that I can take a look around.

Backup:
1. Create a NFS share on a remote system and mount it
2. Pick a fairly quiescent time and 'fssnap' the root filesystem (to freeze it temporarily) sending the journal ('backing_store' switch on fssnap) to one of your other local filesystems.
3. Run 'ufsdump' to backup the whole filesystem to the NFS storage.
4. Make a note of your ip interface name (eg, e1000g0 or whatever)
5. Make a note of all the VTOC's

Note that you need to gauge the frequency of doing the backup because, in the event of a recovery, new users, groups, security changes and patches will be mssing.

Recovery:
Suddenly the system won't boot so.....
1. Boot from CD into single user:
PRE { OVERFLOW: auto }

Code:
boot cdrom -s

2. Use 'format' to check disk visibility and check slicing of disks.
3. After confirming that local recovery (eg, fsck, etc) will not fix the issue, 'newfs' the root disk slice. Root filesystem is now empty.
4. Mount the new empty root filesystem under /a
5. Use 'ifconfig' to manually 'plumb', 'address' and 'up' your network interface.
6. Check that you can ping the NFS node holding your ufsdump(s)
7. Mount the remote NFS storage under /mnt
8. Change directory to the top of your hard disk (empty) root
9. 'ufsrestore' the backup from the NFS storage to the root hard disk
10. 'sync' and 'umount' the NFS storage and the root hard disk and do an orderly shutdown.
11. System should now boot.

Note that if your /usr filesystem is separate from the root filesystem you should consider backing up that for emergency recovery too since without being able to mount /usr the recovered system will probably go into maintenance if it cannot mount /usr

As I say, all professionals have their own opinion and you may well get a torrent of alternatives posted to this thread. You may also have further question about what I have written above. Feel free to ask.

You could, of course, use 'flarcreate' to create a flash of just your root disk filesystem and that is certainly a good option. The above is just the method that I have used on Solaris 10 with ufs. You can, of course, test your recovery procedure by using a dummy root slice elsewhere on the system (not the real one).

This was referring to Solaris 10 but equally applies to Solaris 9 with ufs.

If the hardware platform you are recovering to is not identical (processor type, disk controllers, network interfaces, etc) then some adjustment may need to be done after ufsrestore like modify /etc/vfstab, modify /etc/system, create new device nodes (/dev/dsk/xxxxx, for new filesystem locations), plumb in new network interfaces, etc.

NOTE: If your /usr filesystem is separate from root then you will need to restore that too otherwise the system will go into maintenance mode when it boots.

There's no substitute whatsoever for actually doing it yourself and asking the questions as you go. We're here to help.

Also, with DR planning, using flarcreate is the more supported means for DR.

Last edited by hicksd8; 12-05-2017 at 01:03 PM.. Reason: Fix non-working link
This User Gave Thanks to hicksd8 For This Post:
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
All times are GMT -4. The time now is 01:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy