Take the 2-minute tour ×
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.

Is there an easy and safe way to back up and restore an entire texlive installation, e.g. before a fresh OS (re)installation or to put onto another pc (same architecture)?

What I have in mind is to simply copy (rsync) my whole texlive directory (~/texlive) to my external HD, i.e. along with my usual home directory backup, then copy it back into my (new) home directory after doing a fresh install of Xubuntu. As far as I know, everything tex-related is in ~/texlive.

But I don't know whether tlmgr perhaps has a backup option (for entire texlive installations, not just packages), or if there's a better way. I also don't know if my proposal requires something extra, like updating tlmgr or what.

share|improve this question

6 Answers 6

Short answer: On Unix, copying the whole texlive directory is the correct way to backup and/or duplicate a whole TeX Live installation and is guaranteed to work. In TeX Live on Unix, everything lies in the texlive directory by design.

More details. If you used the "symlink" option during installation or installed symlinks later using tlmgr path add then you'll want to run this command on your new installation after restoring the files (possibly after setting the directories using tlmgr option sys_bin, sys_man and sys_info).

If you have anything in your ~/texmf, you'll obviously want to back it up too. Things in ~/.texlive2011/texmf-var are generated, you don't need to back them up. Files in ~/.texlive2011/texmf-config on the other hand hold configuration information (for example if you installed a font mapping only for your user using updmap (as opposed to updmap-sys)) so you'll probably want to back it up if it exists. Unless of course it was created by mistake (running updmap and fmtutil instead of their -sys variants is a common mistake), then you'll want to fix that before backing up.

Finally, as nplatis said, if your new architecture is different from the old one, install the new architecture before you do the backup/duplication.

share|improve this answer
Great, thanks. And for reference, to see a list of all platforms available from the repository for installation, run tlmgr platform list, which also marks which one(s) you currently have installed. To add new architectures, run tlmgr platform add ARCH1 ARCH2 ..., and to remove, tlmgr platform remove ARCH1 ARCH2 .... –  Brian Buccola Feb 7 '12 at 13:40

I have successfully duplicated a TeXLive installation simply by duplicating all the texlive folder (in my case, /usr/local/texlive). I haven't even copied ~/.texlive2011/ folder, I believe it holds stuff that can be regenerated.

BTW, I have also been able to duplicate the TeXLive installation from an x86_64 machine to an x86 machine: before duplicating the folder I added the 32-bit architecture to texlive, then moved the folder to the new machive, and finally I removed the unneeded architectures from the two machines.

share|improve this answer
Of course one should not forget the ~/texmf folder, containing personal additions. –  egreg Feb 5 '12 at 20:05

Here's what I do, and so far it has worked -- I can't affirm that it's correct, so your mileage may vary. I do this among Windows systems; I imagine something similar will work for Unix systems; I have no idea whether it will also work Windows <-> Unix, but suspect anyone trying this out should not do it where the systems need to be stable. That said, here goes:

New Installation on first machine:

  1. Install from the TexLive CD
  2. Bring it up-to-date with tlmgr
  3. I install everything. Up to you.

This is now the "Master Copy"

New Installation on second and subsequent machines:

  1. Install from the TexLive CD
  2. Test the installation
  3. Mirror copy the Master Copy to this Slave Copy (this is an operation equivalent to deleting the contents of the Slave and copying over the whole Master -- rsync --delete might be a useful option here). This is required because things occasionally move around in the tree, and you don't want old versions left over.

These are now the "Slave Copies"

Maintenance of Master:

Just do it normally with tlmgr

Maintenance of Slave(s):

Mirror copy as above. Just in case it isn't obvious, never do maintenance on a Slave Copy.

share|improve this answer
Step 1 and 2 on slaves are useless. (Unless you use the "symlink" option at installation time.) –  mpg Feb 6 '12 at 8:35
Quite possibly, but I don't trust Windows not to hide something vital in the PATH, or the registry, or setting up shortcuts in my start menu. –  Brent.Longborough Feb 6 '12 at 8:37

Another option would be to reinstall on the second system using the first system's installation profile. From the install-tl docs:

-profile profile

Load the file profile for repeated installations on different systems. This is useful for batch or scripted installation of TeX Live, that is, no user interaction is required.

A profile file contains all the values needed to perform an installation. After a normal installation has finished, a profile for that exact installation is written to the file DEST/tlpkg/texlive.profile. That file can be given as the argument to -profile to redo the exact same installation on a different system, of rexample. Alternatively, you can create a custom profile by starting from a generated one and changing values.

We use this on Windows to do silent installs of TeX Live on each system's C: drive. Should work just as well on Linux.

share|improve this answer
His question is not clear to me. Why would anybody want to keep old installation of TeXLive on the new system? Configuration files yes but old binaries? I am guessing he could use damp and restore to do that as long as old binaries can run on the new installation? Mike you know more about Unix than me. What am I missing here? –  Predrag Punosevac Feb 6 '12 at 0:23
The new installation might be a reinstall of the same OS for whatever reason. No worry about incompatibilities there. Maybe Internet access is expensive there, and a DVD download or network reinstall is inconvenient. Just guesses. –  Mike Renfro Feb 6 '12 at 4:00
Mike is right - I have a severely limited monthly data transfer limit, so ~3 GB (the full texlive) eats up quite a bit of that allotment. –  Brian Buccola Feb 6 '12 at 4:31

I usually keep my TL on a separate partion (/opt in my case), when I reinstall I simply ask the installer to use this partition as /opt and not reformat it. Then after the OS reinstall I usually have to edit /etc/environment (Ubuntu) and perhaps install the TL equivs package. I've done this on my netbook for a few years now works fine.

share|improve this answer

Have you tried using a "portable installation"?


share|improve this answer

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.