LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 07-25-2016, 05:50 AM   #1
sid62065
LQ Newbie
 
Registered: Jul 2016
Posts: 3

Rep: Reputation: Disabled
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.
 
Old 07-25-2016, 05:55 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,830

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
http://unix.stackexchange.com/questi...er-a-directory
I would suggest you rsync too.
 
1 members found this post helpful.
Old 07-25-2016, 06:24 AM   #3
sid62065
LQ Newbie
 
Registered: Jul 2016
Posts: 3

Original Poster
Rep: Reputation: Disabled
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]
 
Old 07-25-2016, 06:28 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,830

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
what did you try at all?
 
Old 07-25-2016, 06:37 AM   #5
sid62065
LQ Newbie
 
Registered: Jul 2016
Posts: 3

Original Poster
Rep: Reputation: Disabled
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.
 
Old 07-25-2016, 06:50 AM   #6
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by sid62065 View Post
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?
 
Old 07-25-2016, 06:52 AM   #7
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,830

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
you can also try rsync --debug .... to check what's happening
 
  


Reply



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
LXer: Install and Configure SFTP server on ubuntu 16.04 (Xenial Xerus) server LXer Syndicated Linux News 0 06-01-2016 09:44 PM
Problem using SFTP to copy files onto server vishawdeep Linux - Newbie 27 03-08-2016 10:42 AM
Delete a Directory tree from SFTP Server VijayB Linux - Newbie 4 01-21-2015 09:51 PM
copy whole directory to ftp server thunyiwe Linux - General 1 10-31-2010 09:00 PM
Kickstart files put on http server directory ? Gates1026 Linux - General 0 01-27-2004 10:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:11 PM.

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