Link to home
Start Free TrialLog in
Avatar of fpoyavo
fpoyavoFlag for United States of America

asked on

Replication

Hi Experts,

How do I replicate my application located on IP1server ( /opt/myapp) to IP2server (/opt/myapp) ?

Thank you.
Avatar of owensleftfoot
owensleftfoot

There are several differnt ways - ftp,samba,nfs,uucp. What distro are the boxes running?
Avatar of fpoyavo

ASKER

I have redhat 8. Both machines have samba (there is no nfs, ftp is installed).
Set up your application directory as a share in smb.conf Restart samba - service smb restart. In the other box create a mountpoint for it under /mnt, ie
mkdir /mnt/box1
Mount it with mount -t smbfs //machinename/sharename /mnt/box1
Go to /mnt/box1 and copy the files wherever you want.
Avatar of fpoyavo

ASKER

What if I would replicate starting from root ? How it can be done ?
Set up root as a share. In the file /etc/samba/smb.conf of the server you want to copy files from add the following.

[root]
comment = root partition
path = /
browseable = yes
public = yes

Restart samba ie service samba (or smb) restart
From the other box issue the command mount -t smbfs //otherbox/root /mnt/yourmountpoint.
Avatar of fpoyavo

ASKER

What happens if some directories already exist ?
Avatar of fpoyavo

ASKER

Another thing I have noticed that some executables don't have X attribute after copied via samba. Why ? How to avoid it ?
ASKER CERTIFIED SOLUTION
Avatar of jlevie
jlevie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
use rsync :)

cheers
Do you have ssh installed then use scp its safer and easy just do like this:
scp (filename) user@(ip):(path)
and you are done if this must be made automatic just add the host_keys to the host then you dont have to put in a pass and can be run from for example cron.

/Rob