fpoyavo
asked on
Replication
Hi Experts,
How do I replicate my application located on IP1server ( /opt/myapp) to IP2server (/opt/myapp) ?
Thank you.
How do I replicate my application located on IP1server ( /opt/myapp) to IP2server (/opt/myapp) ?
Thank you.
There are several differnt ways - ftp,samba,nfs,uucp. What distro are the boxes running?
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.
mkdir /mnt/box1
Mount it with mount -t smbfs //machinename/sharename /mnt/box1
Go to /mnt/box1 and copy the files wherever you want.
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.
[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.
ASKER
What happens if some directories already exist ?
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
use rsync :)
cheers
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
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