Questions tagged [lftp]

lftp is a sophisticated terminal-based file transfer program with support for FTP, HTTP, FISH, SFTP, HTTPS and FTPS protocols. BitTorrent is also supported.

lftp is a sophisticated terminal-based file retrieval program with support for FTP, HTTP, FISH, SFTP, HTTPS and FTPS protocols.

lftp supports background jobs, mirroring sites, and using multiple connections to speed up downloading of large files. If the program is exited while a file transfer is in progress it will automatically put itself into the background to complete any remaining jobs.

241 questions
5
votes
1 answer

LFTP Reconnect infinite loop

When I try to connect to the host that is dwon I get the following message: cd `sftp://example.com/tmp' [Delaying before reconnect: 30] After each attempt delay sis increasing. I found the following command that should help me: repeat -d 10 -c 1…
meso_2600
  • 1,940
  • 5
  • 25
  • 50
5
votes
1 answer

LFTP Unknown command `;'

I am trying to use LFTP to pull down new file from a server and thing seem to be working fairly well. However, every time I run the script, I get an "Unknown command `;'" error followed by my echo "Download Complete". I have dug through a ton of…
Paige
  • 665
  • 1
  • 9
  • 14
5
votes
3 answers

how to redirect result "!find ..." command to put lftp command

I'd like to put files from result of !find command from lftp. I tried: $> lftp -u foo, sftp://bar lftp foo@bar$> put < !find ./local -type f But failed!! This worked: $> lftp -u foo, sftp://bar lftp foo@bar$> !find ./local -type f | awk '{print…
Luiz Coura
  • 51
  • 1
  • 2
4
votes
4 answers

LFTP in gitlab CI: files are not updated on FTP server even if they are changed in the last commit

we have an issue with GITLAB-CI pipelines when we commit a new modification on the server. We want to update the modification on the FTP server automatically. To do that, we are using a simple CI configuration in gitlaci.yaml file: deploy: …
NicoESIEA
  • 499
  • 1
  • 6
  • 23
4
votes
2 answers

lftp pause and resume download

Googled around and looked on this forum but couldn't find if I can pause a download using lftp. Currently downloading tons of logs and would like to pause, add more drives to the system and continue downloading. Thanks
chowpay
  • 1,515
  • 6
  • 22
  • 44
4
votes
2 answers

Can lftp follow symbolic directories?

lftp can get the files which symbolic links point to, but can it get these files if they are in directories represented by symbolic links? For example, I am looking to get files at…
truthling
  • 134
  • 10
3
votes
3 answers

gitlab-CI pipeline: lftp error 550 when trying to delete files

I am using the free shared runners on the gitlab.com environment. I have a gitlab-CI pipeline that runs the following lftp commands one after the other: lftp -c "set ftp:ssl-allow no; open -u $USERNAME,$PASSWORD $HOST; glob -a rm -r…
Miha Šušteršič
  • 9,742
  • 25
  • 92
  • 163
3
votes
2 answers

Continuous deployment using LFTP gets "stuck" temporarily after about 10 files

I am using GitLab Community Edition and GitLab runner CI setup to deploy (synchronize) a bunch of JSON files on a server using LFTP. This job however, seems to "freeze" for a few minutes every 10 files roughly. Having to synchronize roughly 400…
3
votes
1 answer

GitLab FTP deploy - Job failed: execution took longer than 1h0m0s seconds

Im new to GitLab and CI but I want deploy from GitLab repo to FTP via lftp its goes to lftp and still running 1 hour and then return: ERROR: Job failed: execution took longer than 1h0m0s seconds .gitlab-ci.yml ... deploy: stage: deploy image:…
Shaddow
  • 3,175
  • 3
  • 22
  • 42
3
votes
2 answers

LFTP: save username/password for specific server?

Can I save a username/password pair for an ftp server in some local configuration file, so that lftp will find them automatically when connecting to that server? Background: I have script which will be used by multiple users, with different…
PLL
  • 1,572
  • 1
  • 13
  • 21
3
votes
1 answer

Automated .gitlab-ci.yml lftp configuration

I'm using lftp to automated gitlab ci deployments. I run a script to deploy my code, except 'static' files that I need to upload to other server. Here a sample of my current code. script: - > lftp -e "mirror --exclude ^\.git.* --exclude-glob…
paralosreg
  • 141
  • 1
  • 15
3
votes
1 answer

lftp mirror wrong return code

I am using lftp mirror -R to sync a local dir to a remote sftp dir Just to get myself super clarified, the script my i am running lftp -f is as follows open sftp://hostname port user username password mirror -R local_dir sftp_dir exit However I…
Xinwei Liu
  • 333
  • 6
  • 15
3
votes
1 answer

Speeding up lftp mirroring with many directories

I am trying to mirror a public FTP to a local directory. When I use wget -m {url} then wget quite quickly skips lots of files that have been already downloaded (and no newer version exists), when I use lftp open -u user,pass {url}; mirror then lftp…
econ
  • 547
  • 7
  • 22
3
votes
2 answers

Environment variables in LFTP script

I am trying to run lftp with a script like so: $ lftp -f deploy.scp However I would like to use environment variables for l/p inside deploy.scp like so: open -u $FTP_USER,$FTP_PASSWORD $FTP_HOST; Is that possible in any way? I have struck out…
Ole
  • 269
  • 1
  • 3
  • 8
3
votes
1 answer

LFTP, download only files created the same day I execute LFTP

How do I make LFTP download a file from a remote server only if this file was created TODAY (the same day I run LFTP) ?
Con7e
  • 225
  • 4
  • 20
1
2
3
16 17