LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 02-28-2013, 12:24 PM   #1
prathamesh7478
LQ Newbie
 
Registered: Feb 2013
Location: Pune
Distribution: Unix,Solaris,Ubuntu.
Posts: 25

Rep: Reputation: Disabled
Copyind files between two servers


Hello Guys,

I have to copy huge myswl files between two servers
But being new to unix i am not aware how to copyit
Can you give me some examples.
 
Old 02-28-2013, 12:25 PM   #2
suicidaleggroll
Senior Member
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 2,805

Rep: Reputation: 995Reputation: 995Reputation: 995Reputation: 995Reputation: 995Reputation: 995Reputation: 995Reputation: 995
Assuming you have an ssh server running on the destination machine:

Code:
scp -p /path/to/file user@destserver:/path/to/destination/

Last edited by suicidaleggroll; 02-28-2013 at 12:30 PM.
 
1 members found this post helpful.
Old 02-28-2013, 03:09 PM   #3
prathamesh7478
LQ Newbie
 
Registered: Feb 2013
Location: Pune
Distribution: Unix,Solaris,Ubuntu.
Posts: 25

Original Poster
Rep: Reputation: Disabled
Thanks dude it was really helpfull
 
Old 02-28-2013, 11:26 PM   #4
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,539

Rep: Reputation: 462Reputation: 462Reputation: 462Reputation: 462Reputation: 462
you can also use rsync to move files around both locally on the same box as well as across the LAN/WAN/WWW

scp = secure copy
rsync = remote synchronization

rsync can be used with ssh (secure shell) just like scp does for encryption.

a basic rsync without CheckSum is as follows:

Code:
rsync -aviS /path/to/file(s)/ remote_user@remote_IP_DNS:/path/to/put/file(s)/
you can also reverse this and have the files pulled from the remote to the local:

Code:
rsync -aviS remote_user@remote_IP_DNS:/path/of/remote/file(s)/ /path/to/put/local/file(s)/
if you wish to add CheckSum (will drastically increase transfer time) replace -aviS with -aciHXv

### -c Checksum comparison (takes longer, but recommended for backups)
### -H Preserve hard linkes
### -X Preserve Extended Attributes (ACLs, SELinux contexts, etc...)
### -i "in-place" and dropped the -S "sparse" option

the reversal i did with rsync you can also do with scp the same way.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] diff between files at different servers ZAMO Linux - General 1 03-18-2010 10:34 PM
Compare files in two different servers elainelaw Linux - Software 2 07-16-2009 07:35 AM
Share files between servers? nutnut Linux - Server 4 10-04-2008 04:03 PM
How would I keep files on two servers synchronised? hymerman Linux - Software 6 09-15-2008 03:36 AM
Replicating files between servers. cpgeorge Linux - Networking 6 12-10-2004 10:07 AM


All times are GMT -5. The time now is 07:12 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration