LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   put -r not working in sftp to copy the whole directory from one server to another server (https://www.linuxquestions.org/questions/linux-newbie-8/put-r-not-working-in-sftp-to-copy-the-whole-directory-from-one-server-to-another-server-4175585464/)

sid62065 07-25-2016 05:50 AM

put -r not working in sftp to copy the whole directory from one server to another server
 
Hi all,

We are moving from AIX 7100-03-04-1441 to Oracle Linux 6.5 2.6.32-573.22.1.el6.x86_64. We use put -r inside sftp to copy the directory and its content from the local server to the remote server. But in Linux, the command put -r throws the below error : Invalid flag -r. Is recursive put not supported in newer versions of Linux? Is there any other way we can copy the directory and its content through sftp? Thanks.

pan64 07-25-2016 05:55 AM

http://unix.stackexchange.com/questi...er-a-directory
I would suggest you rsync too.

sid62065 07-25-2016 06:24 AM

Hi,

Getting the below error while using rsync :
rsync: connection unexpectedly closed (0 bytes received so far) [sender]rsync error: unexplained error (code 255) at io.c(600) [sender=3.0.6]

pan64 07-25-2016 06:28 AM

what did you try at all?

sid62065 07-25-2016 06:37 AM

Sorry for not providing the details, just was doing a test.

trying to sync test1 dir from below path in lserver1(app01.prz.ap.com) to rserver (app02.prz.ap.com)

/ngs/app/essbase/test1

rsync -a test1 user@app02.prz.ap.com:/home/essbase/Appfiles/test1

asks for logging into app02.prz.ap.com and the gives the error once the password is provided :

got the error :rsync: connection unexpectedly closed (0 bytes received so far) [sender]rsync error: unexplained error (code 255) at io.c(600) [sender=3.0.6

Thanks.

hydrurga 07-25-2016 06:50 AM

Quote:

Originally Posted by sid62065 (Post 5580943)
Sorry for not providing the details, just was doing a test.

trying to sync test1 dir from below path in lserver1(app01.prz.ap.com) to rserver (app02.prz.ap.com)

/ngs/app/essbase/test1

rsync -a test1 user@app02.prz.ap.com:/home/essbase/Appfiles/test1

asks for logging into app02.prz.ap.com and the gives the error once the password is provided :

got the error :rsync: connection unexpectedly closed (0 bytes received so far) [sender]rsync error: unexplained error (code 255) at io.c(600) [sender=3.0.6

Thanks.

Are you certain that the target directory exists?

Also, you say that you're running the command from /ngs/app/essbase/test1, but you then rsync a directory in the current directory called test1. Is your local directory structure really /ngs/app/essbase/test1/test1?

pan64 07-25-2016 06:52 AM

you can also try rsync --debug .... to check what's happening


All times are GMT -5. The time now is 05:42 PM.