TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a local network with many clients using (La)TeX. Mirroring TeX Live distribution in my server will save time and bandwidth. We are Windows users who are not familiar with RSYNC. I have read the TeX Live site, but I am still confused how to use RSYNC.

Could you tell me how to make a mirror for TeX Live step by step?

I want to make a local mirror such that any local clients can download or update from it. The local mirror works like other CTAN mirrors, but the synchronization to the CTAN mirrors is not done automatically but on my manual action.

share|improve this question
To clarify your question. Is what you asking for a method to mirror the server's TeX Live installation onto a the systems of a set of clients in a LAN? That is, every client will have a copy of the distribution which they'll use when compiling documents but the client's copy of the distribution will be synced against the server's? – N.N. Jul 5 '11 at 10:59
@N.N: See my update. – Friendly Ghost Jul 5 '11 at 11:08
Another idea would be to install and update TeXLive on one machine aka "the server" (maybe as 'mobile' version) and share this one across multiple machine, e.g. using a shared network folder or by setting the clients up to synchronize with the server, e.g. using rsync or other means. It depends on your size and traffic limitations as well as other things. – Martin Scharrer Jul 5 '11 at 11:17
@Martin: How to make the local TeX distribution repository on one machine that can be updated later to the CTAN mirror? Installing on one machine is not a good idea, right? Installing on one machine will modify the registry on that machine that cannot be reflected to other clients. – Friendly Ghost Jul 5 '11 at 11:20
@Friendly Ghost: Does TeXLive needs registry entries? You of course need to set it up on the other machines (set PATH correctly etc.), but there should be no other things besides files which would requirer updating (except if you update from TeXlive 201X to TeXLive 201(X+1) ) – Martin Scharrer Jul 5 '11 at 11:30
up vote 8 down vote accepted

rsync is an advanced tool to synchronize remote directories. You can get it for Linux and Windows (probably also for Mac and further OSs), but it is a command line tool.

Here some instructions and tips how to rsync the TeXLive repository so you can set up an own HTTP or FTP server as repository for you local TeXLive.

A general description on how to rsync TeXLive can be found at http://www.tug.org/texlive/acquire-mirror.html, but I most likely read that page already.

For Windows there is e.g. cwRsync which is based on cygwin, a Unix emulation for Windows.

Another Windows HowTo to install and setup rsync can be found at http://optics.ph.unimelb.edu.au/help/rsync/rsync_pc1.html. This is useful if you want to update your copy of the TeXLive repository automatically.

To synchronize it simply use the following command line, where %CTANMIRROR% is a rsync CTAN mirror:

rsync -a --delete rsync://%CTANMIRROR%/systems/texlive/tlnet/ "/cygdrive/<driveletter>/dir/subdir" 

So e.g., to sync from DANTE's rsync server to C:\texlive\ use:

rsync -a --delete rsync://rsync.dante.ctan.org/CTAN/systems/texlive/tlnet/ "/cygdrive/c/texlive/"

Here -a stands for archive mode (you might get some warnings that Unix/Linux permissions can't be set; that's normal and not really an issue) and --delete will delete all extraneous files (in the local destination) which do not exist on the remote source folders.

share|improve this answer
I think you only need to "get" rsync for Windows. It's certainly a standard part of the Mac OS (and I presume Linux too?) – Alan Munn Jul 5 '11 at 12:42
@FriendlyGhost: If you use cwRsync then yes, at least after its website. If you have a different rsync try c:/texlive instead or maybe c:\\texlive. – Martin Scharrer Jul 5 '11 at 12:56
@Martin: do you know how to schedule synchronization of my local repository with a remote CTAN mirror? – Friendly Ghost Jul 5 '11 at 15:13
@Friendly: Maybe optics.ph.unimelb.edu.au/help/rsync/rsync_pc1.html#automate (already linked in the answer) – Martin Scharrer Jul 5 '11 at 15:16
Note: I installed cwrsync version 3 because version 4 behaves strange with many invalid argument errors. – Friendly Ghost Jul 5 '11 at 15:54

Before I answer your question let me give you another suggestion: put TeX Live installation on the network and make it available to your clients. There are convenience scripts w32cilent to help with the latter.

For mirroring a package repository see this page. rsync is recommended for this, but wget can also be used (I had a custom script using wget in the past, which I can try to dig out if you are interested). There is also an experimental script download-package-repository in TeX Live svn repository. It works with the standard install-tl.zip installer. Put it together with the wrapper .bat script under tlpkg/installer subdirectory of the installer and run.

Edit: Here are wget incantations for completeness (for download/update in the current ditectory):

wget -m -nH -np --cut-dirs=3 --retr-symlinks -X "/systems/texlive/tlnet/archive" -R "update-tlmgr-r*,index.html*" http://ctan.sqsol.co.uk/systems/texlive/tlnet/
wget -m -nH -np --cut-dirs=3 -R "index.html*" http://ctan.sqsol.co.uk/systems/texlive/tlnet/archive/
share|improve this answer
+1 I am reading this. – Friendly Ghost Jul 5 '11 at 12:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.