Mirror howto

From Qt Wiki
Revision as of 16:08, 14 January 2015 by Maintenance script (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Qt Project download mirror how-to

This page explains how to set up mirror server for Qt Project downloads. When your mirror is up and running we are able to redirect clients in your area to your server via our download redirector – http://download.qt.io/. There are only a few steps involved to set up a mirror:

Resources checklist

  • Bandwidth – In general we would like our mirrors to have at least a 50 Mbit/s Internet link. The link itself should be fairly stable, so please don’t set up a mirror over a home-use cable or DSL link. However, if you are in a country with limited bandwidth you can disregard this checkpoint.
  • Disk space – Currently, a full mirror of qt.io is about 200 GB. It is possible to only mirror parts, but we would recommend mirrors to at least have the “Official Releases” and “Development Releases” tree.
  • Mirror dedication – We would like our pool of mirrors to be stable, so if you only have temporary access to your server and/or bandwidth, we would not recommend that you sign up to be a global mirror. In addition, the mirror admin should be willing to respond to changes to the Qt Project server in a timely fashion, and that the admin will be around for the foreseeable future.
  • Http and rsync access – Your mirror needs to be accessible by http and rsync. We use rsync to check the status of the files you are serving, so we don’t redirect clients to your mirror for files you don’t have or not synced yet. You can enable FTP access for your mirror as well, but it’s not mandatory from our point of view. However, http and rsync are.

Sync files

To update your mirror you can use a tool called rsync. When you run it e.g. daily to keep your mirror updated, it will only transfer the files that have changed since the last update.

Rsync is included in most Linux distros, or it can be downloaded from http://rsync.samba.org/ [rsync.samba.org]

We have a set of rsync “modules” that can be used to update your mirror. The recommended one is qt-all which will pull down the complete download tree. This is also the module that will consume most disk space, currently about 200 GB. If you are short on disk space we recommend to at least use the two modules called qt-official and qt-development. The first one includes the pub/qtproject/official_releases tree, has roughly the size of 20 GB, and contains stable releases of Qt related packages. The second one pulls down the pub/qtproject/development_releases tree, takes up roughly 50 GB of disk space, and contains alpha, beta and release candidates of Qt. There are other modules available as well, please drop an email to Qt Project Sysadmin if you want a list of the modules.

Tree Rsync server/module
All (pub/qtproject/) – 200 GB rsync master.qt.io::qt-all
Official Releases (pub/qtproject/official_releases/) – 20 GB rsync master.qt.io::qt-official
Development Releases (pub/qtproject/development_releases/) – 50 GB rsync master.qt.io::qt-development

Here is an example of how to use rsync. This assumes that your mirror files will be in /data/pub/qtproject and that you want a full Qt Project mirror.

Say you only want to mirror Official Releases and Development Releases:

To keep the files updated and in sync with the master server you can set this up as a cron job that runs e.g. once a day. This example assumes that you put the rsync command in a script called mirror_qtproject.sh. Preferred sync interval is four (4) hours

Inform us

Now you should have a fully working Qt Project mirror up and running. The last thing to do is to inform the Qt Project Sysadmin by email to get listed on the mirrors page. Please include the following information in the email:

  • Your name and email address
  • Operator
  • The http address of the mirror
  • The rsync address of the mirror
  • The ftp address of the mirror (optional)

As the mirror admin you should also subscribe to the Qt Project mirrors [lists.qt.io] mailing list. This will be the point of contact for all Qt Project mirror admins.

Thank you for becoming a Qt Project mirror!


Qt Project Sysadmin