LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-18-2015, 08:32 PM   #1
ilovecentos
LQ Newbie
 
Registered: Sep 2015
Posts: 15

Rep: Reputation: Disabled
regarding SCP


how to copy the directory from remote host to another remote host. If im using filezilla it would be take much time.
here a situation. i need to copy directory from server 1.1.1.1 to another server 2.2.2.2. please help me.
 
Old 10-18-2015, 09:45 PM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Code:
scp -r 1.1.1.1:/source_directory 2.2.2.2:/target_directory
 
Old 10-19-2015, 02:47 AM   #3
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,380
Blog Entries: 3

Rep: Reputation: 3772Reputation: 3772Reputation: 3772Reputation: 3772Reputation: 3772Reputation: 3772Reputation: 3772Reputation: 3772Reputation: 3772Reputation: 3772Reputation: 3772
rsync is another option, especially if you are re-copying the data or resuming an interrupted transfer. Log in to 1.1.1.1 and then transfer to 2.2.2.2

Code:
rsync -av /source_directory/ 2.2.2.2:/target_directory/
rsync copies only the changes, so it will save time and bandwidth after the first copy. It works over SSH by default these days so it is secure like scp.
 
1 members found this post helpful.
Old 10-20-2015, 04:52 AM   #4
ilovecentos
LQ Newbie
 
Registered: Sep 2015
Posts: 15

Original Poster
Rep: Reputation: Disabled
Code:
rsync -av /source_directory/ 2.2.2.2:/target_directory/
thank you, found these command make my transfer things become easier.
 
  


Reply

Tags
scp


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
Shell scp works perfectly, Net::SCP::Expect calls timing out - reasons? EnderX Programming 1 04-27-2013 01:35 AM
Centos 6.3 host+guest: try scp to guest: scp cmd not found. ssh ok chrism01 Linux - Virtualization and Cloud 3 08-24-2012 01:52 AM
[SOLVED] ssh scp key not working to ssh/scp without password anon091 Linux - Newbie 9 08-22-2011 04:28 PM
scp does not work and gives the following error message: scp: FATAL: Executing ssh1 i akay Linux - Networking 16 09-28-2008 11:41 PM
scp help akhil.mud Programming 6 04-14-2008 08:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:23 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration