Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Replication

Posted on 2004-04-30
10
Medium Priority
?
327 Views
Last Modified: 2010-04-20
Hi Experts,

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

Thank you.
0
Comment
Question by:fpoyavo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 17

Expert Comment

by:owensleftfoot
ID: 10959993
There are several differnt ways - ftp,samba,nfs,uucp. What distro are the boxes running?
0
 
LVL 1

Author Comment

by:fpoyavo
ID: 10960168
I have redhat 8. Both machines have samba (there is no nfs, ftp is installed).
0
 
LVL 17

Expert Comment

by:owensleftfoot
ID: 10960305
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.
0
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
LVL 1

Author Comment

by:fpoyavo
ID: 10960404
What if I would replicate starting from root ? How it can be done ?
0
 
LVL 17

Expert Comment

by:owensleftfoot
ID: 10960461
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.
0
 
LVL 1

Author Comment

by:fpoyavo
ID: 10961676
What happens if some directories already exist ?
0
 
LVL 1

Author Comment

by:fpoyavo
ID: 10961683
Another thing I have noticed that some executables don't have X attribute after copied via samba. Why ? How to avoid it ?
0
 
LVL 40

Accepted Solution

by:
jlevie earned 2000 total points
ID: 10961984
In the general case transferring an application from one system to another via Samba is unlikely to work. File/dir ownership and permissions won't be preserved with a direct copy. It is possible to use Samba shares or FTP as a transport media by tar'ing up an application directory on one system, copying the tar image to the other, and upacking it there, something like:

1) On system A

# cd /opt
# tar cvzf myapp.tar.gz myapp

2) Use FTP or Samba to copy /opt/myap.tar.gz to system B and there execute:

# cd /opt
# tar xvpf /path-to/myapp.tar.gz

Note that this may not be completely successful if the application requires specific things (config files, data dirs, special user accounts) to exist outside of /opt/myapp. Any of that must also be copied and/or set up on the target system.
0
 
LVL 2

Expert Comment

by:patrick24
ID: 10968623
use rsync :)

cheers
0
 
LVL 8

Expert Comment

by:da99rmd
ID: 10975719
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
0

Featured Post

Create CentOS 7 Newton Packstack Running Keystone

A bug was filed against RDO for the installation of Keystone v3. This guide is designed to walk you through the configuration for using Keystone v3 with Packstack. You will accomplish this using various repos and the Answers file.

Question has a verified solution.

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

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

664 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