sync directories without ssh


 
Thread Tools Search this Thread
Operating Systems Solaris sync directories without ssh
# 1  
Old 04-20-2012
Error sync directories without ssh

Developers write application programs in a directory say /oraas/testappl. Once they complete testing they copy application files to /oraas/liveappl.

I would like to do:- As soon as any file is copied to /oraas/liveappl, I would like to copy the same file to /oraas/liveappl on another server. Now it is done with SSH. But I like to do it without ssh, as developers can ssh to that server !

Can I pick file which is copied from the directory and copy to another server automatically. Any idea on script / cron etc ?

thanks Smilie
# 2  
Old 04-20-2012
Without ssh: ftp, tape, nfs mounted disks. Since you want an instant approach, I would guess you want to use nfs.

Please advise what connectivity method you want, then we can go from there.

By the way, I don't understand why you want to avoid sftp/scp (all based on ssh) . Just because someone else can use a network protocol does not automatically make it a bad idea for you to use the same one.
This User Gave Thanks to jim mcnamara For This Post:
# 3  
Old 04-20-2012
Thanks jim for your reply.
on Server-A: /oraas/testappl ->testappl owner, /oraas/liveappl ->oracle owner
on Server-B: /oraas/liveappl ->oracle owner

we can do ftp,etc but for that you need manual intervention. Is there any way to PICK the COPIED file from Server-A & copy to Server-B (/oraas/liveappl), Automatically ? I don't want Testappl user of Server-A to have any access on Server-B !

I am sorry, if I could not explain my requirement properly.
# 4  
Old 04-25-2012
Hi there,

Have you tried this:

1: Create a regular user account and home directory for your user
# /usr/sbin/adduser jones
2: Add the user to the AllowedUsers in your /etc/ssh/sshd_config file
AllowUsers jones smith
3: Restart sshd
# /etc/init.d/sshd restart
4: Check that you can login remotely as that user - ssh and sftp should both work
% ssh jones@yourhost
% sftp jones@yourhost
5: Figure out where you sftp-server executable lives - look in /etc/ssh/sshd_config for this line:
Subsystem sftp /usr/lib/openssh/sftp-server
6: Edit /etc/passwd and replace the default shell for your user with this path
jones:x:1004:1004:Rob Jones,,,:/home/jones:/bin/bash becomes: jones:x:1004:1004:Rob Jones,,,:/home/jones:/usr/lib/openssh/sftp-server
7: Connecting with sftp should now work normally but if you try ssh you will get prompted for the password at which point nothing will happen.
This User Gave Thanks to juan.brein For This Post:
# 5  
Old 04-25-2012
try rsync command, and if you dont want to give password to anyone, just create an user and generate the public keys to enable password less ssh between the hosts, and after you may execute rsync using that user with the help of cron.

---------- Post updated at 07:31 AM ---------- Previous update was at 07:26 AM ----------

or you may also go with unison tool in linux.
This User Gave Thanks to Rajeshc For This Post:
# 6  
Old 04-25-2012
Thank you guys....
# 7  
Old 05-08-2012
Rsync 100% will do what you want. You can put it in cron to sync however often you want.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

Giving read write permission to user for specific directories and sub directories.

I have searched this quite a long time but couldn't find the right method for me to use. I need to assign read write permission to the user for specific directories and it's sub directories and files. I do not want to use ACL. This is for Solaris. Please help. (1 Reply)
Discussion started by: blinkingdan
1 Replies

2. Shell Programming and Scripting

Rsync from remote machine via ssh and sync by uisng find by modified time

Hi I have a requirement to rsync from remote to local machine via ssh and sync files that are changed in last n hours. pgrep to check if no other sync is running pgrep -f rsync.*/opt > /dev/null || rsync --bwlimit=10000 -avz --delete root@X.X.X.X:/var/source/ /opt/dest/ >> /home/log 2>&1... (0 Replies)
Discussion started by: robo
0 Replies

3. UNIX for Dummies Questions & Answers

List the directories, having given pattern in the directories name, sorted by creation date

It is for HP-Unix B.11.31. Requirement: 1. List the directories, having given pattern in the directories name, sorted by creation date. Example: Directories with name "pkg32*" or "pkg33*" 2. On the output of 1. list the directories by creation date as sort order, with creation date... (2 Replies)
Discussion started by: Siva SQL
2 Replies

4. Shell Programming and Scripting

How to list all the files, directories and sub-directories in the current path except one directory?

Can anyone come up with a unix command that lists all the files, directories and sub-directories in the current directory except a folder called log.? Thank you in advance. (7 Replies)
Discussion started by: Manjunath B
7 Replies

5. OS X (Apple)

directories which start with dot (.) as .ssh .vim etc?

Why this directories start with . and not without . ? I am very curious :( (1 Reply)
Discussion started by: c_lady
1 Replies

6. Shell Programming and Scripting

How to list all the directories, sub directories in a mount along with size in ascending order?

Hi , I am very new to unix as well as shell scripting. I have to write a script for the following requirement. In a particular mount, have to list all the directories and sub directories along with size of the directory and sub directory in ascending order. Please help me in this regard and many... (4 Replies)
Discussion started by: nmakkena
4 Replies

7. Shell Programming and Scripting

Script for parsing directories one level and finding directories older than n days

Hello all, Here's the deal...I have one directory with many subdirs and files. What I want to find out is who is keeping old files and directories...say files and dirs that they didn't use since a number of n days, only one level under the initial dir. Output to a file. A script for... (5 Replies)
Discussion started by: ejianu
5 Replies

8. Shell Programming and Scripting

check if multiple directories exist else create missing directories

Hi , I 'm trying to check if multiple directories exist on a server, if not create the missing ones and print " creating missing directory. how to write this in a simple script, I have made my code complex if ; then taskStatus="Schema extract directory exists, checking if SQL,Count and... (7 Replies)
Discussion started by: ramky79
7 Replies

9. Solaris

Sync to Green vs. Separate Sync

Hi all....I have a Sun Ultra2 that I want to use with my PC monitor. I have purchased an adapter that does not work and I was told I need to change my video card setting (if I can) to Separate Sync.....my Monitor product number ends in 1343......I am running SunOS 5.7 ......anyone have any ideas? ... (0 Replies)
Discussion started by: psantinello
0 Replies
Login or Register to Ask a Question