Things look quiet here. But I've been doing a lot of blogging at
dan.langille.org because I prefer WordPress now.
Not all my posts there are FreeBSD related.
I am in the midst of migrating The FreeBSD Diary over to WordPress
(and you can read about that here).
Once the migration is completed, I'll move the FreeBSD posts into the
new FreeBSD Diary website.
This article tells you how to set up an FTP mirror site. It will allow you to
keep the files on one system up to date with the files on another system. It's very
easy to do and pretty quick and painless.
My failed attempt
You are welcome to try this method. If you get it to work or you know how to
make it work, please add your comments.
At the moment, the successful attempt is what you
should try if you want it to work.
My first attempt involved the mirror
port. Please don't confuse this with the cvsup-mirror port. The
latter is a "kit for easily setting up a FreeBSD mirror site using CVSup" and
which is what I used to create my article on Setting up a FreeBSD
mirror site. The mirror port is a separate tool which can be used for
any type of mirroring. It sounds like a great tool. I just couldn't get it to
I did the normal make install. And some configuration. But when
it came time to the running, I couldn't enter PASV (passive) mode for my connection.
I'm behind a firewall, so I needed
PASV mode. Here is the output:
[root@ns:/usr/local/mirror] # mirror -n packages/ftp.au.freebsd.org
su: mirror: command not found
[root@ns:/usr/local/mirror] # ./mirror -n packages/ftp.au.freebsd.org
lchat.pl: using hardwired in network constantants at lchat.pl line
ftp timeout set to 300
Scanning local directory /var/ftp/FreeBSD/releases
/var/ftp/FreeBSD/releases no such directory - creating it
Connecting to ftp.au.freebsd.org
220- Welcome to Mirror.AARNet.EDU.AU in Australia
220 Mirror.AARNet FTP server ready.
login as anonymous
---> USER anonymous
331 Guest login ok, send your complete e-mail address as password.
---> PASS <somestring>
230- Welcome to Mirror.AARNet.EDU.AU in sunny Brisbane, located at the
230- Prentice Centre, University of Queensland, Australia.
230- Providing fast FTP/WWW access and bandwidth cost savings to AARNet
230- members using Sun hardware, Optus bandwidth and archive management
230- by the DSTC core mirror team of Paul Young and Jason Andrade.
230- Questions/Suggestions/Feedback: <firstname.lastname@example.org>
230- *** DISCLAIMER: The AVCC/DSTC/UQ are not liable for any use ***
230- *** storage or transmission of any files stored here. ***
230- *** Un-authorised use of this server is strictly prohibited ***
230- 97 out of 200 in this class, from: 210-55-210-87.ipnets.xtra.co.nz
230- *** For a list of hosted mirrors, please get: /pub/MIRRORS ***
230- *** For a search engine look at http://mirror.aarnet.edu.au ***
230 Guest login ok, access restrictions apply.
---> REST 0
350 Restarting at 0. Send STORE or RETRIEVE to initiate transfer.
Can do restarts
---> TYPE I
200 Type set to I.
Scanning remote directory /pub/FreeBSD/releases
---> CWD /pub/FreeBSD/releases
250-Please read the file README.TXT
250- it was last modified on Sun Jan 17 12:42:00 1999 - 28 days ago
250 CWD command successful.
---> TYPE A
200 Type set to A.
227 Entering Passive Mode (203,22,86,145,147,142)
Cannot open pasv ftp to ftp.au.freebsd.org
---> LIST -lRat
425 Can't open data connection.
Cannot get remote directory listing because: 425 Can't open
Cannot get remote directory details (/pub/FreeBSD/releases)
disconnecting from ftp.au.freebsd.org
My successful attempt to set up an FTP involved using the rsync port.
This should be familiar to you now. Since I have all the
ports installed, all I needed to do was:
[root@ns:~] # cd /usr/ports/net/rsync
[root@ns:/usr/ports/net/rsync] # make
[root@ns:/usr/ports/net/rsync] # make install
Configuring the FTP server
My first attempt at mirroring using rsync failed. I ran out of disk
space. When people connect to an FTP server, the FTP daemon (ftpd) is given
a root directory. This is where ftpd will find all of its files. On
my machine, this was set to /var/ftp, which doesn't have much space. I
needed to change to another directory, so I ran vipw and changed the directory.
Here's what it looks like now: