?
Solved

Transfering files between two Solaris 7 machines

Posted on 2003-03-09
24
Medium Priority
?
408 Views
Last Modified: 2013-12-27
Hi there!

I would like to know how I can transfer all files from one Solaris 7 machine to another one.

I know that I can use CRONTAB to schedule this transfer but I don't know how to connect both machines. I don't even know if I should use CP or FTP.

I appreciate your comments on this.
0
Comment
Question by:NoviceASP
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 12
  • 8
  • 2
  • +2
24 Comments
 
LVL 1

Expert Comment

by:nrosier
ID: 8099719
What do you mean: all files? As in the entire system?
If so, easiest is probably using ufsdump/ufsrestore
Make sure you can login to the remote system without password (setup .rhosts)
On source-server: ufsdump 0f target:/export/source.dump /dev/dsk/c0t0d0s0
On target-server: ufsrestore xvf /export/source.dump

Something like that should do the trick.  You might also be able to do something like, never tried it though:

ufsdump 0f - /dev/dsk/c0t0d0s0 | (rsh target-hosts ; ufsrestore xvf -)
0
 
LVL 48

Expert Comment

by:Tintin
ID: 8099764
rsync is also a good option.
0
 
LVL 38

Expert Comment

by:yuzh
ID: 8099855
What are you trying to achieve? Mirroring the two systems?
You can make the 2 boxes almost mirroring, but not 100%, the 2nd box has to keep it own name and IP !

Have a look at the following page. If you need more details, please post a comment.

http://www.experts-exchange.com/Operating_Systems/Solaris/Q_20349722.html

Cheers!
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 4

Expert Comment

by:Otetelisanu
ID: 8101267
With rcp

look man rcp

Example:

rcp -rp /home/* machine:/home

0
 

Author Comment

by:NoviceASP
ID: 8104566
Thank you guys for the solutions. They all seem to work but I haven't tried any so far.

What I like to do exactly is to have a computer that is constantly updating a second one just in case the first one fails. Like a mirror system.

I have read that rsync is very efficient.

I'm gonna try during the day and I will post the results as soon as I finish.

Thank you again.
0
 
LVL 1

Expert Comment

by:nrosier
ID: 8105856
Just be aware that all mistakes that sneak into the master computer, will also sneak into the slave. So any mistake or corruption, will also be copied to the slave.
Did you look into SunCluster 3.0?
Your resources are kept on (protected) storage. Both your nodes keep their configuration in sync. Both nodes run their own copy of the OS (so any change to one will have to be made to the other manually). If one node fails, the other takes over. This is off course not for free.
Another solution might be the Netra FT1800. I don't know if Sun still sells these puppies but these are fault tolerant. The architecture makes sure that both sides of the system are exact copies (so all operations are run in mirror as if they are one system). But it's a even pricier solution.
0
 

Author Comment

by:NoviceASP
ID: 8113699
Ok guys, this is what I did:

The first choice that I wanted to try was the "rcp" command, since it's not necessary to backup everything from one box to the other, just data files.

I named the boxes "solaris1" and "solaris2", both host names are included in the file /etc/hosts.

I first turn on solaris1 then I do solaris2. The second one says solaris1 "Bad address" and it won't connect, so I couldn't try rcp.

Any suggestions?

Thanks.
0
 
LVL 38

Expert Comment

by:yuzh
ID: 8116061
You need to put a .rhosts your home dir (at least in the remote box).

let'say you do it from box1 to box2, the both machine has the same login name. you put a .rhosts under you home dir, the format looks like:

box1-name your-login-name

Use rsh, rpc is not secure ! I strongly recommended you to set up secure shell (ssh), openssh can be download from: (FREE)
http://sunfreeware.com/

Then you can use tar, rsync via ssh to transfer the files across . (If the two box is in the same network, you can simply setup NFS mount, and usr rsync, tar to transfer the file across)

Here's an example for copy file from box1 to box2, use tar + ssh: (tarnsfer everything under /mydir-box1 to box2, login name fred)

cd /mydir-box1
tar cf - . | ssh fred@box2" (cd /mydir-box2/backup; tar xvf - )"

once you have secure shell setup, do a
man ssh
to learn more about secure shell.

To use rsync have a look at my previous comment. If you are doing backup regularly, it is the best choice !

Cheers!





0
 

Author Comment

by:NoviceASP
ID: 8131501
I tried to create the /home/rhosts file but I get the message "Operation not applicable" it seems like there are no permissions to write on the directory. I logged in as root.

I tried to include the file /etc/hosts.equiv but I dont't see the difference. I cannot make both computers to see each other.

I need more help!

Thanks in advance.
0
 
LVL 1

Expert Comment

by:nrosier
ID: 8132607
.rhosts needs to be created in the homedirectory of your user (so probably / in case of root).
/home usually is an automounted directory; you cannot write in those.
0
 

Author Comment

by:NoviceASP
ID: 8132650
Thank you for your help nrosier but I'm still in the same place: when I try to ping each computer I don't get anything. Both network cards are tested on a Windows network and the cables and hub as well.

I don't know what to do to get this two computers connected.
0
 
LVL 1

Accepted Solution

by:
nrosier earned 1000 total points
ID: 8132879
Are you sure your NIC's are configured correctly?
Does ifconfig -a show you the ip-adres of the NIC?
Run snoop on 1 box and ping it from the other. Do you see any packets on the interface? Can you ping via the ip-address?
Both network cards have been testen on a Windows network, what does that mean? Did you plug the systems on a network with PC's and ping them or are you using Solaris x86 and you tested the cards in PC's?
Don't bother trying to copy or do anything until you get ping working.
0
 

Author Comment

by:NoviceASP
ID: 8133548
When I said that the network cards where tested in a Windows network, I meant that they are not faulty.

I'm running Solaris 7 (intel platform) on PC's.

Ifconfig command -a shows the IP addresses on both NIC's

"solaris1" is 192.168.10.11
"solaris2" is 192.168.10.12

I ran snoop as you told me on "solaris1" and ping from "solaris2", and i had the following results:

On "solaris1" I get a bunch of lines saying the same

solaris1->solaris2 APR R 192.168.10.11, solaris1 is 0:c0:f0:15:8d:3d

solaris2-> (broadcast) ARP C who is 192.168.10.11, solaris1?

on "solaris2"... still pinging.

What should I check to see if the configuration is fine?
Do I need to mount NFS?

Just to let you know, when I was installing Solaris on both computer, the installation program asked for a network service and I answered "none".

Thank you for your help.
0
 
LVL 1

Expert Comment

by:nrosier
ID: 8135206
In snoop you should see at least the ICMP Echo request from the pinging box and a ICMP Echo reply from the pinged box.
If you don't get that working, forget about doing anything else. Your network-config does not work.

solaris2 to launches an arp-request to find out the mac of solaris1
solaris1 responds with it's mac.

so I don't get why you don't get any icmp-requests/replies

can you see solaris1 and 2 in the arp-cache? arp -a

none for network service is fine. as long as you have the hostname/ip-adresses in /etc/hosts
0
 

Author Comment

by:NoviceASP
ID: 8143960
snoop gives me what I told you in the previous comment.

arp -a on solaris1 shows solaris2 with th "U" flag but only right after I ping solaris2. Few minutes later I see only solaris1 and 224.0.0.0 on the arp cache.

There is something wrong with my network configuration but I can't find the cause.

As I told you before, ifconfig on each machine gives me the IP address and everything seems to be ok.

If I have both /etc/hosts.equiv and ./rhosts files, and ifconfig gives me the right IP address for each machine, and both the cables and the network cards has been tested, what else should I check?

Thanks for your help!

0
 

Author Comment

by:NoviceASP
ID: 8143997
I have the following configuration on solaris1 (the box that will be accessed by solaris2):

FILE: /etc/hosts
127.0.0.1      localhost      loghost
192.168.10.11  solaris1
192.168.10.12  solaris2

FILE: /etc/hosts.equiv
solaris2

FILE: /etc/hostname.dnet0
solaris1

FILE: /etc/netmasks
192.168.10.0

FILE: ./rhosts
solaris2


0
 
LVL 1

Expert Comment

by:nrosier
ID: 8144315
The "U" flags in the arp-table means that it's "U"nresolved. So it never received a response to it's arp-request.

just 2 remarks about your files:

/etc/netmasks should be:
192.168.10.0  255.255.255.0

/.rhosts should be
solaris2  <userid>

In one of your posts, you said you got solaris1 "Bad address". When do you get this? I recall only ever seeing this during boot. It might be that your netmask-file is causing the problem so adjust it first, reboot and see if you get a network connection.
0
 

Author Comment

by:NoviceASP
ID: 8144534
I made a mistake on my last comment. I actually have 192.168.10.0  255.255.255.0 on /etc/netmasks

I changed /.rhosts but it didn't make any difference.

I have a quick question regarding the arp command, why does it show 255.255.255.255 on the mask field for solaris1 and solaris2?
0
 

Author Comment

by:NoviceASP
ID: 8144545
on etc/inet/networks I have:

loopback 127
private  192.168.10
0
 

Author Comment

by:NoviceASP
ID: 8144616
on etc/inet/networks I have:

loopback 127
private  192.168.10
0
 
LVL 1

Expert Comment

by:nrosier
ID: 8144764
if you do 192.168.10.1 AND 255.255.255.255 you get 192.168.10.1 so a "network" consisting of 1 host. Never got why they show that (multicast is different though) as 1 IP can only have 1 MAC. Inverse is possible. 1 MAC can have multiple IP.

Never seen private in /etc/inet/networks before; did you put it in there or was it setup during installation.

Just forget about rcp, rsh, .rhosts etc... you need to get a working network; i.e. arp -a shows the other hosts with a MAC-address and you can ping in between. Nothing to do with .rhosts.

Is your system on the HCL for Solaris x86? I've used Sol8 and  9 on my laptop and have never had that much trouble setting up the network.
0
 

Author Comment

by:NoviceASP
ID: 8144778
I didn't understand the first paragraph of your most recent comment.

The entry on /etc/inet/networks was added by me.

My systems are in the HCL, the motherboards, the video cards and the network cards.
0
 
LVL 1

Expert Comment

by:nrosier
ID: 8146155
The netmask is used to determine the network-part of your ip-address by doing a logical AND operation of the address and the netmask. So 255.255.255 means that the 1st 3 numbers make up your network. 255.255.255.255 means that the entire number is your "network", so a network that can only hold 1 IP. Since an IP can only be connected to 1 NIC (so 1 MAC) in the same network, the netmask is kind of irrelevant when looking at the ARP-table.

Why did you add that line to /etc/inet/networks? Is there a special reason why it's needed?
0
 

Author Comment

by:NoviceASP
ID: 8187304
The last thing I tried was two different network adapters and the communication problem was resolved immediately.

It was really hard to find hardware compatible with Solaris 7, however I found two Intel EtherExpress PRO/10+ ethernet cards and they work PERFECT!

Regarding the transfer, I'm using the rcp command and it's fine with me.

Thank you for your time.

Best regards!
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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…
Suggested Courses

771 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