?
Solved

Program and files -> copyover...

Posted on 2004-10-18
11
Medium Priority
?
264 Views
Last Modified: 2013-12-27
I've got 2 identical servers.  I installed a lot of different packages on server#1.  On server#2, I simply copied all the packages over from server#1, and then did some SYM links to server1.  I copied server1 using rsync into a directory on server2, then set a symlink like:

ln -s /server_1/usr/local /usr/local

(BTW - I renamed /usr/local to /usr/local.org)

Most packages are installed in /usr/local/ so I thought that a symlink to server_1 /usr/local would be sufficient.

And it works just fine.  All packages are executing with not problems.

The main problem is that pkginfo -l obviously doesn't list the programs (and packages) installed because it was just copied...not "installed".

So...where is pkginfo -l pulling it's information? Does the system check for dependencies using the pkginfo command?

Now, I want to install a package on server_2 - to test before I install it on server_1.  But it doesn't know that a DEPENDENCY package is installed...so it won't let me.

I'd like to know a little bit about the characteristics of the pkgadd -d and pkginfo -i command...is there a type of "registry" that it updates for this information?  Can I edit that, and simply manually add the packages that I've copied over?

Show me the ERR of my ways.  :)

Thanks_ramble
0
Comment
Question by:ramble
  • 5
  • 4
  • 2
11 Comments
 
LVL 48

Expert Comment

by:Tintin
ID: 12342284
The "registry" for Solaris packages is under  /var/spool/pkg
0
 
LVL 48

Accepted Solution

by:
Tintin earned 1600 total points
ID: 12342303
Sorry, /var/spool/pkg is where the actual packages reside, the package info is in /var/sadm/pkg
0
 

Author Comment

by:ramble
ID: 12343026
So...I take it, that you can't manually add anything to it?

Am I correct in thinking that when a package is added..or attempted to be added, that it looks in /var/sadm/pkg for dependencies?
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 48

Expert Comment

by:Tintin
ID: 12343138
You can manually add stuff to /var/sadm/pkg.  If you rsynced that directory from your server1 and then did a pkginfo on server2, they should be the same.
0
 

Author Comment

by:ramble
ID: 12343256
What you are suggesting is simply copying /var/sadm/pkg (srv1) to /var/sadm/pkg (svr2).

Which is kind of what I'm trying to avoid.

You suggest that I can manually add stuff to /var/sadm/pkg
How do I do that?  When I look at pkg it seems to be rather jumbled.

example:

-mgr-share:SUNWgnome-file-mgr<Y      SUNWxwpft<_,SUNWgnome-fun-applets-root<e$UNWgnome-fun-applets-share<s SUNWgnome-fun-applets<ˆ   SUNWxwslb<²     SUNWxwslx<Á     SUNWxwsrc<ÇSUNWgnome-games=^    SUNWxwsrv=l SUNWgnome-games-root=rSUNWypr=– SUNWgnome-games-share=œSUNWypu=ÛSUNWzip>óSUNWzsh>SUNWeslu>ÿSUNWgnome-help-db?$UNWgnome-help-viewer-share?! SUNWgnome-help-viewer?3$SUNWgnome-hex-editor-roSUNWicux?Æ SUNWgnome-print-

So, it appears that I can't add (or edit) the file directly...
0
 
LVL 48

Expert Comment

by:Tintin
ID: 12343531
Why do you want to do it manually?

Once you've synced /var/sadm/pkg and /var/spool/pkg from server1, you can then happily test new packages on server2, and when happy, install it on server1.
0
 
LVL 38

Expert Comment

by:yuzh
ID: 12343773
Hi  ramble,

    Tintin has given you good infor.

     For your information, you don't have to copy the program from server1 to server2 at
all, you can simply setup NFS mount to mount server1:/usr/local on server2, and you only
have to worry about update server1 when you need to, all the software will work without
problem, that's the way I do it in my network.

     

     
0
 

Author Comment

by:ramble
ID: 12348868
Yes, Tintin did give me good information.

I made a mistake and typed: cat pkg

I thought it was a file...not a directory... *duh*.

*BUT*.  I misrepresented the problem a bit.  Both are NOT identical servers (as I initially posted in this question).  They have different RAID managers.  And, one is based on PCI architeture and the other is SunBUS architecture.

So, the reason I was thinking about manually adding, is because I would need to be selective.  An RSYNC on that directory would probably result in the system malfunctioning...or the Raid Array not coming up.

Is there any problem with me simply just coping the packages selectively from the pkg directory?

BTW: /var/spool/pkg is empty on both servers.
0
 

Author Comment

by:ramble
ID: 12349046
There's over 1000 entries in the /pkg directory.  Most start with SUNW...

It's starting to appear that what I'm wanting to do isn't feasible...
0
 
LVL 38

Assisted Solution

by:yuzh
yuzh earned 400 total points
ID: 12353776
Why not simplely use NFS to mount server1:/usr/local on server2?

rsync is not a good tool for ONE OFF copy (the first time is very slow, it is a good tool
for sync 2 file system!)

you can use "ssh + tar" to copy the software accross. eg:

at server2, you do:

cd /user/local
ssh root@server1 "cd /usr/local ; tar cf -)" | tar -xvf -

You can forget about copy the pkginfor stuff to /usr/local, please make a note of what
you done in server2.



0
 

Author Comment

by:ramble
ID: 12368561
Thanks
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
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.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses
Course of the Month14 days, 5 hours left to enroll

809 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