Instant update mirroring

ranguard edited this page Jul 7, 2012 · 17 revisions

Instant Update Mirroring

CPAN mirroring uses File::Rsync::Mirror::Recent (also known as rrr, version 0.1.1 or later required). It is also available from git.

You can use this for the full CPAN; no need to separately use rrr for the PAUSE directories.

How to install

curl --compressed -LO
chmod +x ./cpanm
./cpanm JSON File::Rsync::Mirror::Recent

Also check that you have rsync installed; version 3.x or newer is highly recommended.

Run the client

Use rrr-client:

   mkdir -p /home/mirrors/CPAN
   rrr-client --source --target /home/mirrors/CPAN

Client resources

It will take a while - up to several hours - to get synced up. During this time the system may use a good deal of CPU and momentarily up to 1GB of memory. After that it'll get the latest changes every 20 seconds with virtually no CPU usage and just using about 10MB of memory -- basically less resources than running rsync just a few times a day. And you get instant updates!

What to test

If you want to test if all updates from the master have been fetched, you can run

   rsync -avn /home/mirrors/CPAN

There should only be a few changes - files that have changed in the last minute. If there are more, run rsync again without the -n parameter to update your mirror. Please report any discrepancies!

In production is recommended to run a full rsync every few days in case rrr missed something.

rsync masters

  • Public, no authentication required:
  • For "Tier 1" mirrors, (the "master mirror")

The plan is to make point to a group of instantly updated mirrors -- the "Tier 1" mirrors. With some clever DNS, we can even have clients of the tier 1 mirrors pull appropriately from a mirror in their country or on their continent.

If you wish to be a tier 1 mirror, please email for a username/password for the master mirror for testing.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.