mirror-tutorial/en mirror-tutorial-en.xml,1.2,1.3
Hugo Cisneiros (eitch)
fedora-docs-commits at redhat.com
Mon Feb 6 20:29:55 UTC 2006
- Previous message (by thread): release-notes/ru - New directory
- Next message (by thread): release-notes ArchSpecific-en.xml, 1.2, 1.3 ArchSpecificPPC-en.xml, 1.3, 1.4 ArchSpecificx86-en.xml, 1.2, 1.3 ArchSpecificx86_64-en.xml, 1.2, 1.3 BackwardsCompatibility-en.xml, 1.1, 1.2 Colophon-en.xml, 1.2, 1.3 DatabaseServers-en.xml, 1.1, 1.2 Desktop-en.xml, 1.3, 1.4 Entertainment-en.xml, 1.1, 1.2 Feedback-en.xml, 1.1, 1.2 FileServers-en.xml, 1.2, 1.3 FileSystems-en.xml, 1.1, 1.2 I18n-en.xml, 1.2, 1.3 Installer-en.xml, 1.2, 1.3 Kernel-en.xml, 1.3, 1.4 Legacy-en.xml, 1.3, 1.4 Makefile, 1.17, 1.18 Multimedia-en.xml, 1.2, 1.3 Networking-en.xml, 1.1, 1.2 OverView-en.xml, 1.6, 1.7 PackageChanges-en.xml, 1.3, 1.4 PackageNotes-en.xml, 1.2, 1.3 PackageNotesJava-en.xml, 1.1, 1.2 Printing-en.xml, 1.1, 1.2 ProjectOverview-en.xml, 1.2, 1.3 RELEASE-NOTES-en.xml, 1.20, 1.21 Samba-en.xml, 1.2, 1.3 Security-en.xml, 1.2, 1.3 SecuritySELinux-en.xml, 1.2, 1.3 ServerTools-en.xml, 1.2, 1.3 SystemDaemons-en.xml, 1.2, 1.3 WebServers-en.xml, 1.2, 1.3 Welcome-en.xml, 1.5, 1.6 Xorg-en.xml, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: eitch
Update of /cvs/docs/mirror-tutorial/en
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29832
Modified Files:
mirror-tutorial-en.xml
Log Message:
added lftp command to the http or ftp mirroring method (BZ #178790)
Index: mirror-tutorial-en.xml
===================================================================
RCS file: /cvs/docs/mirror-tutorial/en/mirror-tutorial-en.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- mirror-tutorial-en.xml 4 Feb 2006 04:51:01 -0000 1.2
+++ mirror-tutorial-en.xml 6 Feb 2006 20:29:48 -0000 1.3
@@ -639,8 +639,9 @@
<section id="sn-http-and-ftp-download">
<title>Download Using HTTP or FTP</title>
<para>
- To download via HTTP or FTP, use the <command>wget</command>
- command. <command>wget</command> recurses subdirectories
+ To download via HTTP or FTP, use either the
+ <command>wget</command> or the <command>lftp</command>
+ command. <command>wget</command> recurses subdirectories
automatically and pulls down entire trees of data with a
single command. If you are not careful, however, it is
possible to pull down much more data than you intended. The
@@ -698,6 +699,115 @@
options. See the <command>wget</command> man pages for more
information.
</para>
+
+ <para>
+ The <command>lftp</command> command works like the
+ <command>wget</command> command, mirroring the content of a
+ HTTP or FTP server. But there are problems with updating the
+ mirror with <command>wget</command>, like not deleting
+ old files locally. This is very important when creating an
+ updates repository mirror, where new files are created
+ frequently and old files are automatically removed from the
+ upstream mirrors.
+ </para>
+
+ <para>
+ With <command>lftp</command> you can synchronize files and
+ directories from a remote host just like
+ <command>rsync</command>, but using HTTP or FTP protocols. For
+ example: doing the above method used by wget to mirror the
+ entire current Fedora Core distribution:
+ </para>
+
+<screen>
+<userinput>cd /var/www/mirror
+lftp -e "open http://mirror.example.com/pub/mirror/linux/core/&FCVER;/i386/ && \
+mirror --delete --verbose && \
+quit"</userinput>
+</screen>
+
+ <para>
+ The <command>-e</command> parameter tells
+ <command>lftp</command> to execute given commands. Doing
+ this, you can execute many actions from a single command.
+ Commands are separated with &&, so note the commands
+ above:
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ <command>open</command> connects to the site and changes
+ the directory automatically.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <command>mirror --delete --verbose</command> tells
+ <command>lftp</command> to fetch all files and/or
+ directories recursively in the current directory (opened
+ by the <command>open</command> command). The
+ <command>--delete</command> parameter excludes all local
+ files that are not in the remote directory, and the
+ <command>--verbose</command> parameter prints some
+ information in the screen and is optional.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <command>quit</command> is last executed and
+ <command>lftp</command> exits finishing the job.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <para>
+ <command>lftp</command> will mantain an exact copy of the
+ directory for you: only new files will be downloaded and old
+ files will be deleted.
+ </para>
+
+ <para>
+ As with <command>wget</command>, it is possible that you may
+ download some unwanted files in directories.
+ <command>lftp</command> supports regular expressions when
+ excluding files within a <command>mirror</command> command.
+ In another example, the command below shows how to mirror an
+ current Fedora Core distribution updates repository,
+ excluding the <filename>debug</filename> and
+ <filename>repodata</filename> directories:
+ </para>
+
+<screen>
+<userinput>cd /var/www/mirror
+lftp -e "set mirror:exclude-regex 'debug\/|repodata\/' && \
+open http://mirror.example.com/pub/mirror/linux/core/updates/&FCVER;/i386/ && \
+mirror --delete --verbose && \
+quit"</userinput>
+</screen>
+
+ <para>There are many usages for the <command>lftp</command>
+ command. Consult the <command>lftp</command> man pages for more
+ details.</para>
+
+ <tip>
+ <title>Using Proxy for HTTP or FTP retrieval</title>
+ <para>
+ Sometimes when behind a proxy or firewall, you may need to
+ do mirroring throught a http proxy. This can be accomplished
+ exporting the environment variables
+ <command>http_proxy</command> and
+ <command>ftp_proxy</command> before running the
+ <command>wget</command> or <command>lftp</command> commands,
+ like this:
+ </para>
+
+<screen>
+<userinput>export http_proxy=http://<replaceable>username</replaceable>:<replaceable>password</replaceable>@<replaceable>host</replaceable>:<replaceable>port</replaceable>
+export ftp_proxy=http://<replaceable>username</replaceable>:<replaceable>password</replaceable>@<replaceable>host</replaceable>:<replaceable>port</replaceable></userinput>
+</screen>
+
+ </tip>
</section>
<section id="sn-rsync">
- Previous message (by thread): release-notes/ru - New directory
- Next message (by thread): release-notes ArchSpecific-en.xml, 1.2, 1.3 ArchSpecificPPC-en.xml, 1.3, 1.4 ArchSpecificx86-en.xml, 1.2, 1.3 ArchSpecificx86_64-en.xml, 1.2, 1.3 BackwardsCompatibility-en.xml, 1.1, 1.2 Colophon-en.xml, 1.2, 1.3 DatabaseServers-en.xml, 1.1, 1.2 Desktop-en.xml, 1.3, 1.4 Entertainment-en.xml, 1.1, 1.2 Feedback-en.xml, 1.1, 1.2 FileServers-en.xml, 1.2, 1.3 FileSystems-en.xml, 1.1, 1.2 I18n-en.xml, 1.2, 1.3 Installer-en.xml, 1.2, 1.3 Kernel-en.xml, 1.3, 1.4 Legacy-en.xml, 1.3, 1.4 Makefile, 1.17, 1.18 Multimedia-en.xml, 1.2, 1.3 Networking-en.xml, 1.1, 1.2 OverView-en.xml, 1.6, 1.7 PackageChanges-en.xml, 1.3, 1.4 PackageNotes-en.xml, 1.2, 1.3 PackageNotesJava-en.xml, 1.1, 1.2 Printing-en.xml, 1.1, 1.2 ProjectOverview-en.xml, 1.2, 1.3 RELEASE-NOTES-en.xml, 1.20, 1.21 Samba-en.xml, 1.2, 1.3 Security-en.xml, 1.2, 1.3 SecuritySELinux-en.xml, 1.2, 1.3 ServerTools-en.xml, 1.2, 1.3 SystemDaemons-en.xml, 1.2, 1.3 WebServers-en.xml, 1.2, 1.3 Welcome-en.xml, 1.5, 1.6 Xorg-en.xml, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Fedora-docs-commits
mailing list