Solved

Ufsdump over network

Posted on 2004-10-19
14
3,860 Views
Last Modified: 2013-12-16
Hi guys.

I'm trying to do a ufsdump of a partition over a network. This is what I have done so far:

--> on the machine where I'm getting the data from
share slice -->  vi /etc/dfs/dfstab
share -F nfs -d "opt" /opt
/etc/init.d/nfs.server start

then

--> on the machine I'm trying to dump to

mount /dev/dsk/c0t1d0s3 /opt2
mount 192.168.0.72:/opt /opt3

So far so good.  

--> Now i try to dump opt3 to opt2:
ufsdump 0f - /opt3 | (cd /opt2; ufsrestore xf -)

and i get the following:
 
 DUMP: `/opt3' is not on a locally mounted filesystem
  DUMP: The ENTIRE dump is aborted.
Volume is not in dump format

Please help!
0
Comment
Question by:Trigger_Hippie
  • 3
  • 2
  • 2
  • +4
14 Comments
 
LVL 13

Expert Comment

by:gripe
ID: 12352670
Are you trying to just move /opt from one machine to /opt2 on another machine? It would be easier and likely faster to just use the 'cp' utility to do this. What type of UNIX are you using?

On many types of UNIX, you can simply mount your directories as you have already done and on the machine you want to copy to, issue the following command:

cp -Rp /opt3/* /opt2

This will copy *recursively* all of the files in /opt3 to /opt2. It will reproduce (not follow) symlinks and will create directories as per normal. You can 'follow' symlinks as if they were actual directories/files by issuing '-r' instead of '-R' but this is likely not what you want (nor is it what ufsdump would do)

I suggest reading the man page for cp prior to issuing any commands just to verify that the behaviour is what you want. Or you can reply with your UNIX type and I'll try to help.
0
 
LVL 14

Expert Comment

by:chris_calabrese
ID: 12352829
As gripe aluded to.... What is the problem you are trying to solve?

If it is a one-time copy of the filesystem, then something like this will work best (cp actually has some issues with things like sym-links):

  (cd /opt3 && tar cf - .) | (cd /opt2 && tar xf -)

If it's keeping the two in sync, then you want something like rsync (http://samba.anu.edu.au/rsync/) possibly tunneled over SSH (www.openssh.org) if you have any care for security.

If it's doing backups, then you want to go to tape, CD-R, or DVD-R - not disk. If you don't have a tape drive on all the systems, you can do something like this
  ssh other-server ufsdump options, etc. > /dev/rmt/some-device
0
 
LVL 40

Accepted Solution

by:
jlevie earned 46 total points
ID: 12352992
The ufsdump must be done on the system that has the file system. You can write the results to an NFS mount point, which is the inverse of what you've attempted.
0
 
LVL 38

Assisted Solution

by:yuzh
yuzh earned 43 total points
ID: 12354085
You don't need to use NFS for ufsdump/restore, you can setup rsh (not secure, need
.rhosts file under root's home dir) or use ssh, eg:

ufsdump 0f - fs |rsh remotebox "cd /restoredir; ufsrestore rf -"

or:
ufsdump 0f - fs |ssh root@remotebox "cd /restoredir; ufsrestore rf -"
0
 

Author Comment

by:Trigger_Hippie
ID: 12358045
The O/S is Solaris 8.  

I guess what I should have pointed out is that I eventually want to copy the entire disk (all partitions) over including root to get a bootable copy.

0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 14

Assisted Solution

by:chris_calabrese
chris_calabrese earned 43 total points
ID: 12358337
Umm, wouldn't it be easier to do this with JumpStart?
0
 
LVL 40

Expert Comment

by:jlevie
ID: 12362602
You can replicate this system over the network to a disk on another box, you just have to run ufsdump on this box and send the data to the other system. And then you'll need to make the result bootable with installboot.
0
 

Author Comment

by:Trigger_Hippie
ID: 12444052
"Umm, wouldn't it be easier to do this with JumpStart?"

I haven't used jumpstart before?  Where/how do i get started?
0
 
LVL 38

Assisted Solution

by:wesly_chen
wesly_chen earned 43 total points
ID: 13010684
Hi,

   Jumpstart is a method that provides a way to install the Solaris (8 or above) on groups of similar
systems automatically and identically. After you finishing the jumpstart configuration file, then you don't
even to type in any information such hostname, ip address, which package need to be installed. All are
done automatically (hands off).

   Here are some setup guide and Sun Blueprint for Jumpstart:
http://www.blacksheepnetworks.com/security/resources/jumpstart-sun.html
(BluePrint) Performing Network Installations Without a Local Boot Server:
http://www.sun.com/blueprints/0504/817-7288.pdf

If you have multiple similar hardware boxes and need to re-install Solaris frequently,
then Jumpstart is the one to save you time.

Wesly
0
 
LVL 40

Expert Comment

by:jlevie
ID: 13011070
Jumpstart is just a way of automating the installation of Solaris, and that presumes that you already know how this system was installed and configured. To some degree third party packages can be added as a part of a Jumpstart, and naturally patches can be applied. Of course if you know all of that you could manually install Solaris on another systen and set it up like this one.

It is worth the effort to set up Jumpstart only if you need to be able to semi-automatically install a number of machines with similar configurations. In my opinion it would be a waste of time and effort to do so for a single duplicate.

Using an NFS mount of the target of the ufsdump, or rsh (per yuzh's suggestion) is going to be the most efficient solution to duplicate a single machine. Actually, the fastest way is to attach the target disk to this system and use ufsdump/ufsrestore to replicate the system directly to the target disk.
0
 
LVL 16

Expert Comment

by:Hanno Schröder
ID: 13875091
Keep in mind that
a) ufsdump reads directly from the (local, raw) disk device
b) can write to a local tape or a remote tape (via network)

Locally attached tape device:
ufsdump 0f /dev/raw-disk /dev/tape

Tape device on antother machine (rsh access must be allowed):
ufsdump 0f /dev/raw-disk server:/dev/tape
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
prtdiag report hdd failure 10 122
CPU monthly average? 12 91
FTP on FreeBSD server 2 91
Linux "time" command output redirection 16 77
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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…

757 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now