Cannot get lftp to work -- need to transfer a directory

edlentz

New Member
Joined
Apr 13, 2022
Messages
6
Reaction score
0
Credits
46
I have a Centos system with lftp installed. There is a sftp server I need to connect to (I have no control over it). I can use lftp to connect to the server just fine. The issue is that I cannot use the mirror function to move the directory from the local system to the sftp server. The files I need to move are at /var/spool/asterisk/monitor. After connecting I can lcd to that directory and I get an OK. Then I send mirror -R Then the reply is:
cd `.' [Connecting...]
It freezes there, until I do a ctrl C

Why or what am I doing wrong? This is driving me nuts.
Thanks for any help
 


should be something like
lftp -u user,password -e 'mirror --reverse /var/spool/asterisk/monitor sftp://username@server
 
I am getting an error "command not found" My password ends with C! I have tried to put it in quotes and apostrophes with no luck.
 
Figured out that I needed to close the apostrphe Getting Mirror: Not Connected 1 error detected
 
I am at my wits end with this. I had a crude script that transferred files from a different directory to the same ftp server that worked every day for months. The user wanted a different directory and wanted it recursive to get all the sub-directories. So I thought I would edit the working file and move on. It will not work anymore. Can anyone explain this to me? Here is the script that I had working
Code:
#!/bin/expect
spawn sftp user@ftp.*******.com
expect "password:"
send "*********\n"
expect "sftp>"
send "put /var/spool/asterisk/backup/*.gz\n"
expect "sftp>"
send "exit\n"

So all I did was change the directory to /var/spool/asterisk/monitor/ *.*
 

Members online


Latest posts

Top