Mirror howto: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
(Add "cleanup" tag)
(Convert ExpressionEngine links)
Line 19: Line 19:
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.
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/":http://rsync.samba.org/
Rsync is included in most Linux distros, or it can be downloaded from [http://rsync.samba.org/ http://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":mailto:sysadmin@qt.io to Qt Project Sysadmin if you want a list of the modules.
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":mailto:sysadmin@qt.io to Qt Project Sysadmin if you want a list of the modules.
Line 66: Line 66:
* The ftp address of the mirror (optional)
* The ftp address of the mirror (optional)


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


Thank you for becoming a Qt Project mirror!
Thank you for becoming a Qt Project mirror!



Revision as of 15:05, 4 March 2015

This article may require cleanup to meet the Qt Wiki's quality standards. Reason: Auto-imported from ExpressionEngine.
Please improve this article if you can. Remove the {{cleanup}} tag and add this page to Updated pages list after it's clean.

h1. 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/

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":mailto:sysadmin@qt.io 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.

rsync -rlpt delete master.qt.io::qt-all /data/pub/qtproject<code>

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

rsync -rlpt —delete master.qt.io::qt-official /data/pub/qtproject/official_releases rsync -rlpt —delete master.qt.io::qt-development /data/pub/qtproject/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
  1. run each four (4) hours

0 */4 * * $HOME/bin/mirror_qtproject.sh

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":mailto:sysadmin@qt.io 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 mailing list. This will be the point of contact for all Qt Project mirror admins.

Thank you for becoming a Qt Project mirror!