Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm reading myself blind here
I want to mirror a directory between two remote SFTP hosts with lftp. I'm on my local computer and I have two hosts, system0 and system1 So, something like lftp sftp://system0 sftp://system1, then mirror /directory between system0 and system1
Also, why use lftp AT ALL? Rsync is standard on most Linux systems, and does EXACTLY what you're after, including keeping two directories in sync, and it supports SSH. You don't tell us what version/distro of Linux you're using, or provide many details...see the "Question Guidelines" link in my posting signature.
That link you provided talks about synchronizing a remote directory with a local one. The original question was about sync between a remote directory and a remote directory.
That link you provided talks about synchronizing a remote directory with a local one. The original question was about sync between a remote directory and a remote directory.
...and did you not think about:
Running it on system0, making THAT ONE the local and system1 the remote?
The fact that your local system can look at BOTH of them, and use the software to keep them in sync?
Try to change ANY of the parameters based on the guide, to do what you wanted??
And AGAIN, LFTP isn't the best solution. Rsync, as stated before, does all of this over SSH, and can be set up in a cron job on one of the systems to do exactly what you're after.
Well, I know how to mirror using from one host to another, but I don't know how to mirror when I got two remote hosts. I don't want to log in to one of the hosts; that's why I created this thread.
Do you know how to do this with lftp or not?
I can also use rsync, but does rsync sync between two remote systems?
[QUOTE=famadorian;5536232]Well, I know how to mirror using from one host to another, but I don't know how to mirror when I got two remote hosts. I don't want to log in to one of the hosts; that's why I created this thread.QUOTE]
Why? That is, by far, the easiest and most reliable solution.
Quote:
Do you know how to do this with lftp or not?
Yes..it was in the instructions you were sent. Read the documentation, and replace the targets however you want.
Quote:
I can also use rsync, but does rsync sync between two remote systems?
As said before, yes. Again, doing this from one remote server to another is far better, easier, and more reliable.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.