Visit Our UNIX and Linux User Community


ufsrestore


 
Thread Tools Search this Thread
Operating Systems Solaris ufsrestore
# 1  
Old 06-09-2008
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.
# 2  
Old 06-09-2008
# 3  
Old 06-09-2008
Thanks Neo , below steps works for me:

1 ) ufsrestore -i
2 ) cd to directory
3 ) add file name I want to restore
4 ) extract
5 ) Specify next volume #: 1
6 ) set owner/mode for '.'? [yn] y
7 ) exit

*** Can any one tell me how to restore different location ??
***Any command or How to check how many backup volume in the system ??

Many thanks!

Last edited by Neo; 06-09-2008 at 09:58 AM.. Reason: Added Internal Google Search Tags in Question.
# 4  
Old 06-10-2008
Computer

Got your message ;-)
# 5  
Old 06-14-2008
Tools

Found the solution .

Hi Expert : help us verify if it's correct. Thanks.
Hi Newbie: you can follow below steps to restore from ufsdump.

------------------------------

When restoring individual files and directories, it is a good idea to restore them to a temporary directory such as /var/tmp. After you verify them, you can move the files to their proper locations. You can restore individual files and directories to their original locations. If you do so, be sure you are not overwriting newer files with older versions from the backup tape.

Follow these steps to restore files interactively:

1. Become superuser.
2. Write-protect the tape for safety.
3. Put the backup tape in the tape drive.
4. Type cd /var/tmp and press Return. If you want to restore the files to a different directory, substitute the directory name for / var/tmp in this step.
5. Type ufsrestore if /dev/rmt/unit and press Return. Some informational messages and the restore> prompt are displayed.
6. Create a list of files to be restored:

• To list the contents of a directory, type ls and press Return.
• To change directories, type cd directory-name and press Return.
• To add a directory or file name to the list of files to be restored, type add file-name and press Return.
• To remove a directory or file name from the list of files to be restored, type delete file-name and press Return.
• To keep the mode of the current directory unchanged, type setmodes and press Return. Then type n and press Return.

7. When the list is complete, type extract and press Return. Then, ufsrestore asks you which volume number to use.
8. Type the volume number and press Return. If you have only one volume, type 1 and press Return. The files and directories in the list are extracted and restored to the current working directory.
9. Type quit and press Return. The shell prompt is displayed.
10. Use the ls -l command to list the restored files and directories. A list of files and directories is displayed.
11. Check the list to be sure all the files and directories you specified in the list have been restored.
12. Use the mv command to move the files to the proper directories.

In this example, the files backup.examples and junk are restored from the pubs directory:

# cd /var/tmp
# ufsrestore if /dev/rmt/
ufsrestore > ls
.:
lost+found/ pubs/

ufsrestore > cd pubs
ufsrestore > ls
./pubs:
.Xauthority .login .profile backup.examples%
.Xdefaults .mtdeletelog .wastebasket/ core
.cshrc .openwin-init Junk/ dead.letter
.desksetdefaults .openwin-init.BAK backup.examples junk

ufsrestore > add backup.examples
ufsrestore > add junk
ufsrestore > setmodes
set owner/mode for '.'? [yn] n
ufsrestore > extract
You have not read any volumes yet.
Unless you know which volume your file(s) are on you should start
with the last volume and work towards the first.
Specify next volume #: 1
set owner/mode for '.'? [yn] n
ufsrestore > quit
# ls -l
total 6
drwxrwxrwt 3 sys sys 512 Mar 11 1:36 ./
drwxrwxr-x 18 root sys 512 Mar 1 16:43 ../
drwxr-xr-x 2 pubs staff 512 Mar 11 1:11 pubs/
# pwd
/var/tmp
# cd pubs
# ls
./ ../ backup.examples junk
#

Restoring a Single File from a Backup Tape (ufsrestore)

Follow these steps to restore a single file from a backup tape:

1. Become superuser.
2. Put the backup tape in the tape drive.
3. Type cd /var/tmp and press Return. If you want to restore the files to a different directory, substitute the directory name for /var/tmp in this step.
4. Type ufsrestore xf /dev/rmt /unit file-name and press Return. The x option tells ufsrestore to copy specific files or directories in the filename argument. The message set owner/mode for '.'? [yn] is displayed.
5. Type n and press Return. Directory modes remain unchanged.
6. Type the volume number where files are located and press Return. If there is only one volume, type 1 and press Return. The file is restored to the current working directory.
7. Type ls -l file-name and press Return. A listing for the file is displayed.
8. Use the mv command to move the file to the proper directory.

----------------------------------------------------------

Last edited by skully; 06-14-2008 at 01:50 PM..
This User Gave Thanks to skully For This Post:

Previous Thread | Next Thread
Test Your Knowledge in Computers #693
Difficulty: Medium
The rights to Unixware, as well as OpenServer, were acquired by UnXis in 2011.
True or False?

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. Shell Programming and Scripting

Ufsrestore

Good Afternoon, I'm going to attempt a ufsrestore of a Solaris 9 machine from a connected NAS containing the ufsdumps. The idea is to be able to take ufsdumps of a failed machine (machine 1), and use them to set up a backup machine (machine 2). (I'm testing for disaster recovery) Note... (52 Replies)
Discussion started by: Stellaman1977
52 Replies

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

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

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

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

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

Featured Tech Videos