Solved

Using LFTP to mirroe 2 remote directories

Posted on 2009-07-08
13
1,565 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
Backup Solution for AWS

Read about how CloudBerry Backup fully integrates your backups with Amazon S3 and Amazon Glacier to provide military-grade encryption and dramatically cut storage costs on any platform.

 

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

Many admins will agree: WSUS is is a nice invention but using it on the client side when updating a newly installed computer is still time consuming as you have to do several reboots and furthermore, the procedure of installing updates, rebooting an…
INTRODUCTION The purpose of this document is to demonstrate the Installation and configuration of the Data Protection Manager product. Note that this demonstration was prepared on the basis of Windows OS is 2008 R2 and DPM 2010. DATA PROTECTI…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

756 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