CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Advanced:
OPENDIR to remote server


New User

May 29, 2006, 11:00 AM

Post #1 of 3 (1658 views)
OPENDIR to remote server Can't Post

I have a script that I run on server1 and it reads the apps directory on server1 and puts all the sub directory names into an array. Works perfectly to that point. Now I am tring to figure out the best way I can read the apps directory and subdirectories on server2 from this script on server1.

1.) Creating a link between the servers of the apps directory is not allowed due to policy restrictions.
2.) Can it be done with the SSH perl module?
3.) Is there a way to use OPENDIR, READDIR, CLOSEDIR to a remote server?

2 UNIX Servers.
server1 /apps
server2 /apps

The Apps files and directories are (should be) identical mirrors on both servers.

Thanks for any suggestions in advance.

Thaumaturge / Moderator

May 30, 2006, 4:24 AM

Post #2 of 3 (1654 views)
Re: [Bex] OPENDIR to remote server [In reply to] Can't Post

Not enough information to give a really useful answer.

What operating systems are running on the servers? How are they networked? What network services are running on the servers?

Something like Net::SSH would probably do the job if you had an ssh daemon running on the server. Or you could do it using FTP or webdav. But my prefered solution would be to use something like NFS or Samba to mount the remote directory onto the local server.

Dave Cross, Perl Hacker, Trainer and Writer
Get more help at Perl Monks

New User

May 30, 2006, 10:56 AM

Post #3 of 3 (1650 views)
Re: [davorg] OPENDIR to remote server [In reply to] Can't Post

2 Aix Servers. All the options you suggested are available but I just wanted to see what solutions others would come up with. I have been programming for some time but I am new to PERL and I wanted to see other ideas.

What I am actually working on is a code migration and promotion script. The thing is that we have 2 clustered servers but there is an apps directory on each server the hold all the applications directories. These are on independant servers for high avaiability.

I have created script prompting from a release directory of applications and versions. Once the user selected the application and version to be promoted then the script will create backups and move the code in as well as do numberous validations. Which is easy to do on a single server but I only want to run the script once from one primary server and have it validate and update the other server. The main thing that I want to run is a validation of the files and directories between the 2 servers before the update takes place.


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives