https://wiki.archlinux.org/api.php?action=feedcontributions&user=Bender02&feedformat=atomArchWiki - User contributions [en]2024-03-28T13:58:28ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=TeX_Live/FAQ&diff=74831TeX Live/FAQ2009-08-29T11:19:29Z<p>Bender02: added troubleshooting common upgrade problems (formats and fonts)</p>
<hr />
<div>[[Category:FAQs (English)]]<br />
[[Category:Software (English)]]<br />
[[Category:Office (English)]]<br />
<br />
This FAQ contains answers to some TeXlive related questions that have appeared on the forums, as well as some other info that might be useful.<br />
<br />
= General questions: Where should I start? Resources? =<br />
<br />
For an introduction to LaTeX, I recommend "The not so Short Introduction to LaTeX" by Tobias Oetiker. Originally German, this document is translated to many languages, especially to the lingua franca of the Internet, English. Downloadable from CTAN [http://www.ctan.org/tex-archive/info/lshort/ here].<br />
<br />
==Q: How can I access texlive documentation?==<br />
'''A:''' Provided that you installed appropriate texlive-*-doc packages,<br />
texdoc <packagename><br />
can probably (i.e. in many cases) do the job. Unfortunately some package authors do not name their documentation equally to their package. So asking for documentation in Forums or mailing lists not always is silly.<br />
<br />
==Q: I want latex to do something special, and I'm pretty sure someone before me had to have the same problem.==<br />
'''A:''' There is an excellent [http://www.tex.ac.uk/cgi-bin/texfaq2html TeX FAQ] on the web. Typical latex problems (special headers, different page layout, tricks with tables, etc..) are all covered there. Searchable!<br />
<br />
==Q: I want to read more! More! I said more!==<br />
'''A:''' Andy Roberts (arooaroo) has a couple of tricks on his website [http://www.andy-roberts.net/misc/latex/index.html Getting to grips with LaTeX], which has been used as a basis for [http://en.wikibooks.org/wiki/LaTeX LaTeX wikibook].<br />
<br />
= Tricks with LaTeX =<br />
<br />
==Q: I need/want to use some funky bibliography/references format.==<br />
'''A:''' [http://www.ctan.org/tex-archive/help/Catalogue/entries/biblatex.html biblatex] is then the thing you are looking for (it's in AUR). It has an enhancement [http://www.ctan.org/tex-archive/help/Catalogue/entries/biblatex-dw.html biblatex-dw], also in AUR, which is especially valuable for the special issues in the Humanities.<br />
<br />
= TeXlive directory structure and important files =<br />
<br />
==Q: What's up with all these dirs /usr/share/{texmf,texmf-dist,texmf-var,texmf-config}?==<br />
'''A:''' TeX uses several "source trees"; they have the same internal structure, and can "overlap". This is to allow users to modify files provided system-wide without having to access files they're not supposed to access. Here's the portion of the main config file which lists all these dirs with some explanations ($SELFAUTODIR=/usr/share):<br />
% The tree containing the runtime files closely related to the specific<br />
% program version used:<br />
TEXMFMAIN = $SELFAUTODIR/texmf<br />
% The main distribution tree:<br />
TEXMFDIST = $SELFAUTODIR/texmf-dist<br />
% A place for local additions to a "standard" texmf tree.<br />
% This tree is not used for local configuration maintained by<br />
% texconfig, it uses TEXMFCONFIG below.<br />
TEXMFLOCAL = $SELFAUTODIR/texmf-local<br />
% TEXMFSYSVAR, where texconfig-sys stores variable runtime data.<br />
TEXMFSYSVAR = $SELFAUTODIR/texmf-var<br />
% TEXMFSYSCONFIG, where texconfig-sys stores configuration data.<br />
TEXMFSYSCONFIG = $SELFAUTODIR/texmf-config<br />
% User texmf trees are allowed as follows.<br />
TEXMFHOME = $HOME/texmf<br />
% TEXMFVAR, where texconfig stores variable runtime data.<br />
TEXMFVAR = $HOME/.texmf-var<br />
% TEXMFCONFIG, where texconfig stores configuration data.<br />
TEXMFCONFIG = $HOME/.texmf-config<br />
Note that they are searched in the reverse order that they are listed above (I think). So when some problems pops up, search the trees in the proper order ;)<br />
<br />
One more remark: if you install something just for you, it should go to your home texmf tree. However, on desktops, you might not want to clutter your home dir; then it should go to texmf-local tree (which should be writable by the "tex" group).<br />
<br />
==Q: I want to have some configuration app!==<br />
'''A:''' Run<br />
texconfig<br />
Careful! When you run this as a user, you modify settings for that user. If you want to modify system-wide settings, run<br />
texconfig-sys<br />
as root instead.<br />
<br />
==Q: I want to edit textfiles! Where are some configuration files?==<br />
'''A:''' Keeping in mind the above directory structure (<texmfroot> refers to one of the dirs above), here you go:<br />
The main config file:<br />
<texmfroot>/web2c/texmf.cnf<br />
List of formats generated:<br />
<texmfroot>/web2c/fmtutil.cnf<br />
Settings with which are e.g. bitmap fonts generated<br />
<texmfroot>/web2c/mktex.cnf<br />
Which and how type1 fonts are used instead of metafont generated bitmap ones?<br />
<texmfroot>/web2c/updmap.cfg<br />
<br />
= Common problems with TeXlive =<br />
<br />
==Q: I just updated texlive and it stopped working.==<br />
'''A:''' While this can be caused by many things, the most common reason for troubles of this sort is the following mechanism of how texlive works: there can be more than one "tree of tex files" which are put "on top of each other" as far as TeX is concerned (see question 3.1 above), and so there can be more copies of "the same" config file around on the disk, and only one of them is used. In particular, if a user makes some config changes, or generates some formats, the resulting "changes" are saved in the local user's tree (~/.texlive/texmf-{var,config}), and while these exist, they are '''always''' preferred over the system files. This implies that even if the system files are updated on texlive update, when a user runs tex, it still uses the "old" files that are in ~/.texlive.<br />
<br />
Hence, if you suspect that this might be the cause of the problem, you can<br />
* backup your ~/.texlive dir somewhere and try again. If the problem persists, with big probability it's a problem with some texlive-* package.<br />
* there is a tool with which one can check which file with a particular name is "seen" by tex. Namely<br />
kpsewhich <filename><br />
returns the full path to file of that name that would tex use.<br />
<br />
Finally, the most usual troubles that span from this behavior are:<br />
* after upgrade, tex "stops working" with the following error message:<br />
Fatal format file error; I'm stymied.<br />
What one should understand is that TeX system "precompiles" formats (that is, takes the macros which constitute for instance the latex format, and creates a binary thing (file latex.fmt), which is then used when you call "latex <somefile>"). Now when the tex binary itself is updated, all the precompiled formats need to be recompiled as well. While pacman does that for you for system-wide formats, the info above implies that if a user (or some program like LyX) ever compiled the formats by himself, that user needs to recompile the formats manually. The command for that is<br />
fmtutil --all<br />
(as a user). (Btw, the location of *.fmt files is <texmfroot>/texmf-var/web2c.) The other option is to delete the *.fmt files from the local tree (~/.texlive/texmf-var/web2c/*.fmt) and use the system-wide generated formats (which can be regenerated by "sudo fmtutil-sys --all").<br />
* after upgrade, some fonts stop being used properly; or there is an error that tex can't find some font. This is related to the question 4.4 below - you most probably have a local 'updmap.cfg' file (check by "kpsewhich updmap.cfg") which doesn't reflect changes in *.map files and fonts which came with the upgrade. In this case, apply the methods from the question 4.4.<br />
<br />
==Q: I want use ConTeXt.==<br />
'''A:''' (English) ConTeXt should be enabled automatically. Remember that the perl wrapper to be used with ConTeXt is<br />
texexec<br />
If ConTeXt is not enabled (or you want to use localized version), use<br />
texconfig<br />
to edit the configuration file with formats, and uncomment the appropriate lines.<br />
To set up the new MarkIV implementation of ConTeXt, see http://wiki.contextgarden.net/Running_Mark_IV<br />
<br />
==Q: I've just installed some .sty files, but tex doesn't seem to see them.==<br />
'''A:''' TeXlive (and tetex) uses its own directory indexes (files named ls-R), and you need to refresh them after you copy something into one of the TeX trees. Magic command:<br />
mktexlsr<br />
or<br />
texhash<br />
or<br />
texconfig[-sys] rehash<br />
A command line program to search through these indexes is<br />
kpsewhich<br />
Hence you can check that TeX can find a particular file by running<br />
kpsewhich <filename><br />
The output should be full path to that file.<br />
<br />
==Q: Pdftex and/or dvips uses bitmap fonts instead of type1 postscript fonts (aka "when I zoom my pdf/ps file, fonts are really pixelated" aka "everytime I run tex, it takes a long time because it generates fonts with metafont" aka "at the end of my logfile generated by pdftex I see that it includes *.pk fonts instead of *.pfb)==<br />
'''A:''' This takes a bit of time to explain. Now it's important that you understand how does the system work, so that you know what you're doing.<br />
<br />
* Files which tell pdftex/dvips which fonts are to be included as type1 fonts (instead of traditional bitmap fonts) have suffix .map and reside somewhere in <texmfroot>/fonts/map/{pdftex,dvips}/updmap/{pdftex.map,psfonts.map}.<br />
* You '''don't''' want to edit these files manually; they're good for checking if your favorite type1 font which causes troubles is sitting there properly.<br />
* These files are automatically generated, when you run<br />
updmap<br />
as user (or<br />
updmap-sys<br />
as root for system-wide changes)<br />
* What you need to do to have your favorite fonts (for instance kpfonts) properly used as type1 fonts in pdf and ps files is to locate the .map file that goes with the package (e.g. kpfonts.map; you don't need to actually *do* anything with the file, just know that it's there somewhere), edit updmap.cfg by running<br />
updmap --edit<br />
as user (or "updmap-sys --edit" as root) and add the line<br />
Map kpfonts.map<br />
or the line<br />
MixedMap kpfonts.map<br />
(MixedMap indicates that fonts are also available as bitmap fonts.), and exit the editor. At this point, you should see the messages which indicate that updmap is regenerating {pdftex,psfonts}.map files.<br />
* This should be sufficient, and your next run of pdftex/dvips should be already including the type1 versions of fonts.<br />
<br />
= Useful apps to use with (any TeX installation) =<br />
<br />
==Q: Editors? ==<br />
'''A:''' Great for beginners (errr...) are [http://kile.sourceforge.net/ kile] (depends on kde though) or [http://winefish.berlios.de/ winefish]. <br />
<br />
For serious work, especially scientic papers, more especially in the humanities, I strongly recommend emacs with reftex and [http://www.gnu.org/software/auctex/ auctex]. Reftex helps very much with references within big documents.<br />
<br />
Also (g)vim with [http://vim-latex.sourceforge.net/ vim-latex] (although I had some problems with it with vim-7.* versions) might be a good solution. If you have problems with vim-latex, try [http://www.vim.org/scripts/script.php?script_id=162 auctex.vim], which has much of the same functionality. If you are more WYSIWIG oriented, then perhaps [http://www.lyx.org/Home lyx] (just be aware that transitions "lyx <-> manual source editing" is not always seamless, and using your own macros is a bit awkward of course); or [http://www.texmacs.org/ texmacs] (with which I have no experience, and it seems a bit outdated).<br />
<br />
==Q: Pictures with LaTeX labels?==<br />
'''A:''' Apart from some latex in-source macros (which are a bit of a PITA to write), there are excellent "picture programming languages" [http://cm.bell-labs.com/who/hobby/MetaPost.html metapost] and its (more-less) successor [http://asymptote.sourceforge.net asymptote]. They are pretty powerful, but have similar approach as tex itself - you write down what you want to have and how are the things related, and compiler then produces the picture. The target format is postscript for metapost; and eps/pdf/png for asymptote.<br />
<br />
Even closer incorporated to TeX itself - i.e. to Plain TeX, LaTeX or Context, there are layers for each of this formats - is the relatively new PGF package with its language named [http://www.fauskes.net/pgftikzexamples/ TIKZ].<br />
<br />
The Python library [http://pyx.sourceforge.net/ PyX] (named python-pyx in AUR) gives the possibillity to use Python to program pictures, and it uses TeX for the typesetting.<br />
<br />
Last but not least: [http://tug.org/PSTricks/main.cgi/ PSTricks], which gives an interface for direct inclusion of Postscript-code into TeX ([http://pages.cs.wisc.edu/~ghost/doc/AFPL/6.50/Ps2pdf.htm ps2pdf]). There are some hurdles to climb if you want to have pdf-output, because PSTricks is not compatible to pdftex.<br />
<br />
==Q: Pictures with LaTeX labels - I want GUI! - I want pictures fast!==<br />
'''A:''' The "grandfather" of vector editors - xfig is able to produce some output relevant to tex. I had relatively good experience with [http://tclab.kaist.ac.kr/ipe/ ipe] recently (saves eps/pdf). Inkscape is a good choice too.</div>Bender02https://wiki.archlinux.org/index.php?title=Xkb&diff=51872Xkb2008-10-28T19:00:16Z<p>Bender02: Xkb moved to Configuring keyboard layouts in X: The previous title was pretty stupid... (silly me)</p>
<hr />
<div>#REDIRECT [[Configuring keyboard layouts in X]]</div>Bender02https://wiki.archlinux.org/index.php?title=Configuring_keyboard_layouts_in_X&diff=51871Configuring keyboard layouts in X2008-10-28T19:00:16Z<p>Bender02: Xkb moved to Configuring keyboard layouts in X: The previous title was pretty stupid... (silly me)</p>
<hr />
<div>= Intro =<br />
<br />
This page should describe howto configure the keyboard layouts for X properly, and also some common pitfalls when trying to do so.<br />
<br />
Note that this page deals with X only, if you want to set a proper keyboard for the console, you should edit /etc/rc.conf (KEYMAP variable), or you can do it manually with 'loadkeys'.<br />
<br />
= Setting the layouts: the keyboard section in xorg.conf =<br />
<br />
Let's do it by example: mine looks like this:<br />
<br />
Section "InputDevice"<br />
Identifier "IntegratedKeyboard"<br />
Option "CoreKeyboard"<br />
Option "XkbModel" "thinkpad60" # "pc105"<br />
Option "XkbLayout" "us,sk,de"<br />
Option "XkbVariant" "altgr-intl,qwerty,"<br />
Option "XkbOptions" "grp:menu_toggle,grp_led:caps"<br />
Option "XkbRules" "xorg"<br />
Driver "kbd"<br />
EndSection<br />
<br />
The outcome is the following: I have three keyboard layouts available (us, sk and de) with my preferred variants; I can switch cyclically between them by pressing the 'menu' key, and when one of the last two is selected, my caps led is on (obviously, the caps led doesn't show if I have capslock on anymore). Also, the extra multimedia keys on my thinkpad will produce appropriate events.<br />
<br />
Now some explanations for the variables:<br />
* XkbModel: selects the keyboard model. This has an influence only for some extra keys your keyboard might have. The safe fallback is "pc105". But for instance laptops usually have some extra keys, and usually to get them working (without messing up with xmodmap, see below) you can set a proper model. The list of models can be found in /usr/share/X11/xkb/rules/xorg<br />
* XkbLayout: sets the list of available layouts. The possibilities can be found in /usr/share/X11/xkb/symbols/* (each layout has a file there)<br />
* XkbVariant: specify variants for each of the layouts given in XkbLayout. For instance, the default sk variant is 'qwertz', so I had to specify 'qwerty' to get the one I wanted. The possibilities for variants can be found in /usr/share/X11/xkb/symbols/<layout> and they tend to have some commentary about what do they actually do. '''Warning:''' if you do specify some XkbVariant, you need to have as many commas in it as in XkbLayout, otherwise it may not work. For instance, if I just wanted sk-qwerty, and us and de with their default variants, I need to write 'XkbVariant ",qwerty,"' (notice the commas).<br />
* XkbOptions: some extras. Here you can specify how do you want to switch the layouts, what led will be used for notification, a special way to enter the euro-sign, etc... For the possibilities, look at /usr/share/X11/xkb/rules/xorg and then for their descriptions in the appropriate file in /usr/share/X11/xkb/symbols/*<br />
<br />
= What to do when it doesn't work as expected? =<br />
<br />
First try to narrow down the problem by removing most of the settings, and adding them one-by-one to see when the problem occurs. Make sure that the syntax is correct (ie the commas in 'XkbVariant').<br />
<br />
Read the section on xmodmap and xev below for more ways to check what's going on.<br />
<br />
If you're still puzzled, try politely asking on the forums, with a good description of the problem, and also the list of things that you tried.<br />
<br />
= Futher reading: assigning actions to extra keys =<br />
<br />
It's all here [[Extra_Keyboard_Keys]] and here [[Extra_Keyboard_Keys_in_Xorg]].</div>Bender02https://wiki.archlinux.org/index.php?title=Configuring_keyboard_layouts_in_X&diff=51870Configuring keyboard layouts in X2008-10-28T18:59:10Z<p>Bender02: referenced extra_keyboard_keys articles</p>
<hr />
<div>= Intro =<br />
<br />
This page should describe howto configure the keyboard layouts for X properly, and also some common pitfalls when trying to do so.<br />
<br />
Note that this page deals with X only, if you want to set a proper keyboard for the console, you should edit /etc/rc.conf (KEYMAP variable), or you can do it manually with 'loadkeys'.<br />
<br />
= Setting the layouts: the keyboard section in xorg.conf =<br />
<br />
Let's do it by example: mine looks like this:<br />
<br />
Section "InputDevice"<br />
Identifier "IntegratedKeyboard"<br />
Option "CoreKeyboard"<br />
Option "XkbModel" "thinkpad60" # "pc105"<br />
Option "XkbLayout" "us,sk,de"<br />
Option "XkbVariant" "altgr-intl,qwerty,"<br />
Option "XkbOptions" "grp:menu_toggle,grp_led:caps"<br />
Option "XkbRules" "xorg"<br />
Driver "kbd"<br />
EndSection<br />
<br />
The outcome is the following: I have three keyboard layouts available (us, sk and de) with my preferred variants; I can switch cyclically between them by pressing the 'menu' key, and when one of the last two is selected, my caps led is on (obviously, the caps led doesn't show if I have capslock on anymore). Also, the extra multimedia keys on my thinkpad will produce appropriate events.<br />
<br />
Now some explanations for the variables:<br />
* XkbModel: selects the keyboard model. This has an influence only for some extra keys your keyboard might have. The safe fallback is "pc105". But for instance laptops usually have some extra keys, and usually to get them working (without messing up with xmodmap, see below) you can set a proper model. The list of models can be found in /usr/share/X11/xkb/rules/xorg<br />
* XkbLayout: sets the list of available layouts. The possibilities can be found in /usr/share/X11/xkb/symbols/* (each layout has a file there)<br />
* XkbVariant: specify variants for each of the layouts given in XkbLayout. For instance, the default sk variant is 'qwertz', so I had to specify 'qwerty' to get the one I wanted. The possibilities for variants can be found in /usr/share/X11/xkb/symbols/<layout> and they tend to have some commentary about what do they actually do. '''Warning:''' if you do specify some XkbVariant, you need to have as many commas in it as in XkbLayout, otherwise it may not work. For instance, if I just wanted sk-qwerty, and us and de with their default variants, I need to write 'XkbVariant ",qwerty,"' (notice the commas).<br />
* XkbOptions: some extras. Here you can specify how do you want to switch the layouts, what led will be used for notification, a special way to enter the euro-sign, etc... For the possibilities, look at /usr/share/X11/xkb/rules/xorg and then for their descriptions in the appropriate file in /usr/share/X11/xkb/symbols/*<br />
<br />
= What to do when it doesn't work as expected? =<br />
<br />
First try to narrow down the problem by removing most of the settings, and adding them one-by-one to see when the problem occurs. Make sure that the syntax is correct (ie the commas in 'XkbVariant').<br />
<br />
Read the section on xmodmap and xev below for more ways to check what's going on.<br />
<br />
If you're still puzzled, try politely asking on the forums, with a good description of the problem, and also the list of things that you tried.<br />
<br />
= Futher reading: assigning actions to extra keys =<br />
<br />
It's all here [[Extra_Keyboard_Keys]] and here [[Extra_Keyboard_Keys_in_Xorg]].</div>Bender02https://wiki.archlinux.org/index.php?title=Configuring_keyboard_layouts_in_X&diff=51864Configuring keyboard layouts in X2008-10-28T18:01:39Z<p>Bender02: initial commit</p>
<hr />
<div>= Intro =<br />
<br />
This page should describe howto configure the keyboard settings for X properly, and also some common pitfalls when trying to do so.<br />
<br />
Note that this page deals with X only, if you want to set a proper keyboard for the console, you should edit /etc/rc.conf (KEYMAP variable), or you can do it manually with 'loadkeys'.<br />
<br />
= Setting the layouts: the keyboard section in xorg.conf =<br />
<br />
Let's do it by example: mine looks like this:<br />
<br />
Section "InputDevice"<br />
Identifier "IntegratedKeyboard"<br />
Option "CoreKeyboard"<br />
Option "XkbModel" "thinkpad60" # "pc105"<br />
Option "XkbLayout" "us,sk,de"<br />
Option "XkbVariant" "altgr-intl,qwerty,"<br />
Option "XkbOptions" "grp:menu_toggle,grp_led:caps"<br />
Option "XkbRules" "xorg"<br />
Driver "kbd"<br />
EndSection<br />
<br />
The outcome is the following: I have three keyboard layouts available (us, sk and de) with my preferred variants; I can switch cyclically between them by pressing the 'menu' key, and when one of the last two is selected, my caps led is on (obviously, the caps led doesn't show if I have capslock on anymore). Also, the extra multimedia keys on my thinkpad will produce appropriate events.<br />
<br />
Now some explanations for the variables:<br />
* XkbModel: selects the keyboard model. This has an influence only for some extra keys your keyboard might have. The safe fallback is "pc105". But for instance laptops usually have some extra keys, and usually to get them working (without messing up with xmodmap, see below) you can set a proper model. The list of models can be found in /usr/share/X11/xkb/rules/xorg<br />
* XkbLayout: sets the list of available layouts. The possibilities can be found in /usr/share/X11/xkb/symbols/* (each layout has a file there)<br />
* XkbVariant: specify variants for each of the layouts given in XkbLayout. For instance, the default sk variant is 'qwertz', so I had to specify 'qwerty' to get the one I wanted. The possibilities for variants can be found in /usr/share/X11/xkb/symbols/<layout> and they tend to have some commentary about what do they actually do. '''Warning:''' if you do specify some XkbVariant, you need to have as many commas in it as in XkbLayout, otherwise it may not work. For instance, if I just wanted sk-qwerty, and us and de with their default variants, I need to write 'XkbVariant ",qwerty,"' (notice the commas).<br />
* XkbOptions: some extras. Here you can specify how do you want to switch the layouts, what led will be used for notification, a special way to enter the euro-sign, etc... For the possibilities, look at /usr/share/X11/xkb/rules/xorg and then for their descriptions in the appropriate file in /usr/share/X11/xkb/symbols/*<br />
<br />
= What to do when it doesn't work as expected? =<br />
<br />
First try to narrow down the problem by removing most of the settings, and adding them one-by-one to see when the problem occurs. Make sure that the syntax is correct (ie the commas in 'XkbVariant').<br />
<br />
Read the section on xmodmap and xev below for more ways to check what's going on.<br />
<br />
If you're still puzzled, try politely asking on the forums, with a good description of the problem, and also the list of things that you tried.<br />
<br />
= xev and xmodmap =<br />
<br />
To test what keys generate which keycodes and symbols in X, use the utility 'xev'. Run it in a terminal, and watch what output do you get when you press various keys. This is useful to see<br />
1) what keycode is reported<br />
2) what 'symbol' is currently assigned to it<br />
<br />
For instance, when you press 'insert', you should get some keycode (which could depend on your keyboard model), but more importantly, you should see 'Insert' written somewhere. If you get 'NoSymbol', it means that that particular key isn't being recognized properly. For multimedia keys, you should get something like 'XF86AudioPlay', 'XF86AudioNext', etc... [For the possibilities for XF86 symbols, you can look at /usr/include/X11/XF86keysym.h]<br />
<br />
What to do when the extra keys don't generate symbols that you want them to generate? The first option is to tweak your XkbModel (see above). If you're sure that you cannot achieve what you want with this setting, 'xmodmap' comes into play.<br />
<br />
With xmodmap you can explicitly (re)assign symbols to keycodes. Find out what keycode is generated when you press the desired key with xev, and add it to ~/.xmodmaprc My ~/.xmodmaprc is below:<br />
<br />
! browser<br />
keycode 178 = XF86WWW<br />
! mail<br />
keycode 236 = XF86Mail<br />
! file manager<br />
keycode 230 = XF86Documents<br />
! sleep<br />
keycode 223 = XF86Sleep<br />
<br />
The exclamation mark denotes comments. Having done this, you let X know your preferences by running 'xmodmap ~/.xmodmaprc'. You probably want this to be executed whenever you start X. Some DEs or WMs do this automatically, for others you need to add manually.<br />
<br />
Some applications and window managers automatically react on proper symbols (for instance, when 'XF86AudioStop' is pressed in gnome, it stops audio playback; when 'XF86Back' is pressed in firefox, it goes 'back'), but for others you have to assign actions to it manually. This can be done either in your DE or WM; or you can use 'xbindkeys' - a handy utility designed exactly for this purpose.</div>Bender02https://wiki.archlinux.org/index.php?title=Synchronization_and_backup_programs&diff=41720Synchronization and backup programs2008-05-22T14:28:08Z<p>Bender02: added links to AUR</p>
<hr />
<div>[[Category:System (English)]]<br />
<br />
== Intro ==<br />
<br />
This wiki page contains information about various backup programs. It's a good idea to ''have'' regular backups of important data, most notably configuration files (<tt>/etc/*</tt>) and local pacman database (usually <tt>/var/lib/pacman/local/*</tt>).<br />
<br />
Few words to end the introduction: before you start trying programs out, try to think about your needs, e.g. consider the following questions:<br />
* What backup medium do I have available?<br />
** cd / dvd<br />
** remote server (With what access? Ssh? Can I install some software on it (necessary for e.g. rsync-based solutions)?)<br />
** external harddrive<br />
* How often do I plan to backup?<br />
** daily?<br />
** weekly?<br />
** less often?<br />
* What goodies do I expect from the backup solution?<br />
** compression? (what algorithms?)<br />
** encryption? (gpg or something more straightforward?)<br />
* Most importantly: how do I plan to restore backups if needed?<br />
<br />
All right, enough with this, let's see some options!<br />
<br />
== Incremental backups ==<br />
<br />
The point with these is that they remember what has been backed up during the last run, and back up only what has changed. Great if you back up often.<br />
<br />
=== Rsync-type backups ===<br />
<br />
The main characteristic of this type of backups is that they maintain a copy of the directory you want to keep a backup of, together with files which describe how did the contents change from the last backup (the so-called 'diffs'). Hence, they are inherently incremental, but usually they don't have compression/encryption. On the other hand, a working copy of everything is immediately available, no decompression/decryption needed. Finally the way it works makes it hard to burn backups to cd/dvd..<br />
<br />
===== command line based =====<br />
*[http://www.samba.org/rsync/ rsync] (in extra repo)<br />
*[http://www.nongnu.org/rdiff-backup/ rdiff-backup] (in community repo)<br />
*[http://www.rsnapshot.org rsnapshot] (in community repo)<br />
*[http://safekeep.sourceforge.net/ safekeep] (in AUR)<br />
* [http://www.scottlu.com/Content/Link-Backup.html Link-Backup] ([http://aur.archlinux.org/packages.php?ID=16929 AUR] may be patched with additional features) is similar to rsync based scripts, but does not use rsync<br />
** creates hard links between a series of backed-up trees (snapshots)<br />
** intelligently handles renames, moves, and duplicate files without additional storage or transfer<br />
** dstdir/.catalog is a catalog of all unique file instances; backup trees hard-link to the catalog<br />
** if a backup tree would be identical to the previous backup tree, it won't be needlessly created<br />
** transfer occurs over standard I/O locally or remotely between a client and server instance of this script<br />
** it copies itself to the server; it does not need to be installed on the server<br />
** remote backups rely on SSH<br />
** it resumes stopped backups; it can even be told to run for n minutes<br />
<br />
===== gui based =====<br />
*[http://www.flyback-project.org/ flyback] (in AUR)<br />
*[http://areca.sourceforge.net/ areca] (in AUR)<br />
*[https://wiki.ubuntu.com/TimeVault timevault] (in AUR)<br />
<br />
=== Not rsync-based ===<br />
<br />
They tend to create (big) archive files (like tar.bz2), and (of course) keep track of what's been archived. Now creating tar.bz2 or tar.gz archives has the advantage that you can extract the backups with just tar/bzip2/gzip, so you don't need to have the backup program around.<br />
<br />
* [[Backup with arch-backup|arch-backup]] (in community repo); [http://code.google.com/p/archlinux-stuff/ website]); trivial backup scripts with simple configuration:<br />
** compression method can be configured<br />
** possible to specify more directories to backup<br />
<br />
* [[Backup with hdup|hdup]] (in extra repo; [http://miek.nl/projects/hdup2/ website]; it's no longer developed, the author develops rdup now (below); but it's still a decent one):<br />
** creates tar.gz or tar.bz2 archives<br />
** supports gpg encryption<br />
** supports pushing over ssh<br />
** possible to specify more directories to backup<br />
<br />
* [http://http://miek.nl/projects/rdup rdup] (in [http://aur.archlinux.org/packages.php?ID=3728 AUR]) successor to hdup: the program *just determines* which files have changed since the last backup. It's completely up to you what do you want to do with that list. Some helper scripts are supplied, and with them it supports:<br />
** creating tar.gz archives '''or''' rsync-type copy<br />
** encryption (gpg and usual strong (eg. blowfish)), also applies for rsync-type copy<br />
** compression (also for rsync-type copy)<br />
<br />
* [http://www.nongnu.org/duplicity/ duplicity] (in community repo) is similar to hdup, supports tarring and encrypting. But:<br />
** the files backed up are "randomly" distributed between encrypted tar archives, which makes it harder to recover a particular file<br />
** you can backup just one directory at a time (while with hdup you can specify as many as you want in one backup profile)<br />
<br />
* [http://dar.linux.free.fr/ dar] (in community repo): <br />
** it uses its own format for archives (so you need to have it around when you want to restore)<br />
** supports splitting backups into more files by size<br />
** makefile-type config files, some custom scripts are available along with it<br />
** supports basic encryption (not gpg; but also strong, but you need to supply a password every time)<br />
** some gui tools for inspecting backups are also available (kdar, in [http://aur.archlinux.org/packages.php?ID=7586 AUR], but current dar needs beta version)<br />
** a script suitable for running from cron is [http://sarab.sourceforge.net/ sarab] (in [http://aur.archlinux.org/packages.php?ID=17044 AUR]): supports pretty much any backup scheme (Towers of Hanoi, Grandfather-Father-Son, etc..)<br />
<br />
== Not incremental backups ==<br />
<br />
* "Just copy everything into one big archive, but support writing to cd/dvd"-type: [http://www2.backup-manager.org/ backup-manager] (in [http://aur.archlinux.org/packages.php?ID=4351 AUR])<br />
<br />
== Versioning systems ==<br />
<br />
These are traditionally used for keeping track of software development; but if you want to have a simple way to manage your config files in one directory, it might be a good solution.<br />
<br />
* [http://www.selenic.com/mercurial/wiki/ mercurial] or [http://git.or.cz/ git] (both in extra repo)<br />
<br />
== Articles ==<br />
<br />
* [http://www.halfgaar.net/backing-up-unix Backing up Linux and other Unix(-like) systems]</div>Bender02https://wiki.archlinux.org/index.php?title=Synchronization_and_backup_programs&diff=41719Synchronization and backup programs2008-05-22T14:24:09Z<p>Bender02: added sarab</p>
<hr />
<div>[[Category:System (English)]]<br />
<br />
== Intro ==<br />
<br />
This wiki page contains information about various backup programs. It's a good idea to ''have'' regular backups of important data, most notably configuration files (<tt>/etc/*</tt>) and local pacman database (usually <tt>/var/lib/pacman/local/*</tt>).<br />
<br />
Few words to end the introduction: before you start trying programs out, try to think about your needs, e.g. consider the following questions:<br />
* What backup medium do I have available?<br />
** cd / dvd<br />
** remote server (With what access? Ssh? Can I install some software on it (necessary for e.g. rsync-based solutions)?)<br />
** external harddrive<br />
* How often do I plan to backup?<br />
** daily?<br />
** weekly?<br />
** less often?<br />
* What goodies do I expect from the backup solution?<br />
** compression? (what algorithms?)<br />
** encryption? (gpg or something more straightforward?)<br />
* Most importantly: how do I plan to restore backups if needed?<br />
<br />
All right, enough with this, let's see some options!<br />
<br />
== Incremental backups ==<br />
<br />
The point with these is that they remember what has been backed up during the last run, and back up only what has changed. Great if you back up often.<br />
<br />
=== Rsync-type backups ===<br />
<br />
The main characteristic of this type of backups is that they maintain a copy of the directory you want to keep a backup of, together with files which describe how did the contents change from the last backup (the so-called 'diffs'). Hence, they are inherently incremental, but usually they don't have compression/encryption. On the other hand, a working copy of everything is immediately available, no decompression/decryption needed. Finally the way it works makes it hard to burn backups to cd/dvd..<br />
<br />
===== command line based =====<br />
*[http://www.samba.org/rsync/ rsync] (in extra repo)<br />
*[http://www.nongnu.org/rdiff-backup/ rdiff-backup] (in community repo)<br />
*[http://www.rsnapshot.org rsnapshot] (in community repo)<br />
*[http://safekeep.sourceforge.net/ safekeep] (in AUR)<br />
* [http://www.scottlu.com/Content/Link-Backup.html Link-Backup] ([http://aur.archlinux.org/packages.php?ID=16929 AUR] may be patched with additional features) is similar to rsync based scripts, but does not use rsync<br />
** creates hard links between a series of backed-up trees (snapshots)<br />
** intelligently handles renames, moves, and duplicate files without additional storage or transfer<br />
** dstdir/.catalog is a catalog of all unique file instances; backup trees hard-link to the catalog<br />
** if a backup tree would be identical to the previous backup tree, it won't be needlessly created<br />
** transfer occurs over standard I/O locally or remotely between a client and server instance of this script<br />
** it copies itself to the server; it does not need to be installed on the server<br />
** remote backups rely on SSH<br />
** it resumes stopped backups; it can even be told to run for n minutes<br />
<br />
===== gui based =====<br />
*[http://www.flyback-project.org/ flyback] (in AUR)<br />
*[http://areca.sourceforge.net/ areca] (in AUR)<br />
*[https://wiki.ubuntu.com/TimeVault timevault] (in AUR)<br />
<br />
=== Not rsync-based ===<br />
<br />
They tend to create (big) archive files (like tar.bz2), and (of course) keep track of what's been archived. Now creating tar.bz2 or tar.gz archives has the advantage that you can extract the backups with just tar/bzip2/gzip, so you don't need to have the backup program around.<br />
<br />
* [[Backup with arch-backup|arch-backup]] (in AUR; [http://code.google.com/p/archlinux-stuff/ website]); trivial backup scripts with simple configuration:<br />
** compression method can be configured<br />
** possible to specify more directories to backup<br />
<br />
* [[Backup with hdup|hdup]] (in extra repo; [http://miek.nl/projects/hdup2/ website]; it's no longer developed, the author develops rdup now (below); but it's still a decent one):<br />
** creates tar.gz or tar.bz2 archives<br />
** supports gpg encryption<br />
** supports pushing over ssh<br />
** possible to specify more directories to backup<br />
<br />
* [http://http://miek.nl/projects/rdup rdup] (in AUR) successor to hdup: the program *just determines* which files have changed since the last backup. It's completely up to you what do you want to do with that list. Some helper scripts are supplied, and with them it supports:<br />
** creating tar.gz archives '''or''' rsync-type copy<br />
** encryption (gpg and usual strong (eg. blowfish)), also applies for rsync-type copy<br />
** compression (also for rsync-type copy)<br />
<br />
* [http://www.nongnu.org/duplicity/ duplicity] (in community repo) is similar to hdup, supports tarring and encrypting. But:<br />
** the files backed up are "randomly" distributed between encrypted tar archives, which makes it harder to recover a particular file<br />
** you can backup just one directory at a time (while with hdup you can specify as many as you want in one backup profile)<br />
<br />
* [http://dar.linux.free.fr/ dar] (in community repo): <br />
** it uses its own format for archives (so you need to have it around when you want to restore)<br />
** supports splitting backups into more files by size<br />
** makefile-type config files, some custom scripts are available along with it<br />
** supports basic encryption (not gpg; but also strong, but you need to supply a password every time)<br />
** some gui tools for inspecting backups are also available (kdar)<br />
** a script suitable for running from cron is [http://sarab.sourceforge.net/ sarab] (in AUR): supports pretty much any backup scheme (Towers of Hanoi, Grandfather-Father-Son, etc..)<br />
<br />
== Not incremental backups ==<br />
<br />
* "Just copy everything into one big archive, but support writing to cd/dvd"-type: [http://www2.backup-manager.org/ backup-manager] (in AUR)<br />
<br />
== Versioning systems ==<br />
<br />
These are traditionally used for keeping track of software development; but if you want to have a simple way to manage your config files in one directory, it might be a good solution.<br />
<br />
* [http://www.selenic.com/mercurial/wiki/ mercurial] or [http://git.or.cz/ git] (both in extra repo)<br />
<br />
== Articles ==<br />
<br />
* [http://www.halfgaar.net/backing-up-unix Backing up Linux and other Unix(-like) systems]</div>Bender02https://wiki.archlinux.org/index.php?title=TeX_Live/FAQ&diff=41263TeX Live/FAQ2008-05-14T05:07:48Z<p>Bender02: added a remark about context</p>
<hr />
<div>[[Category:FAQs (English)]]<br />
[[Category:Software (English)]]<br />
[[Category:Office (English)]]<br />
<br />
This FAQ contains answers to some TeXlive related questions that have appeared on the forums, as well as some other info that might be useful.<br />
<br />
= General questions: Where should I start? Resources? =<br />
<br />
For an introduction to LaTeX, I recommend "The not so Short Introduction to LaTeX" by Tobias Oetiker. Originally german, this document is translated to many languages, especially to the lingua franca of the Internet, english. Downloadable from CTAN [http://www.ctan.org/tex-archive/info/lshort/ here].<br />
<br />
==Q: How do can I access texlive documentation?==<br />
'''A:''' Provided that you installed appropriate texlive-*-doc packages,<br />
texdoc <packagename><br />
can probably (i.e. in many cases) do the job. Unfortunately some package authors do not name their documentation equally to their package. So asking for documentation in Forums or mailing lists not always is silly.<br />
<br />
==Q: I want latex to do something special, and I'm pretty sure someone before me had to have the same problem.==<br />
'''A:''' There is an excellent [http://www.tex.ac.uk/cgi-bin/texfaq2html TeX FAQ] on the web. Typical latex problems (special headers, different page layout, tricks with tables, etc..) are all covered there. Searchable!<br />
<br />
==Q: I want to read more! More! I said more!==<br />
'''A:''' Andy Roberts (arooaroo) has a couple of tricks on his website [http://www.andy-roberts.net/misc/latex/index.html Getting to grips with LaTeX], which has been used as a basis for [http://en.wikibooks.org/wiki/LaTeX LaTeX wikibook].<br />
<br />
= Tricks with LaTeX =<br />
<br />
==Q: I need/want to use some funky bibliography/references format.==<br />
'''A:''' [http://www.ctan.org/tex-archive/help/Catalogue/entries/biblatex.html biblatex] is then the thing you are looking for (it's in AUR). It has an enhancement [http://www.ctan.org/tex-archive/help/Catalogue/entries/biblatex-dw.html biblatex-dw], also in AUR, which is especially valuable for the special issues in the Humanities.<br />
<br />
= TeXlive directory structure and important files =<br />
<br />
==Q: What's up with all these dirs in /opt/texlive/*==<br />
'''A:''' TeX uses several "source trees"; they have the same internal structure, and can "overlap". This is to allow users to modify files provided system-wide without having to access files they're not supposed to access. Here's the portion of the main config file which lists all these dirs with some explanations ($SELFAUTODIR=/opt/texlive):<br />
% The tree containing the runtime files closely related to the specific<br />
% program version used:<br />
TEXMFMAIN = $SELFAUTODIR/texmf<br />
% The main distribution tree:<br />
TEXMFDIST = $SELFAUTODIR/texmf-dist<br />
% A place for local additions to a "standard" texmf tree.<br />
% This tree is not used for local configuration maintained by<br />
% texconfig, it uses TEXMFCONFIG below.<br />
TEXMFLOCAL = $SELFAUTODIR/texmf-local<br />
% TEXMFSYSVAR, where texconfig-sys stores variable runtime data.<br />
TEXMFSYSVAR = $SELFAUTODIR/texmf-var<br />
% TEXMFSYSCONFIG, where texconfig-sys stores configuration data.<br />
TEXMFSYSCONFIG = $SELFAUTODIR/texmf-config<br />
% User texmf trees are allowed as follows.<br />
TEXMFHOME = $HOME/texmf<br />
% TEXMFVAR, where texconfig stores variable runtime data.<br />
TEXMFVAR = $HOME/.texmf-var<br />
% TEXMFCONFIG, where texconfig stores configuration data.<br />
TEXMFCONFIG = $HOME/.texmf-config<br />
Note that they are searched in the reverse order that they are listed above (I think). So when some problems pops up, search the trees in the proper order ;)<br />
<br />
One more remark: if you install something just for you, it should go to your home texmf tree. However, on desktops, you might not want to clutter your home dir; then it should go to texmf-local tree (which should be writable by the "tex" group).<br />
<br />
==Q: I want to have some configuration app!==<br />
'''A:''' Run<br />
texconfig<br />
Careful! When you run this as a user, you modify settings for that user. If you want to modify system-wide settings, run<br />
texconfig-sys<br />
as root instead.<br />
<br />
==Q: I want to edit textfiles! Where are some configuration files?==<br />
'''A:''' Keeping in mind the above directory structure (<texmfroot> refers to one of the dirs above), here you go:<br />
The main config file:<br />
<texmfroot>/web2c/texmf.cnf<br />
List of formats generated:<br />
<texmfroot>/web2c/fmtutil.cnf<br />
Settings with which are e.g. bitmap fonts generated<br />
<texmfroot>/web2c/mktex.cnf<br />
Which and how type1 fonts are used instead of metafont generated bitmap ones?<br />
<texmfroot>/web2c/updmap.cfg<br />
<br />
= Common problems with TeXlive =<br />
<br />
==Q: I've just installed TeXlive and nothing works!==<br />
'''A:''' TeXlive installs to /opt, and so you need to log out and log back in (or start a new login shell) in order to update PATH variable.<br />
<br />
==Q: I want use ConTeXt.==<br />
'''A:''' (English) ConTeXt should be enabled automatically. Remember that the perl wrapper to be used with ConTeXt is<br />
texexec<br />
If ConTeXt is not enabled (or you want to use localized version), use<br />
texconfig<br />
to edit the configuration file with formats, and uncomment the appropriate lines.<br />
<br />
==Q: I've just installed some .sty files, but tex doesn't seem to see them.==<br />
'''A:''' TeXlive (and tetex) uses its own directory indexes (files named ls-R), and you need to refresh them after you copy something into one of the TeX trees. Magic command:<br />
mktexlsr<br />
or<br />
texhash<br />
A command line program to search through these indexes is<br />
kpsewhich<br />
Hence you can check that TeX can find a particular file by running<br />
kpsewhich <filename><br />
The output should be full path to that file.<br />
<br />
==Q: Pdftex and/or dvips uses bitmap fonts instead of type1 postscript fonts (aka "when I zoom my pdf/ps file, fonts are really pixelated" aka "everytime I run tex, it takes a long time because it generates fonts with metafont" aka "at the end of my logfile generated by pdftex I see that it includes *.pk fonts instead of *.pfb)==<br />
'''A:''' This takes a bit of time to explain. Now it's important that you understand how does the system work, so that you know what you're doing.<br />
<br />
* Files which tell pdftex/dvips which fonts are to be included as type1 fonts (instead of traditional bitmap fonts) have suffix .map and reside somewhere in <texmfroot>/fonts/map/{pdftex,dvips}/updmap/{pdftex.map,psfonts.map}.<br />
* You '''don't''' want to edit these files manually; they're good for checking if your favorite type1 font which causes troubles is sitting there properly.<br />
* These files are automatically generated, when you run<br />
updmap<br />
as user (or<br />
updmap-sys<br />
as root for system-wide changes)<br />
* What you need to do to have your favorite fonts (for instance kpfonts) properly used as type1 fonts in pdf and ps files is to locate the .map file that goes with the package (e.g. kpfonts.map; you don't need to actually *do* anything with the file, just know that it's there somewhere), edit updmap.cfg by running<br />
updmap --edit<br />
as user (or "updmap-sys --edit" as root) and add the line<br />
Map kpfonts.map<br />
or the line<br />
MixedMap kpfonts.map<br />
(MixedMap indicates that fonts are also available as bitmap fonts.), and exit the editor. At this point, you should see the messages which indicate that updmap is regenerating {pdftex,psfonts}.map files.<br />
* This should be sufficient, and your next run of pdftex/dvips should be already including the type1 versions of fonts.<br />
<br />
= Useful apps to use with (any TeX installation) =<br />
<br />
==Q: Editors? ==<br />
'''A:''' Great for beginners (errr...) are [http://kile.sourceforge.net/ kile] (depends on kde though) or [http://winefish.berlios.de/ winefish]. <br />
<br />
For serious work, especially scientic papers, more especially in the humanities, I strongly recommend emacs with reftex and [http://www.gnu.org/software/auctex/ auctex]. Reftex helps very much with references within big documents.<br />
<br />
Also (g)vim with [http://vim-latex.sourceforge.net/ vim-latex] (although I had some problems with it with vim-7.* versions) might be a good solution. If you are more WYSIWIG oriented, then perhaps [http://www.lyx.org/Home lyx] (just be aware that transitions "lyx <-> manual source editing" is not always seamless, and using your own macros is a bit awkward of course); or [http://www.texmacs.org/ texmacs] (with which I have no experience, and it seems a bit outdated).<br />
<br />
==Q: Pictures with LaTeX labels?==<br />
'''A:''' Apart from some latex in-source macros (which are a bit of a PITA to write), there are excellent "picture programming languages" [http://cm.bell-labs.com/who/hobby/MetaPost.html metapost] and its (more-less) successor [http://asymptote.sourceforge.net asymptote]. They are pretty powerful, but have similar approach as tex itself - you write down what you want to have and how are the things related, and compiler then produces the picture. The target format is postscript for metapost; and eps/pdf/png for asymptote.<br />
<br />
Even closer incorporated to TeX itself - i.e. to Plain TeX, LaTeX or Context, there are layers for each of this formats - is the relatively new PGF package with its language named [http://www.fauskes.net/pgftikzexamples/ TIKZ].<br />
<br />
The Python library [http://pyx.sourceforge.net/ PyX] (named python-pyx in AUR) gives the possibillity to use Python to program pictures, and it uses TeX for the typesetting.<br />
<br />
Last but not least: [http://tug.org/PSTricks/main.cgi/ PSTricks], which gives an interface for direct inclusion of Postscript-code into TeX ([http://pages.cs.wisc.edu/~ghost/doc/AFPL/6.50/Ps2pdf.htm ps2pdf]). There are some hurdles to climb if you want to have pdf-output, because PSTricks is not compatible to pdftex.<br />
<br />
==Q: Pictures with LaTeX labels - I want GUI! - I want pictures fast!==<br />
'''A:''' The "grandfather" of vector editors - xfig is able to produce some output relevant to tex. I had relatively good experience with [http://tclab.kaist.ac.kr/ipe/ ipe] recently (saves eps/pdf).</div>Bender02https://wiki.archlinux.org/index.php?title=Hdup&diff=41102Hdup2008-05-11T01:00:26Z<p>Bender02: added link to Backup_programs page</p>
<hr />
<div>[[Category:Development (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
== Intro ==<br />
<br />
This wiki page contains a guide on how to set up [http://www.miek.nl/projects/hdup2/hdup.html hdup], "The little, spiffy, backup tool". (Don't be discouraged by the fact that on its website it says "Unmaintained!". It's mature program, and that warning means only that its author, Miek Gieben, develops and uses a similar program (rdup), which is a bit more difficult to use.) Although it's a command line program, it's easy to set up, so don't be afraid.<br />
<br />
=== Features ===<br />
* archives are tar.bz2 (or tar.gz)<br />
* incremental backups (monthly-weekly-daily scheme)<br />
* backups over ssh<br />
* encrypted backups (mcrypt, gpg)<br />
<br />
=== Other backup programs ===<br />
<br />
See the general wiki page about backups: [[Backup_programs]]<br />
<br />
== Installing/running/restoring ==<br />
<br />
=== Installing and setting hdup up ===<br />
<br />
* hdup is in [extra] repo, so you can install it via pacman:<br />
pacman -S hdup<br />
* We need to edit the configuration file '''/etc/hdup/hdup.conf'''. There's one supplied, so you can just edit that one; or you can use the minimal one listed here:<br />
[global]<br />
# to which dir the archives will be written<br />
archive dir = /vol/backup<br />
# chown the archives to this user<br />
user = <yourusername><br />
<br />
[my-comp]<br />
# what to backup, separate with ,.<br />
# For directories add closing slash, like /home/<br />
dir = /home/,/var/abs/local/<br />
# don't include theses directories<br />
exclude = lost\+found/, /proc/, /dev/, /sys/<br />
* You '''need to modify''' at least the following options:<br />
** '''archive dir''': that's where the backups will be written to<br />
** '''user''': created archives will be chowned to this user; you can just use your username. This is needed since hdup needs to be run as root.<br />
** '''dir''': that's the list of directories whose contents you want to back up).<br />
<br />
The rest of the comments about the config file can be skipped on the first<br />
reading. They describe various other options you can use if the hdup.conf file:<br />
* You can have more that one ''profile'' (the one used above is named '''my-comp'''). This means that you can have a couple of independent backup schemes. For instance, you might want to have another one for your webpages:<br />
[my-webpages]<br />
dir = /var/www/<br />
* To have a simple means of excluding some directories, use the '''nobackup''' option. It specifies the filename, which if it exists in a directory, then that directory is excluded from backing up.<br />
nobackup = .nobackup<br />
This can be used for example to exclude backing up of opera cache, by creating and empty .nobackup file in the cache directory:<br />
touch ~/.opera/cache4/.nobackup<br />
* You can specify the compression algorithm used:<br />
compression = bzip<br />
compression level = 6<br />
* hdup refuses to restore backups to / by default, since it can be dangerous. To override this, use<br />
# allow restoring to /<br />
force = yes<br />
<br />
=== Running hdup ===<br />
<br />
Let's first explain the monthly-weekly-daily scheme of backups. The 'monthly'<br />
archives contain all the data you specify to backup. The 'weekly' archives<br />
contain only those files, which have changed from the last 'monthly' backup.<br />
Finally, 'daily' contain only those which have changed from the last 'weekly'<br />
backup.<br />
<br />
Of course, 'monthly', 'weekly' and 'daily' are just names, you don't need to<br />
perform backups in these intervals. But you cannot perform a 'weekly', unless<br />
you have at least one 'monthly', etc.<br />
<br />
So, how does hdup implement this scheme?<br />
<br />
As root, you can run hdup with the command like<br />
hdup monthly my-comp<br />
This creates a directory 'my-comp' in the directory you specified in the config file (/vol/backup), and inside it two other directories: 'etc' and (current date) '2008-02-23'. The 'etc' one contains some hdup's files, and the '2008-02-23' one will have a big .tar.bz2 archive in it. That's your backup.<br />
<br />
After some time after 'monthly' backup, you decide you want to backup again. Now you can run hdup as<br />
hdup weekly my-comp<br />
and hdup will archive only what has changed from the 'monthly', and the archive will be put into another dir named after current date in /vol/backup/my-comp.<br />
<br />
It should be clear now how the backing up works. Note that if hdup cannot find a 'monthly' and you ask it to do a 'weekly', it will complain. See the tips section.<br />
<br />
=== Restoring backups ===<br />
<br />
To restore, you need to have all 'parent' archives (ie. if you want to restore a weekly backup, you also need to have its 'monthly' available). The command for restoring is<br />
hdup restore my-comp 2008-01-31 /somedir<br />
With this, hdup will try to restore things as they've been up to the date specified, and it will unpack to the directory /somedir. You can force it to unpack right away to / (see 'force' option above), but be very careful with this!<br />
<br />
Note that the backups are just .tar.bz2 archives, so if you need a particular file from a particular date, just use any archive manager (or tar and bzip2) to open the archive and copy the needed file over.<br />
<br />
=== More goodies: encryption and ssh ===<br />
<br />
If you've got here, let me remind you that '''man hdup''' and '''man hdup.conf''' are your friends!<br />
<br />
* For gpg encryption, you want to add something like<br />
algorithm = gpg<br />
key = <your gpg key identifier><br />
either to [global] (then it's going to be used for all profiles), or just to a profile part. The archives will then be encrypted with your public key (so you can only decrypt them with your secret key). Note that you can decrypt them manually with<br />
gpg -d <archive file><br />
in case you need it.<br />
<br />
* For other encryption (e.g. mcrypt), just add<br />
algorithm = mcrypt<br />
In this case, hdup will ask for a password both when archiving and restoring.<br />
<br />
I haven't tried the backups over ssh... so if anybody feels like, please update this wiki.<br />
<br />
=== Tips ===<br />
<br />
* You can of course burn the archives to cd/dvd with any burning software you like. The only thing to remember here is that the 'parent' archive is needed when you're doing a 'child' backup (like you need 'monthly' for 'weekly'). However, if you're tight on space, this can be achieved by mounting the cd/dvd with 'parent' backup, and soft linking its directory into /vol/backup, so that hdup can find it there.</div>Bender02https://wiki.archlinux.org/index.php?title=Synchronization_and_backup_programs&diff=41101Synchronization and backup programs2008-05-11T00:51:14Z<p>Bender02: Initial version</p>
<hr />
<div>[[Category:System (English)]]<br />
<br />
== Intro ==<br />
<br />
This wiki page contains information about various backup programs. It's a good idea to ''have'' regular backups of important data, most notably configuration files (<tt>/etc/*</tt>) and local pacman database (usually <tt>/var/lib/pacman/local/*</tt>).<br />
<br />
Few words to end the introduction: before you start trying programs out, try to think about your needs, e.g. consider the following questions:<br />
* What backup medium do I have available?<br />
** cd / dvd<br />
** remote server (With what access? Ssh? Can I install some software on it (necessary for e.g. rsync-based solutions)?)<br />
** external harddrive<br />
* How often do I plan to backup?<br />
** daily?<br />
** weekly?<br />
** less often?<br />
* What goodies do I expect from the backup solution?<br />
** compression? (what algorithms?)<br />
** encryption? (gpg or something more straightforward?)<br />
* Most importantly: how do I plan to restore backups if needed?<br />
<br />
All right, enough with this, let's see some options!<br />
<br />
== Incremental backups ==<br />
<br />
The point with these is that they remember what has been backed up during the last run, and back up only what has changed. Great if you back up often.<br />
<br />
=== Rsync-type backups ===<br />
<br />
The main characteristic of this type of backups is that they maintain a copy of the directory you want to keep a backup of, together with files which describe how did the contents change from the last backup (the so-called 'diffs'). Hence, they are inherently incremental, but usually they don't have compression/encryption. On the other hand, a working copy of everything is immediately available, no decompression/decryption needed. Finally the way it works makes it hard to burn backups to cd/dvd..<br />
<br />
===== command line based =====<br />
*[http://www.samba.org/rsync/ rsync] (in extra repo)<br />
*[http://www.nongnu.org/rdiff-backup/ rdiff-backup] (in community repo)<br />
*[http://www.rsnapshot.org rsnapshot] (in community repo)<br />
*[http://safekeep.sourceforge.net/ safekeep] (in AUR)<br />
===== gui based =====<br />
*[http://www.flyback-project.org/ flyback] (in AUR)<br />
*[http://areca.sourceforge.net/ areca] (in AUR)<br />
*[https://wiki.ubuntu.com/TimeVault timevault] (in AUR)<br />
<br />
=== Not rsync-based ===<br />
<br />
They tend to create (big) archive files (like tar.bz2), and (of course) keep track of what's been archived. Now creating tar.bz2 or tar.gz archives has the advantage that you can extract the backups with just tar/bzip2/gzip, so you don't need to have the backup program around.<br />
<br />
* [[Backup with hdup|hdup]] (in extra repo; [http://miek.nl/projects/hdup2/ website]; it's no longer developed, the author develops rdup now (below); but it's still a decent one):<br />
** creates tar.gz or tar.bz2 archives<br />
** supports gpg encryption<br />
** supports pushing over ssh<br />
** possible to specify more directories to backup<br />
<br />
* [http://http://miek.nl/projects/rdup rdup] (in AUR) successor to hdup: the program *just determines* which files have changed since the last backup. It's completely up to you what do you want to do with that list. Some helper scripts are supplied, and with them it supports:<br />
** creating tar.gz archives '''or''' rsync-type copy<br />
** encryption (gpg and usual strong (eg. blowfish)), also applies for rsync-type copy<br />
** compression (also for rsync-type copy)<br />
<br />
* [http://www.nongnu.org/duplicity/ duplicity] (in community repo) is similar to hdup, supports tarring and encrypting. But:<br />
** the files backed up are "randomly" distributed between encrypted tar archives, which makes it harder to recover a particular file<br />
** you can backup just one directory at a time (while with hdup you can specify as many as you want in one backup profile)<br />
<br />
* [http://dar.linux.free.fr/ dar] (in community repo): <br />
** it uses its own format for archives (so you need to have it around when you want to restore)<br />
** supports splitting backups into more files by size<br />
** makefile-type config files, some custom scripts are available along with it<br />
** supports basic encryption (not gpg; but also strong, but you need to supply a password every time)<br />
** some gui tools for inspecting backups are also available (kdar)<br />
<br />
<br />
<br />
== Not incremental backups ==<br />
<br />
* "Just copy everything into one big archive, but support writing to cd/dvd"-type: [http://www2.backup-manager.org/ backup-manager] (in AUR)<br />
<br />
== Versioning systems ==<br />
<br />
These are traditionally used for keeping track of software development; but if you want to have a simple way to manage your config files in one directory, it might be a good solution.<br />
<br />
* [http://www.selenic.com/mercurial/wiki/ mercurial] or [http://git.or.cz/ git] (both in extra repo)</div>Bender02https://wiki.archlinux.org/index.php?title=TeX_Live&diff=39976TeX Live2008-04-19T18:50:42Z<p>Bender02: Added link to FAQ</p>
<hr />
<div>[[Category:HOWTOs (English)]]<br />
[[Category:Software (English)]]<br />
[[Category:Utilities (English)]]<br />
[[Category:Office (English)]]<br />
<br />
{{i18n_links_start}}<br />
{{i18n_entry|Italiano|TeXLive (Italiano)}}<br />
{{i18n_links_end}}<br />
<br />
= Introduction =<br />
Since [http://www.tug.org/tetex/ '''tetex'''] -- the standard distribution of TeX and friends for Unix systems -- is no longer maintained, many users have expressed the wish that it be replaced by [http://www.tug.org/texlive/ '''TeXLive''']. See [http://bbs.archlinux.org/viewtopic.php?id=35991 this forum discussion] for more details. The good news is that TeXLive packages for Arch Linux (based on TeXLive 2007 with incremental updates to the latest version of all CTAN packages) are now available in [http://aur.archlinux.org/packages.php?O=0&K=texlive&PP=50 '''community'''] (as of Sept. 27, 2007). Now by installing the package texlive-core (85MB) you will have a very solid typesetting system at your disposal.<br />
<br />
= List of all texlive-* packages = <br />
<br />
The texlive packages are arranged into four groups: '''texlive-most''', '''texlive-most-doc''', '''texlive-lang''', and '''texlive-lang-doc'''. The dummy package '''texlive-all''' will install everything. As you can see, the documentation has been packaged separately, for the benefit of users who want to save space or who prefer to [http://tug.org/texlive/Contents/live/doc.html '''access the documentation online''']. <br />
<br />
'''NOTE: For most packages in texlive-most (but not for texlive-bin and the documention), a *-svn version is also available in [community].''' <br />
<br />
The essential package '''texlive-core''' contains the basic texmf-dist tree, while '''texlive-bin''' contains the binaries. It is based on the “medium” install scheme of the original TeXLive installable CD and DVD. All other packages are based on the eponymous collections in TeXLive. The links bring to a list of the CTAN packages contained in each Arch package.<br />
<br />
== Group texlive-most ==<br />
* texlive-bin (13M)<br />
* [[texlive-core]] (60M) <br />
* [[texlive-bibtexextra]] (1.2M) <br />
* [[texlive-fontsextra]] (91M) <br />
* [[texlive-formatsextra]] (327K) <br />
* [[texlive-games]] (370K) <br />
* [[texlive-genericextra]] (265K) <br />
* [[texlive-htmlxml]] (1.4M) <br />
* [[texlive-humanities]] (280K) <br />
* [[texlive-latex3]] (48K) <br />
* [[texlive-latexextra]] (3.8M) <br />
* [[texlive-music]] (4.7M) <br />
* [[texlive-omega]] (1.5M) <br />
* [[texlive-pictures]] (531K) <br />
* [[texlive-plainextra]] (130K) <br />
* [[texlive-pstricks]] (267K) <br />
* [[texlive-publishers]] (1.7M) <br />
* [[texlive-science]] (300K)<br />
<br />
== Group texlive-most-doc ==<br />
* texlive-core-doc (127M) <br />
* texlive-doc-i18n (42M) <br />
* texlive-bibtexextra-doc (2.9M) <br />
* texlive-fontsextra-doc (15M) <br />
* texlive-formatsextra-doc (2.1M) <br />
* texlive-games-doc (1.3M) <br />
* texlive-genericextra-doc (1.7M) <br />
* texlive-htmlxml-doc (299K) <br />
* texlive-humanities-doc (8.7M) <br />
* texlive-latex3-doc (592K) <br />
* texlive-latexextra-doc (81M) <br />
* texlive-music-doc (2.5M) <br />
* texlive-omega-doc (633K) <br />
* texlive-pictures-doc (7.5M) <br />
* texlive-plainextra-doc (1.1M) <br />
* texlive-pstricks-doc (23M) <br />
* texlive-publishers-doc (13M) <br />
* texlive-science-doc (7.6M)<br />
<br />
== Group texlive-lang ==<br />
* [[texlive-langafrican]] (5.4M) <br />
* [[texlive-langarab]] (2.9M) <br />
* [[texlive-langarmenian]] (347K) <br />
* [[texlive-langcjk]] (31M) <br />
* [[texlive-langcroatian]] (48K) <br />
* [[texlive-langcyrillic]] (2.3M) <br />
* [[texlive-langgreek]] (7.2M) <br />
* [[texlive-langhebrew]] (43K) <br />
* [[texlive-langindic]] (5.4M) <br />
* [[texlive-langmanju]] (2.6K) <br />
* [[texlive-langmongolian]] (1.7M) <br />
* [[texlive-langtibetan]] (377K) <br />
* [[texlive-langvietnamese]] (6.0M)<br />
<br />
== Group texlive-lang-doc ==<br />
* texlive-langafrican-doc (488K) <br />
* texlive-langarab-doc (3.4M) <br />
* texlive-langarmenian-doc (168K) <br />
* texlive-langcjk-doc (1.8M) <br />
* texlive-langcroatian-doc (92K) <br />
* texlive-langcyrillic-doc (2.1M) <br />
* texlive-langgreek-doc (1.2M) <br />
* texlive-langhebrew-doc (96K) <br />
* texlive-langindic-doc (2.0M) <br />
* texlive-langmanju-doc (24K) <br />
* texlive-langmongolian-doc (1.1M) <br />
* texlive-langtibetan-doc (261K) <br />
* texlive-langvietnamese-doc (1001K)<br />
<br />
= Building SVN versions of TeXlive packages =<br />
<br />
'''[Note: This is no longer necessary since the svn packages are in community.]'''<br />
<br />
For power-users who would like to enjoy the very latest from CTAN without installing too much by hand, the following directions will enable you to easily build and install '''texlive-svn''' packages:<br />
<br />
Note first that texlive-core-svn contains the same binaries than texlive-core (based on the February 2007 release of TeX Live with the inclusion of a bugfix patch). The svn version, as its name suggests, targets the texmf trees in the current development version on tug.org's subversion server (retrieved via '''rsync''' for performance). <br />
<br />
To build the svn packages, get [http://ankabut.net/archlinux/texlive-svn.zip texlive-svn.zip] which contains the complete build tree, i.e., the '''PKGBUILD'''s and auxiliary files for all the packages mentioned above. The *.paths files (which contain the paths that rsync needs to retrieve) won't be up-to-date, so you need also the following: [http://ankabut.net/archlinux/tl-scripts.zip tl-scripts.zip].<br />
<br />
Be sure you have installed in the system '''xorg-server''', '''t1lib''', '''gd''', '''rsync''', '''flex''' and '''bison''' packages. Assuming you are in the same directory where you downloaded the '''.zip''' files, follow these instructions:<br />
<br />
$ unzip texlive-svn.zip -d texlive-svn<br />
$ unzip tl-scripts.zip -d texlive-svn<br />
$ cd texlive-svn<br />
$ ./updatepathfiles #Wait a little..<br />
...<br />
$ ls<br />
<br />
You'll see all the packages names, you should think about what you need. But surely you need '''texlive-core'''.<br />
<br />
$ cd texlive-core<br />
$ makepkg -c<br />
<br />
''Be patient!'' Sources are big, and compilation takes quite a long time. If everything goes well you can install texlive-core with pacman:<br />
<br />
$ pacman -U texlive-core-2007*.pkg.tar.gz #press tab to complete<br />
<br />
If something goes wrong, join us [http://bbs.archlinux.org/viewtopic.php?id=35991 in the forum] and look to see if your problem has already been solved. If not, we will happily help!<br />
Post everything you think useful and the '''build.log''' made this way:<br />
$ makepkg -c 2>&1 | tr -d -c '\n[:print:]' | tee build.log<br />
or just:<br />
$ makepkg -c 2>&1 | tee build.log<br />
but do not passing through '''tr''' won't delete non-printable characters.<br />
<br />
Even after failure you can delete the '''pkg''' and '''src''' folders. Don't delete the '''texmf'''* folders yet, otherwise you will have to download everything again the next time you run '''makepkg'''. The other files in the '''PKGBUILD''' directory should not be deleted, they are part of the sources.<br />
<br />
If you need some other package, just repeat the above in the appropriate directory. The other packages do not need compiling so they ''should'' just work.<br />
<br />
If you want to compile all packages without thinking too much about it you may use, from the directory where you unpacked the '''.zip''' file:<br />
<br />
$ for d in texlive-*; do cd "$d" && makepkg -dc ; touch ../"$d"-"$?" && cd .. ; done <br />
<br />
This will make every package of every directory that fall in the '''texlive-*''' expression and make a file with the directory name and return code, zero means success, non-zero failure. So if '''texlive-core''' has been compiled correctly you'll have a file called '''texlive-core-0''' in the directory.<br />
<br />
= Alternative: TeX Live with loop-mounted DVD ISO =<br />
<br />
See [[TeXLive_from_iso]]<br />
<br />
= Working with TeXLive: FAQ =<br />
<br />
See [[TeXLive_FAQ]].</div>Bender02https://wiki.archlinux.org/index.php?title=TeX_Live/FAQ&diff=39928TeX Live/FAQ2008-04-18T01:36:34Z<p>Bender02: Some more questions from forums added</p>
<hr />
<div>[[Category:FAQs (English)]]<br />
[[Category:Software (English)]]<br />
[[Category:Office (English)]]<br />
<br />
This FAQ contains answers to some TeXlive related questions that have appeared on the forums, as well as some other info that might be useful.<br />
<br />
= General questions: Where should I start? Resources? =<br />
<br />
For an introduction to LaTeX, I recommend "The not so Short Introduction to LaTeX" by Tobias Oetiker. Translated to many languages. Downloadable from CTAN [http://www.ctan.org/tex-archive/info/lshort/ here].<br />
<br />
==Q: How do can I access texlive documentation?==<br />
'''A:''' Provided that you installed appropriate texlive-*-doc packages,<br />
texdoc <packagename><br />
should do the job.<br />
<br />
==Q: I want latex to do something special, and I'm pretty sure someone before me had to have the same problem.==<br />
'''A:''' There is an excellent [http://www.tex.ac.uk/cgi-bin/texfaq2html TeX FAQ] on the web. Typical latex problems (special headers, different page layout, tricks with tables, etc..) are all covered there. Searchable!<br />
<br />
==Q: I want to read more! More! I said more!==<br />
'''A:''' Andy Roberts (arooaroo) has a couple of tricks on his website [http://www.andy-roberts.net/misc/latex/index.html Getting to grips with LaTeX], which has been used as a basis for [http://en.wikibooks.org/wiki/LaTeX LaTeX wikibook].<br />
<br />
= Tricks with LaTeX =<br />
<br />
==Q: I need/want to use some funky bibliography/references format.==<br />
'''A:''' [http://www.ctan.org/tex-archive/help/Catalogue/entries/biblatex.html biblatex] is then the thing you are looking for (it's in AUR).<br />
<br />
= TeXlive directory structure and important files =<br />
<br />
==Q: What's up with all these dirs in /opt/texlive/*==<br />
'''A:''' TeX uses several "source trees"; they have the same internal structure, and can "overlap". This is to allow users to modify files provided system-wide without having to access files they're not supposed to access. Here's the portion of the main config file which lists all these dirs with some explanations ($SELFAUTODIR=/opt/texlive):<br />
% The tree containing the runtime files closely related to the specific<br />
% program version used:<br />
TEXMFMAIN = $SELFAUTODIR/texmf<br />
% The main distribution tree:<br />
TEXMFDIST = $SELFAUTODIR/texmf-dist<br />
% A place for local additions to a "standard" texmf tree.<br />
% This tree is not used for local configuration maintained by<br />
% texconfig, it uses TEXMFCONFIG below.<br />
TEXMFLOCAL = $SELFAUTODIR/texmf-local<br />
% TEXMFSYSVAR, where texconfig-sys stores variable runtime data.<br />
TEXMFSYSVAR = $SELFAUTODIR/texmf-var<br />
% TEXMFSYSCONFIG, where texconfig-sys stores configuration data.<br />
TEXMFSYSCONFIG = $SELFAUTODIR/texmf-config<br />
% User texmf trees are allowed as follows.<br />
TEXMFHOME = $HOME/texmf<br />
% TEXMFVAR, where texconfig stores variable runtime data.<br />
TEXMFVAR = $HOME/.texmf-var<br />
% TEXMFCONFIG, where texconfig stores configuration data.<br />
TEXMFCONFIG = $HOME/.texmf-config<br />
Note that they are searched in the reverse order that they are listed above (I think). So when some problems pops up, search the trees in the proper order ;)<br />
<br />
One more remark: if you install something just for you, it should go to your home texmf tree. However, on desktops, you might not want to clutter your home dir; then it should go to texmf-local tree (which should be writable by the "tex" group).<br />
<br />
==Q: I want to have some configuration app!==<br />
'''A:''' Run<br />
texconfig<br />
Careful! When you run this as a user, you modify settings for that user. If you want to modify system-wide settings, run<br />
texconfig-sys<br />
as root instead.<br />
<br />
==Q: I want to edit textfiles! Where are some configuration files?==<br />
'''A:''' Keeping in mind the above directory structure (<texmfroot> refers to one of the dirs above), here you go:<br />
The main config file:<br />
<texmfroot>/web2c/texmf.cnf<br />
List of formats generated:<br />
<texmfroot>/web2c/fmtutil.cnf<br />
Settings with which are e.g. bitmap fonts generated<br />
<texmfroot>/web2c/mktex.cnf<br />
Which and how type1 fonts are used instead of metafont generated bitmap ones?<br />
<texmfroot>/web2c/updmap.cfg<br />
<br />
= Common problems with TeXlive =<br />
<br />
==Q: I've just installed TeXlive and nothing works!==<br />
'''A:''' TeXlive installs to /opt, and so you need to log out and log back in (or start a new login shell) in order to update PATH variable.<br />
<br />
==Q: I've just installed some .sty files, but tex doesn't seem to see them.==<br />
'''A:''' TeXlive (and tetex) uses its own directory indexes (files named ls-R), and you need to refresh them after you copy something into one of the TeX trees. Magic command:<br />
mktexlsr<br />
or<br />
texhash<br />
A command line program to search through these indexes is<br />
kpsewhich<br />
Hence you can check that TeX can find a particular file by running<br />
kpsewhich <filename><br />
The output should be full path to that file.<br />
<br />
==Q: Pdftex and/or dvips uses bitmap fonts instead of type1 postscript fonts (aka "when I zoom my pdf/ps file, fonts are really pixelated" aka "everytime I run tex, it takes a long time because it generates fonts with metafont" aka "at the end of my logfile generated by pdftex I see that it includes *.pk fonts instead of *.pfb)==<br />
'''A:''' This takes a bit of time to explain. Now it's important that you understand how does the system work, so that you know what you're doing.<br />
<br />
* Files which tell pdftex/dvips which fonts are to be included as type1 fonts (instead of traditional bitmap fonts) have suffix .map and reside somewhere in <texmfroot>/fonts/map/{pdftex,dvips}/updmap/{pdftex.map,psfonts.map}.<br />
* You '''don't''' want to edit these files manually; they're good for checking if your favorite type1 font which causes troubles is sitting there properly.<br />
* These files are automatically generated, when you run<br />
updmap<br />
as user (or<br />
updmap-sys<br />
as root for system-wide changes)<br />
* What you need to do to have your favorite fonts (for instance kpfonts) properly used as type1 fonts in pdf and ps files is to locate the .map file that goes with the package (e.g. kpfonts.map; you don't need to actually *do* anything with the file, just know that it's there somewhere), edit updmap.cfg by running<br />
updmap --edit<br />
as user (or "updmap-sys --edit" as root) and add the line<br />
Map kpfonts.map<br />
or the line<br />
MixedMap kpfonts.map<br />
(MixedMap indicates that fonts are also available as bitmap fonts.), and exit the editor. At this point, you should see the messages which indicate that updmap is regenerating {pdftex,psfonts}.map files.<br />
* This should be sufficient, and your next run of pdftex/dvips should be already including the type1 versions of fonts.<br />
<br />
= Useful apps to use with (any tex installation) =<br />
<br />
==Q: Editors? ==<br />
'''A:''' A great one for beginners (errr...) is [http://kile.sourceforge.net/ kile] (depends on kde though). Then of course emacs with [http://www.gnu.org/software/auctex/ auctex] and (g)vim with [http://vim-latex.sourceforge.net/ vim-latex] (although I had some problems with it with vim-7.* versions). If you are more WYSIWIG oriented, then perhaps [http://www.lyx.org/Home lyx] (just be aware that transitions "lyx <-> manual source editing" is not always seamless, and using your own macros is a bit awkward of course); or [http://www.texmacs.org/ texmacs] (with which I have no experience, and it seems a bit outdated).<br />
<br />
==Q: Pictures with latex labels?==<br />
'''A:''' Apart from some latex in-source macros (which are a bit of a PITA to write), there are excellent "picture programming languages" [http://cm.bell-labs.com/who/hobby/MetaPost.html metapost] and its (more-less) successor [http://asymptote.sourceforge.net asymptote]. They are pretty powerful, but have similar approach as tex itself - you write down what you want to have and how are the things related, and compiler then produces the picture. The target format is postscript for metapost; and eps/pdf/png for asymptote.<br />
<br />
Even closer incorporated to TeX itself - i.e. to Plain TeX, LaTex or Context, ther are layers for each of this formats - is the relatively new PGF package with its language named [http://www.fauskes.net/pgftikzexamples/ TIKZ].<br />
<br />
==Q: Pictures with latex labels - I want GUI! - I want pictures fast!==<br />
'''A:''' The "grandfather" of vector editors - xfig is able to produce some output relevant to tex. I had relatively good experience with [http://tclab.kaist.ac.kr/ipe/ ipe] recently (saves eps/pdf).</div>Bender02https://wiki.archlinux.org/index.php?title=TeX_Live/FAQ&diff=39905TeX Live/FAQ2008-04-17T17:59:16Z<p>Bender02: More info on editors; link for tikz</p>
<hr />
<div>[[Category:FAQs (English)]]<br />
[[Category:Software (English)]]<br />
[[Category:Office (English)]]<br />
<br />
= TeX directory structure and important files =<br />
<br />
==Q: I just installed some .sty files, but tex doesn't seem to see them.==<br />
'''A:''' TeXlive (and tetex) uses its own directory indexes (files named ls-R), and you need to refresh them after you copy something into one of the TeX trees. Magic command:<br />
mktexlsr<br />
or<br />
texhash<br />
A command line program to search through these indexes is<br />
kpsewhich<br />
Hence you can check that TeX can find a particular file by running<br />
kpsewhich <filename><br />
The output should be full path to that file.<br />
<br />
==Q: What's up with all these dirs in /opt/texlive/*==<br />
'''A:''' TeX uses several "source trees"; they have the same internal structure, and can "overlap". This is to allow users to modify files provided system-wide without having to access files they're not supposed to access. Here's the portion of the main config file which lists all these dirs with some explanations ($SELFAUTODIR=/opt/texlive):<br />
% The tree containing the runtime files closely related to the specific<br />
% program version used:<br />
TEXMFMAIN = $SELFAUTODIR/texmf<br />
% The main distribution tree:<br />
TEXMFDIST = $SELFAUTODIR/texmf-dist<br />
% A place for local additions to a "standard" texmf tree.<br />
% This tree is not used for local configuration maintained by<br />
% texconfig, it uses TEXMFCONFIG below.<br />
TEXMFLOCAL = $SELFAUTODIR/texmf-local<br />
% TEXMFSYSVAR, where texconfig-sys stores variable runtime data.<br />
TEXMFSYSVAR = $SELFAUTODIR/texmf-var<br />
% TEXMFSYSCONFIG, where texconfig-sys stores configuration data.<br />
TEXMFSYSCONFIG = $SELFAUTODIR/texmf-config<br />
% User texmf trees are allowed as follows.<br />
TEXMFHOME = $HOME/texmf<br />
% TEXMFVAR, where texconfig stores variable runtime data.<br />
TEXMFVAR = $HOME/.texmf-var<br />
% TEXMFCONFIG, where texconfig stores configuration data.<br />
TEXMFCONFIG = $HOME/.texmf-config<br />
Note that they are searched in the reverse order that they are listed above (I think). So when some problems pops up, search the trees in the proper order ;)<br />
<br />
One more remark: if you install something just for you, it should go to your home texmf tree. However, on desktops, you might not want to clutter your home dir; then it should go to texmf-local tree (which should be writable by the "tex" group).<br />
<br />
==Q: I want to have some configuration app!==<br />
'''A:''' Run<br />
texconfig<br />
Careful! When you run this as a user, you modify settings for that user. If you want to modify system-wide settings, run<br />
texconfig-sys<br />
as root instead.<br />
<br />
==Q: I want to edit textfiles! Where are some configuration files?==<br />
'''A:''' Keeping in mind the above directory structure (<texmfroot> refers to one of the dirs above), here you go:<br />
The main config file:<br />
<texmfroot>/web2c/texmf.cnf<br />
List of formats generated:<br />
<texmfroot>/web2c/fmtutil.cnf<br />
Settings with which are e.g. bitmap fonts generated<br />
<texmfroot>/web2c/mktex.cnf<br />
Which and how type1 fonts are used instead of metafont generated bitmap ones?<br />
<texmfroot>/web2c/updmap.cfg<br />
<br />
= Common problems =<br />
<br />
==Q: Pdftex and/or dvips uses bitmap fonts instead of type1 postscript fonts (aka "when I zoom my pdf/ps file, fonts are really pixelated" aka "everytime I run tex, it takes a long time because it generates fonts with metafont" aka "at the end of my logfile generated by pdftex I see that it includes *.pk fonts instead of *.pfb)==<br />
'''A:''' This takes a bit of time to explain. Now it's important that you understand how does the system work, so that you know what you're doing.<br />
<br />
* Files which tell pdftex/dvips which fonts are to be included as type1 fonts (instead of traditional bitmap fonts) have suffix .map and reside somewhere in <texmfroot>/fonts/map/{pdftex,dvips}/updmap/{pdftex.map,psfonts.map}.<br />
* You '''don't''' want to edit these files manually; they're good for checking if your favorite type1 font which causes troubles is sitting there properly.<br />
* These files are automatically generated, when you run<br />
updmap<br />
as user (or<br />
updmap-sys<br />
as root for system-wide changes)<br />
* What you need to do to have your favorite fonts (for instance kpfonts) properly used as type1 fonts in pdf and ps files is to locate the .map file that goes with the package (e.g. kpfonts.map; you don't need to actually *do* anything with the file, just know that it's there somewhere), edit updmap.cfg by running<br />
updmap --edit<br />
as user (or "updmap-sys --edit" as root) and add the line<br />
Map kpfonts.map<br />
or the line<br />
MixedMap kpfonts.map<br />
(MixedMap indicates that fonts are also available as bitmap fonts.), and exit the editor. At this point, you should see the messages which indicate that updmap is regenerating {pdftex,psfonts}.map files.<br />
* This should be sufficient, and your next run of pdftex/dvips should be already including the type1 versions of fonts.<br />
<br />
= Useful apps to use with (any tex installation) =<br />
<br />
==Q: Editors? ==<br />
'''A:''' A great one for beginners (errr...) is [http://kile.sourceforge.net/ kile] (depends on kde though). Then of course emacs with [http://www.gnu.org/software/auctex/ auctex] and (g)vim with [http://vim-latex.sourceforge.net/ vim-latex] (although I had some problems with it with vim-7.* versions). If you are more WYSIWIG oriented, then perhaps [http://www.lyx.org/Home lyx] (just be aware that transitions "lyx <-> manual source editing" is not always seamless, and using your own macros is a bit awkward of course); or [http://www.texmacs.org/ texmacs] (with which I have no experience, and it seems a bit outdated).<br />
<br />
==Q: Pictures with latex labels?==<br />
'''A:''' Apart from some latex in-source macros (which are a bit of a PITA to write), there are excellent "picture programming languages" [http://cm.bell-labs.com/who/hobby/MetaPost.html metapost] and its (more-less) successor [http://asymptote.sourceforge.net asymptote]. They are pretty powerful, but have similar approach as tex itself - you write down what you want to have and how are the things related, and compiler then produces the picture. The target format is postscript for metapost; and eps/pdf/png for asymptote.<br />
<br />
Even closer incorporated to TeX itself - i.e. to Plain TeX, LaTex or Context, ther are layers for each of this formats - is the relatively new PGF package with its language named [http://www.fauskes.net/pgftikzexamples/ TIKZ].<br />
<br />
==Q: Pictures with latex labels - I want GUI! - I want pictures fast!==<br />
'''A:''' The "grandfather" of vector editors - xfig is able to produce some output relevant to tex. I had relatively good experience with [http://tclab.kaist.ac.kr/ipe/ ipe] recently (saves eps/pdf).</div>Bender02https://wiki.archlinux.org/index.php?title=TeX_Live/FAQ&diff=39892TeX Live/FAQ2008-04-17T00:50:39Z<p>Bender02: map/mixedmap explanation</p>
<hr />
<div>[[Category:FAQs (English)]]<br />
[[Category:Software (English)]]<br />
[[Category:Office (English)]]<br />
<br />
= TeX directory structure and important files =<br />
<br />
==Q: I just installed some .sty files, but tex doesn't seem to see them.==<br />
'''A:''' TeXlive (and tetex) uses its own directory indexes (files named ls-R), and you need to refresh them after you copy something into one of the TeX trees. Magic command:<br />
mktexlsr<br />
or<br />
texhash<br />
A command line program to search through these indexes is<br />
kpsewhich<br />
Hence you can check that TeX can find a particular file by running<br />
kpsewhich <filename><br />
The output should be full path to that file.<br />
<br />
==Q: What's up with all these dirs in /opt/texlive/*==<br />
'''A:''' TeX uses several "source trees"; they have the same internal structure, and can "overlap". This is to allow users to modify files provided system-wide without having to access files they're not supposed to access. Here's the portion of the main config file which lists all these dirs with some explanations ($SELFAUTODIR=/opt/texlive):<br />
% The tree containing the runtime files closely related to the specific<br />
% program version used:<br />
TEXMFMAIN = $SELFAUTODIR/texmf<br />
% The main distribution tree:<br />
TEXMFDIST = $SELFAUTODIR/texmf-dist<br />
% A place for local additions to a "standard" texmf tree.<br />
% This tree is not used for local configuration maintained by<br />
% texconfig, it uses TEXMFCONFIG below.<br />
TEXMFLOCAL = $SELFAUTODIR/texmf-local<br />
% TEXMFSYSVAR, where texconfig-sys stores variable runtime data.<br />
TEXMFSYSVAR = $SELFAUTODIR/texmf-var<br />
% TEXMFSYSCONFIG, where texconfig-sys stores configuration data.<br />
TEXMFSYSCONFIG = $SELFAUTODIR/texmf-config<br />
% User texmf trees are allowed as follows.<br />
TEXMFHOME = $HOME/texmf<br />
% TEXMFVAR, where texconfig stores variable runtime data.<br />
TEXMFVAR = $HOME/.texmf-var<br />
% TEXMFCONFIG, where texconfig stores configuration data.<br />
TEXMFCONFIG = $HOME/.texmf-config<br />
Note that they are searched in the reverse order that they are listed above (I think). So when some problems pops up, search the trees in the proper order ;)<br />
<br />
One more remark: if you install something just for you, it should go to your home texmf tree. However, on desktops, you might not want to clutter your home dir; then it should go to texmf-local tree (which should be writable by the "tex" group).<br />
<br />
==Q: I want to have some configuration app!==<br />
'''A:''' Run<br />
texconfig<br />
Careful! When you run this as a user, you modify settings for that user. If you want to modify system-wide settings, run<br />
texconfig-sys<br />
as root instead.<br />
<br />
==Q: I want to edit textfiles! Where are some configuration files?==<br />
'''A:''' Keeping in mind the above directory structure (<texmfroot> refers to one of the dirs above), here you go:<br />
The main config file:<br />
<texmfroot>/web2c/texmf.cnf<br />
List of formats generated:<br />
<texmfroot>/web2c/fmtutil.cnf<br />
Settings with which are e.g. bitmap fonts generated<br />
<texmfroot>/web2c/mktex.cnf<br />
Which and how type1 fonts are used instead of metafont generated bitmap ones?<br />
<texmfroot>/web2c/updmap.cfg<br />
<br />
= Common problems =<br />
<br />
==Q: Pdftex and/or dvips uses bitmap fonts instead of type1 postscript fonts (aka "when I zoom my pdf/ps file, fonts are really pixelated" aka "everytime I run tex, it takes a long time because it generates fonts with metafont" aka "at the end of my logfile generated by pdftex I see that it includes *.pk fonts instead of *.pfb)==<br />
'''A:''' This takes a bit of time to explain. Now it's important that you understand how does the system work, so that you know what you're doing.<br />
<br />
* Files which tell pdftex/dvips which fonts are to be included as type1 fonts (instead of traditional bitmap fonts) have suffix .map and reside somewhere in <texmfroot>/fonts/map/{pdftex,dvips}/updmap/{pdftex.map,psfonts.map}.<br />
* You '''don't''' want to edit these files manually; they're good for checking if your favorite type1 font which causes troubles is sitting there properly.<br />
* These files are automatically generated, when you run<br />
updmap<br />
as user (or<br />
updmap-sys<br />
as root for system-wide changes)<br />
* What you need to do to have your favorite fonts (for instance kpfonts) properly used as type1 fonts in pdf and ps files is to locate the .map file that goes with the package (e.g. kpfonts.map; you don't need to actually *do* anything with the file, just know that it's there somewhere), edit updmap.cfg by running<br />
updmap --edit<br />
as user (or "updmap-sys --edit" as root) and add the line<br />
Map kpfonts.map<br />
or the line<br />
MixedMap kpfonts.map<br />
(MixedMap indicates that fonts are also available as bitmap fonts.), and exit the editor. At this point, you should see the messages which indicate that updmap is regenerating {pdftex,psfonts}.map files.<br />
* This should be sufficient, and your next run of pdftex/dvips should be already including the type1 versions of fonts.<br />
<br />
= Useful apps to use with (any tex installation) =<br />
<br />
==Q: Editors? ==<br />
'''A:''' A great one for beginners (errr...) is [http://kile.sourceforge.net/ kile] (depends on kde though). Then of course emacs with [http://www.gnu.org/software/auctex/ auctex] and (g)vim with [http://vim-latex.sourceforge.net/ vim-latex] (although I had some problems with it with vim-7.* versions). If you are more WYSIWIG oriented, then perhaps [http://www.lyx.org/Home lyx] (just be aware that transitions "lyx <-> manual source editing" is not always seamless).<br />
<br />
==Q: Pictures with latex labels?==<br />
'''A:''' Apart from some latex in-source macros (which are a bit of a PITA to write), there are excellent "picture programming languages" [http://cm.bell-labs.com/who/hobby/MetaPost.html metapost] and its (more-less) successor [http://asymptote.sourceforge.net asymptote]. They are pretty powerful, but have similar approach as tex itself - you write down what you want to have and how are the things related, and compiler then produces the picture.<br />
==Q: Pictures with latex labels - I want GUI! - I want pictures fast!==<br />
'''A:''' The "grandfather" of vector editors - xfig is able to produce some output relevant to tex. However, I had relatively good experience with [http://tclab.kaist.ac.kr/ipe/ ipe] recently.</div>Bender02https://wiki.archlinux.org/index.php?title=TeX_Live/FAQ&diff=39891TeX Live/FAQ2008-04-17T00:41:11Z<p>Bender02: initial commit</p>
<hr />
<div>[[Category:FAQs (English)]]<br />
[[Category:Software (English)]]<br />
[[Category:Office (English)]]<br />
<br />
= TeX directory structure and important files =<br />
<br />
==Q: I just installed some .sty files, but tex doesn't seem to see them.==<br />
'''A:''' TeXlive (and tetex) uses its own directory indexes (files named ls-R), and you need to refresh them after you copy something into one of the TeX trees. Magic command:<br />
mktexlsr<br />
or<br />
texhash<br />
A command line program to search through these indexes is<br />
kpsewhich<br />
Hence you can check that TeX can find a particular file by running<br />
kpsewhich <filename><br />
The output should be full path to that file.<br />
<br />
==Q: What's up with all these dirs in /opt/texlive/*==<br />
'''A:''' TeX uses several "source trees"; they have the same internal structure, and can "overlap". This is to allow users to modify files provided system-wide without having to access files they're not supposed to access. Here's the portion of the main config file which lists all these dirs with some explanations ($SELFAUTODIR=/opt/texlive):<br />
% The tree containing the runtime files closely related to the specific<br />
% program version used:<br />
TEXMFMAIN = $SELFAUTODIR/texmf<br />
% The main distribution tree:<br />
TEXMFDIST = $SELFAUTODIR/texmf-dist<br />
% A place for local additions to a "standard" texmf tree.<br />
% This tree is not used for local configuration maintained by<br />
% texconfig, it uses TEXMFCONFIG below.<br />
TEXMFLOCAL = $SELFAUTODIR/texmf-local<br />
% TEXMFSYSVAR, where texconfig-sys stores variable runtime data.<br />
TEXMFSYSVAR = $SELFAUTODIR/texmf-var<br />
% TEXMFSYSCONFIG, where texconfig-sys stores configuration data.<br />
TEXMFSYSCONFIG = $SELFAUTODIR/texmf-config<br />
% User texmf trees are allowed as follows.<br />
TEXMFHOME = $HOME/texmf<br />
% TEXMFVAR, where texconfig stores variable runtime data.<br />
TEXMFVAR = $HOME/.texmf-var<br />
% TEXMFCONFIG, where texconfig stores configuration data.<br />
TEXMFCONFIG = $HOME/.texmf-config<br />
Note that they are searched in the reverse order that they are listed above (I think). So when some problems pops up, search the trees in the proper order ;)<br />
<br />
One more remark: if you install something just for you, it should go to your home texmf tree. However, on desktops, you might not want to clutter your home dir; then it should go to texmf-local tree (which should be writable by the "tex" group).<br />
<br />
==Q: I want to have some configuration app!==<br />
'''A:''' Run<br />
texconfig<br />
Careful! When you run this as a user, you modify settings for that user. If you want to modify system-wide settings, run<br />
texconfig-sys<br />
as root instead.<br />
<br />
==Q: I want to edit textfiles! Where are some configuration files?==<br />
'''A:''' Keeping in mind the above directory structure (<texmfroot> refers to one of the dirs above), here you go:<br />
The main config file:<br />
<texmfroot>/web2c/texmf.cnf<br />
List of formats generated:<br />
<texmfroot>/web2c/fmtutil.cnf<br />
Settings with which are e.g. bitmap fonts generated<br />
<texmfroot>/web2c/mktex.cnf<br />
Which and how type1 fonts are used instead of metafont generated bitmap ones?<br />
<texmfroot>/web2c/updmap.cfg<br />
<br />
= Common problems =<br />
<br />
==Q: Pdftex and/or dvips uses bitmap fonts instead of type1 postscript fonts (aka "when I zoom my pdf/ps file, fonts are really pixelated" aka "everytime I run tex, it takes a long time because it generates fonts with metafont" aka "at the end of my logfile generated by pdftex I see that it includes *.pk fonts instead of *.pfb)==<br />
'''A:''' Now this takes a bit of time to explain. Now it's important that you understand how does the system work, so that you know what you're doing.<br />
<br />
* Files which tell pdftex/dvips which fonts are to be included as type1 fonts (instead of traditional bitmap fonts) have suffix .map and reside somewhere in <texmfroot>/fonts/map/{pdftex,dvips}/updmap/{pdftex.map,psfonts.map}.<br />
* You '''don't''' want to edit these files manually; they're good for checking if your favorite type1 font which causes troubles is sitting there properly.<br />
* These files are automatically generated, when you run<br />
updmap<br />
as user (or<br />
updmap-sys<br />
as root for system-wide changes)<br />
* What you need to do to have your favorite fonts (for instance kpfonts) properly used as type1 fonts in pdf and ps files is to locate the .map file that goes with the package (e.g. kpfonts.map; you don't need to actually *do* anything with the file, just know that it's there somewhere), edit updmap.cfg by running<br />
updmap --edit<br />
as user (or "updmap-sys --edit" as root) and add the line<br />
Map kpfonts.map<br />
or the line<br />
MixedMap kpfonts.map<br />
(I'm not very sure when to use which ... please clarify somebody who knows), and exit the editor. At this point, you should see the messages which indicate that updmap is regenerating {pdftex,psfonts}.map files.<br />
* This should be sufficient, and your next run of pdftex/dvips should be already including the type1 versions of fonts.<br />
<br />
= Useful apps to use with (any tex installation) =<br />
<br />
==Q: Editors? ==<br />
'''A:''' A great one for beginners (errr...) is [http://kile.sourceforge.net/ kile] (depends on kde though). Then of course emacs with [http://www.gnu.org/software/auctex/ auctex] and (g)vim with [http://vim-latex.sourceforge.net/ vim-latex] (although I had some problems with it with vim-7.* versions). If you are more WYSIWIG oriented, then perhaps [http://www.lyx.org/Home lyx] (just be aware that transitions "lyx <-> manual source editing" is not always seamless).<br />
<br />
==Q: Pictures with latex labels?==<br />
'''A:''' Apart from some latex in-source macros (which are a bit of a PITA to write), there are excellent "picture programming languages" [http://cm.bell-labs.com/who/hobby/MetaPost.html metapost] and its (more-less) successor [http://asymptote.sourceforge.net asymptote]. They are pretty powerful, but have similar approach as tex itself - you write down what you want to have and how are the things related, and compiler then produces the picture.<br />
==Q: Pictures with latex labels - I want GUI! - I want pictures fast!==<br />
'''A:''' The "grandfather" of vector editors - xfig is able to produce some output relevant to tex. However, I had relatively good experience with [http://tclab.kaist.ac.kr/ipe/ ipe] recently.</div>Bender02https://wiki.archlinux.org/index.php?title=Hdup&diff=39890Hdup2008-04-16T23:34:32Z<p>Bender02: added dar info</p>
<hr />
<div>[[Category:Development (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
== Intro ==<br />
<br />
This wiki page contains a guide on how to set up [http://www.miek.nl/projects/hdup2/hdup.html hdup], "The little, spiffy, backup tool". (Don't be discouraged by the fact that on its website it says "Unmaintained!". It's mature program, and that warning means only that its author, Miek Gieben, develops and uses a similar program (rdup), which is a bit more difficult to use.) Although it's a command line program, it's easy to set up, so don't be afraid.<br />
<br />
=== Features ===<br />
* archives are tar.bz2 (or tar.gz)<br />
* incremental backups (monthly-weekly-daily scheme)<br />
* backups over ssh<br />
* encrypted backups (mcrypt, gpg)<br />
<br />
=== Other backup programs ===<br />
Let's list some other programs dedicated to making backups, grouped by "type":<br />
<br />
* rsync type: Those which maintain a copy of the directory you want to keep a backup of, together with files which describe how did the contents change from the last backup (the so-called 'diffs'). Hence, they are inherently incremental, but usually they don't have compression/encryption. On the other hand, a working copy of everything is immediately available, no decompression/decryption needed. Finally the way it works makes it hard to burn backups to cd/dvd.:<br />
** command line: [http://www.samba.org/rsync/ rsync], [http://www.nongnu.org/rdiff-backup/ rdiff-backup], [http://www.rsnapshot.org rsnapshot]<br />
** gui: [http://www.flyback-project.org/ flyback], [http://areca.sourceforge.net/ areca], [https://wiki.ubuntu.com/TimeVault timevault]<br />
* "just copy everything into one big archive, but support writing to cd/dvd"-type: [http://www2.backup-manager.org/ backup-manager]<br />
* a one which has support for incremental backups, tarring and encrypting is [http://www.nongnu.org/duplicity/ duplicity]. Functioning is very similar to hdup, but: <br />
** the files backed up are "randomly" distributed between encrypted tar archives, which makes it harder to recover a particular file (hdup uses just one file: this is a drawback if you backup a lot of data at once)<br />
** you can backup just one directory at a time (while with hdup you can specify as many as you want in one backup profile)<br />
* another one which is similar to hdup: [http://dar.linux.free.fr/ dar]: it uses its own format for archives (so you need to have it around when you want to restore), but supports incremental backups, splitting backups into more files by size, makefile-type config files, some custom scripts are available along with it; supports basic encryption; some gui tools for inspecting backups are also available (kdar). Recommended ... a wiki page should appear soon :)<br />
<br />
You should think about your needs, read a bit about various possibilities. For instance, a popular solution for managing your configuration files is to use a versioning system (like [http://www.selenic.com/mercurial/wiki/ mercurial] or [http://git.or.cz/ git])<br />
<br />
== Installing/running/restoring ==<br />
<br />
=== Installing and setting hdup up ===<br />
<br />
* hdup is in [extra] repo, so you can install it via pacman:<br />
pacman -S hdup<br />
* We need to edit the configuration file '''/etc/hdup/hdup.conf'''. There's one supplied, so you can just edit that one; or you can use the minimal one listed here:<br />
[global]<br />
# to which dir the archives will be written<br />
archive dir = /vol/backup<br />
# chown the archives to this user<br />
user = <yourusername><br />
<br />
[my-comp]<br />
# what to backup, separate with ,.<br />
# For directories add closing slash, like /home/<br />
dir = /home/,/var/abs/local/<br />
# don't include theses directories<br />
exclude = lost\+found/, /proc/, /dev/, /sys/<br />
* You '''need to modify''' at least the following options:<br />
** '''archive dir''': that's where the backups will be written to<br />
** '''user''': created archives will be chowned to this user; you can just use your username. This is needed since hdup needs to be run as root.<br />
** '''dir''': that's the list of directories whose contents you want to back up).<br />
<br />
The rest of the comments about the config file can be skipped on the first<br />
reading. They describe various other options you can use if the hdup.conf file:<br />
* You can have more that one ''profile'' (the one used above is named '''my-comp'''). This means that you can have a couple of independent backup schemes. For instance, you might want to have another one for your webpages:<br />
[my-webpages]<br />
dir = /var/www/<br />
* To have a simple means of excluding some directories, use the '''nobackup''' option. It specifies the filename, which if it exists in a directory, then that directory is excluded from backing up.<br />
nobackup = .nobackup<br />
This can be used for example to exclude backing up of opera cache, by creating and empty .nobackup file in the cache directory:<br />
touch ~/.opera/cache4/.nobackup<br />
* You can specify the compression algorithm used:<br />
compression = bzip<br />
compression level = 6<br />
* hdup refuses to restore backups to / by default, since it can be dangerous. To override this, use<br />
# allow restoring to /<br />
force = yes<br />
<br />
=== Running hdup ===<br />
<br />
Let's first explain the monthly-weekly-daily scheme of backups. The 'monthly'<br />
archives contain all the data you specify to backup. The 'weekly' archives<br />
contain only those files, which have changed from the last 'monthly' backup.<br />
Finally, 'daily' contain only those which have changed from the last 'weekly'<br />
backup.<br />
<br />
Of course, 'monthly', 'weekly' and 'daily' are just names, you don't need to<br />
perform backups in these intervals. But you cannot perform a 'weekly', unless<br />
you have at least one 'monthly', etc.<br />
<br />
So, how does hdup implement this scheme?<br />
<br />
As root, you can run hdup with the command like<br />
hdup monthly my-comp<br />
This creates a directory 'my-comp' in the directory you specified in the config file (/vol/backup), and inside it two other directories: 'etc' and (current date) '2008-02-23'. The 'etc' one contains some hdup's files, and the '2008-02-23' one will have a big .tar.bz2 archive in it. That's your backup.<br />
<br />
After some time after 'monthly' backup, you decide you want to backup again. Now you can run hdup as<br />
hdup weekly my-comp<br />
and hdup will archive only what has changed from the 'monthly', and the archive will be put into another dir named after current date in /vol/backup/my-comp.<br />
<br />
It should be clear now how the backing up works. Note that if hdup cannot find a 'monthly' and you ask it to do a 'weekly', it will complain. See the tips section.<br />
<br />
=== Restoring backups ===<br />
<br />
To restore, you need to have all 'parent' archives (ie. if you want to restore a weekly backup, you also need to have its 'monthly' available). The command for restoring is<br />
hdup restore my-comp 2008-01-31 /somedir<br />
With this, hdup will try to restore things as they've been up to the date specified, and it will unpack to the directory /somedir. You can force it to unpack right away to / (see 'force' option above), but be very careful with this!<br />
<br />
Note that the backups are just .tar.bz2 archives, so if you need a particular file from a particular date, just use any archive manager (or tar and bzip2) to open the archive and copy the needed file over.<br />
<br />
=== More goodies: encryption and ssh ===<br />
<br />
If you've got here, let me remind you that '''man hdup''' and '''man hdup.conf''' are your friends!<br />
<br />
* For gpg encryption, you want to add something like<br />
algorithm = gpg<br />
key = <your gpg key identifier><br />
either to [global] (then it's going to be used for all profiles), or just to a profile part. The archives will then be encrypted with your public key (so you can only decrypt them with your secret key). Note that you can decrypt them manually with<br />
gpg -d <archive file><br />
in case you need it.<br />
<br />
* For other encryption (e.g. mcrypt), just add<br />
algorithm = mcrypt<br />
In this case, hdup will ask for a password both when archiving and restoring.<br />
<br />
I haven't tried the backups over ssh... so if anybody feels like, please update this wiki.<br />
<br />
=== Tips ===<br />
<br />
* You can of course burn the archives to cd/dvd with any burning software you like. The only thing to remember here is that the 'parent' archive is needed when you're doing a 'child' backup (like you need 'monthly' for 'weekly'). However, if you're tight on space, this can be achieved by mounting the cd/dvd with 'parent' backup, and soft linking its directory into /vol/backup, so that hdup can find it there.</div>Bender02https://wiki.archlinux.org/index.php?title=Hdup&diff=37755Hdup2008-02-27T00:41:21Z<p>Bender02: fixed backup-manager link</p>
<hr />
<div>[[Category:Development (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
== Intro ==<br />
<br />
This wiki page contains a guide on how to set up [http://www.miek.nl/projects/hdup2/hdup.html hdup], "The little, spiffy, backup tool". (Don't be discouraged by the fact that on its website it says "Unmaintained!". It's mature program, and that warning means only that its author, Miek Gieben, develops and uses a similar program (rdup), which is a bit more difficult to use.) Although it's a command line program, it's easy to set up, so don't be afraid.<br />
<br />
=== Features ===<br />
* archives are tar.bz2 (or tar.gz)<br />
* incremental backups (monthly-weekly-daily scheme)<br />
* backups over ssh<br />
* encrypted backups (mcrypt, gpg)<br />
<br />
=== Other backup programs ===<br />
Let's list some other programs dedicated to making backups, grouped by "type":<br />
<br />
* rsync type: Those which maintain a copy of the directory you want to keep a backup of, together with files which describe how did the contents change from the last backup (the so-called 'diffs'). Hence, they are inherently incremental, but usually they don't have compression/encryption. On the other hand, a working copy of everything is immediately available, no decompression/decryption needed. Finally the way it works makes it hard to burn backups to cd/dvd.:<br />
** command line: [http://www.samba.org/rsync/ rsync], [http://www.nongnu.org/rdiff-backup/ rdiff-backup], [http://www.rsnapshot.org rsnapshot]<br />
** gui: [http://www.flyback-project.org/ flyback], [http://areca.sourceforge.net/ areca], [https://wiki.ubuntu.com/TimeVault timevault]<br />
* "just copy everything into one big archive, but support writing to cd/dvd"-type: [http://www2.backup-manager.org/ backup-manager]<br />
* a one which has support for incremental backups, tarring and encrypting is [http://www.nongnu.org/duplicity/ duplicity]. Functioning is very similar to hdup, but: <br />
** the files backed up are "randomly" distributed between encrypted tar archives, which makes it harder to recover a particular file (hdup uses just one file: this is a drawback if you backup a lot of data at once)<br />
** you can backup just one directory at a time (while with hdup you can specify as many as you want in one backup profile)<br />
<br />
You should think about your needs, read a bit about various possibilities. For instance, a popular solution for managing your configuration files is to use a versioning system (like [http://www.selenic.com/mercurial/wiki/ mercurial] or [http://git.or.cz/ git])<br />
<br />
== Installing/running/restoring ==<br />
<br />
=== Installing and setting hdup up ===<br />
<br />
* hdup is in [extra] repo, so you can install it via pacman:<br />
pacman -S hdup<br />
* We need to edit the configuration file '''/etc/hdup/hdup.conf'''. There's one supplied, so you can just edit that one; or you can you a minimal one listed here:<br />
[global]<br />
# to which dir the archives will be written<br />
archive dir = /vol/backup<br />
# chown the archives to this user<br />
user = <yourusername><br />
<br />
[my-comp]<br />
# what to backup, separate with ,.<br />
# For directories add closing slash, like /home/<br />
dir = /home/,/var/abs/local/<br />
# don't include theses directories<br />
exclude = lost\+found/, /proc/, /dev/, /sys/<br />
* You '''need to modify''' at least the following options:<br />
** '''archive dir''': that's where the backups will be written to<br />
** '''user''': created archives will be chowned to this user; you can just use your username. This is needed since hdup needs to be run as root.<br />
** '''dir''': that's the list of directories whose contents you want to back up).<br />
<br />
The rest of the comments about the config file can be skipped on the first<br />
reading. They describe various other options you can use if the hdup.conf file:<br />
* You can have more that one ''profile'' (the one used above is named '''my-comp'''). This means that you can have a couple of independent backup schemes. For instance, you might want to have another one for your webpages:<br />
[my-webpages]<br />
dir = /var/www/<br />
* To have a simple means of excluding some directories, use the '''nobackup''' option. It specifies the filename, which if it exists in a directory, then that directory is excluded from backing up.<br />
nobackup = .nobackup<br />
This can be used for example to exclude backing up of opera cache, by creating and empty .nobackup file in the cache directory:<br />
touch ~/.opera/cache4/.nobackup<br />
* You can specify the compression algorithm used:<br />
compression = bzip<br />
compression level = 6<br />
* hdup refuses to restore backups to / by default, since it can be dangerous. To override this, use<br />
# allow restoring to /<br />
force = yes<br />
<br />
=== Running hdup ===<br />
<br />
Let's first explain the monthly-weekly-daily scheme of backups. The 'monthly'<br />
archives contain all the data you specify to backup. The 'weekly' archives<br />
contain only those files, which have changed from the last 'monthly' backup.<br />
Finally, 'daily' contain only those which have changed from the last 'weekly'<br />
backup.<br />
<br />
Of course, 'monthly', 'weekly' and 'daily' are just names, you don't need to<br />
perform backups in these intervals. But you cannot perform a 'weekly', unless<br />
you have at least one 'monthly', etc.<br />
<br />
So, how does hdup implement this scheme?<br />
<br />
As root, you can run hdup with the command like<br />
hdup monthly my-comp<br />
This creates a directory 'my-comp' in the directory you specified in the config file (/vol/backup), and inside it two other directories: 'etc' and (current date) '2008-02-23'. The 'etc' one contains some hdup's files, and the '2008-02-23' one will have a big .tar.bz2 archive in it. That's your backup.<br />
<br />
After some time after 'monthly' backup, you decide you want to backup again. Now you can run hdup as<br />
hdup weekly my-comp<br />
and hdup will archive only what has changed from the 'monthly', and the archive will be put into another dir named after current date in /vol/backup/my-comp.<br />
<br />
It should be clear now how the backing up works. Note that if hdup cannot find a 'monthly' and you ask it to do a 'weekly', it will complain. See the tips section.<br />
<br />
=== Restoring backups ===<br />
<br />
To restore, you need to have all 'parent' archives (ie. if you want to restore a weekly backup, you also need to have its 'monthly' available). The command for restoring is<br />
hdup restore my-comp 2008-01-31 /somedir<br />
With this, hdup will try to restore things as they've been up to the date specified, and it will unpack to the directory /somedir. You can force it to unpack right away to / (see 'force' option above), but be very careful with this!<br />
<br />
Note that the backups are just .tar.bz2 archives, so if you need a particular file from a particular date, just use any archive manager (or tar and bzip2) to open the archive and copy the needed file over.<br />
<br />
=== More goodies: encryption and ssh ===<br />
<br />
If you've got here, let me remind you that '''man hdup''' and '''man hdup.conf''' are your friends!<br />
<br />
* For gpg encryption, you want to add something like<br />
algorithm = gpg<br />
key = <your gpg key identifier><br />
either to [global] (then it's going to be used for all profiles), or just to a profile part. The archives will then be encrypted with your public key (so you can only decrypt them with your secret key). Note that you can decrypt them manually with<br />
gpg -d <archive file><br />
in case you need it.<br />
<br />
* For other encryption (e.g. mcrypt), just add<br />
algorithm = mcrypt<br />
In this case, hdup will ask for a password both when archiving and restoring.<br />
<br />
I haven't tried the backups over ssh... so if anybody feels like, please update this wiki.<br />
<br />
=== Tips ===<br />
<br />
* You can of course burn the archives to cd/dvd with any burning software you like. The only thing to remember here is that the 'parent' archive is needed when you're doing a 'child' backup (like you need 'monthly' for 'weekly'). However, if you're tight on space, this can be achieved by mounting the cd/dvd with 'parent' backup, and soft linking its directory into /vol/backup, so that hdup can find it there.</div>Bender02https://wiki.archlinux.org/index.php?title=Hdup&diff=37754Hdup2008-02-27T00:39:46Z<p>Bender02: </p>
<hr />
<div>[[Category:Development (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
== Intro ==<br />
<br />
This wiki page contains a guide on how to set up [http://www.miek.nl/projects/hdup2/hdup.html hdup], "The little, spiffy, backup tool". (Don't be discouraged by the fact that on its website it says "Unmaintained!". It's mature program, and that warning means only that its author, Miek Gieben, develops and uses a similar program (rdup), which is a bit more difficult to use.) Although it's a command line program, it's easy to set up, so don't be afraid.<br />
<br />
=== Features ===<br />
* archives are tar.bz2 (or tar.gz)<br />
* incremental backups (monthly-weekly-daily scheme)<br />
* backups over ssh<br />
* encrypted backups (mcrypt, gpg)<br />
<br />
=== Other backup programs ===<br />
Let's list some other programs dedicated to making backups, grouped by "type":<br />
<br />
* rsync type: Those which maintain a copy of the directory you want to keep a backup of, together with files which describe how did the contents change from the last backup (the so-called 'diffs'). Hence, they are inherently incremental, but usually they don't have compression/encryption. On the other hand, a working copy of everything is immediately available, no decompression/decryption needed. Finally the way it works makes it hard to burn backups to cd/dvd.:<br />
** command line: [http://www.samba.org/rsync/ rsync], [http://www.nongnu.org/rdiff-backup/ rdiff-backup], [http://www.rsnapshot.org rsnapshot]<br />
** gui: [http://www.flyback-project.org/ flyback], [http://areca.sourceforge.net/ areca], [https://wiki.ubuntu.com/TimeVault timevault]<br />
* "just copy everything into one big archive, but support writing to cd/dvd"-type: backup-manager<br />
* a one which has support for incremental backups, tarring and encrypting is [http://www.nongnu.org/duplicity/ duplicity]. Functioning is very similar to hdup, but: <br />
** the files backed up are "randomly" distributed between encrypted tar archives, which makes it harder to recover a particular file (hdup uses just one file: this is a drawback if you backup a lot of data at once)<br />
** you can backup just one directory at a time (while with hdup you can specify as many as you want in one backup profile)<br />
<br />
You should think about your needs, read a bit about various possibilities. For instance, a popular solution for managing your configuration files is to use a versioning system (like [http://www.selenic.com/mercurial/wiki/ mercurial] or [http://git.or.cz/ git])<br />
<br />
== Installing/running/restoring ==<br />
<br />
=== Installing and setting hdup up ===<br />
<br />
* hdup is in [extra] repo, so you can install it via pacman:<br />
pacman -S hdup<br />
* We need to edit the configuration file '''/etc/hdup/hdup.conf'''. There's one supplied, so you can just edit that one; or you can you a minimal one listed here:<br />
[global]<br />
# to which dir the archives will be written<br />
archive dir = /vol/backup<br />
# chown the archives to this user<br />
user = <yourusername><br />
<br />
[my-comp]<br />
# what to backup, separate with ,.<br />
# For directories add closing slash, like /home/<br />
dir = /home/,/var/abs/local/<br />
# don't include theses directories<br />
exclude = lost\+found/, /proc/, /dev/, /sys/<br />
* You '''need to modify''' at least the following options:<br />
** '''archive dir''': that's where the backups will be written to<br />
** '''user''': created archives will be chowned to this user; you can just use your username. This is needed since hdup needs to be run as root.<br />
** '''dir''': that's the list of directories whose contents you want to back up).<br />
<br />
The rest of the comments about the config file can be skipped on the first<br />
reading. They describe various other options you can use if the hdup.conf file:<br />
* You can have more that one ''profile'' (the one used above is named '''my-comp'''). This means that you can have a couple of independent backup schemes. For instance, you might want to have another one for your webpages:<br />
[my-webpages]<br />
dir = /var/www/<br />
* To have a simple means of excluding some directories, use the '''nobackup''' option. It specifies the filename, which if it exists in a directory, then that directory is excluded from backing up.<br />
nobackup = .nobackup<br />
This can be used for example to exclude backing up of opera cache, by creating and empty .nobackup file in the cache directory:<br />
touch ~/.opera/cache4/.nobackup<br />
* You can specify the compression algorithm used:<br />
compression = bzip<br />
compression level = 6<br />
* hdup refuses to restore backups to / by default, since it can be dangerous. To override this, use<br />
# allow restoring to /<br />
force = yes<br />
<br />
=== Running hdup ===<br />
<br />
Let's first explain the monthly-weekly-daily scheme of backups. The 'monthly'<br />
archives contain all the data you specify to backup. The 'weekly' archives<br />
contain only those files, which have changed from the last 'monthly' backup.<br />
Finally, 'daily' contain only those which have changed from the last 'weekly'<br />
backup.<br />
<br />
Of course, 'monthly', 'weekly' and 'daily' are just names, you don't need to<br />
perform backups in these intervals. But you cannot perform a 'weekly', unless<br />
you have at least one 'monthly', etc.<br />
<br />
So, how does hdup implement this scheme?<br />
<br />
As root, you can run hdup with the command like<br />
hdup monthly my-comp<br />
This creates a directory 'my-comp' in the directory you specified in the config file (/vol/backup), and inside it two other directories: 'etc' and (current date) '2008-02-23'. The 'etc' one contains some hdup's files, and the '2008-02-23' one will have a big .tar.bz2 archive in it. That's your backup.<br />
<br />
After some time after 'monthly' backup, you decide you want to backup again. Now you can run hdup as<br />
hdup weekly my-comp<br />
and hdup will archive only what has changed from the 'monthly', and the archive will be put into another dir named after current date in /vol/backup/my-comp.<br />
<br />
It should be clear now how the backing up works. Note that if hdup cannot find a 'monthly' and you ask it to do a 'weekly', it will complain. See the tips section.<br />
<br />
=== Restoring backups ===<br />
<br />
To restore, you need to have all 'parent' archives (ie. if you want to restore a weekly backup, you also need to have its 'monthly' available). The command for restoring is<br />
hdup restore my-comp 2008-01-31 /somedir<br />
With this, hdup will try to restore things as they've been up to the date specified, and it will unpack to the directory /somedir. You can force it to unpack right away to / (see 'force' option above), but be very careful with this!<br />
<br />
Note that the backups are just .tar.bz2 archives, so if you need a particular file from a particular date, just use any archive manager (or tar and bzip2) to open the archive and copy the needed file over.<br />
<br />
=== More goodies: encryption and ssh ===<br />
<br />
If you've got here, let me remind you that '''man hdup''' and '''man hdup.conf''' are your friends!<br />
<br />
* For gpg encryption, you want to add something like<br />
algorithm = gpg<br />
key = <your gpg key identifier><br />
either to [global] (then it's going to be used for all profiles), or just to a profile part. The archives will then be encrypted with your public key (so you can only decrypt them with your secret key). Note that you can decrypt them manually with<br />
gpg -d <archive file><br />
in case you need it.<br />
<br />
* For other encryption (e.g. mcrypt), just add<br />
algorithm = mcrypt<br />
In this case, hdup will ask for a password both when archiving and restoring.<br />
<br />
I haven't tried the backups over ssh... so if anybody feels like, please update this wiki.<br />
<br />
=== Tips ===<br />
<br />
* You can of course burn the archives to cd/dvd with any burning software you like. The only thing to remember here is that the 'parent' archive is needed when you're doing a 'child' backup (like you need 'monthly' for 'weekly'). However, if you're tight on space, this can be achieved by mounting the cd/dvd with 'parent' backup, and soft linking its directory into /vol/backup, so that hdup can find it there.</div>Bender02https://wiki.archlinux.org/index.php?title=Hdup&diff=37707Hdup2008-02-25T23:14:58Z<p>Bender02: Initial submit</p>
<hr />
<div>[[Category:Development (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
== Intro ==<br />
<br />
This wiki page contains a guide on how to set up [http://www.miek.nl/projects/hdup2/hdup.html hdup], "The little, spiffy, backup tool". (Don't be discouraged by the fact that on its website it says "Unmaintained!". It's mature program, and that warning means only that its author, Miek Gieben, develops and uses a similar program (rdup), which is a bit more difficult to use.) Although it's a command line program, it's easy to set up, so don't be afraid.<br />
<br />
=== Features ===<br />
* archives are tar.bz2 (or tar.gz)<br />
* incremental backups (monthly-weekly-daily scheme)<br />
* backups over ssh<br />
* encrypted backups (mcrypt, gpg)<br />
<br />
=== Other backup programs ===<br />
Let's list some other programs dedicated to making backups, grouped by "type":<br />
<br />
* rsync type: Those which maintain a copy of the directory you want to keep a backup of, together with files which describe how did the contents change from the last backup (the so-called 'diffs'). Hence, they are inherently incremental, but usually they don't have compression/encryption. On the other hand, a working copy of everything is immediately available, no decompression/decryption needed. Finally the way it works makes it hard to burn backups to cd/dvd.:<br />
** command line: [http://www.samba.org/rsync/ rsync], [http://www.nongnu.org/rdiff-backup/ rdiff-backup], [http://www.rsnapshot.org rsnapshot]<br />
** gui: [http://www.flyback-project.org/ flyback], [http://areca.sourceforge.net/ areca], [https://wiki.ubuntu.com/TimeVault timevault]<br />
* "just copy everything into one big archive, but support writing to cd/dvd"-type: backup-manager<br />
* a one which has support for incremental backups, tarring and encrypting is [http://www.nongnu.org/duplicity/ duplicity]. Functioning is very similar to hdup, but: <br />
** the files backed up are "randomly" distributed between encrypted tar archives, which makes it harder to recover a particular file (hdup uses just one file: this is a drawback if you backup a lot of data at once)<br />
** you can backup just one directory at a time (while with hdup you can specify as many as you want in one backup profile)<br />
<br />
You should think about your needs, read a bit about various possibilities. For instance, a popular solution for managing your configuration files is to use a versioning system (like [http://www.selenic.com/mercurial/wiki/ mercurial] or [http://git.or.cz/ git])<br />
<br />
== Installing/running/restoring ==<br />
<br />
=== Installing and setting hdup up ===<br />
<br />
* hdup is in [extra] repo, so you can install it via pacman:<br />
pacman -S hdup<br />
* We need to edit the configuration file '''/etc/hdup/hdup.conf'''. There's<br />
one supplied, so you can just edit that one; or you can you a minimal one listed<br />
here:<br />
[global]<br />
# to which dir the archives will be written<br />
archive dir = /vol/backup<br />
# chown the archives to this user<br />
user = <yourusername><br />
<br />
[my-comp]<br />
# what to backup, separate with ,.<br />
# For directories add closing slash, like /home/<br />
dir = /home/,/var/abs/local/<br />
# don't include theses directories<br />
exclude = lost\+found/, /proc/, /dev/, /sys/<br />
* You '''need to modify''' at least the following options:<br />
** '''archive dir''': that's where the backups will be written to<br />
** '''user''': created archives will be chowned to this user; you can just use your username. This is needed since hdup needs to be run as root.<br />
** '''dir''': that's the list of directories whose contents you want to back up).<br />
<br />
The rest of the comments about the config file can be skipped on the first<br />
reading. They describe various other options you can use if the hdup.conf file:<br />
* You can have more that one ''profile'' (the one used above is named '''my-comp'''). This means that you can have a couple of independent backup schemes. For instance, you might want to have another one for your webpages:<br />
[my-webpages]<br />
dir = /var/www/<br />
* To have a simple means of excluding some directories, use the '''nobackup''' option. It specifies the filename, which if it exists in a directory, then that directory is excluded from backing up.<br />
nobackup = .nobackup<br />
This can be used for example to exclude backing up of opera cache, by creating and empty .nobackup file in the cache directory:<br />
touch ~/.opera/cache4/.nobackup<br />
* You can specify the compression algorithm used:<br />
compression = bzip<br />
compression level = 6<br />
* hdup refuses to restore backups to / by default, since it can be dangerous. To override this, use<br />
# allow restoring to /<br />
force = yes<br />
<br />
=== Running hdup ===<br />
<br />
Let's first explain the monthly-weekly-daily scheme of backups. The 'monthly'<br />
archives contain all the data you specify to backup. The 'weekly' archives<br />
contain only those files, which have changed from the last 'monthly' backup.<br />
Finally, 'daily' contain only those which have changed from the last 'weekly'<br />
backup.<br />
<br />
Of course, 'monthly', 'weekly' and 'daily' are just names, you don't need to<br />
perform backups in these intervals. But you cannot perform a 'weekly', unless<br />
you have at least one 'monthly', etc.<br />
<br />
So, how does hdup implement this scheme?<br />
<br />
As root, you can run hdup with the command like<br />
hdup monthly my-comp<br />
This creates a directory 'my-comp' in the directory you specified in the config file (/vol/backup), and inside it two other directories: 'etc' and (current date) '2008-02-23'. The 'etc' one contains some hdup's files, and the '2008-02-23' one will have a big .tar.bz2 archive in it. That's your backup.<br />
<br />
After some time after 'monthly' backup, you decide you want to backup again. Now you can run hdup as<br />
hdup weekly my-comp<br />
and hdup will archive only what has changed from the 'monthly', and the archive will be put into another dir named after current date in /vol/backup/my-comp.<br />
<br />
It should be clear now how the backing up works. Note that if hdup cannot find a 'monthly' and you ask it to do a 'weekly', it will complain. See the tips section.<br />
<br />
=== Restoring backups ===<br />
<br />
To restore, you need to have all 'parent' archives (ie. if you want to restore a weekly backup, you also need to have its 'monthly' available). The command for restoring is<br />
hdup restore my-comp 2008-01-31 /somedir<br />
With this, hdup will try to restore things as they've been up to the date specified, and it will unpack to the directory /somedir. You can force it to unpack right away to / (see 'force' option above), but be very careful with this!<br />
<br />
Note that the backups are just .tar.bz2 archives, so if you need a particular file from a particular date, just use any archive manager (or tar and bzip2) to open the archive and copy the needed file over.<br />
<br />
=== More goodies: encryption and ssh ===<br />
<br />
If you've got here, let me remind you that '''man hdup''' and '''man hdup.conf''' are your friends!<br />
<br />
* For gpg encryption, you want to add something like<br />
algorithm = gpg<br />
key = <your gpg key identifier><br />
either to [global] (then it's going to be used for all profiles), or just to a profile part. The archives will then be encrypted with your public key (so you can only decrypt them with your secret key). Note that you can decrypt them manually with<br />
gpg -d <archive file><br />
in case you need it.<br />
<br />
* For other encryption (e.g. mcrypt), just add<br />
algorithm = mcrypt<br />
In this case, hdup will ask for a password both when archiving and restoring.<br />
<br />
I haven't tried the backups over ssh... so if anybody feels like, please update this wiki.<br />
<br />
=== Tips ===<br />
<br />
* You can of course burn the archives to cd/dvd with any burning software you like. The only thing to remember here is that the 'parent' archive is needed when you're doing a 'child' backup (like you need 'monthly' for 'weekly'). However, if you're tight on space, this can be achieved by mounting the cd/dvd with 'parent' backup, and soft linking its directory into /vol/backup, so that hdup can find it there.</div>Bender02