Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Using LFTP to mirroe 2 remote directories

Posted on 2009-07-08
13
Medium Priority
?
1,720 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
  • 7
  • 6
13 Comments
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 1000 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

The password reset disk is often mentioned as the best solution to deal with the lost Windows password problem. In Windows 2008, 7, Vista and XP, a password reset disk can be easily created. But besides Windows 7/Vista/XP, Windows Server 2008 and ot…
Hello, As I have seen there a lot of requests regarding monitoring and reporting for exchange 2007 / 2010 / 2013 I have decided to post some thoughts together and link to articles that have helped me. Of course a lot of information you can get…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Suggested Courses

877 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