Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Migrating data from server A to server B - Remote sites 2

Status
Not open for further replies.

josel

Programmer
Oct 16, 2001
716
US
Howdy!

I have two servers and I need to transfer a lot of data
from A to B. Server A is current operation server. Server B is a new server we are migrating to.

I do not have a working backup device on server A. Server
B is in Houston while server A is in Miami. They are both
members of the same network thus I am able to telnet/ftp
between them.

I know how to get rcp to copy from A to B but was wondering if there was a faster way. Perhaps, backup from A to a file in B and then restore from said file.

All suggestions will be greatly appreciated.

Thanks;

Jose Lerebours



KNOWLEDGE: Something you can give away endlessly and gain more of it in the process! - Jose Lerebours
 
The method you choose will depend upon a few factors:
How fast are the systems?
What is the connection speed?
Do you have a compression-enabled tar command?

Setting all that aside for now, this is how I typically do this:

On Server B (the receiving end), create a little script called "get.serverA". Place it in the /usr/local/bin directory.

Contents of "get.serverA" script:
umask 0
cd /in
tar xf -

On ServerB, run this command:
# umask 0
# cd /appdir
# tar cvf - .|rcmd serverB /usr/local/bin/get.serverA

This assumes you have root equivalence on both ends. You will need to change the path locations to suite your needs, but I wouldn't allow the receiving end to drop the results into the / directory!!!
One of the benefits of this option is that you preserve file ownership, permissions, and modification times. If your tar command supports compression, be sure to add that option. You could also just tar into a file, compress the file and ftp it over.

If this is an ongoing migration, you'll want to check out "rsync" (of which I know nothing, but suspect it's a good fit).

If these ideas don't help, please give more information about the quantity of data, line speed, O/S version, etc.

"Proof that there is intelligent life in Oregon. Well, Life anyway.
 
rsync (over ssh) is definitely the way to go.
it is a great tool for mirroring, and it will maintain permissions, UID, modification date/time, sym-links, etc.
it can be restarted and or rerun multiple times and will only transfer the changes or differences.
 
Thank you guys for your suggestions. They both are great and I think I can use them both.

Regards;


Jose Lerebours


KNOWLEDGE: Something you can give away endlessly and gain more of it in the process! - Jose Lerebours
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top