Questions tagged [lftp]

lftp is a file transfer program that supports several network protocols.

Filter by
Sorted by
Tagged with
0 votes
1 answer
24 views

How to have `lftp` compare directories and only sync changed files?

The entirety of my question is summed up in the title. If there isn't a way to do this, what FTPS-compatible alternative would allow it? I'm running Debian GNU/Linux 11 (Bullseye) Stable.
user avatar
  • 174
0 votes
1 answer
42 views

Can't delete a hidden file on a linux server

I've a backups linux server where I upload my backups via lftp. I don't have any other way to access this server. For some reason I can't delete a hidden file. $ls -la drwxr-xr-x 2 100 ...
user avatar
  • 103
0 votes
0 answers
103 views

How to automatically remove a remote sftp folder after sync?

I'm using the following command to download all files from an sftp, and remove the remote files afterwards: /usr/bin/lftp sftp://user@host -e "set sftp:auto-confirm yes; mirror --delete --...
user avatar
0 votes
0 answers
90 views

Is there an alternative command or way to speed up find in LFTP?

There is an FTP server I'm connecting to, and it could possibly have 20-30k zip files and an assortment of subdirectories. I would like to return a list of all of these files based on their extension, ...
user avatar
  • 3
0 votes
0 answers
277 views

Connect to SFTP via a http proxy in lftp?

I am behind a http proxy (http://localhost:8080). I want to connect to my sftp server via this http proxy using the lftp command. How to do that ? My lftp command now is lftp sftp://... How to ...
user avatar
0 votes
0 answers
205 views

Transferring a 28GB directory with lftp:mirror was slow and caused 4 TB of bandwidth usage

I'm writing this post in hopes to learn what I did wrong. Linux isn't my forte, but I am comfortable with it and do read the man pages when I don't remember how to perform a task. Hopefully someone ...
user avatar
0 votes
1 answer
393 views

"find" using LFTP tries to access arguments

I connect via lftp -u username, sftp://server.name.com:/directory to a sftp-server, which works correctly. Anyhow, I want to use find. -name *someWildcardExpression -type f -delete in order to delete ...
user avatar
  • 103
1 vote
1 answer
409 views

Lftp --newer-than is downloading empty directories

I am trying to use lftp to download only new files files from a remote sftp server to the local server This is what I am doing: lftp sftp://user@remoteserver cd to the directory then: mirror --newer-...
user avatar
1 vote
0 answers
2k views

TLS 1.2 connection with lftp

I'm trying to connect to a server from my RHEL 7 server that only accepts FTPS, TLS 1.2 connections. The only client available seems to be lftp. When I try to connect, it hangs on "TLS negotiation......
user avatar
  • 11
1 vote
1 answer
2k views

How to log some, but not all, lftp transfers

I have an lftp script file that I use for mirroring some directories over sftp, so I run the command using something like lftp -f mirror_dirs.lftp. I would now like to log the transfers to a specific ...
user avatar
2 votes
1 answer
594 views

Specify key exchange protocol with lftp

I have to download some (large) data from a distant server. The remote IT people suggest using lftp sftp://user@server.domain:port. However, when I type ls, I read: `ls' at 0 [Unable to negotiate ...
user avatar
0 votes
0 answers
263 views

vsftpd uses TLS1.1 even after disabling

I have disabled TLS1.1 and SSLv3 in my vsftpd.conf ssl_tlsv1_1=NO ssl_tlsv1_2=YES ssl_tlsv1=NO ssl_sslv2=NO ssl_sslv3=NO ssl_ciphers=DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-DSS-AES128-...
user avatar
  • 173
0 votes
1 answer
3k views

lftp behind firewall – what ports need to be opened?

I need to setup a secure file transfer from Linux client to z/OS ftp server using TLS 1.2 secure protocol. I am trying to use the lftp client for this purpose. My Linux server is behind a firewall. I ...
user avatar
  • 1
0 votes
1 answer
654 views

A way to stop lftp from issuing "CWD /" when transferring a file

Given an lftp command similar to the following: lftp -vv -d -c set ssl:ca-file /path/to/cert/ftps_cron-bundle.crt; set ssl:check-hostname no; set ftp:ssl-protect-data true; set sftp:connect-program "...
user avatar
  • 505
1 vote
2 answers
2k views

trust server certificate with lftp

When connecting to a server with lftp, I have the following issue: Certificate verification: Not trusted: no issuer was found (AA:AA:AA:[...]:AA:AA) Which indicates at least that the cert ...
user avatar
  • 155
1 vote
5 answers
799 views

How to copy millions files from dedicated server to AWS EC2? [closed]

I have a website that needs to move from a dedicated server to AWS EC2 instance. I have 650GB+ data and 3+ million files. I tried using SCP like this but because of huge file it taking so much time. ...
user avatar
  • 11
3 votes
3 answers
1k views

Does LFTP support keepalive for FTP/SFTP?

In the documentation it's not clear whether lftp support keepalive for FTP and SFTP protocols. Does someone know the answer?
user avatar
2 votes
1 answer
1k views

How do I specify an MVS data set name when using lftp?

We have a Linux server that needs to send a file to a z/OS mainframe using FTPS. How do we specify the MVS data set name we want to create? When we try to FTP the file, it always prepends the ...
user avatar
  • 21
0 votes
0 answers
795 views

Simple Command for Cron Job that will FTPS a Text File to Remote Server

I am trying to have a text file moved routinely from our server to a remote server. The remote server requires ftps protocol and our servers IP address to be whitelisted (which I have done). The best ...
user avatar
0 votes
0 answers
325 views

best way to backup data to a sftp server

In my projects, I have work on a 800 GB of data (that includes data and codes). Some part of my data is constituted by somewhat large files, ~1GB, but I have also some folder with thousands of small ...
user avatar
  • 197
3 votes
1 answer
1k views

How to disable Lftp chmod permissions warning?

I use this script (launching lftp with some options) to mirror a local folder and a website. #!/bin/bash HOST="myhost.com" USER="user" PASS="xxxxxx" lftp -c "set ftp:list-options -a; set cmd:fail-...
user avatar
  • 133
0 votes
1 answer
192 views

Prefixing protocol for address in ssh and lftp

I'm using ssh to connect to my remote server. I'm able to do so fine using the regular SSH commands, but using lftp to connect requires prepending sftp:// to the address for it to work. What's the ...
user avatar
  • 1
4 votes
0 answers
651 views

Resuming segmented file transfer

When I run an lftp command like this: mirror --use-pget-n=10 "My Directory" sometimes I find myself in a situation, that the computer was unexpectedly shutdown, say, during a blackout. After that, ...
user avatar
3 votes
0 answers
598 views

lftp mirror -I and mirror -i don't work

I am using the following command lines to mirror a remote server to my local directory: $ lftp -d -c 'open -e "mirror -i ^ABC . mirrordir/" http://ftp.abc.com/dir1/dir2' $ lftp -d -c 'open -e "...
user avatar
0 votes
1 answer
222 views

Received time of file in Linux

I'm sending a file from one server to another via lftp. Suppose S1 and S2 is two server. A file file1 is created at S1 at Mar 27 19:41. ls -ltrh shows it. I sent the file to S2 at Mar 28 20:00 ...
user avatar
3 votes
1 answer
345 views

lftp: bash equivalent of command substitution backticks or $()

Is it possible to use bash-like command substitution, like backticks `` or $() with lftp? This is to e.g. cd into a directory given by a command: lftp .. cd `pwd`
user avatar
  • 133
2 votes
1 answer
967 views

Add time offset for mirroring via lftp

I am working on a CI runner in GitLab which is supposed to transfer changed files via FTP to a development environment. lftp seemed to be a good solution for doing so as it's easy to use and not ...
user avatar
  • 121
1 vote
0 answers
335 views

lftp bi directional syncing

How to sync directories on two different machines? If I change/add/delete a file on the windows machine, it should be changed/added/deleted on the linux machine and vice versa. I have to use lftp to ...
user avatar
1 vote
0 answers
573 views

Downloading large file via SFTP timeout

I've been trying to download a 3GB file from an SFTP server. However, I keep getting timeout. Downloading a smaller size file works without issue. I tried in different workstations and servers as well ...
user avatar
  • 649
1 vote
0 answers
556 views

lftp miror does not remove extra files

I'm trying to mirror remote ftp to local dir: lftp -u 'user','pass' -e 'mirror -vv ./wp-content ./ && ex' sftp://x.x.x.x -p 22 Old file `cache/index-https-mobile.html' is not removed Old ...
user avatar
  • 821
1 vote
2 answers
1k views

lftp: where are bookmarks stored on debian jessie?

Bookmarks are saved but I get an empty (new file) when I run bookmark edit inside lftp and I don't have any ~/.lftp/bookmarks file. For information, I add bookmarks like this: $ lftp sftp://username@...
user avatar
  • 111
0 votes
1 answer
188 views

Recommended file extension for Linux 'lftp' scripts?

lftp allows to execute commands from the script file by using -f option (as described on man page), e.g. lftp -f my-lftp-script-file Is there any file extension that is recommended (or just widely ...
user avatar
  • 101
2 votes
0 answers
244 views

Retrieving from ftp dirs with wildcards

What is the most efficient way to retrieve all relevant data from ftp if the address of said data can be specified with wildcards as below: ftp://ftp.some.site.gov/data/directory/only/*/these/*/*...
user avatar
  • 121
1 vote
1 answer
1k views

Working with LFTP, find and -exec option throws error

What is wrong with the following lftp command? There files on server. I am trying to get their names without any path in it (like ./) Just file names. lftp -u user,password -e 'find -exec basename {} ...
user avatar
0 votes
1 answer
608 views

All Time Lftp Mirroring

How to make lftp run in background all time and push any change made to a local folder to a folder on remote server. The normal reverse mirror command isn't working for all time and specific to ...
user avatar
0 votes
1 answer
815 views

How do I attach running lftp process

I have lftp process running for days at a time on a CentOS machine. I read the lftp man pages and discovered the attach command. However when I call it with the respective process id from the lftp ...
user avatar
  • 1
-1 votes
1 answer
122 views

Automatically lcd to ~/Downloads on every lftp connect

How can I configure lftp to automatically lcd to ~/Downloads whenever I connect to any FTP server?
user avatar
  • 2,976
1 vote
1 answer
844 views

How can I permanently disable directory caching in lftp?

I attempted to configure my $HOME/.lftp.rc to permanently disable directory caching (it has a nasty habit of never bloody updating). https://raw.githubusercontent.com/mcandre/dotfiles/master/.lftp.rc ...
user avatar
  • 2,976
1 vote
0 answers
1k views

lftp mirror mode over hftp/proxy not working

When I connect lftp over an http proxy using hftp and try to use mirror mode, no files are transferred. dir and get work fine. Mirror mode works fine when I connect directly. Here is the script I ...
user avatar
  • 291
1 vote
1 answer
1k views

shell script file (.sh) - dynamic command

I'm trying to build a dynamic command to execute in an .sh file, however, when I do it, it seems that somehow it adds \r characters so command is not correctly executed. Notice that I'm running this ...
user avatar
  • 151
1 vote
1 answer
3k views

Connection to Microsoft FTP server hangs when transferring thousands of files

I am seeing that some ftp clients cannot complete when transferring thousands of files to an FTP server. The mput * command runs for several hours and then hangs in 150 Opening BINARY mode data ...
user avatar
-1 votes
1 answer
539 views

bash script with lftp with redirected input

I need lftp to connect to a list of hosts from a list file which are in IP address format. Then, if a ftp server is up, log that address (and if possible, device type, in this case routers) to a text ...
user avatar
  • 1
0 votes
2 answers
164 views

Move files from one server directly to another server without writing to PC disk

Forgive me if I word this Poorly. I'm working with a Linux desktop and several ESXi hosts. Lets name my desktop Desk-1 and the ESXi hosts ESXi-1 and ESXi-2 for simplicity's sake. I'd like to move ...
user avatar
7 votes
1 answer
13k views

How to enable lftp protocol logging?

We are trying to get lftp to log all its protocol commands (during the login). I see several verbose options in the man page but the all have to do with a specific command issued after logging in (...
user avatar