Disk cloning using ufsrestore


 
Thread Tools Search this Thread
Operating Systems Solaris Disk cloning using ufsrestore
# 1  
Old 06-05-2007
Disk cloning using ufsrestore

I am using ufsdump and ufsrestore to clone the root disk on one of my servers. I would like to automate this as much as possible, but have run into a problem where it prompts for changing the owner/mode when it is complete.

Any ideas for running this in the background and not being prompted?

Here is the output:

DUMP: DUMP IS DONE
set owner/mode for '.'? [yn] n
Directories already exist, set modes anyway? [yn] n
# 2  
Old 06-05-2007
i think that should do the trick:

# ufsdump 0f - /dev/rdsk/c0t0d0s3 | (cd /backup;ufsrestore xf -)

the man page says:
x -> For each file, the owner, modification time, and mode are restored (if possible).

regards PRESSY
# 3  
Old 06-05-2007
I am using the -x switch and it still prompts each time.

$ uname -a
SunOS xxxxxx 5.7 Generic_106541-45 sun4u sparc SUNW,UltraSPARC-IIi-cEngine

$ufsdump 0f - /dev/rdsk/c0t0d0s7 \ | (cd /new_exporthome;ufsrestore xf -)

DUMP: DUMP IS DONE
set owner/mode for '.'? [yn] n
Directories already exist, set modes anyway? [yn] n
# 4  
Old 06-15-2007
i've used the line below since solaris 2.5.1 and it's still good on solaris 10 ...
Code:
ufsdump 0uf /dev/rdsk/c0t0d0s7 | (cd /new_exporthome; ufsrestore rf -)

# 5  
Old 06-16-2007
From ufsrestore(1M):
Quote:
setmodes Prompts: set owner/mode for `.'
(period). Type y for yes to set the
mode (permissions, owner, times) of
the current directory `.' (period)
into which files are being restored
equal to the mode of the root direc-
tory of the file system from which
they were dumped. Normally, this is
what you want when restoring a whole
file system, or restoring individual
files into the same locations from
which they were dumped. Type n for
no, to leave the mode of the current
directory unchanged. Normally, this
is what you want when restoring part
of a dump to a directory other than
the one from which the files were
dumped.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

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

2. Linux

Disk cloning ?

Dear All I needed to clone my disk to another hard drive . I did it as the following : #dd if=/dev/sdb of=/dev/sdc But after a while, the procedure ended with the "writing to /dev/sdc input/output error" message. Can you please let me know how can I overcome this as the fdisk now returns as "... (1 Reply)
Discussion started by: hadimotamedi
1 Replies

3. Ubuntu

dd cloning of whole disk

I am using 'dd' to clone an entire hard drive which only has Ubuntu 11.10 and some data with no special options. The disks are both 1Tb, However, I did re-partition the target disk with gparted successfully. The new partions are not the same size as the source disk. When starting 'dd' no partitions... (24 Replies)
Discussion started by: Royalist
24 Replies

4. Filesystems, Disks and Memory

Automated disk cloning

Hi, I'm running Ubuntu on my laptop. To keep my data safe and easy disaster recovery as well I bought similar HDD to one installed in my laptop with higher capacity and using USB box I'm doing disk clone to it. So at any time I can replace disk and carry on with my work as before. I'm trying... (2 Replies)
Discussion started by: uvaio
2 Replies

5. Solaris

Problem by cloning boot disk.

Hello guys! I use the Solaris 10 x86 machine. I need to clone the boot disk. Why, when I copy slice 1 - there is a following: # ufsdump 0f - /dev/rdsk/c0d0s1 | (cd /mnt && ufsrestore rf - ) DUMP: Warning - super-block on device `/dev/rdsk/c0d01` is corrupt - run fsck Dump: The Entire... (6 Replies)
Discussion started by: wolfgang
6 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. HP-UX

Hpux Disk Cloning

hello, Anybody that has already running script or command that can disk clone the hpux machine thanks (2 Replies)
Discussion started by: eykyn17
2 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. SCO

Disk cloning

Hello everybody, :confused: I have to change the system disk on an old PC running SCO 5.0.5. The disk is up and running, this is a preventive action. My experience on UNIX is very limited and I look for the easyest solution to clone this unit. Is it possible with commands or through a clone... (2 Replies)
Discussion started by: mhachez
2 Replies
Login or Register to Ask a Question