The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
copy files from remote server (B) to target server (A)? Beginer0705 Shell Programming and Scripting 4 07-29-2009 06:24 PM
Copy folder and its contents from HP Unix server to RH Linux FanTom UNIX and Linux Applications 2 11-24-2008 05:38 PM
Commands to copy a tar.gz file from a Remote Unix Server to Local Desktop. marconi UNIX for Advanced & Expert Users 3 08-28-2008 03:06 AM
Copy a file on remote server sunsysadm2003 Shell Programming and Scripting 1 06-30-2008 01:48 PM
copy folder from one server to another sak900354 UNIX for Dummies Questions & Answers 11 04-23-2008 02:31 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 08-24-2009
anderow anderow is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 12
How to copy folder from one server to remote one using SSH

ok guys.

I have a Centos server running a large website I own. Its is severely struggling under the load and I am having to move to a new load balanced setup.

The servers are both remote (to me) and although I can do most things admin wise in nix, I am struggling a bit to come up with a way to transfer 4 GB of folders (one main and lots of subfiles and directories.)

I was thinking SFTP or FTP but Im not 100% on the command to use.


example info/



Server A - (the one with site on) IP 11.222.333.444

Server B - IP 12.222.333.444

For both servers

user: root
Password: password

The directors I want to copy from Server A to server B

/var/www/html/site.com/




All help is appreciated

---------- Post updated at 06:34 PM ---------- Previous update was at 05:07 PM ----------

ok, I am able to connect to the remote machine and used SCP



scp /var/www/html/mysite root@server******:/user/folder1

then entered the relevant password. All looked fine but then I am getting this



Code:
/var/www/html/mysite: not a regular file



What do I need to change to get it to copy the whole directory??????? and all subdirectories and files? thanks


edit//


SOlved it now. Sorry mods, please close this thread or leave for others who need this info

i had forgotten to user the recursive command. (its late!!)

Got it copying over now


scp -r /var/www/html/mysite root@server1.*******:/tmp/mysite/

Last edited by anderow; 08-24-2009 at 08:39 PM..
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:33 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0