Solved

Using LFTP to mirroe 2 remote directories

Posted on 2009-07-08
13
1,634 Views
Last Modified: 2013-12-02
I am trying to sync two remote file structures using lftp and fxp protocals.  Can some supply the correct syntax or a script to do the following
ftp site a: foo.bar.com  user id fred password flintstone directory mydocs
ftp stie b: just.me.com user id bill password aredue directory htdocs
0
Comment
Question by:ajohnpeters
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 6
13 Comments
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 250 total points
ID: 24813610
Something like the following should work -

set ftp:use-fxp true
open foo.bar.com
user fred flintstone
mirror /mydocs
[i]ftp://bill:aredue@just.me.com/htdocs[/i]

If you put the above into a controlfile, let's say a2b.ftprc , you can use
lftp -f a2b.ftprc
Good luck!
wmp

0
 

Author Comment

by:ajohnpeters
ID: 24814521
How does lftp know that mydocs is on foo.bat.com and not the local machine?
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 24814613
via open ...
0
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 

Author Comment

by:ajohnpeters
ID: 24818476
IT appears to load to my local machine not to the remote machine.  I verified that fxp was available on both machines.

Connected to remote 1---did mirror to ftp on remote 2.  All the files showed up on my local and not on remote 2.  Does lftp do this in a 2 step process remote1-->local-->remote2

I do not have enough disk space on my local for this/
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 24818612
Strange ...
No, fxp is not a two stage method.
Please help me understand -
All the files showed up on my local ... <
Does this mean that the files got actually fetched from remote 1? If yes, the open has succeeded and since you specified the target as an URL, there should be no reason to store th files locally. At which location did the files show up on your local machine?
We could try with two URLs, although my version worked for me (I can't test at the moment, we don't use lftp anymore).
mirror ftp://fred:flintstone@foo.bar/mydocs ftp://bill:aredue@just.me.com/htdocs
wmp
 
 
0
 

Author Comment

by:ajohnpeters
ID: 24818661
THe files can to a directory named ftp:/fred:flintstorne@foo.bar/mydocs
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 24818685
OK,
if there is REALLY only one slash following ftp:  we've foud the culprit ...
0
 

Author Comment

by:ajohnpeters
ID: 24818888
here is my current command

set ftp:use-fxp true
mirror --only-newer --verbose -P ftp://ntsxxxxxx:yyyyyyyyyy@ymy.com/htdocs ftp://xxxxx+otg-dss.com:yyyyyyyy@your.com/

I need to go home for the night before my wife kills me.
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 24818939
OK, apart from the missing target directory - that MUST work!

Else your servers (one or both) aren't really FXP capable!


0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 24818942
P.S. Good night!
0
 

Author Comment

by:ajohnpeters
ID: 24824764
When I use this syntax I get not connected
set ftp:use-fxp true
mirror --only-newer --verbose -P ftp://ntsxxxxxx:yyyyyyyyyy@ymy.com/htdocs ftp://xxxxx+otg-dss.com:yyyyyyyy@your.com/

this correct?  I connected to both sites with the connect command and user command
set ftp:use-fxp true
mirror ftp://SiteAUsername:SiteAPassword@SiteADomainName  ftp://SiteBUsername:SiteBPassword@SiteBDomainName

The above is on one line.
0
 

Author Comment

by:ajohnpeters
ID: 24825705
I just talked to Network Solutions and they do not offer fxp on their servers.l   It At least according the tech I called.  Can anyone verify that?  What does lftp do when you try fxp on a non-supportted server.

wilmilkproc,  I will award the points soon.

I used fetch on a Mac, and it seemed to work.  Do you think it was doing a download upload scenario?
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 24838079
Hi,
afaik lftp would fallback to plain copy (via client) if FXP transfer cannot be initiated.
wmp
 
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Determining the an SCCM package name from the Package ID
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
Suggested Courses

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question