From d9627759cbdb66ab608aac8e8376e7d7a77ff10b Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Fri, 1 Jan 2010 14:16:55 +0100 Subject: [PATCH] Reset everything to English --- docs/manuals/de/console/Makefile.in | 19 +- docs/manuals/de/console/bconsole.tex | 1820 ++++----- docs/manuals/de/console/console.kilepr | 20 +- docs/manuals/de/console/console.tex | 16 +- docs/manuals/de/console/fdl.tex | 68 +- docs/manuals/de/developers/Makefile.in | 20 +- docs/manuals/de/developers/catalog.tex | 249 +- docs/manuals/de/developers/coverpage.tex | 28 + docs/manuals/de/developers/developers.kilepr | 34 +- docs/manuals/de/developers/developers.tex | 51 +- .../de/{catalog => developers}/do_echo | 0 docs/manuals/de/developers/generaldevel.tex | 295 -- docs/manuals/de/developers/git.tex | 372 ++ docs/manuals/de/developers/gui-interface.tex | 102 + .../concepts => de/developers}/pluginAPI.tex | 0 docs/manuals/de/developers/regression.tex | 619 +++ docs/manuals/de/main.tex | 167 + .../{fr/install => de/main}/Makefile.in | 28 +- docs/manuals/{es/concepts => de/main}/STYLE | 1 - .../{es/concepts => de/main}/ansi-labels.tex | 0 .../de/{install => main}/autochangerres.tex | 0 .../{es/concepts => de/main}/autochangers.tex | 0 .../{es/concepts => de/main}/bootstrap.tex | 0 .../manuals/{es/concepts => de/main}/bugs.tex | 0 .../catalog => de/main}/catmaintenance.tex | 36 +- .../manuals/de/{catalog => main}/check_tex.pl | 0 .../{es/install => de/main}/configure.tex | 11 +- .../{es/install => de/main}/consoleconf.tex | 0 docs/manuals/de/main/coverpage.tex | 28 + .../{es/install => de/main}/critical.tex | 0 .../concepts => de/main}/dataencryption.tex | 0 .../{es/install => de/main}/dirdconf.tex | 116 +- .../manuals/{es/concepts => de/main}/disk.tex | 0 docs/manuals/de/{concepts => main}/do_echo | 0 docs/manuals/{es/catalog => de/main}/fdl.tex | 0 .../{es/install => de/main}/filedconf.tex | 2 +- .../{es/install => de/main}/fileset.tex | 165 +- docs/manuals/de/{catalog => main}/fix_tex.pl | 0 docs/manuals/de/main/general.tex | 522 +++ docs/manuals/{es/concepts => de/main}/gpl.tex | 0 docs/manuals/de/{catalog => main}/index.perl | 0 .../installation.tex => de/main/install.tex} | 66 +- .../de/{catalog => main}/latex2html-init.pl | 0 .../{es/concepts => de/main}/lesser.tex | 0 .../{es/concepts => de/main}/license.tex | 0 .../concepts.kilepr => de/main/main.kilepr} | 59 +- .../concepts.tex => de/main/main.tex} | 57 +- .../{es/install => de/main}/messagesres.tex | 22 +- .../{es/concepts => de/main}/migration.tex | 34 +- .../de/{install => main}/monitorconf.tex | 0 .../de/{concepts => main}/mtx-changer.txt | 0 .../manuals/{es/catalog => de/main}/mysql.tex | 17 +- .../{es/concepts => de/main}/newfeatures.tex | 155 +- docs/manuals/de/{concepts => main}/pools.tex | 0 .../{es/catalog => de/main}/postgresql.tex | 85 +- .../{es/install => de/main}/quickstart.tex | 0 .../{es/concepts => de/main}/recycling.tex | 0 docs/manuals/de/main/requirements.tex | 67 + .../{es/concepts => de/main}/rescue.tex | 0 .../{es/concepts => de/main}/restore.tex | 0 .../manuals/de/{install => main}/security.tex | 0 .../{es/concepts => de/main}/spooling.tex | 6 +- .../{es/catalog => de/main}/sqlite.tex | 0 docs/manuals/de/main/state.tex | 250 ++ .../{es/concepts => de/main}/statistics.tex | 0 .../{es/install => de/main}/storedconf.tex | 201 +- .../de/{concepts => main}/strategies.tex | 0 .../{concepts => main}/supportedchangers.tex | 0 docs/manuals/de/main/supporteddrives.tex | 158 + docs/manuals/de/main/supportedoses.tex | 90 + docs/manuals/de/{concepts => main}/thanks.tex | 0 docs/manuals/de/{concepts => main}/tls.tex | 0 .../de/{catalog => main}/translate_images.pl | 0 docs/manuals/de/main/tutorial.tex | 1357 +++++++ .../{es/concepts => de/main}/verify.tex | 0 .../{es/concepts => de/main}/win32.tex | 0 docs/manuals/de/misc/Makefile.in | 24 +- docs/manuals/de/misc/coverpage.tex | 2 +- .../{es/catalog => de/misc}/internaldb.tex | 0 docs/manuals/de/misc/misc.kilepr | 9 + docs/manuals/de/misc/misc.tex | 1 + docs/manuals/de/{ => old}/catalog/Makefile.in | 0 docs/manuals/de/{ => old}/catalog/catalog.css | 0 .../de/{ => old}/catalog/catalog.kilepr | 0 docs/manuals/de/{ => old}/catalog/catalog.tex | 0 .../de/{ => old}/catalog/catmaintenance.tex | 0 .../de/{concepts => old/catalog}/check_tex.pl | 0 .../de/{install => old/catalog}/do_echo | 0 docs/manuals/de/{ => old}/catalog/fdl.tex | 0 .../de/{concepts => old/catalog}/fix_tex.pl | 0 .../de/{concepts => old/catalog}/index.perl | 0 .../de/{ => old}/catalog/internaldb.tex | 0 .../catalog}/latex2html-init.pl | 0 docs/manuals/de/{ => old}/catalog/mysql.tex | 0 .../de/{ => old}/catalog/postgresql.tex | 0 docs/manuals/de/{ => old}/catalog/setup.sm | 0 docs/manuals/de/{ => old}/catalog/sqlite.tex | 0 .../catalog}/translate_images.pl | 0 .../manuals/de/{ => old}/concepts/Makefile.in | 0 docs/manuals/de/{ => old}/concepts/STYLE | 0 .../de/{ => old}/concepts/ansi-labels.tex | 0 .../de/{ => old}/concepts/autochangerres.tex | 0 .../de/{ => old}/concepts/autochangers.tex | 0 .../de/{ => old}/concepts/bootstrap.tex | 0 docs/manuals/de/{ => old}/concepts/bugs.tex | 0 .../de/{install => old/concepts}/check_tex.pl | 0 .../de/{ => old}/concepts/concepts.kilepr | 0 .../de/{ => old}/concepts/concepts.tex | 0 .../de/{ => old}/concepts/dataencryption.tex | 0 docs/manuals/de/{ => old}/concepts/disk.tex | 0 .../{es/catalog => de/old/concepts}/do_echo | 0 docs/manuals/de/{ => old}/concepts/dvd.tex | 0 docs/manuals/de/{ => old}/concepts/fdl.tex | 0 .../de/{install => old/concepts}/fix_tex.pl | 0 .../manuals/de/{ => old}/concepts/general.tex | 0 docs/manuals/de/{ => old}/concepts/gpl.tex | 0 .../de/{install => old/concepts}/index.perl | 0 .../concepts}/latex2html-init.pl | 0 docs/manuals/de/{ => old}/concepts/lesser.tex | 0 .../manuals/de/{ => old}/concepts/license.tex | 0 .../de/{ => old}/concepts/migration.tex | 0 .../{es => de/old}/concepts/mtx-changer.txt | 0 .../de/{ => old}/concepts/newfeatures.tex | 0 .../manuals/{es => de/old}/concepts/pools.tex | 0 .../de/{ => old}/concepts/projects.tex | 0 docs/manuals/de/{ => old}/concepts/python.tex | 0 .../de/{ => old}/concepts/recycling.tex | 0 .../de/{ => old}/concepts/requirements.tex | 0 docs/manuals/de/{ => old}/concepts/rescue.tex | 0 .../manuals/de/{ => old}/concepts/restore.tex | 0 docs/manuals/de/{ => old}/concepts/setup.sm | 0 .../de/{ => old}/concepts/spooling.tex | 0 docs/manuals/de/{ => old}/concepts/state.tex | 0 .../de/{ => old}/concepts/statistics.tex | 0 .../{es => de/old}/concepts/strategies.tex | 0 .../manuals/de/{ => old}/concepts/stunnel.tex | 0 .../old}/concepts/supportedchangers.tex | 0 .../de/{ => old}/concepts/supporteddrives.tex | 0 .../de/{ => old}/concepts/supportedoses.tex | 0 .../{es => de/old}/concepts/thanks.tex | 0 docs/manuals/{es => de/old}/concepts/tls.tex | 0 .../concepts}/translate_images.pl | 0 .../de/{ => old}/concepts/tutorial.tex | 0 docs/manuals/de/{ => old}/concepts/uploaddoc | 0 docs/manuals/de/{ => old}/concepts/vars.tex | 0 docs/manuals/de/{ => old}/concepts/verify.tex | 0 docs/manuals/de/{ => old}/concepts/win32.tex | 0 .../Makefile => de/old/console/Makefile.in} | 2 - docs/manuals/de/old/console/bconsole.tex | 1698 ++++++++ .../catalog => de/old/console}/check_tex.pl | 0 .../install.css => old/console/console.css} | 0 docs/manuals/de/old/console/console.kilepr | 70 + .../old/console/console.tex} | 56 +- .../{es/concepts => de/old/console}/do_echo | 0 docs/manuals/de/old/console/fdl.tex | 485 +++ .../{es/catalog => de/old/console}/fix_tex.pl | 0 .../{es/catalog => de/old/console}/index.perl | 0 .../old/console}/latex2html-init.pl | 0 .../de/{install => old/console}/setup.sm | 0 .../old/console}/translate_images.pl | 0 .../old/developers/Makefile.in} | 4 +- docs/manuals/de/old/developers/catalog.tex | 939 +++++ .../old/developers}/check_tex.pl | 0 .../de/old/developers/daemonprotocol.tex | 284 ++ .../old/developers/developers.css} | 0 .../old/developers/developers.kilepr} | 106 +- .../old/developers/developers.tex} | 49 +- docs/manuals/de/old/developers/director.tex | 18 + docs/manuals/de/old/developers/fdl.tex | 511 +++ docs/manuals/de/old/developers/file.tex | 68 + .../concepts => de/old/developers}/fix_tex.pl | 0 .../de/old/developers/generaldevel.tex | 1363 +++++++ .../concepts => de/old/developers}/index.perl | 0 .../old/developers}/latex2html-init.pl | 0 docs/manuals/de/old/developers/md5.tex | 184 + .../manuals/de/old/developers/mediaformat.tex | 1115 +++++ docs/manuals/de/old/developers/mempool.tex | 234 ++ .../manuals/de/old/developers/netprotocol.tex | 224 ++ .../de/old/developers/platformsupport.tex | 107 + docs/manuals/de/old/developers/porting.tex | 173 + .../catalog => de/old/developers}/setup.sm | 0 docs/manuals/de/old/developers/smartall.tex | 432 ++ docs/manuals/de/old/developers/storage.tex | 258 ++ .../manuals/de/old/developers/tls-techdoc.tex | 391 ++ .../old/developers}/translate_images.pl | 0 docs/manuals/de/{ => old}/install/Makefile.in | 0 .../de/{ => old}/install/Makefile.save | 0 .../old/install}/autochangerres.tex | 0 .../{es => de/old}/install/check_tex.pl | 0 .../de/{ => old}/install/configure.tex | 0 .../de/{ => old}/install/consoleconf.tex | 0 .../manuals/de/{ => old}/install/critical.tex | 0 .../manuals/de/{ => old}/install/dirdconf.tex | 0 docs/manuals/{es => de/old}/install/do_echo | 0 .../de/{ => old}/install/filedconf.tex | 0 docs/manuals/de/{ => old}/install/fileset.tex | 0 .../manuals/{es => de/old}/install/fix_tex.pl | 0 .../manuals/{es => de/old}/install/index.perl | 0 .../{es => de/old}/install/install.css | 0 .../de/{ => old}/install/install.kilepr | 0 docs/manuals/de/{ => old}/install/install.tex | 0 .../de/{ => old}/install/installation.tex | 0 .../{es => de/old}/install/latex2html-init.pl | 0 .../de/{ => old}/install/messagesres.tex | 0 .../{es => de/old}/install/monitorconf.tex | 0 .../de/{ => old}/install/quickstart.tex | 0 .../{es => de/old}/install/security.tex | 0 .../{es/concepts => de/old/install}/setup.sm | 0 .../de/{ => old}/install/storedconf.tex | 0 .../old}/install/translate_images.pl | 0 .../{fr/catalog => de/old/misc}/Makefile.in | 12 +- docs/manuals/de/old/misc/coverpage.tex | 28 + .../{fr/catalog => de/old/misc}/do_echo | 0 .../{fr/concepts => de/old/misc}/dvd.tex | 14 +- .../{es/concepts => de/old/misc}/fdl.tex | 0 .../{fr/concepts => de/old/misc}/gpl.tex | 0 .../old/misc}/latex2html-init.pl | 0 .../{fr/concepts => de/old/misc}/lesser.tex | 0 .../{fr/concepts => de/old/misc}/license.tex | 28 +- docs/manuals/de/old/misc/misc.kilepr | 124 + docs/manuals/de/old/misc/misc.tex | 63 + .../{es/concepts => de/old/misc}/projects.tex | 0 .../{es/concepts => de/old/misc}/python.tex | 2 +- .../{es/concepts => de/old/misc}/stunnel.tex | 0 .../old/misc}/translate_images.pl | 0 .../{fr/concepts => de/old/misc}/vars.tex | 8 +- .../Makefile => de/old/problems/Makefile.in} | 2 - .../catalog => de/old/problems}/check_tex.pl | 0 .../{fr/concepts => de/old/problems}/do_echo | 0 docs/manuals/de/old/problems/faq.tex | 876 ++++ .../{fr/catalog => de/old/problems}/fdl.tex | 0 docs/manuals/de/old/problems/firewalls.tex | 373 ++ .../catalog => de/old/problems}/fix_tex.pl | 0 .../catalog => de/old/problems}/index.perl | 0 docs/manuals/de/old/problems/kaboom.tex | 233 ++ .../old/problems}/latex2html-init.pl | 0 docs/manuals/de/old/problems/problems.kilepr | 88 + .../old/problems/problems.tex} | 27 +- docs/manuals/de/old/problems/rpm-faq.tex | 395 ++ .../{es/install => de/old/problems}/setup.sm | 0 docs/manuals/de/old/problems/tapetesting.tex | 1293 ++++++ docs/manuals/de/old/problems/tips.tex | 1045 +++++ .../old/problems}/translate_images.pl | 0 .../Makefile => de/old/utility/Makefile.in} | 3 - .../de/old/utility/bimagemgr-chapter.tex | 149 + .../concepts => de/old/utility}/check_tex.pl | 0 .../{fr/install => de/old/utility}/do_echo | 0 .../{fr/concepts => de/old/utility}/fdl.tex | 0 .../concepts => de/old/utility}/fix_tex.pl | 0 .../concepts => de/old/utility}/index.perl | 0 .../old/utility}/latex2html-init.pl | 0 docs/manuals/de/old/utility/progs.tex | 1332 ++++++ docs/manuals/de/old/utility/rpm-faq.tex | 405 ++ .../{fr/catalog => de/old/utility}/setup.sm | 0 .../old/utility}/translate_images.pl | 0 docs/manuals/de/old/utility/utility.kilepr | 70 + .../old/utility/utility.tex} | 14 +- docs/manuals/de/problems/Makefile.in | 19 +- docs/manuals/de/problems/firewalls.tex | 2 +- docs/manuals/de/problems/problems.kilepr | 40 +- docs/manuals/de/problems/problems.tex | 8 +- docs/manuals/de/problems/tapetesting.tex | 41 +- docs/manuals/de/utility/Makefile.in | 20 +- docs/manuals/de/utility/bimagemgr-chapter.tex | 192 +- docs/manuals/de/utility/progs.tex | 128 +- docs/manuals/de/utility/rpm-faq.tex | 79 +- docs/manuals/de/utility/utility.kilepr | 10 +- docs/manuals/de/utility/utility.tex | 4 - docs/manuals/es/catalog/Makefile | 137 - docs/manuals/es/catalog/Makefile.in | 137 - docs/manuals/es/concepts/Makefile | 141 - docs/manuals/es/concepts/Makefile.in | 141 - docs/manuals/es/concepts/bimagemgr.bix | 7 - docs/manuals/es/concepts/dvd.tex | 329 -- docs/manuals/es/concepts/general.tex | 454 --- docs/manuals/es/concepts/requirements.tex | 60 - docs/manuals/es/concepts/state.tex | 262 -- docs/manuals/es/concepts/supporteddrives.tex | 158 - docs/manuals/es/concepts/supportedoses.tex | 79 - docs/manuals/es/concepts/tutorial.tex | 1358 ------- docs/manuals/es/concepts/uploaddoc | 11 - docs/manuals/es/concepts/vars.tex | 229 -- docs/manuals/es/console/Makefile.in | 19 +- docs/manuals/es/console/bconsole.tex | 17 +- docs/manuals/es/developers/Makefile.in | 22 +- docs/manuals/es/developers/catalog.tex | 249 +- docs/manuals/es/developers/coverpage.tex | 28 + docs/manuals/es/developers/developers.kilepr | 44 +- docs/manuals/es/developers/developers.tex | 36 +- docs/manuals/es/developers/do_echo | 6 + docs/manuals/es/developers/generaldevel.tex | 632 +-- docs/manuals/es/developers/git.tex | 372 ++ docs/manuals/es/developers/gui-interface.tex | 102 + docs/manuals/es/developers/pluginAPI.tex | 854 ++++ docs/manuals/es/developers/regression.tex | 619 +++ docs/manuals/es/install/Makefile.save | 101 - docs/manuals/es/main.tex | 167 + docs/manuals/es/{install => main}/Makefile.in | 30 +- docs/manuals/{fr/concepts => es/main}/STYLE | 1 - .../{fr/concepts => es/main}/ansi-labels.tex | 0 .../es/{install => main}/autochangerres.tex | 0 docs/manuals/es/main/autochangers.tex | 1011 +++++ .../{fr/concepts => es/main}/bootstrap.tex | 11 +- .../manuals/{fr/concepts => es/main}/bugs.tex | 0 .../catalog => es/main}/catmaintenance.tex | 60 +- .../{fr/install => es/main}/check_tex.pl | 0 .../{fr/install => es/main}/configure.tex | 17 +- .../{fr/install => es/main}/consoleconf.tex | 0 docs/manuals/es/main/coverpage.tex | 28 + .../{fr/install => es/main}/critical.tex | 2 +- .../concepts => es/main}/dataencryption.tex | 8 +- .../{fr/install => es/main}/dirdconf.tex | 417 +- .../manuals/{fr/concepts => es/main}/disk.tex | 0 docs/manuals/es/main/do_echo | 6 + docs/manuals/es/main/fdl.tex | 485 +++ .../{fr/install => es/main}/filedconf.tex | 13 +- .../{fr/install => es/main}/fileset.tex | 228 +- .../{fr/install => es/main}/fix_tex.pl | 0 docs/manuals/es/main/general.tex | 522 +++ docs/manuals/es/main/gpl.tex | 420 ++ .../{fr/install => es/main}/index.perl | 0 docs/manuals/es/main/install.tex | 1745 ++++++++ docs/manuals/es/main/latex2html-init.pl | 10 + docs/manuals/es/main/lesser.tex | 573 +++ docs/manuals/es/main/license.tex | 113 + docs/manuals/es/main/main.kilepr | 358 ++ .../concepts.tex => es/main/main.tex} | 76 +- docs/manuals/es/main/messagesres.tex | 388 ++ .../{fr/concepts => es/main}/migration.tex | 58 +- .../{fr/install => es/main}/monitorconf.tex | 0 .../{fr/concepts => es/main}/mtx-changer.txt | 0 .../manuals/{fr/catalog => es/main}/mysql.tex | 17 +- docs/manuals/es/main/newfeatures.tex | 2032 ++++++++++ .../{fr/concepts => es/main}/pools.tex | 0 docs/manuals/es/main/postgresql.tex | 499 +++ docs/manuals/es/main/quickstart.tex | 389 ++ .../{fr/concepts => es/main}/recycling.tex | 28 +- docs/manuals/es/main/requirements.tex | 67 + docs/manuals/es/main/rescue.tex | 804 ++++ docs/manuals/es/main/restore.tex | 1470 +++++++ docs/manuals/es/main/security.tex | 332 ++ .../{fr/concepts => es/main}/spooling.tex | 16 +- .../{fr/catalog => es/main}/sqlite.tex | 0 docs/manuals/es/main/state.tex | 250 ++ docs/manuals/es/main/statistics.tex | 61 + docs/manuals/es/main/storedconf.tex | 1448 +++++++ .../{fr/concepts => es/main}/strategies.tex | 0 .../main}/supportedchangers.tex | 54 +- docs/manuals/es/main/supporteddrives.tex | 158 + docs/manuals/es/main/supportedoses.tex | 90 + .../{fr/concepts => es/main}/thanks.tex | 0 docs/manuals/{fr/concepts => es/main}/tls.tex | 0 docs/manuals/es/main/translate_images.pl | 185 + docs/manuals/es/main/tutorial.tex | 1357 +++++++ .../{fr/concepts => es/main}/verify.tex | 0 .../{fr/concepts => es/main}/win32.tex | 40 +- docs/manuals/es/misc/Makefile.in | 24 +- docs/manuals/es/misc/coverpage.tex | 2 +- .../{fr/catalog => es/misc}/internaldb.tex | 0 docs/manuals/es/misc/misc.kilepr | 9 + docs/manuals/es/misc/misc.tex | 1 + docs/manuals/es/problems/Makefile.in | 21 +- docs/manuals/es/problems/firewalls.tex | 2 +- docs/manuals/es/problems/tapetesting.tex | 8 +- docs/manuals/es/utility/Makefile.in | 21 +- docs/manuals/es/utility/progs.tex | 86 +- docs/manuals/fr/catalog/catalog.css | 30 - docs/manuals/fr/catalog/postgresql.tex | 457 --- docs/manuals/fr/concepts/Makefile.in | 139 - docs/manuals/fr/concepts/autochangerres.tex | 109 - docs/manuals/fr/concepts/autochangers.tex | 936 ----- docs/manuals/fr/concepts/bimagemgr.bix | 7 - docs/manuals/fr/concepts/general.tex | 554 --- docs/manuals/fr/concepts/projects.tex | 28 - docs/manuals/fr/concepts/python.tex | 479 --- docs/manuals/fr/concepts/requirements.tex | 63 - docs/manuals/fr/concepts/restore.tex | 1209 ------ docs/manuals/fr/concepts/setup.sm | 23 - docs/manuals/fr/concepts/state.tex | 258 -- docs/manuals/fr/concepts/stunnel.tex | 553 --- docs/manuals/fr/concepts/supporteddrives.tex | 174 - docs/manuals/fr/concepts/supportedoses.tex | 92 - docs/manuals/fr/concepts/tutorial.tex | 1392 ------- docs/manuals/fr/concepts/uploaddoc | 11 - docs/manuals/fr/console/Makefile.in | 19 +- docs/manuals/fr/console/bconsole.tex | 1762 ++++---- docs/manuals/fr/console/console.kilepr | 70 + docs/manuals/fr/console/console.tex | 17 +- docs/manuals/fr/developers/Makefile.in | 20 +- docs/manuals/fr/developers/catalog.tex | 249 +- docs/manuals/fr/developers/coverpage.tex | 28 + .../{es => fr/developers}/developers.kilepr | 112 +- docs/manuals/fr/developers/developers.tex | 60 +- docs/manuals/fr/developers/do_echo | 6 + docs/manuals/fr/developers/generaldevel.tex | 632 +-- docs/manuals/fr/developers/git.tex | 372 ++ docs/manuals/fr/developers/gui-interface.tex | 102 + docs/manuals/fr/developers/pluginAPI.tex | 854 ++++ docs/manuals/fr/developers/regression.tex | 619 +++ docs/manuals/fr/developers/smartall.tex | 2 +- docs/manuals/fr/install/Makefile.save | 101 - docs/manuals/fr/install/install.css | 30 - docs/manuals/fr/install/installation.tex | 1518 ------- docs/manuals/fr/install/messagesres.tex | 347 -- docs/manuals/fr/install/quickstart.tex | 415 -- docs/manuals/fr/install/security.tex | 336 -- docs/manuals/fr/install/setup.sm | 23 - docs/manuals/fr/install/storedconf.tex | 1269 ------ docs/manuals/fr/main.tex | 167 + .../install/Makefile => fr/main/Makefile.in} | 30 +- docs/manuals/fr/main/STYLE | 75 + docs/manuals/fr/main/ansi-labels.tex | 58 + .../fr/{install => main}/autochangerres.tex | 0 docs/manuals/fr/main/autochangers.tex | 1011 +++++ docs/manuals/fr/main/bootstrap.tex | 427 ++ docs/manuals/fr/main/bugs.tex | 21 + docs/manuals/fr/main/catmaintenance.tex | 790 ++++ docs/manuals/fr/main/check_tex.pl | 152 + docs/manuals/fr/main/configure.tex | 415 ++ docs/manuals/fr/main/consoleconf.tex | 356 ++ docs/manuals/fr/main/coverpage.tex | 28 + docs/manuals/fr/main/critical.tex | 130 + docs/manuals/fr/main/dataencryption.tex | 195 + docs/manuals/fr/main/dirdconf.tex | 3570 +++++++++++++++++ docs/manuals/fr/main/disk.tex | 798 ++++ docs/manuals/fr/main/do_echo | 6 + docs/manuals/fr/main/fdl.tex | 485 +++ docs/manuals/fr/main/filedconf.tex | 384 ++ docs/manuals/fr/main/fileset.tex | 1780 ++++++++ docs/manuals/fr/main/fix_tex.pl | 184 + docs/manuals/fr/main/general.tex | 522 +++ docs/manuals/fr/main/gpl.tex | 420 ++ docs/manuals/fr/main/index.perl | 564 +++ docs/manuals/fr/main/install.tex | 1745 ++++++++ docs/manuals/fr/main/latex2html-init.pl | 10 + docs/manuals/fr/main/lesser.tex | 573 +++ docs/manuals/fr/main/license.tex | 113 + docs/manuals/fr/main/main.kilepr | 358 ++ docs/manuals/fr/main/main.tex | 115 + docs/manuals/fr/main/messagesres.tex | 388 ++ docs/manuals/fr/main/migration.tex | 479 +++ docs/manuals/fr/main/monitorconf.tex | 341 ++ docs/manuals/fr/main/mtx-changer.txt | 215 + docs/manuals/fr/main/mysql.tex | 299 ++ docs/manuals/fr/main/newfeatures.tex | 2032 ++++++++++ docs/manuals/fr/main/pools.tex | 429 ++ docs/manuals/fr/main/postgresql.tex | 499 +++ docs/manuals/fr/main/quickstart.tex | 389 ++ docs/manuals/fr/main/recycling.tex | 723 ++++ docs/manuals/fr/main/requirements.tex | 67 + docs/manuals/fr/main/rescue.tex | 804 ++++ docs/manuals/fr/main/restore.tex | 1470 +++++++ docs/manuals/fr/main/security.tex | 332 ++ docs/manuals/fr/main/spooling.tex | 150 + docs/manuals/fr/main/sqlite.tex | 168 + docs/manuals/fr/main/state.tex | 250 ++ docs/manuals/fr/main/statistics.tex | 61 + docs/manuals/fr/main/storedconf.tex | 1448 +++++++ docs/manuals/fr/main/strategies.tex | 439 ++ docs/manuals/fr/main/supportedchangers.tex | 76 + docs/manuals/fr/main/supporteddrives.tex | 158 + docs/manuals/fr/main/supportedoses.tex | 90 + docs/manuals/fr/main/thanks.tex | 102 + docs/manuals/fr/main/tls.tex | 315 ++ docs/manuals/fr/main/translate_images.pl | 185 + docs/manuals/fr/main/tutorial.tex | 1357 +++++++ docs/manuals/fr/main/verify.tex | 376 ++ docs/manuals/fr/main/win32.tex | 865 ++++ docs/manuals/fr/misc/Makefile.in | 24 +- docs/manuals/fr/misc/coverpage.tex | 2 +- docs/manuals/fr/misc/internaldb.tex | 76 + docs/manuals/fr/misc/misc.kilepr | 9 + docs/manuals/fr/misc/misc.tex | 1 + docs/manuals/fr/problems/Makefile.in | 19 +- docs/manuals/fr/problems/faq.tex | 2 +- docs/manuals/fr/problems/firewalls.tex | 2 +- .../problems/problems.kilepr} | 52 +- docs/manuals/fr/problems/problems.tex | 17 +- docs/manuals/fr/problems/tapetesting.tex | 41 +- docs/manuals/fr/problems/tips.tex | 2 +- docs/manuals/fr/utility/Makefile.in | 20 +- docs/manuals/fr/utility/bimagemgr-chapter.tex | 6 +- docs/manuals/fr/utility/progs.tex | 128 +- docs/manuals/fr/utility/rpm-faq.tex | 79 +- docs/manuals/fr/utility/utility.kilepr | 70 + docs/manuals/fr/utility/utility.tex | 17 +- 486 files changed, 73236 insertions(+), 18966 deletions(-) create mode 100644 docs/manuals/de/developers/coverpage.tex rename docs/manuals/de/{catalog => developers}/do_echo (100%) create mode 100644 docs/manuals/de/developers/git.tex create mode 100644 docs/manuals/de/developers/gui-interface.tex rename docs/manuals/{es/concepts => de/developers}/pluginAPI.tex (100%) create mode 100644 docs/manuals/de/developers/regression.tex create mode 100644 docs/manuals/de/main.tex rename docs/manuals/{fr/install => de/main}/Makefile.in (82%) rename docs/manuals/{es/concepts => de/main}/STYLE (99%) rename docs/manuals/{es/concepts => de/main}/ansi-labels.tex (100%) rename docs/manuals/de/{install => main}/autochangerres.tex (100%) rename docs/manuals/{es/concepts => de/main}/autochangers.tex (100%) rename docs/manuals/{es/concepts => de/main}/bootstrap.tex (100%) rename docs/manuals/{es/concepts => de/main}/bugs.tex (100%) rename docs/manuals/{es/catalog => de/main}/catmaintenance.tex (95%) rename docs/manuals/de/{catalog => main}/check_tex.pl (100%) rename docs/manuals/{es/install => de/main}/configure.tex (97%) rename docs/manuals/{es/install => de/main}/consoleconf.tex (100%) create mode 100644 docs/manuals/de/main/coverpage.tex rename docs/manuals/{es/install => de/main}/critical.tex (100%) rename docs/manuals/{es/concepts => de/main}/dataencryption.tex (100%) rename docs/manuals/{es/install => de/main}/dirdconf.tex (97%) rename docs/manuals/{es/concepts => de/main}/disk.tex (100%) rename docs/manuals/de/{concepts => main}/do_echo (100%) rename docs/manuals/{es/catalog => de/main}/fdl.tex (100%) rename docs/manuals/{es/install => de/main}/filedconf.tex (99%) rename docs/manuals/{es/install => de/main}/fileset.tex (93%) rename docs/manuals/de/{catalog => main}/fix_tex.pl (100%) create mode 100644 docs/manuals/de/main/general.tex rename docs/manuals/{es/concepts => de/main}/gpl.tex (100%) rename docs/manuals/de/{catalog => main}/index.perl (100%) rename docs/manuals/{es/install/installation.tex => de/main/install.tex} (96%) rename docs/manuals/de/{catalog => main}/latex2html-init.pl (100%) rename docs/manuals/{es/concepts => de/main}/lesser.tex (100%) rename docs/manuals/{es/concepts => de/main}/license.tex (100%) rename docs/manuals/{es/concepts/concepts.kilepr => de/main/main.kilepr} (92%) rename docs/manuals/{es/concepts/concepts.tex => de/main/main.tex} (60%) rename docs/manuals/{es/install => de/main}/messagesres.tex (94%) rename docs/manuals/{es/concepts => de/main}/migration.tex (93%) rename docs/manuals/de/{install => main}/monitorconf.tex (100%) rename docs/manuals/de/{concepts => main}/mtx-changer.txt (100%) rename docs/manuals/{es/catalog => de/main}/mysql.tex (96%) rename docs/manuals/{es/concepts => de/main}/newfeatures.tex (94%) rename docs/manuals/de/{concepts => main}/pools.tex (100%) rename docs/manuals/{es/catalog => de/main}/postgresql.tex (89%) rename docs/manuals/{es/install => de/main}/quickstart.tex (100%) rename docs/manuals/{es/concepts => de/main}/recycling.tex (100%) create mode 100644 docs/manuals/de/main/requirements.tex rename docs/manuals/{es/concepts => de/main}/rescue.tex (100%) rename docs/manuals/{es/concepts => de/main}/restore.tex (100%) rename docs/manuals/de/{install => main}/security.tex (100%) rename docs/manuals/{es/concepts => de/main}/spooling.tex (98%) rename docs/manuals/{es/catalog => de/main}/sqlite.tex (100%) create mode 100644 docs/manuals/de/main/state.tex rename docs/manuals/{es/concepts => de/main}/statistics.tex (100%) rename docs/manuals/{es/install => de/main}/storedconf.tex (89%) rename docs/manuals/de/{concepts => main}/strategies.tex (100%) rename docs/manuals/de/{concepts => main}/supportedchangers.tex (100%) create mode 100644 docs/manuals/de/main/supporteddrives.tex create mode 100644 docs/manuals/de/main/supportedoses.tex rename docs/manuals/de/{concepts => main}/thanks.tex (100%) rename docs/manuals/de/{concepts => main}/tls.tex (100%) rename docs/manuals/de/{catalog => main}/translate_images.pl (100%) create mode 100644 docs/manuals/de/main/tutorial.tex rename docs/manuals/{es/concepts => de/main}/verify.tex (100%) rename docs/manuals/{es/concepts => de/main}/win32.tex (100%) rename docs/manuals/{es/catalog => de/misc}/internaldb.tex (100%) rename docs/manuals/de/{ => old}/catalog/Makefile.in (100%) rename docs/manuals/de/{ => old}/catalog/catalog.css (100%) rename docs/manuals/de/{ => old}/catalog/catalog.kilepr (100%) rename docs/manuals/de/{ => old}/catalog/catalog.tex (100%) rename docs/manuals/de/{ => old}/catalog/catmaintenance.tex (100%) rename docs/manuals/de/{concepts => old/catalog}/check_tex.pl (100%) rename docs/manuals/de/{install => old/catalog}/do_echo (100%) rename docs/manuals/de/{ => old}/catalog/fdl.tex (100%) rename docs/manuals/de/{concepts => old/catalog}/fix_tex.pl (100%) rename docs/manuals/de/{concepts => old/catalog}/index.perl (100%) rename docs/manuals/de/{ => old}/catalog/internaldb.tex (100%) rename docs/manuals/de/{concepts => old/catalog}/latex2html-init.pl (100%) rename docs/manuals/de/{ => old}/catalog/mysql.tex (100%) rename docs/manuals/de/{ => old}/catalog/postgresql.tex (100%) rename docs/manuals/de/{ => old}/catalog/setup.sm (100%) rename docs/manuals/de/{ => old}/catalog/sqlite.tex (100%) rename docs/manuals/de/{concepts => old/catalog}/translate_images.pl (100%) rename docs/manuals/de/{ => old}/concepts/Makefile.in (100%) rename docs/manuals/de/{ => old}/concepts/STYLE (100%) rename docs/manuals/de/{ => old}/concepts/ansi-labels.tex (100%) rename docs/manuals/de/{ => old}/concepts/autochangerres.tex (100%) rename docs/manuals/de/{ => old}/concepts/autochangers.tex (100%) rename docs/manuals/de/{ => old}/concepts/bootstrap.tex (100%) rename docs/manuals/de/{ => old}/concepts/bugs.tex (100%) rename docs/manuals/de/{install => old/concepts}/check_tex.pl (100%) rename docs/manuals/de/{ => old}/concepts/concepts.kilepr (100%) rename docs/manuals/de/{ => old}/concepts/concepts.tex (100%) rename docs/manuals/de/{ => old}/concepts/dataencryption.tex (100%) rename docs/manuals/de/{ => old}/concepts/disk.tex (100%) rename docs/manuals/{es/catalog => de/old/concepts}/do_echo (100%) rename docs/manuals/de/{ => old}/concepts/dvd.tex (100%) rename docs/manuals/de/{ => old}/concepts/fdl.tex (100%) rename docs/manuals/de/{install => old/concepts}/fix_tex.pl (100%) rename docs/manuals/de/{ => old}/concepts/general.tex (100%) rename docs/manuals/de/{ => old}/concepts/gpl.tex (100%) rename docs/manuals/de/{install => old/concepts}/index.perl (100%) rename docs/manuals/de/{install => old/concepts}/latex2html-init.pl (100%) rename docs/manuals/de/{ => old}/concepts/lesser.tex (100%) rename docs/manuals/de/{ => old}/concepts/license.tex (100%) rename docs/manuals/de/{ => old}/concepts/migration.tex (100%) rename docs/manuals/{es => de/old}/concepts/mtx-changer.txt (100%) rename docs/manuals/de/{ => old}/concepts/newfeatures.tex (100%) rename docs/manuals/{es => de/old}/concepts/pools.tex (100%) rename docs/manuals/de/{ => old}/concepts/projects.tex (100%) rename docs/manuals/de/{ => old}/concepts/python.tex (100%) rename docs/manuals/de/{ => old}/concepts/recycling.tex (100%) rename docs/manuals/de/{ => old}/concepts/requirements.tex (100%) rename docs/manuals/de/{ => old}/concepts/rescue.tex (100%) rename docs/manuals/de/{ => old}/concepts/restore.tex (100%) rename docs/manuals/de/{ => old}/concepts/setup.sm (100%) rename docs/manuals/de/{ => old}/concepts/spooling.tex (100%) rename docs/manuals/de/{ => old}/concepts/state.tex (100%) rename docs/manuals/de/{ => old}/concepts/statistics.tex (100%) rename docs/manuals/{es => de/old}/concepts/strategies.tex (100%) rename docs/manuals/de/{ => old}/concepts/stunnel.tex (100%) rename docs/manuals/{es => de/old}/concepts/supportedchangers.tex (100%) rename docs/manuals/de/{ => old}/concepts/supporteddrives.tex (100%) rename docs/manuals/de/{ => old}/concepts/supportedoses.tex (100%) rename docs/manuals/{es => de/old}/concepts/thanks.tex (100%) rename docs/manuals/{es => de/old}/concepts/tls.tex (100%) rename docs/manuals/de/{install => old/concepts}/translate_images.pl (100%) rename docs/manuals/de/{ => old}/concepts/tutorial.tex (100%) rename docs/manuals/de/{ => old}/concepts/uploaddoc (100%) rename docs/manuals/de/{ => old}/concepts/vars.tex (100%) rename docs/manuals/de/{ => old}/concepts/verify.tex (100%) rename docs/manuals/de/{ => old}/concepts/win32.tex (100%) rename docs/manuals/{es/console/Makefile => de/old/console/Makefile.in} (96%) create mode 100644 docs/manuals/de/old/console/bconsole.tex rename docs/manuals/{es/catalog => de/old/console}/check_tex.pl (100%) rename docs/manuals/de/{install/install.css => old/console/console.css} (100%) create mode 100644 docs/manuals/de/old/console/console.kilepr rename docs/manuals/{fr/install/install.tex => de/old/console/console.tex} (55%) rename docs/manuals/{es/concepts => de/old/console}/do_echo (100%) create mode 100644 docs/manuals/de/old/console/fdl.tex rename docs/manuals/{es/catalog => de/old/console}/fix_tex.pl (100%) rename docs/manuals/{es/catalog => de/old/console}/index.perl (100%) rename docs/manuals/{es/catalog => de/old/console}/latex2html-init.pl (100%) rename docs/manuals/de/{install => old/console}/setup.sm (100%) rename docs/manuals/{es/catalog => de/old/console}/translate_images.pl (100%) rename docs/manuals/{es/developers/Makefile => de/old/developers/Makefile.in} (94%) create mode 100644 docs/manuals/de/old/developers/catalog.tex rename docs/manuals/{es/concepts => de/old/developers}/check_tex.pl (100%) create mode 100644 docs/manuals/de/old/developers/daemonprotocol.tex rename docs/manuals/{es/catalog/catalog.css => de/old/developers/developers.css} (100%) rename docs/manuals/{es/install/install.kilepr => de/old/developers/developers.kilepr} (59%) rename docs/manuals/{es/install/install.tex => de/old/developers/developers.tex} (69%) create mode 100644 docs/manuals/de/old/developers/director.tex create mode 100644 docs/manuals/de/old/developers/fdl.tex create mode 100644 docs/manuals/de/old/developers/file.tex rename docs/manuals/{es/concepts => de/old/developers}/fix_tex.pl (100%) create mode 100644 docs/manuals/de/old/developers/generaldevel.tex rename docs/manuals/{es/concepts => de/old/developers}/index.perl (100%) rename docs/manuals/{es/concepts => de/old/developers}/latex2html-init.pl (100%) create mode 100644 docs/manuals/de/old/developers/md5.tex create mode 100644 docs/manuals/de/old/developers/mediaformat.tex create mode 100644 docs/manuals/de/old/developers/mempool.tex create mode 100644 docs/manuals/de/old/developers/netprotocol.tex create mode 100644 docs/manuals/de/old/developers/platformsupport.tex create mode 100644 docs/manuals/de/old/developers/porting.tex rename docs/manuals/{es/catalog => de/old/developers}/setup.sm (100%) create mode 100644 docs/manuals/de/old/developers/smartall.tex create mode 100644 docs/manuals/de/old/developers/storage.tex create mode 100644 docs/manuals/de/old/developers/tls-techdoc.tex rename docs/manuals/{es/concepts => de/old/developers}/translate_images.pl (100%) rename docs/manuals/de/{ => old}/install/Makefile.in (100%) rename docs/manuals/de/{ => old}/install/Makefile.save (100%) rename docs/manuals/{es/concepts => de/old/install}/autochangerres.tex (100%) rename docs/manuals/{es => de/old}/install/check_tex.pl (100%) rename docs/manuals/de/{ => old}/install/configure.tex (100%) rename docs/manuals/de/{ => old}/install/consoleconf.tex (100%) rename docs/manuals/de/{ => old}/install/critical.tex (100%) rename docs/manuals/de/{ => old}/install/dirdconf.tex (100%) rename docs/manuals/{es => de/old}/install/do_echo (100%) rename docs/manuals/de/{ => old}/install/filedconf.tex (100%) rename docs/manuals/de/{ => old}/install/fileset.tex (100%) rename docs/manuals/{es => de/old}/install/fix_tex.pl (100%) rename docs/manuals/{es => de/old}/install/index.perl (100%) rename docs/manuals/{es => de/old}/install/install.css (100%) rename docs/manuals/de/{ => old}/install/install.kilepr (100%) rename docs/manuals/de/{ => old}/install/install.tex (100%) rename docs/manuals/de/{ => old}/install/installation.tex (100%) rename docs/manuals/{es => de/old}/install/latex2html-init.pl (100%) rename docs/manuals/de/{ => old}/install/messagesres.tex (100%) rename docs/manuals/{es => de/old}/install/monitorconf.tex (100%) rename docs/manuals/de/{ => old}/install/quickstart.tex (100%) rename docs/manuals/{es => de/old}/install/security.tex (100%) rename docs/manuals/{es/concepts => de/old/install}/setup.sm (100%) rename docs/manuals/de/{ => old}/install/storedconf.tex (100%) rename docs/manuals/{es => de/old}/install/translate_images.pl (100%) rename docs/manuals/{fr/catalog => de/old/misc}/Makefile.in (89%) create mode 100644 docs/manuals/de/old/misc/coverpage.tex rename docs/manuals/{fr/catalog => de/old/misc}/do_echo (100%) rename docs/manuals/{fr/concepts => de/old/misc}/dvd.tex (97%) rename docs/manuals/{es/concepts => de/old/misc}/fdl.tex (100%) rename docs/manuals/{fr/concepts => de/old/misc}/gpl.tex (100%) rename docs/manuals/{fr/catalog => de/old/misc}/latex2html-init.pl (100%) rename docs/manuals/{fr/concepts => de/old/misc}/lesser.tex (100%) rename docs/manuals/{fr/concepts => de/old/misc}/license.tex (84%) create mode 100644 docs/manuals/de/old/misc/misc.kilepr create mode 100644 docs/manuals/de/old/misc/misc.tex rename docs/manuals/{es/concepts => de/old/misc}/projects.tex (100%) rename docs/manuals/{es/concepts => de/old/misc}/python.tex (99%) rename docs/manuals/{es/concepts => de/old/misc}/stunnel.tex (100%) rename docs/manuals/{fr/catalog => de/old/misc}/translate_images.pl (100%) rename docs/manuals/{fr/concepts => de/old/misc}/vars.tex (98%) rename docs/manuals/{es/problems/Makefile => de/old/problems/Makefile.in} (96%) rename docs/manuals/{fr/catalog => de/old/problems}/check_tex.pl (100%) rename docs/manuals/{fr/concepts => de/old/problems}/do_echo (100%) create mode 100644 docs/manuals/de/old/problems/faq.tex rename docs/manuals/{fr/catalog => de/old/problems}/fdl.tex (100%) create mode 100644 docs/manuals/de/old/problems/firewalls.tex rename docs/manuals/{fr/catalog => de/old/problems}/fix_tex.pl (100%) rename docs/manuals/{fr/catalog => de/old/problems}/index.perl (100%) create mode 100644 docs/manuals/de/old/problems/kaboom.tex rename docs/manuals/{fr/concepts => de/old/problems}/latex2html-init.pl (100%) create mode 100644 docs/manuals/de/old/problems/problems.kilepr rename docs/manuals/{fr/catalog/catalog.tex => de/old/problems/problems.tex} (78%) create mode 100644 docs/manuals/de/old/problems/rpm-faq.tex rename docs/manuals/{es/install => de/old/problems}/setup.sm (100%) create mode 100644 docs/manuals/de/old/problems/tapetesting.tex create mode 100644 docs/manuals/de/old/problems/tips.tex rename docs/manuals/{fr/concepts => de/old/problems}/translate_images.pl (100%) rename docs/manuals/{es/utility/Makefile => de/old/utility/Makefile.in} (95%) create mode 100644 docs/manuals/de/old/utility/bimagemgr-chapter.tex rename docs/manuals/{fr/concepts => de/old/utility}/check_tex.pl (100%) rename docs/manuals/{fr/install => de/old/utility}/do_echo (100%) rename docs/manuals/{fr/concepts => de/old/utility}/fdl.tex (100%) rename docs/manuals/{fr/concepts => de/old/utility}/fix_tex.pl (100%) rename docs/manuals/{fr/concepts => de/old/utility}/index.perl (100%) rename docs/manuals/{fr/install => de/old/utility}/latex2html-init.pl (100%) create mode 100644 docs/manuals/de/old/utility/progs.tex create mode 100644 docs/manuals/de/old/utility/rpm-faq.tex rename docs/manuals/{fr/catalog => de/old/utility}/setup.sm (100%) rename docs/manuals/{fr/install => de/old/utility}/translate_images.pl (100%) create mode 100644 docs/manuals/de/old/utility/utility.kilepr rename docs/manuals/{es/catalog/catalog.tex => de/old/utility/utility.tex} (92%) delete mode 100644 docs/manuals/es/catalog/Makefile delete mode 100644 docs/manuals/es/catalog/Makefile.in delete mode 100644 docs/manuals/es/concepts/Makefile delete mode 100644 docs/manuals/es/concepts/Makefile.in delete mode 100644 docs/manuals/es/concepts/bimagemgr.bix delete mode 100644 docs/manuals/es/concepts/dvd.tex delete mode 100644 docs/manuals/es/concepts/general.tex delete mode 100644 docs/manuals/es/concepts/requirements.tex delete mode 100644 docs/manuals/es/concepts/state.tex delete mode 100644 docs/manuals/es/concepts/supporteddrives.tex delete mode 100644 docs/manuals/es/concepts/supportedoses.tex delete mode 100644 docs/manuals/es/concepts/tutorial.tex delete mode 100755 docs/manuals/es/concepts/uploaddoc delete mode 100644 docs/manuals/es/concepts/vars.tex create mode 100644 docs/manuals/es/developers/coverpage.tex create mode 100644 docs/manuals/es/developers/do_echo create mode 100644 docs/manuals/es/developers/git.tex create mode 100644 docs/manuals/es/developers/gui-interface.tex create mode 100644 docs/manuals/es/developers/pluginAPI.tex create mode 100644 docs/manuals/es/developers/regression.tex delete mode 100644 docs/manuals/es/install/Makefile.save create mode 100644 docs/manuals/es/main.tex rename docs/manuals/es/{install => main}/Makefile.in (81%) rename docs/manuals/{fr/concepts => es/main}/STYLE (99%) rename docs/manuals/{fr/concepts => es/main}/ansi-labels.tex (100%) rename docs/manuals/es/{install => main}/autochangerres.tex (100%) create mode 100644 docs/manuals/es/main/autochangers.tex rename docs/manuals/{fr/concepts => es/main}/bootstrap.tex (98%) rename docs/manuals/{fr/concepts => es/main}/bugs.tex (100%) rename docs/manuals/{fr/catalog => es/main}/catmaintenance.tex (93%) rename docs/manuals/{fr/install => es/main}/check_tex.pl (100%) rename docs/manuals/{fr/install => es/main}/configure.tex (96%) rename docs/manuals/{fr/install => es/main}/consoleconf.tex (100%) create mode 100644 docs/manuals/es/main/coverpage.tex rename docs/manuals/{fr/install => es/main}/critical.tex (99%) rename docs/manuals/{fr/concepts => es/main}/dataencryption.tex (96%) rename docs/manuals/{fr/install => es/main}/dirdconf.tex (91%) rename docs/manuals/{fr/concepts => es/main}/disk.tex (100%) create mode 100644 docs/manuals/es/main/do_echo create mode 100644 docs/manuals/es/main/fdl.tex rename docs/manuals/{fr/install => es/main}/filedconf.tex (95%) rename docs/manuals/{fr/install => es/main}/fileset.tex (89%) rename docs/manuals/{fr/install => es/main}/fix_tex.pl (100%) create mode 100644 docs/manuals/es/main/general.tex create mode 100644 docs/manuals/es/main/gpl.tex rename docs/manuals/{fr/install => es/main}/index.perl (100%) create mode 100644 docs/manuals/es/main/install.tex create mode 100644 docs/manuals/es/main/latex2html-init.pl create mode 100644 docs/manuals/es/main/lesser.tex create mode 100644 docs/manuals/es/main/license.tex create mode 100644 docs/manuals/es/main/main.kilepr rename docs/manuals/{fr/concepts/concepts.tex => es/main/main.tex} (56%) create mode 100644 docs/manuals/es/main/messagesres.tex rename docs/manuals/{fr/concepts => es/main}/migration.tex (88%) rename docs/manuals/{fr/install => es/main}/monitorconf.tex (100%) rename docs/manuals/{fr/concepts => es/main}/mtx-changer.txt (100%) rename docs/manuals/{fr/catalog => es/main}/mysql.tex (96%) create mode 100644 docs/manuals/es/main/newfeatures.tex rename docs/manuals/{fr/concepts => es/main}/pools.tex (100%) create mode 100644 docs/manuals/es/main/postgresql.tex create mode 100644 docs/manuals/es/main/quickstart.tex rename docs/manuals/{fr/concepts => es/main}/recycling.tex (97%) create mode 100644 docs/manuals/es/main/requirements.tex create mode 100644 docs/manuals/es/main/rescue.tex create mode 100644 docs/manuals/es/main/restore.tex create mode 100644 docs/manuals/es/main/security.tex rename docs/manuals/{fr/concepts => es/main}/spooling.tex (92%) rename docs/manuals/{fr/catalog => es/main}/sqlite.tex (100%) create mode 100644 docs/manuals/es/main/state.tex create mode 100644 docs/manuals/es/main/statistics.tex create mode 100644 docs/manuals/es/main/storedconf.tex rename docs/manuals/{fr/concepts => es/main}/strategies.tex (100%) rename docs/manuals/{fr/concepts => es/main}/supportedchangers.tex (59%) create mode 100644 docs/manuals/es/main/supporteddrives.tex create mode 100644 docs/manuals/es/main/supportedoses.tex rename docs/manuals/{fr/concepts => es/main}/thanks.tex (100%) rename docs/manuals/{fr/concepts => es/main}/tls.tex (100%) create mode 100755 docs/manuals/es/main/translate_images.pl create mode 100644 docs/manuals/es/main/tutorial.tex rename docs/manuals/{fr/concepts => es/main}/verify.tex (100%) rename docs/manuals/{fr/concepts => es/main}/win32.tex (96%) rename docs/manuals/{fr/catalog => es/misc}/internaldb.tex (100%) delete mode 100644 docs/manuals/fr/catalog/catalog.css delete mode 100644 docs/manuals/fr/catalog/postgresql.tex delete mode 100644 docs/manuals/fr/concepts/Makefile.in delete mode 100644 docs/manuals/fr/concepts/autochangerres.tex delete mode 100644 docs/manuals/fr/concepts/autochangers.tex delete mode 100644 docs/manuals/fr/concepts/bimagemgr.bix delete mode 100644 docs/manuals/fr/concepts/general.tex delete mode 100644 docs/manuals/fr/concepts/projects.tex delete mode 100644 docs/manuals/fr/concepts/python.tex delete mode 100644 docs/manuals/fr/concepts/requirements.tex delete mode 100644 docs/manuals/fr/concepts/restore.tex delete mode 100644 docs/manuals/fr/concepts/setup.sm delete mode 100644 docs/manuals/fr/concepts/state.tex delete mode 100644 docs/manuals/fr/concepts/stunnel.tex delete mode 100644 docs/manuals/fr/concepts/supporteddrives.tex delete mode 100644 docs/manuals/fr/concepts/supportedoses.tex delete mode 100644 docs/manuals/fr/concepts/tutorial.tex delete mode 100755 docs/manuals/fr/concepts/uploaddoc create mode 100644 docs/manuals/fr/console/console.kilepr create mode 100644 docs/manuals/fr/developers/coverpage.tex rename docs/manuals/{es => fr/developers}/developers.kilepr (64%) create mode 100644 docs/manuals/fr/developers/do_echo create mode 100644 docs/manuals/fr/developers/git.tex create mode 100644 docs/manuals/fr/developers/gui-interface.tex create mode 100644 docs/manuals/fr/developers/pluginAPI.tex create mode 100644 docs/manuals/fr/developers/regression.tex delete mode 100644 docs/manuals/fr/install/Makefile.save delete mode 100644 docs/manuals/fr/install/install.css delete mode 100644 docs/manuals/fr/install/installation.tex delete mode 100644 docs/manuals/fr/install/messagesres.tex delete mode 100644 docs/manuals/fr/install/quickstart.tex delete mode 100644 docs/manuals/fr/install/security.tex delete mode 100644 docs/manuals/fr/install/setup.sm delete mode 100644 docs/manuals/fr/install/storedconf.tex create mode 100644 docs/manuals/fr/main.tex rename docs/manuals/{es/install/Makefile => fr/main/Makefile.in} (81%) create mode 100644 docs/manuals/fr/main/STYLE create mode 100644 docs/manuals/fr/main/ansi-labels.tex rename docs/manuals/fr/{install => main}/autochangerres.tex (100%) create mode 100644 docs/manuals/fr/main/autochangers.tex create mode 100644 docs/manuals/fr/main/bootstrap.tex create mode 100644 docs/manuals/fr/main/bugs.tex create mode 100644 docs/manuals/fr/main/catmaintenance.tex create mode 100755 docs/manuals/fr/main/check_tex.pl create mode 100644 docs/manuals/fr/main/configure.tex create mode 100644 docs/manuals/fr/main/consoleconf.tex create mode 100644 docs/manuals/fr/main/coverpage.tex create mode 100644 docs/manuals/fr/main/critical.tex create mode 100644 docs/manuals/fr/main/dataencryption.tex create mode 100644 docs/manuals/fr/main/dirdconf.tex create mode 100644 docs/manuals/fr/main/disk.tex create mode 100644 docs/manuals/fr/main/do_echo create mode 100644 docs/manuals/fr/main/fdl.tex create mode 100644 docs/manuals/fr/main/filedconf.tex create mode 100644 docs/manuals/fr/main/fileset.tex create mode 100755 docs/manuals/fr/main/fix_tex.pl create mode 100644 docs/manuals/fr/main/general.tex create mode 100644 docs/manuals/fr/main/gpl.tex create mode 100644 docs/manuals/fr/main/index.perl create mode 100644 docs/manuals/fr/main/install.tex create mode 100644 docs/manuals/fr/main/latex2html-init.pl create mode 100644 docs/manuals/fr/main/lesser.tex create mode 100644 docs/manuals/fr/main/license.tex create mode 100644 docs/manuals/fr/main/main.kilepr create mode 100644 docs/manuals/fr/main/main.tex create mode 100644 docs/manuals/fr/main/messagesres.tex create mode 100644 docs/manuals/fr/main/migration.tex create mode 100644 docs/manuals/fr/main/monitorconf.tex create mode 100644 docs/manuals/fr/main/mtx-changer.txt create mode 100644 docs/manuals/fr/main/mysql.tex create mode 100644 docs/manuals/fr/main/newfeatures.tex create mode 100644 docs/manuals/fr/main/pools.tex create mode 100644 docs/manuals/fr/main/postgresql.tex create mode 100644 docs/manuals/fr/main/quickstart.tex create mode 100644 docs/manuals/fr/main/recycling.tex create mode 100644 docs/manuals/fr/main/requirements.tex create mode 100644 docs/manuals/fr/main/rescue.tex create mode 100644 docs/manuals/fr/main/restore.tex create mode 100644 docs/manuals/fr/main/security.tex create mode 100644 docs/manuals/fr/main/spooling.tex create mode 100644 docs/manuals/fr/main/sqlite.tex create mode 100644 docs/manuals/fr/main/state.tex create mode 100644 docs/manuals/fr/main/statistics.tex create mode 100644 docs/manuals/fr/main/storedconf.tex create mode 100644 docs/manuals/fr/main/strategies.tex create mode 100644 docs/manuals/fr/main/supportedchangers.tex create mode 100644 docs/manuals/fr/main/supporteddrives.tex create mode 100644 docs/manuals/fr/main/supportedoses.tex create mode 100644 docs/manuals/fr/main/thanks.tex create mode 100644 docs/manuals/fr/main/tls.tex create mode 100755 docs/manuals/fr/main/translate_images.pl create mode 100644 docs/manuals/fr/main/tutorial.tex create mode 100644 docs/manuals/fr/main/verify.tex create mode 100644 docs/manuals/fr/main/win32.tex create mode 100644 docs/manuals/fr/misc/internaldb.tex rename docs/manuals/{es/catalog/catalog.kilepr => fr/problems/problems.kilepr} (71%) create mode 100644 docs/manuals/fr/utility/utility.kilepr diff --git a/docs/manuals/de/console/Makefile.in b/docs/manuals/de/console/Makefile.in index 9af2083b..f932af49 100644 --- a/docs/manuals/de/console/Makefile.in +++ b/docs/manuals/de/console/Makefile.in @@ -37,6 +37,7 @@ IMAGES=../../../images DOC=console +MAINDOC=Bacula_Console_Operators_Gu.html first_rule: all @@ -77,22 +78,28 @@ html: fi) latex2html -white -no_subdir -split 0 -toc_stars -white -notransparent \ -init_file latex2html-init.pl ${DOC} >tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}.html + @(if [ -f imagename_translations ] ; then \ + ./translate_images.pl --from_meaningful_names ${DOC}.html; \ + fi) + (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} .; done) @echo "Done making html" web: @echo "Making web" + @rm -rf ${DOC} @mkdir -p ${DOC} @cp -fp ${IMAGES}/*.eps . @rm -f next.eps next.png prev.eps prev.png up.eps up.png - @cp -fp ${IMAGES}/*.eps ${DOC}/ - @cp -fp ${IMAGES}/*.eps ${IMAGES}/*.png ${DOC}/ @rm -f ${DOC}/xp-*.png @rm -f ${DOC}/next.eps ${DOC}/next.png ${DOC}/prev.eps ${DOC}/prev.png ${DOC}/up.eps ${DOC}/up.png - @rm -rf ${DOC}/*.html latex2html -split 3 -local_icons -t "Bacula Console and Operators Guide" -long_titles 4 \ - -toc_stars -contents_in_nav -init_file latex2html-init.pl -white -notransparent ${DOC} >tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}/Bacula_Consol*.html + -toc_stars -contents_in_nav -init_file latex2html-init.pl \ + -no_antialias -no_antialias_text \ + -white -notransparent ${DOC} >tex.out 2>&1 + @(if [ -f imagename_translations ] ; then \ + ./translate_images.pl --from_meaningful_names ${DOC}.html; \ + fi) + @cp -f ${DOC}/${MAINDOC} ${DOC}/index.html @echo "Done making web" show: xdvi ${DOC} diff --git a/docs/manuals/de/console/bconsole.tex b/docs/manuals/de/console/bconsole.tex index 87c7e602..32774003 100644 --- a/docs/manuals/de/console/bconsole.tex +++ b/docs/manuals/de/console/bconsole.tex @@ -1,96 +1,97 @@ %% %% -\chapter{Die Bacula Console} +\chapter{Bacula Console} \label{_ConsoleChapter} \index[general]{Console!Bacula} \index[general]{Bacula Console} \index[general]{Console!Bacula} \index[general]{Bacula Console} -Die {\bf Bacula Console} (manchmal auch die Benutzer-Schnittstelle genannt) -ist ein Programm, dass es dem Anwender oder System Administrator erlaubt, -den Bacula-Director-Dienst im laufenden Betrieb zu bedienen. - -Momentan gibt es zwei Versionen des Console-Programms: eine Shell- (TTY) -und eine GNOME GUI-Version. Beide erlauben es dem Administrator oder -autorisierten Benutzern Bacula zu steuern. Sie k\"{o}nnen sich zum Beispiel -den Status eines bestimmten Jobs oder den Inhalt des Katalogs anzeigen lassen, -sowie bestimmte Aktionen mit Tapes und Autochangern durchf\"{u}hren. - -Zus\"{a}tzlich gibt es noch die bwx-Console, die auf wxWidgets aufbaut -und eine M\"{o}glichkeit bietet, den Wiederherstellungsproze{\ss} graphisch zu steuern. -Die bwx-Console befindet sich in einem fr\"{u}hen Entwicklungsstadium und -wurde leider seit einiger Zeit nicht weiterentwickelt. (Trotzdem kann sie sehr hilfreich sein.) - -Da sich alle Bacula-Consolen \"{u}ber das Netzwerk mit dem Director-Dienst verbinden, -ist es nicht notwendig, dass sie auf dem selben Computer laufen. - -Ein gewisses, minimales Grundwissen \"{u}ber die Console ist schon dann notwendig, -wenn Bacula auf mehr als einem Tape schreiben soll. Bacula wird n\"{a}mlich nach einem -leeren Band fragen, falls keines mehr verf\"{u}gbar ist, und erst nach dem mounten -eines neuen Tapes mittels der Console, wird Bacula weiterarbeiten k\"{o}nnen. - -\section{Console Konfiguration} -\index[general]{Console Konfiguration} -\index[general]{Konfiguration!Console} -\index[general]{Console Konfiguration} -\index[general]{Konfiguration!Console} - -Wenn Sie die Bacula-Console starten, liest sie ihre Standard-Konfigurations-Datei -namens {\bf bconsole.conf}, bzw. {\bf bgnome-console.conf} f\"{u}r die GNOME-Console, ein. -Mittels der Kommandozeilen-Option {\bf {-}c} k\"{o}nnen Sie aber auch eine eigene Konfigurations- -Datei angeben. Im einfachsten Fall enth\"{a}llt diese Datei nur den Namen und die -Adresse des Director-Dienstes sowie das Passwort, dass f\"{u}r die Verbindung zum -Director-Dienst ben\"{o}tigt wird. F\"{u}r weitere Informationen zu dieser Datei, -lesen Sie bitte das Kapitel \"{u}ber die -\ilink{Console-Konfiguration-Datei}{ConsoleConfChapter} in diesem Handbuch. - -\section{Benutzung des Console-Programms} -\index[general]{Benutzung des Console-Programms} -\index[general]{Programm!Benutzung des Console-} -\index[general]{Benutzung des Console-Programms} -\index[general]{Programm!Benutzung des Console-} - -Das Console-Programm kann mit den folgenden Optionen gestartet werden: +The {\bf Bacula Console} (sometimes called the User Agent) is a program that +allows the user or the System Administrator, to interact with the Bacula +Director daemon while the daemon is running. + +The current Bacula Console comes in two versions: a shell interface (TTY +style), and a GNOME GUI interface. Both permit the administrator or authorized +users to interact with Bacula. You can determine the status of a particular +job, examine the contents of the Catalog as well as perform certain tape +manipulations with the Console program. + +In addition, there is a bwx-console built with wxWidgets that allows a graphic +restore of files. As of version 1.34.1 it is in an early stage of development, +but it already is quite useful. Unfortunately, it has not been enhanced for +some time now. + +Since the Console program interacts with the Director through the network, your +Console and Director programs do not necessarily need to run on the same +machine. + +In fact, a certain minimal knowledge of the Console program is needed in order +for Bacula to be able to write on more than one tape, because when Bacula +requests a new tape, it waits until the user, via the Console program, +indicates that the new tape is mounted. + +\section{Console Configuration} +\index[general]{Console Configuration} +\index[general]{Configuration!Console} +\index[general]{Console Configuration} +\index[general]{Configuration!Console} + +When the Console starts, it reads a standard Bacula configuration file +named {\bf bconsole.conf} or {\bf bgnome-console.conf} in the case of the GNOME +Console version from the current directory unless you specify the {\bf {-}c} +command line option (see below). This file allows default configuration +of the Console, and at the current time, the only Resource Record defined +is the Director resource, which gives the Console the name and address of +the Director. For more information on configuration of the Console +program, please see the \ilink{Console Configuration +File}{ConsoleConfChapter} Chapter of this document. + +\section{Running the Console Program} +\index[general]{Running the Console Program} +\index[general]{Program!Running the Console} +\index[general]{Running the Console Program} +\index[general]{Program!Running the Console} + +The console program can be run with the following options: \footnotesize \begin{verbatim} -Usage: bconsole [-s] [-c Konfigurations-Datei] [-d Debug-Level] - -c gibt die zu verwendene Konfigurations-Datei an - -dnn setzt den Debug-Level auf nn - -n kein conio - -s keine Signale (*) - -t test - liest die Konfigurations-Datei und beendet sich dann - -? gibt diese Hilfe aus. +Usage: bconsole [-s] [-c config_file] [-d debug_level] + -c set configuration file to file + -dnn set debug level to nn + -n no conio + -s no signals + -u set command execution timeout to seconds + -t test - read configuration and exit + -? print this message. \end{verbatim} \normalsize -(*) \elink{Signale}{http://de.wikipedia.org/wiki/Signal\_\%28Computer\%29} -Nach dem Start des Console-Programms zeigt es durch sein Prompt (*) an, -dass es auf Benutzereingaben wartet. (in der GNOME-Console gibt es kein Prompt, -geben Sie die Befehle bitte einfach in der Textbox unten im Fenster ein.) -Sie k\"{o}nnen in jeder Console einfach nur das Kommando eingeben, wenn weitere Parameter -erforderlich sind, wird das Programm Sie danach fragen. Alternativ k\"{o}nnen Sie -nat\"{u}rlich auch das komplette Kommando mit allen ben\"{o}tigten Parametern eingeben -und ausf\"{u}hren. Das normale Befehlsformat ist dieses: +After launching the Console program (bconsole), it will prompt you for the +next command with an asterisk (*). (Note, in the GNOME version, the prompt is +not present; you simply enter the commands you want in the command text box at +the bottom of the screen.) Generally, for all commands, you can simply enter +the command name and the Console program will prompt you for the necessary +arguments. Alternatively, in most cases, you may enter the command followed by +arguments. The general format is: \footnotesize \begin{verbatim} - [=] [=] ... + [=] [=] ... \end{verbatim} \normalsize -wobei {\bf Kommando} einer der unten aufgef\"{u}hrten Console-Befehle -und {\bf Parameter} eines der unten aufgelisteten Schl\"{u}sselw\"{o}rter ist, -dem dann meistens ein {\bf Argument} folgt. Alle Befehle k\"{o}nnen in der -k\"{u}rzesten eindeutigen Form eingegeben werden. Falls zwei Befehle mit identischen -Buchstaben anfangen, wird der ausgef\"{u}hrt, der in der Ausgabe des {\bf help}-Kommandos -am weitesten oben steht. Wenn Sie das andere Kommando ausf\"{u}hren m\"{o}chten m\"{u}ssen Sie -dementsprechend mehr Buchstaben eingeben, um es eindeutig anzugeben. Keiner der -Parameter darf abgek\"{u}rzt werden. +where {\bf command} is one of the commands listed below; {\bf keyword} is one +of the keywords listed below (usually followed by an argument); and {\bf +argument} is the value. The command may be abbreviated to the shortest unique +form. If two commands have the same starting letters, the one that will be +selected is the one that appears first in the {\bf help} listing. If you want +the second command, simply spell out the full command. None of the keywords +following the command may be abbreviated. -Ein Beispiel: +For example: \footnotesize \begin{verbatim} @@ -98,7 +99,7 @@ list files jobid=23 \end{verbatim} \normalsize -zeigt alle gesicherten Dateien mit der JobID 23 an. +will list all files saved for JobId 23. Or: \footnotesize \begin{verbatim} @@ -106,368 +107,360 @@ show pools \end{verbatim} \normalsize -zeigt alle Pool-Konfigurations-Eintr\"{a}ge an. - -Die maximale L\"{a}nge der eingegebenen Befehle, mit Parametern, ist 511 Zeichen. -Falls Sie die Console \"{u}ber ein Script ansprechen, denken Sie bitte daran, -dass Sie dieses Limit nicht \"{u}berschreiten. - -\section{Beenden des Console-Programms} -\index[general]{Programm!Beenden des Console-} -\index[general]{Beenden des Console-Programms} -\index[general]{Programm!Beenden des Console-} -\index[general]{Beenden des Console-Programms} - -Normalerweise beenden Sie das Console-Programm durch die Eingabe von {\bf quit} oder {\bf exit}. -Allerdings wartet die Console bis der Director-Dienst das Kommando best\"{a}tigt. Wenn der -Director bereits ein l\"{a}nger laufendes Kommando ausf\"{u}hrt, kann es sein, dass das Beenden -der Console einen Moment dauert. Falls Sie die Console sofort verlassen wollen, k\"{o}nnen Sie -in dem Fall das Kommando {\bf .quit} verwenden. - -Momentan gibt es keinen Weg ein laufendes Kommando nach dem Starten abzubrechen (z.B. mit STRG+C). -Allerdings k\"{o}nnen Sie jederzeit, wenn die Console Sie nach einer weiteren Eingabe fragt, -das aktuelle Kommando beenden, indem Sie einen Punkt {\bf .} eingeben. Nach der Eingabe des Punktes, -werden Sie automatisch zum Hauptprompt oder bei verschachtelten Abfragen zum passenden letzten Prompt -zur\"{u}ckgeleitet. Bei einigen Eingaben, wie zum Beispiel der Frage nach einem Volume-Namen, wird -der Punkt als Eingabe gewertet und Sie haben beim n\"{a}chsten Prompt die M\"{o}glichkeit, -das Kommando abzubrechen. +will display all the Pool resource records. + +The maximum command line length is limited to 511 characters, so if you +are scripting the console, you may need to take some care to limit the +line length. + +\section{Stopping the Console Program} +\index[general]{Program!Stopping the Console} +\index[general]{Stopping the Console Program} +\index[general]{Program!Stopping the Console} +\index[general]{Stopping the Console Program} + +Normally, you simply enter {\bf quit} or {\bf exit} and the Console program +will terminate. However, it waits until the Director acknowledges the command. +If the Director is already doing a lengthy command (e.g. prune), it may take +some time. If you want to immediately terminate the Console program, enter the +{\bf .quit} command. + +There is currently no way to interrupt a Console command once issued (i.e. +Ctrl-C does not work). However, if you are at a prompt that is asking you to +select one of several possibilities and you would like to abort the command, +you can enter a period ({\bf .}), and in most cases, you will either be +returned to the main command prompt or if appropriate the previous prompt (in +the case of nested prompts). In a few places such as where it is asking for a +Volume name, the period will be taken to be the Volume name. In that case, you +will most likely be able to cancel at the next prompt. \label{keywords} -\section{Alphabetische Liste der Console-Schl\"{u}sselw\"{o}rter} -\index[general]{Schl\"{u}sselw\"{o}rter!Alphabetische Liste der Console} -\index[general]{Alphabetische Liste der Console-Schl\"{u}sselw\"{o}rter} -\index[general]{Schl\"{u}sselw\"{o}rter!Alphabetische Liste der Console} -\index[general]{Alphabetische Liste der Console-Schl\"{u}sselw\"{o}rter} -Wenn es nicht anders angegeben ist, ben\"{o}tigt jedes der folgenden Schl\"{u}sselw\"{o}rter -(Parameter der Console-Befehle) ein Argument, welches dem Schl\"{u}sselwort, -getrennt durch ein Gleichheitszeichen, folgt. -Ein Beispiel: +\section{Alphabetic List of Console Keywords} +\index[general]{Keywords!Alphabetic List of Console} +\index[general]{Alphabetic List of Console Keywords} +\index[general]{Keywords!Alphabetic List of Console} +\index[general]{Alphabetic List of Console Keywords} +Unless otherwise specified, each of the following keywords +takes an argument, which is specified after the keyword following +an equal sign. For example: + \begin{verbatim} jobid=536 \end{verbatim} -Bitte beachten Sie, dass diese Liste durch die st\"{a}ndig weitergehende -Entwicklung eventuell weder komplett, noch in der richtigen alphabetischen -Reihenfolge sein kann. +Please note, this list is incomplete as it is currently in +the process of being created and is not currently totally in +alphabetic +order ... \begin{description} +\item [restart] + Permitted on the python command, and causes the Python + interpreter to be restarted. Takes no argument. \item [all] - Parameter des status und show-Kommandos, - dadurch werden alle Komponenten oder Eintr\"{a}ge ausgew\"{a}hlt + Permitted on the status and show commands to specify all components or + resources respectively. \item [allfrompool] - Parameter des update-Kommandos, - gibt an das alle Volumes des (im Parameter pool angegebenen) Pools - aktualisiert werden sollen. + Permitted on the update command to specify that all Volumes in the + pool (specified on the command line) should be updated. \item [allfrompools] - Parameter des update-Kommandos, - gibt an das alle Volumes aller Pools aktualisiert werden sollen. + Permitted on the update command to specify that all Volumes in all + pools should be updated. \item [before] - Parameter des restore-Kommandos. + Used in the restore command. \item [bootstrap] - Parameter des restore-Kommandos. + Used in the restore command. \item [catalog] - im use-Kommando erlaubt, - um den zu benutzenden Katalog auszuw\"{a}hlen + Allowed in the use command to specify the catalog name + to be used. \item [catalogs] - Parameter des show-Kommandos. - Ben\"{o}tigt keine Argumente. + Used in the show command. Takes no arguments. \item [client | fd] \item [clients] - Parameter des show, list und llist-Kommandos, - bezeichnet alle Clients. Ben\"{o}tigt keine Argumente. + Used in the show, list, and llist commands. Takes no arguments. \item [counters] - im show-Kommando erlaubt. - Ben\"{o}tigt keine Argumente. + Used in the show command. Takes no arguments. \item [current] - Parameter des restore-Kommandos. - Ben\"{o}tigt keine Argumente. + Used in the restore command. Takes no argument. \item [days] - definiert die Anzahl der Tage, die das "`list nextvol"'-Kommando - in Betracht ziehen soll. Der Parameter days kann auch im Kommando - "`status director"' verwendet werden, um die geplanten Jobs f\"{u}r die - angegebene Anzahl Tage zu zeigen. + Used to define the number of days the "list nextvol" command + should consider when looking for jobs to be run. The days keyword + can also be used on the "status dir" command so that it will display + jobs scheduled for the number of days you want. \item [devices] - Parameter des show-Kommandos. - Ben\"{o}tigt keine Argumente. -\item [director | dir] + Used in the show command. Takes no arguments. +\item [dir | director] \item [directors] - Parameter des show-Kommandos. - Ben\"{o}tigt keine Argumente. + Used in the show command. Takes no arguments. \item [directory] - Parameter des restore-Kommandos. - Das Argument gibt das wiederherzustellende Verzeichnis an. + Used in the restore command. Its argument specifies the directory + to be restored. \item [enabled] - Dieser Parameter kann bei den Kommandos "`update volumes"' und "`update slots"' - verwendet werden. Das Argument kann yes, true, no, false, archived, 0,1 oder 2 sein. - 0 ist identisch mit no oder false, 1 mit yes oder true und 2 mit archived. - Archived Volumes werden weder benutzt noch automatisch aus dem Katalog gel\"{o}scht. - Volumes die nicht enabled sind, werden nicht f\"{u}r das Backup oder die Wiederherstellung benutzt. + This keyword can appear on the {\bf update volume} as well + as the {\bf update slots} commands, and can + allows one of the following arguments: yes, true, no, false, archived, + 0, 1, 2. Where 0 corresponds to no or false, 1 corresponds to yes or true, and + 2 corresponds to archived. Archived volumes will not be used, nor will + the Media record in the catalog be pruned. Volumes that are not enabled, + will not be used for backup or restore. \item [done] - wird im restore-Kommando benutzt. - Ben\"{o}tigt keine Argumente. + Used in the restore command. Takes no argument. \item [file] - Parameter des restore-Kommandos. + Used in the restore command. \item [files] - Parameter des list und llist-Kommandos. - Ben\"{o}tigt keine Argumente. + Used in the list and llist commands. Takes no arguments. \item [fileset] \item [filesets] - Parameter des show-Kommandos. - Ben\"{o}tigt keine Argumente. + Used in the show command. Takes no arguments. \item [help] - Parameter des show-Kommandos. - Ben\"{o}tigt keine Argumente. + Used in the show command. Takes no arguments. \item [jobs] - Parameter des show, list und llist-Kommandos. - Ben\"{o}tigt keine Argumente. + Used in the show, list and llist commands. Takes no arguments. \item [jobmedia] - Parameter des list und llist-Kommandos. - Ben\"{o}tigt keine Argumente. + Used in the list and llist commands. Takes no arguments. \item [jobtotals] - Parameter des list und llist-Kommandos. - Ben\"{o}tigt keine Argumente. + Used in the list and llist commands. Takes no arguments. \item [jobid] - Parameter des list und llist-Kommandos. - Die jobid ist die numerische Jobid, die im Job-Report angezeigt wird. - Sie ist der Index f\"{u}r die Datenbankeintr\"{a}ge des entsprechenden Jobs. - Da sie f\"{u}r alle in der Datenbank existierenden Jobs einzigartig ist, - kann sie erst wiederverwendet werden, wenn der vorherige Job mit dieser Jobid - aus der Datenbank gel\"{o}scht wurde. + The JobId is the numeric jobid that is printed in the Job + Report output. It is the index of the database record for the + given job. While it is unique for all the existing Job records + in the catalog database, the same JobId can be reused once a + Job is removed from the catalog. Probably you will refer + specific Jobs that ran using their numeric JobId. \item [job | jobname] - Parameter des list und llist-Kommandos. - Der Job oder JobName entspricht dem Namen den Sie im Job-Eintr\"{a}g - angegeben haben, somit bezieht er sich auf alle Jobs dieses Namens, - die jemals gelaufen sind und deren Eintr\"{a}ge noch im Katalog existieren. + The Job or Jobname keyword refers to the name you specified + in the Job resource, and hence it refers to any number of + Jobs that ran. It is typically useful if you want to list + all jobs of a particular name. \item [level] \item [listing] - Parameter des estimate-Kommandos. - Ben\"{o}tigt keine Argumente. + Permitted on the estimate command. Takes no argument. \item [limit] \item [messages] - Parameter des show-Kommandos. - Ben\"{o}tigt keine Argumente. + Used in the show command. Takes no arguments. \item [media] - Parameter des list und llist-Kommandos. - Ben\"{o}tigt keine Argumente. + Used in the list and llist commands. Takes no arguments. \item [nextvol | nextvolume] - Parameter des list und llist-Kommandos. - Ben\"{o}tigt keine Argumente. + Used in the list and llist commands. Takes no arguments. \item [on] - Ben\"{o}tigt keine Argumente. + Takes no keyword. \item [off] - Ben\"{o}tigt keine Argumente. + Takes no keyword. \item [pool] \item [pools] - Parameter des show, list und llist-Kommandos. - Ben\"{o}tigt keine Argumente. -\item [restart] - Parameter des python-Kommandos, - dadurch wird der python-Interpreter neu gestartet. Ben\"{o}tigt keine Argumente. + Used in the show, list, and llist commands. Takes no arguments. \item [select] - Parameter des restore-Kommandos. - Ben\"{o}tigt keine Argumente. + Used in the restore command. Takes no argument. \item [storages] - Parameter des show-Kommandos. - Ben\"{o}tigt keine Argumente. + Used in the show command. Takes no arguments. \item [schedules] - Parameter des show-Kommandos. - Ben\"{o}tigt keine Argumente. + Used in the show command. Takes no arguments. \item [sd | store | storage] \item [ujobid] - Parameter des list-Kommandos. - Die ujobid ist eine M\"{o}glichkeit einen Job eindeutig zu identifizieren. - Momentan besteht die ujobid aus dem JobNamen und der Uhrzeit wann der Job gelaufen ist. + The ujobid is a unique job identification that is printed + in the Job Report output. At the current time, it consists + of the Job name (from the Name directive for the job) appended + with the date and time the job was run. This keyword is useful + if you want to completely identify the Job instance run. \item [volume] \item [volumes] - Parameter des list und llist-Kommandos. - Ben\"{o}tigt keine Argumente. + Used in the list and llist commands. Takes no arguments. \item [where] - Parameter des restore-Kommandos. + Used in the restore command. \item [yes] - Parameter des restore-Kommandos. - Ben\"{o}tigt keine Argumente. + Used in the restore command. Takes no argument. \end{description} \label{list} -\section{Alphabetische Liste der Console-Kommandos} -\index[general]{Kommandos!Alphabetische Liste der Console-} -\index[general]{Alphabetische Liste der Console-Kommandos} -\index[general]{Kommandos!Alphabetische Liste der Console-} -\index[general]{Alphabetische Liste der Console-Kommandos} +\section{Alphabetic List of Console Commands} +\index[general]{Commands!Alphabetic List of Console} +\index[general]{Alphabetic List of Console Commands} +\index[general]{Commands!Alphabetic List of Console} +\index[general]{Alphabetic List of Console Commands} -Die folgenden Kommandos sind derzeit verf\"{u}gbar: +The following commands are currently implemented: \begin{description} \item [{add [pool=\lt{}pool-name\gt{} storage=\lt{}storage\gt{} jobid=\lt{}JobId\gt{}]} ] \index[general]{add} - Das add-Kommando wird benutzt um Volumes zu einem bestehenden Pool - hinzuzuf\"{u}gen. Dabei wird der Volume-Eintrag in der Datenbank erzeugt - und das Volume dem Pool zugeordnet. Allerdings erfolgt kein physikalischer Zugriff - auf das Volume. Nach dem hinzuf\"{u}gen zu einem Pool geht Bacula davon - aus, dass das Volume wirklich existiert und auch bereits gelabelt ist. - Dieses Kommando wird normalerweise nicht benutzt, da Bacula die Volumes - automatisch beim labeln einem Pool hinzuf\"{u}gt. Allerdings ist es hilfreich, - falls Sie ein Volume aus dem Katalog gel\"{o}scht haben und es sp\"{a}ter wieder - hinzuf\"{u}gen wollen. - - Typischerweise wird das label-Kommando anstelle des add-Kommandos benutzt, da - es au{\ss}er dem labeln des physikalischen Volumes, die identischen Schritte - wie das add-Kommando ausf\"{u}hrt. Das add-Kommando \"{a}ndert nur die Katalog-Eintr\"{a}ge - und nicht die physikalischen Volumes. Die physikalischen Volumes m\"{u}ssen - vorhanden und gelabelt sein (normalerweise mit dem label-Kommando). Trotzdem - kann das add-Kommando sinnvoll sein, wenn Sie zum Beispiel eine bestimmte Anzahl - von Volumes einem Pool hinzuf\"{u}gen wollen, wobei die Volumes erst zu einem - sp\"{a}teren Zeitpunkt gelabelt werden. Auch um ein Volume eines anderen Bacula-Systems - (bzw. anderen Director-Dienstes) zu importieren, kann das add-Kommando benutzt werden. - Die erlaubten Zeichen f\"{u}r einen Volume-Namen finden Sie weiter unten - in der Beschreibung des label-Kommandos. + This command is used to add Volumes to an existing Pool. That is, + it creates the Volume name in the catalog and inserts into the Pool + in the catalog, but does not attempt to access the physical Volume. + Once + added, Bacula expects that Volume to exist and to be labeled. + This command is not normally used since Bacula will + automatically do the equivalent when Volumes are labeled. However, + there may be times when you have removed a Volume from the catalog + and want to later add it back. + + Normally, the {\bf label} command is used rather than this command + because the {\bf label} command labels the physical media (tape, disk, + DVD, ...) and does the equivalent of the {\bf add} command. The {\bf + add} command affects only the Catalog and not the physical media (data + on Volumes). The physical media must exist and be labeled before use + (usually with the {\bf label} command). This command can, however, be + useful if you wish to add a number of Volumes to the Pool that will be + physically labeled at a later time. It can also be useful if you are + importing a tape from another site. Please see the {\bf label} command + below for the list of legal characters in a Volume name. \item [autodisplay on/off] \index[general]{autodisplay on/off} - Das autodisplay-Kommando kennt zwei Parameter: {\bf on} und {\bf off}, - wodurch die automatische Anzeige von Nachrichten in der Console entsprechend - ein- oder ausgeschaltet wird. Der Standardwert ist {\bf off}, was bedeutet, dass - Sie \"{u}ber neue Meldungen benachrichtigt werden, sie aber nicht automatisch - angezeigt werden. In der GNOME-Console ist das automatische Anzeigen dagegen - standardm\"{a}{\ss}ig aktiviert, d.h. neue Meldungen werden automatisch - ausgegeben, wenn sie vom Director-Dienst empfangen wurden (typischerweise innerhalb von - ca. 5 Sekunden nachdem sie generiert wurden). - - Wenn autodisplay auf off steht, m\"{u}ssen Sie neue Nachrichten mit dem - {\bf messages}-Kommando abrufen, um sie sich anzeigen zu lassen. - Wenn autodisplay auf on steht, werden die Nachrichten angezeigt, sobald die Console sie - empfangen hat. + This command accepts {\bf on} or {\bf off} as an argument, and turns + auto-display of messages on or off respectively. The default for the + console program is {\bf off}, which means that you will be notified when + there are console messages pending, but they will not automatically be + displayed. The default for the bgnome-console program is {\bf on}, which + means that messages will be displayed when they are received (usually + within five seconds of them being generated). + + When autodisplay is turned off, you must explicitly retrieve the + messages with the {\bf messages} command. When autodisplay is turned + on, the messages will be displayed on the console as they are received. \item [automount on/off] \index[general]{automount on/off} - Das automount-Kommando kennt zwei Parameter: {\bf on} und {\bf off}, - die entsprechend das automatische mounten nach dem labeln ({\bf label}-Kommando) - an- oder ausschalten. Der Standardwert ist on. Wenn automount ausgeschaltet ist, - m\"{u}ssen Sie nach dem labeln eines Volumes dieses explizit mounten ({\bf mount}-Kommando), - um es benutzen zu k\"{o}nnen. + This command accepts {\bf on} or {\bf off} as the argument, and turns + auto-mounting of the Volume after a {\bf label} command on or off + respectively. The default is {\bf on}. If {\bf automount} is turned + off, you must explicitly {\bf mount} tape Volumes after a label command to + use it. \item [{cancel [jobid=\lt{}number\gt{} job=\lt{}job-name\gt{} ujobid=\lt{}unique-jobid\gt{}]}] \index[general]{cancel jobid} - Das cancel-Kommando wird benutzt um einen Job abzubrechen und kennt die - Parameter {\bf jobid=nnn} oder {\bf job=xxx}, wobei jobid die numerische JobID ist - und job der Job-Name. Wenn Sie weder job noch jobid angeben, listet die Console - alle in Frage kommenden Jobs auf und erlaubt Ihnen aus dieser Liste den abzubrechenden - Job auszuw\"{a}hlen. + This command is used to cancel a job and accepts {\bf jobid=nnn} or {\bf + job=xxx} as an argument where nnn is replaced by the JobId and xxx is + replaced by the job name. If you do not specify a keyword, the Console + program will prompt you with the names of all the active jobs allowing + you to choose one. + + Once a Job is marked to be canceled, it may take a bit of time + (generally within a minute but up to two hours) before the Job actually + terminates, depending on what operations it is doing. + Don't be surprised that you receive a Job not found message. That just + means that one of the three daemons had already canceled the job. + Messages numbered in the 1000's are from the Director, 2000's are from + the File daemon and 3000's from the Storage daemon. - Wenn ein Job als abzubrechen gekennzeichnet wurde, kann es einige Zeit dauern, - bis er tats\"{a}chlich beendet wird (normalerweise innerhalb einer Minute). - Diese Zeit ist aber abh\"{a}ngig davon, was der Job gerade tut. \item [{create [pool=\lt{}pool-name\gt{}]}] \index[general]{create pool} - Das create-Kommando wird normalerweise nicht benutzt, da die Pool-Eintr\"{a}ge - im Katalog automatisch angelegt werden, wenn der Director-Dienst startet und - er seine Pool-Konfiguration aus den Konfigurations-Dateien einliest. Falls ben\"{o}tigt, - kann mit diesem Kommando ein Pool-Eintrag in der Katalog-Datenbank erstellt werden, - der auf einem Pool-Konfigurations-Eintrag basiert, der in der Director-Dienst-Konfiguration - enthalten ist. Einfach gesagt \"{u}bernimmt dieses Kommando nur den Pool-Eintrag aus der - Konfiguration in die Datenbank. Normalerweise wird diese Kommando automatisch ausgef\"{u}hrt, - wenn der Pool zum ersten mal in einem Job-Eintrag benutzt wird. Wenn Sie dieses Kommando - auf einem bestehenden Pool ausf\"{u}hren, wird der Katalog sofort aktualisiert und enth\"{a}lt - dann die identische Pool-Konfiguration, wie die Konfigurations-Dateien. Nach dem Erstellen - eines Pool in den Konfigurations-Dateien werden Sie allerdings h\"{o}chstwahrscheinlich - das {\bf label}-Kommando benutzen, um ein oder mehrere Volumes dem neuen Pool hinzuzuf\"{u}gen - und die entsprechenden Eintr\"{a}ge im Katalog zu erzeugen, anstatt des create-Kommandos. - - Wenn ein Job gestartet wird und Bacula bemerkt, - dass kein passender Pool-Eintrag im Katalog vorhanden ist, - aber in den Konfigurations-Dateien, dann wird der Pool im Katalog automatisch angelegt. - Wenn Sie m\"{o}chten, dass der Pool-Eintrag sofort (ohne das ein Job mit diesem Pool gestartet wurde) - im Katalog erscheint, k\"{o}nnen Sie einfach diese Kommando ausf\"{u}hren, um diesen Vorgang - zu erzwingen. + This command is not normally used as the Pool records are automatically + created by the Director when it starts based on what it finds in + the conf file. If needed, this command can be + to create a Pool record in the database using the + Pool resource record defined in the Director's configuration file. So + in a sense, this command simply transfers the information from the Pool + resource in the configuration file into the Catalog. Normally this + command is done automatically for you when the Director starts providing + the Pool is referenced within a Job resource. If you use this command + on an existing Pool, it will automatically update the Catalog to have + the same information as the Pool resource. After creating a Pool, you + will most likely use the {\bf label} command to label one or more + volumes and add their names to the Media database. + + When starting a Job, if Bacula determines that there is no Pool record + in the database, but there is a Pool resource of the appropriate name, + it will create it for you. If you want the Pool record to appear in the + database immediately, simply use this command to force it to be created. \item [{delete [volume=\lt{}vol-name\gt{} pool=\lt{}pool-name\gt{} job jobid=\lt{}id\gt{}]}] \index[general]{delete} - Das delete-Kommando wird benutzt um ein Volume, einen Pool oder einen Job-Eintrag, - sowie jeweils alle dazugeh\"{o}rigen Datenbank-Eintr\"{a}ge, aus dem Katalog zu - entfernen. Das Kommando \"{a}ndert nur die Katalog-Datenbank, es hat keine - Auswirkungen auf die Konfigurations-Dateien oder die Daten auf den Volumes. - Wir empfehlen Ihnen dieses Kommando nur zu benutzen, wenn Sie wirklich wissen was Sie tun. - - Wenn der Parameter {\bf Volume} angegeben wird, wird das entsprechende Volume aus dem Katalog - gel\"{o}scht, wenn ein {\bf Pool} angeben wird, der entsprechende Pool und bei Angabe des Parameters - {\bf Job} der entsprechende Job, sowie alle zu diesem Job geh\"{o}hrenden JobMedia- und - Datei-Eintr\"{a}ge. - Das delete-Kommando kann folgenderma{\ss}en aufgerufen werden: + The delete command is used to delete a Volume, Pool or Job record from + the Catalog as well as all associated catalog Volume records that were + created. This command operates only on the Catalog database and has no + effect on the actual data written to a Volume. This command can be + dangerous and we strongly recommend that you do not use it unless you + know what you are doing. + + If the keyword {\bf Volume} appears on the command line, the named + Volume will be deleted from the catalog, if the keyword {\bf Pool} + appears on the command line, a Pool will be deleted, and if the keyword + {\bf Job} appears on the command line, a Job and all its associated + records (File and JobMedia) will be deleted from the catalog. The full + form of this command is: \begin{verbatim} -delete pool= oder +delete pool= \end{verbatim} + or + \begin{verbatim} -delete volume= pool= oder +delete volume= pool= or \end{verbatim} \begin{verbatim} -delete JobId= JobId= ... oder +delete JobId= JobId= ... or \end{verbatim} \begin{verbatim} -delete Job JobId=n,m,o-r,t ... +delete Job JobId=n,m,o-r,t ... \end{verbatim} - Das erste Beispiel l\"{o}scht einen Pool-Eintrag aus der Katalog-Datenbank. - Das zweite l\"{o}scht einen Volume-Eintrag aus dem angegebenen Pool - und das dritte Beispiel l\"{o}scht die genannten JobID-Eintr\"{a}ge aus - dem Katalog. Es werden die JobIDs n, m, o, p, q, r und t gel\"{o}scht, - wobei die JobID's n, m, o ... nat\"{u}rlich Zahlen entsprechen m\"{u}ssen. - Wie Sie sehen, kann das delete-Kommando Listen von JobIDs und auch Bereiche - (z.B. o-r) verarbeiten. + The first form deletes a Pool record from the catalog database. The + second form deletes a Volume record from the specified pool in the + catalog database. The third form deletes the specified Job record from + the catalog database. The last form deletes JobId records for JobIds + n, m, o, p, q, r, and t. Where each one of the n,m,... is, of course, a + number. That is a "delete jobid" accepts lists and ranges of + jobids. \item [disable job\lt{}job-name\gt{}] \index[general]{disable} - Das disable-Kommando erlaubt es Ihnen zu verhindern, dass ein Job - automatisch durch den Director-Dienst ausgef\"{u}hrt wird. Wenn Sie den Director-Dienst - neu starten, wird der Status des Jobs wieder auf den Wert gesetzt, der - im Job-Eintrag der Director-Konfiguration eingetragen ist. + This command permits you to disable a Job for automatic scheduling. + The job may have been previously enabled with the Job resource + {\bf Enabled} directive or using the console {\bf enable} command. + The next time the Director is restarted or the conf file is reloaded, + the Enable/Disable state will be set to the value in the Job resource + (default enabled) as defined in the bacula-dir.conf file. \item [enable job\lt{}job-name\gt{}] \index[general]{enable} - Das enable-Kommando erlaubt es Ihnen, einen Job der durch das - disable-Kommando aus der automatischen Job-Planung entfernt wurde, - wieder zu aktivieren. Wenn Sie den Director-Dienst neu starten, - wird der Status des Jobs wieder auf den Wert gesetzt, der im - Job-Eintrag der Director-Konfiguration eingetragen ist. + This command permits you to enable a Job for automatic scheduling. + The job may have been previously disabled with the Job resource + {\bf Enabled} directive or using the console {\bf disable} command. + The next time the Director is restarted or the conf file is reloaded, + the Enable/Disable state will be set to the value in the Job resource + (default enabled) as defined in the bacula-dir.conf file. \label{estimate} \item [estimate] \index[general]{estimate} - Mit dem estimate-Kommando k\"{o}nnen Sie sich anzeigen lassen, welche - Dateien durch einen bestimmten Job gesichert werden, ohne diesen Job - ausf\"{u}hren zu m\"{u}ssen. Standardm\"{a}{\ss}ig wird dabei ein Voll-Backup - angenommen. Sie k\"{o}nnen das aber durch den Parameter level entsprechend anpassen, - indem Sie zum Beispiel {\bf level=Incremental} oder {\bf level=Differential} an das - estimate-Kommando mit \"{u}bergeben. Wenn Sie im Aufruf des Kommandos keinen Job-Name - angegeben, wird die Console Ihnen eine Auswahlliste der m\"{o}glichen Jobs anzeigen. - Zus\"{a}tzlich k\"{o}nnen Sie noch die Parameter Client und FileSet angeben. Nach dem - Starten des Kommandos wird der Director-Dienst den Client kontaktieren, der daraufhin - eine Liste der zu sichernden Dateien mit ihrer Gr\"{o}{\ss}e zur\"{u}ckgibt. Bitte beachten - Sie, dass das estimate-Kommando nur die Anzahl der von der Datei belegten Bl\"{o}cke zur - Bestimmung der Dateigr\"{o}{\ss}e einbezieht, so dass die Datenmenge, die das estimate-Kommando - anzeigt, immer etwas gr\"{o}{\ss}er sein wird als das echte Backup. - - Wahlweise k\"{o}nnen Sie noch den Parameter {\bf listing} mit \"{u}bergeben, - dann wird eine Liste aller zu sichernden Dateien ausgegeben. Abh\"{a}ngig vom FileSet - kann diese Liste sehr lang sein und es daher einige Zeit dauern, alle Dateien anzuzeigen. - Das estimate-Kommando kann folgenderma{\ss}en aufgerufen werden: - + Using this command, you can get an idea how many files will be backed + up, or if you are unsure about your Include statements in your FileSet, + you can test them without doing an actual backup. The default is to + assume a Full backup. However, you can override this by specifying a + {\bf level=Incremental} or {\bf level=Differential} on the command line. + A Job name must be specified or you will be prompted for one, and + optionally a Client and FileSet may be specified on the command line. + It then contacts the client which computes the number of files and bytes + that would be backed up. Please note that this is an estimate + calculated from the number of blocks in the file rather than by reading + the actual bytes. As such, the estimated backup size will generally be + larger than an actual backup. + + The \texttt{estimate} command can use the accurate code to detect changes + and give a better estimation. You can set the accurate behavior on command + line using \texttt{accurate=yes/no} or use the Job setting as default value. + + Optionally you may specify the keyword {\bf listing} in which case, all the + files to be backed up will be listed. Note, it could take quite some time to + display them if the backup is large. The full form is: \begin{verbatim} -estimate job= listing client= +estimate job= listing client= accurate= fileset= level= \end{verbatim} - die Angabe des Jobs ist ausreichend, aber Sie k\"{o}nnen durch Angabe - des Clients, FileSets und/oder des Backup-Levels die entsprechenden Werte \"{u}berschreiben. + Specification of the {\bf job} is sufficient, but you can also override the + client, fileset, accurate and/or level by specifying them on the estimate + command line. + -Zum Beispiel k\"{o}nnen Sie folgendes eingeben: +As an example, you might do: \footnotesize \begin{verbatim} @@ -477,143 +470,129 @@ Zum Beispiel k\"{o}nnen Sie folgendes eingeben: \end{verbatim} \normalsize - durch das erste Kommando wird die Ausgabe der Console in die Datei - {\bf /tmp/listing} umgeleitet. Dann wird durch das estimate-Kommando - eine Liste aller Dateien erstellt, die beim n\"{a}chsten inkrementellen - Backup des Jobs {\bf NightlySave} gesichert werden. Die Console gibt dabei keine - Meldungen aus, da die Ausgabe ja auf die Datei /tmp/listing zeigt. Durch - das dritte Kommando @output wird die Umleitung der Ausgabe wieder aufgehoben. - Beachten Sie bitte, dass die angezeigten Bytes in der Ausgabe des estimate-Kommandos - \"{u}ber die Angabe der Dateigr\"{o}{\ss}e im Verzeichnis-Eintrag bestimmt wird. - Das kann zu gro{\ss}en Abweichungen bei der ermittelten Backup-Gr\"{o}{\ss}e f\"{u}hren, - falls im FileSet \elink{sparse}{http://de.wikipedia.org/wiki/Sparse-Datei}-Dateien - vorhanden sind. sparse-Dateien finden sich oft auf 64-Bit-Maschinen, wo sie f\"{u}r - bestimmte Systemdateien benutzt werden. Die angezeigten Bytes sind die Gesammtgr\"{o}{\ss}e - der gesicherten Dateien, wenn die FileSet-Option "`sparse"' nicht gesetzt ist. - Momentan gibt es keinen Weg, um mit dem estimate-Kommando die echte Backup-Gr\"{o}{\ss}e - f\"{u}r ein FileSet anzuzeigen, bei dem die sparse-Option gesetzt ist. - + which will do a full listing of all files to be backed up for the Job {\bf + NightlySave} during an Incremental save and put it in the file {\bf + /tmp/listing}. Note, the byte estimate provided by this command is + based on the file size contained in the directory item. This can give + wildly incorrect estimates of the actual storage used if there are + sparse files on your systems. Sparse files are often found on 64 bit + systems for certain system files. The size that is returned is the size + Bacula will backup if the sparse option is not specified in the FileSet. + There is currently no way to get an estimate of the real file size that + would be found should the sparse option be enabled. + \item [exit] \index[general]{exit} - Das exit-Kommando beendet die Console. + This command terminates the console program. -+\item [gui] +\item [gui] \index[general]{gui} - Aktiviert den nicht-interaktiven GUI-Modus. + Invoke the non-interactive gui mode. \begin{verbatim} gui [on|off] \end{verbatim} \item [help] \index[general]{help} - Das help-Kommando zeigt alle verf\"{u}gbaren Kommandos mit einer kurzen Beschreibung an. + This command displays the list of commands available. \item [label] \index[general]{label} \index[general]{relabel} \index[general]{label} \index[general]{relabel} - Das label-Kommando wird benutzt um physikalische Volumes zu labeln. - Das label-Kommando kann folgenderma{\ss}en aufgerufen werden: + This command is used to label physical volumes. The full form of this command + is: \begin{verbatim} -label storage= volume= slot= +label storage= volume= + slot= \end{verbatim} - Wenn Sie einen der Parameter storage, volume oder slot nicht angeben, - werden Sie von der Console danach gefragt. Der Media-Typ wird automatisch - anhand des Storage-Eintrags in der Director-Konfiguration gesetzt. - Wenn alle ben\"{o}tigten Informationen vorliegen, kontaktiert die - Console den angegebenen Storage-Dienst und sendet das label-Kommando. - Wenn das labeln erfolgreich war, wird ein entsprechender Volume-Eintrag - im passenden Pool erzeugt. - - Im Volume-Name d\"{u}rfen Buchstaben, Zahlen und folgende Sonderzeichen - verwendet werden: Binde- ({\bf -}) und Unterstrich ({\bf \_}), - Doppelpunkt ({\bf :}) und Punkt ({\bf .}). Alle anderen Zeichen, - einschlie{\ss}lich des Leerzeichens, sind nicht erlaubt. - Durch diese Einschr\"{a}nkung soll sichergestellt werden, dass - die Volume-Namen gut lesbar sind und es nicht zu Benutzerfehlern - aufgrund von Sonderzeichen im Namen kommt. - - Bitte beachten Sie, dass Bacula einen Ein-/Ausgabefehler meldet, - wenn ein neues bzw. komplett leeres Volume gelabelt wird. Bacula - versucht den ersten Block des Volumes zu lesen, um ein eventuell schon - vorhandenes label nicht zu \"{u}berschreiben, dieser Versuch erzeugt - den oben genannten Fehler. Um diesen Fehler zu vermeiden, k\"{o}nnen Sie - mit den folgenden Shell-Kommandos ein EOF am den Anfang des Volumes schreiben: + If you leave out any part, you will be prompted for it. The media type + is automatically taken from the Storage resource definition that you + supply. Once the necessary information is obtained, the Console program + contacts the specified Storage daemon and requests that the Volume be + labeled. If the Volume labeling is successful, the Console program will + create a Volume record in the appropriate Pool. + + The Volume name is restricted to letters, numbers, and the special + characters hyphen ({\bf -}), underscore ({\bf \_}), colon ({\bf :}), and + period ({\bf .}). All other characters including a space are invalid. + This restriction is to ensure good readability of Volume names to reduce + operator errors. + + Please note, when labeling a blank tape, Bacula will get {\bf read I/O + error} when it attempts to ensure that the tape is not already labeled. If + you wish to avoid getting these messages, please write an EOF mark on + your tape before attempting to label it: \footnotesize \begin{verbatim} mt rewind mt weof + \end{verbatim} \normalsize -Das label-Kommando kann aufgrund verschiedener Gr\"{u}nde fehlschlagen: +The label command can fail for a number of reasons: \begin{enumerate} -\item Der angegebene Volume-Name existiert schon in der Katalog-Datenbank +\item The Volume name you specify is already in the Volume database. -\item Der Storage-Dienst hat schon ein Tape oder anderes Volume in dem - ben\"{o}tigten Ger\"{a}t gemountet. In diesem Fall m\"{u}ssen Sie - das Ger\"{a}t erst mit dem {\bf unmount}-Kommando freigeben und dann - ein leeres Volume zum labeln einlegen. +\item The Storage daemon has a tape or other Volume already mounted on the + device, in which case you must {\bf unmount} the device, insert a blank + tape, then do the {\bf label} command. -\item Das Volume ist bereits gelabelt. Bacula wird niemals ein bestehendes label - \"{u}berschreiben, solange das Volume nicht abgelaufen ist und Sie das - {\bf relabel}-Kommando verwenden. +\item The Volume in the device is already a Bacula labeled Volume. (Bacula will + never relabel a Bacula labeled Volume unless it is recycled and you use the + {\bf relabel} command). -\item Es ist kein Volume im Ger\"{a}t. +\item There is no Volume in the drive. \end{enumerate} -Es gibt zwei M\"{o}glichkeiten ein bestehendes Bacula-label zu \"{u}berschreiben. -Die brutale Methode ist es, einfach ein EOF an den Anfang des Volumes zu schreiben -(dabei wird das bestehende label durch das EOF \"{u}berschrieben). -Mit dem Programm {\bf mt} k\"{o}nnen Sie das zum Beispiel so tun: +There are two ways to relabel a volume that already has a Bacula label. The +brute force method is to write an end of file mark on the tape using the +system {\bf mt} program, something like the following: \footnotesize \begin{verbatim} - [user@host]$ mt -f /dev/st0 rewind - [user@host]$ mt -f /dev/st0 weof + mt -f /dev/st0 rewind + mt -f /dev/st0 weof \end{verbatim} \normalsize -Ein Festplatten-Volume k\"{o}nnen Sie auch manuell l\"{o}schen. - -Danach benutzten Sie das label-Kommando, um ein neues label zu erzeugen. -Allerdings kann diese Vorgehensweise Spuren des alten Volumes in der -Katalog-Datenbank hinterlassen. - -Die bevorzugte Methode ein Volume neu zu labeln sollte es sein, -zuerst das Volume als bereinigt (purged) zu markieren. Das passiert entweder automatisch, -wenn die Aufbewahrungszeit (Volume-Retention) f\"{u}r das Volume abl\"{a}uft, -oder kann aber auch mit dem {\bf purge}-Kommando erzwungen werden. -Danach k\"{o}nnen Sie das {\bf relabel}-Kommando, wie weiter unten beschrieben, verwenden. - -Falls Ihr Autochanger Barcode-Labels unterst\"{u}tzt, k\"{o}nnen Sie -alle Volumes im Autochanger, eins nach dem anderen, mit dem Kommando -{\bf label barcodes} labeln. Dabei wird jedes Tape mit Barcode nacheinander -im Laufwerk gemountet und mit der auf dem Barcode enthaltenen Zeichenfolge -als Namen gelabelt. Ein entsprechender Katalog-Eintrag wird automatisch -mit erzeugt. Jedes Volume mit einem Barcode der mit den Zeichen beginnt, -die im Pool-Eintrag als CleaningPrefix konfiguriert sind, wird wie ein -Reinigungsband behandelt und nicht gelabelt. Allerdings wird dabei auch -ein Katalog-Eintrag f\"{u}r das Reinigungsband erstellt. - -Als Beispiel, mit dem Eintrag: +For a disk volume, you would manually delete the Volume. + +Then you use the {\bf label} command to add a new label. However, this could +leave traces of the old volume in the catalog. + +The preferable method to relabel a Volume is to first {\bf purge} the volume, +either automatically, or explicitly with the {\bf purge} command, then use +the {\bf relabel} command described below. + +If your autochanger has barcode labels, you can label all the Volumes in +your autochanger one after another by using the {\bf label barcodes} +command. For each tape in the changer containing a barcode, Bacula will +mount the tape and then label it with the same name as the barcode. An +appropriate Media record will also be created in the catalog. Any barcode +that begins with the same characters as specified on the +"CleaningPrefix=xxx" directive in the Director's Pool resource, will be +treated as a cleaning tape, and will not be labeled. However, an entry for +the cleaning tape will be created in the catalog. For example with: + \footnotesize \begin{verbatim} Pool { Name ... Cleaning Prefix = "CLN" } + \end{verbatim} \normalsize -wird jedes Tape, dessen Barcode mit CLN beginnt, als Reinigungsband betrachtet -und nicht automatisch gemountet. -Das label-Kommando kann folgenderma{\ss}en aufgerufen werden: +Any slot containing a barcode of CLNxxxx will be treated as a cleaning tape +and will not be mounted. Note, the full form of the command is: \footnotesize \begin{verbatim} @@ -623,23 +602,23 @@ label storage=xxx pool=yyy slots=1-5,10 barcodes \item [list] \index[general]{list} - Das list-Kommando zeigt den angegebenen Inhalt der Katalog-Datenbank an. - Die verschiedenen Felder jedes Eintrags werden in einer Zeile ausgegeben. - Die verschiedenen M\"{o}glichkeiten sind: + The list command lists the requested contents of the Catalog. The + various fields of each record are listed on a single line. The various + forms of the list command are: \footnotesize \begin{verbatim} list jobs - list jobid= (zeigt jobid an) + list jobid= (list jobid id) - list ujobid= (zeigt den job mit dem Namen an) + list ujobid= (list job with unique name) - list job= (zeigt alle Jobs mit dem Namen an) + list job= (list all jobs with "job-name") - list jobname= (identisch mit dem oberen) + list jobname= (same as above) - Im oberen Beispiel kann auch den Parameter limit=nn angegeben - werden, um die Ausgabe des Kommandos auf nn Jobs zu begrenzen + In the above, you can add "limit=nn" to limit the output to + nn jobs. list jobmedia @@ -676,40 +655,33 @@ label storage=xxx pool=yyy slots=1-5,10 barcodes \end{verbatim} \normalsize - Die meisten der oben genannten Parameter sollten selbsterkl\"{a}rend sein. - \"{U}blicherweise werden Sie, falls Sie nicht gen\"{u}gend Parameter angeben, - von der Console nach den fehlenden Informationen gefragt. - - Das {\bf list nextvol}-Kommando gibt den Volume-Namen aus, der von dem angegebenen Job - beim n\"{a}chsten Backup benutzt werden wird. Allerdings sollten Sie beachten, dass - das tats\"{a}chlich benutzte Volume von einer Reihe von Faktoren, wie zum Beispiel - von den vorher laufenden Jobs oder der Zeit, wann der Job l\"{a}uft, abh\"{a}ngen kann. - Eventuell wird ein Tape schon voll sein, das aber noch freien Platz hatte, als Sie - das Kommando ausf\"{u}hrten. Dieses Kommando gibt Ihnen also nur einen Hinweis darauf, - welches Tape benutzt werden k\"{o}nnte, aber es kann keine definitive Aussage dar\"{u}ber treffen. - Zus\"{a}tzlich kann dieses Kommando mehrere Seiteneffekte haben, da es den selben - Algorithmus durchl\"{a}uft, wie ein echter Backup-Job. Das bedeutet, dass es dazu f\"{u}hren kann, - dass aufgrund dieses Kommandos Volumes automatisch recycled oder gel\"{o}scht (purged) werden. - Standardm\"{a}{\ss}ig muss der angegebene Job innerhalb der n\"{a}chsten zwei Tage laufen, - ansonsten wird kein Volume f\"{u}r den Job gefunden. Allerdings k\"{o}nnen Sie durch - Angabe des Parameters - {\bf days=nnn} bis zu 50 Tage in die Zukunft angeben, die das Kommando in die Berechnung - mit einbeziehen soll. Falls Sie, zum Beispiel, Freitags sehen wollen, welches Volume am Montag - voraussichtlich benutzt wird, k\"{o}nnen Sie folgendes Kommando benutzen: - {\bf list nextvol job=MyJob days=3}. - - Wenn Sie bestimmte, von Ihnen \"{o}fter ben\"{o}tigte, eigene Kommandos anlegen wollen - um sich bestimmte Inhalte der Katalog-Datenbank anzeigen zu lassen, - k\"{o}nnen Sie diese der Datei {\bf query.sql} hinzu\"{u}gen. Allerdings - erfordert das einiges an Wissen \"{u}ber SQL-Kommandos. Lesen Sie dazu bitte - den Abschnitt \"{u}ber das {\bf query}-Kommando in diesem Kapitel. - - Weiter unten finden Sie auch eine Beispiel-Ausgabe des {\bf llist}-Kommandos, - das Ihnen den kompletten Inhalt des Katalogs zu einem bestimmten Konfigurations-Eintrag - anzeigt. - - Als ein Beispiel, kann Ihnen der Aufruf des Kommandos {\bf list pools} die folgenden - Ausgaben anzeigen: + What most of the above commands do should be more or less obvious. In + general if you do not specify all the command line arguments, the + command will prompt you for what is needed. + + The {\bf list nextvol} command will print the Volume name to be used by + the specified job. You should be aware that exactly what Volume will be + used depends on a lot of factors including the time and what a prior job + will do. It may fill a tape that is not full when you issue this + command. As a consequence, this command will give you a good estimate + of what Volume will be used but not a definitive answer. In addition, + this command may have certain side effect because it runs through the + same algorithm as a job, which means it may automatically purge or + recycle a Volume. By default, the job specified must run within the + next two days or no volume will be found. You can, however, use the + {\bf days=nnn} specification to specify up to 50 days. For example, + if on Friday, you want to see what Volume will be needed on Monday, + for job MyJob, you would use {\bf list nextvol job=MyJob days=3}. + + If you wish to add specialized commands that list the contents of the + catalog, you can do so by adding them to the {\bf query.sql} file. + However, this takes some knowledge of programming SQL. Please see the + {\bf query} command below for additional information. See below for + listing the full contents of a catalog record with the {\bf llist} + command. + + As an example, the command {\bf list pools} might produce the following + output: \footnotesize \begin{verbatim} @@ -722,41 +694,32 @@ label storage=xxx pool=yyy slots=1-5,10 barcodes \end{verbatim} \normalsize - Wie oben schon angedeutet, zeigt das {\bf list}-Kommando den Inhalt - der Katalog-Datenbank an. Einige Konfigurations-Eintr\"{a}ge, bzw. - \"{A}nderungen an den Konfigurations-Eintr\"{a}gen, werden beim - Start des Director-Dienstes in die Datenbank geschrieben. - Die meisten Einstellungen und \"{A}nderungen werden hingegen - erst im Katalog aktualisiert, wenn sie zum ersten Mal - benutzt werden, so zum Beispiel die Client- und Job-Eintr\"{a}ge. - - Bacula erzeugt den Client-Eintrag also dann, wenn zum ersten Mal - ein Job f\"{u}r diesen Client startet. Durch das {\bf status}-Kommando - wird die Katalog-Datenbank nicht aktualisiert, auch wenn Sie dort - eventuell schon einen Eintrag f\"{u}r den neuen Client in der Liste der - geplanten Jobs sehen. Der Client-Eintrag wird auf alle F\"{a}lle - beim starten des ersten Jobs des Clients erzeugt, egal ob der Job - erfolgreich lief oder nicht. Zus\"{a}tzlich schreibt der Director-Dienst - noch eine weitere Client-Information in die Katalog-Datenbank (die Ausgabe - von "`uname -a"'). - - Wenn Sie alle verf\"{u}gbaren Client-Eintr\"{a}ge der Datenbank (auch aus mehreren - Katalog-Datenbanken, falls konfiguriert) sehen wollen, - k\"{o}nnen Sie auch das {\bf show clients}-Kommando verwenden, das zudem - noch Informationen \"{u}ber die Adresse, den Port und den Katalog-Namen des Clients - (sowie einige andere) ausgibt. + As mentioned above, the {\bf list} command lists what is in the + database. Some things are put into the database immediately when Bacula + starts up, but in general, most things are put in only when they are + first used, which is the case for a Client as with Job records, etc. + + Bacula should create a client record in the database the first time you + run a job for that client. Doing a {\bf status} will not cause a + database record to be created. The client database record will be + created whether or not the job fails, but it must at least start. When + the Client is actually contacted, additional info from the client will + be added to the client record (a "uname -a" output). + + If you want to see what Client resources you have available in your conf + file, you use the Console command {\bf show clients}. \item [llist] \index[general]{llist} - Das llist-Kommando ("`langes list"') benutzt dieselben Parameter wie das oben - beschriebene list-Kommando. Der Unterschied ist, dass das llist-Kommando - den kompletten Inhalt der Katalog-Datenbank, zu der als Parameter angegebenen - Konfiguration, anzeigt. Dabei werden die einzelnen Felder der Datenbank-Eintr\"{a}ge - untereinander, mit einem Feld pro Zeile, ausgegeben. Diese Kommando kann eine - sehr lange Liste an Ausgaben produzieren. + The llist or "long list" command takes all the same arguments that the + list command described above does. The difference is that the llist + command list the full contents of each database record selected. It + does so by listing the various fields of the record vertically, with one + field per line. It is possible to produce a very large number of output + lines with this command. - Wenn Sie anstelle des {\bf list pools}, wie im oberen Beispiel, das - Kommando {\bf llist pools} verwenden, erhalten Sie diese Ausgabe: + If instead of the {\bf list pools} as in the example above, you enter + {\bf llist pools} you might get the following output: \footnotesize \begin{verbatim} @@ -791,128 +754,101 @@ label storage=xxx pool=yyy slots=1-5,10 barcodes Recycle: 1 PoolType: Backup LabelFormat: File + \end{verbatim} \normalsize \item [messages] \index[general]{messages} - Durch ausf\"{u}hren des messages-Kommandos werden wartende Console-Meldungen - sofort angezeigt. + This command causes any pending console messages to be immediately displayed. \item [memory] \index[general]{memory} - Gibt die momentane Speichernutzung des Director-Dienstes aus. + Print current memory usage. + \item [mount] \index[general]{mount} - Das mount-Kommando veranlasst Bacula dazu, ein Volume in einem physikalischen - Laufwerk zu lesen. Es ist damit m\"{o}glich Bacula mitzuteilen, dass ein neues - Tape im Laufwerk ist und Bacula wird daraufhin versuchen das Label einlesen, - um das Volume richtig zuordnen zu k\"{o}nnen. Normalerweise wird dieses Kommando - nur ausgef\"{u}hrt, wenn kein Volume im Laufwerk war und Bacula Sie auffordert - ein neues einzulegen, oder wenn Sie das Laufwerk vorher mit dem {\bf unmount}-Kommando - freigegeben haben. Falls Sie einen Autochanger benutzen, wird das mount-Kommando - Sie nach dem Slot des Tapes und dem Laufwerk fragen, in welchem das Tape gemountet werden soll. - - Das mount-Kommando kann folgenderma{\ss}en aufgerufen werden - -\footnotesize -\begin{verbatim} -mount storage= [ slot= ] [ - drive= ] - -mount [ jobid= | job= ] -\end{verbatim} -\normalsize - - Wenn Sie in der Ger\"{a}te-Konfiguration des Storage-Dienstes {\bf Automatic Mount = yes} - angegeben haben, wird Bacula automatisch auf das Ger\"{a}t zugreifen, solange Sie es - nicht explizit mit dem {\bf unmount}-Kommando freigegeben haben. - -\item[python] - \index[general]{python} - Das python-Kommando kennt nur den Parameter {\bf restart}: - -\footnotesize -\begin{verbatim} - python restart -\end{verbatim} -\normalsize - - dadurch wird der python-Interpreter des Director-Dienstes neu geladen. - Das kann beim Testen hilfreich sein, da es der einzige Weg ist, den python-Interpreter - nach dem Start des Director-Dienstes dazu zu veranlassen, seine Konfiguration - in der Datei {\bf DirStartUp.py} neu einzulesen. F\"{u}r weiterf\"{u}hrende Informationen - zum Thema python-Scripting lesen Sie bitte das Kapitel \ilink{PythonScripting}{PythonChapter}. + The mount command is used to get Bacula to read a volume on a physical + device. It is a way to tell Bacula that you have mounted a tape and + that Bacula should examine the tape. This command is normally + used only after there was no Volume in a drive and Bacula requests you to mount a new + Volume or when you have specifically unmounted a Volume with the {\bf + unmount} console command, which causes Bacula to close the drive. If + you have an autoloader, the mount command will not cause Bacula to + operate the autoloader unless you specify a {\bf slot} and possibly a + {\bf drive}. The various forms of the mount command are: + +mount storage=\lt{}storage-name\gt{} [ slot=\lt{}num\gt{} ] [ + drive=\lt{}num\gt{} ] + +mount [ jobid=\lt{}id\gt{} | job=\lt{}job-name\gt{} ] + + If you have specified {\bf Automatic Mount = yes} in the Storage daemon's + Device resource, under most circumstances, Bacula will automatically access + the Volume unless you have explicitly {\bf unmount}ed it in the Console + program. \label{ManualPruning} \item [prune] \index[general]{prune} - Das prune-Kommando erlaubt es Ihnen, abgelaufenen Job- oder Volume-Eintr\"{a}ge - aus der Katalog-Datenbank zu entfernen. Dieses Kommando arbeitet nur auf der - Katalog-Datenbank und l\"{o}scht keine Dateien von den Volumes. Auf jeden Fall - wird ein Aufbewahrungszeitraum (RetentionPeriod) auf die angegebenen Eintr\"{a}ge angewendet, - wenn Sie dieses Kommando ausf\"{u}hren. Falls die Katalog-Eintr\"{a}ge also noch nicht - abgelaufen sind, hat das prune-Kommando auch keine Auswirkungen. Sie k\"{o}nnen - mit diesem Kommando abgelaufene Dateien aus den Job-Eintr\"{a}gen - l\"{o}schen, abgelaufene Jobs oder Statistiken aus dem Katalog entfernen - und Sie k\"{o}nnen veraltete Job- und Datei-Eintr\"{a}ge eines bestimmten - Volumes aus dem Katalog entfernen. + The Prune command allows you to safely remove expired database records from + Jobs, Volumes and Statistics. This command works only on the Catalog + database and does not affect data written to Volumes. In all cases, the + Prune command applies a retention period to the specified records. You can + Prune expired File entries from Job records; you can Prune expired Job + records from the database, and you can Prune both expired Job and File + records from specified Volumes. -\footnotesize -\begin{verbatim} -prune files|jobs|volume|stats client= -volume= -\end{verbatim} -\normalsize +prune files|jobs|volume|stats client=\lt{}client-name\gt{} +volume=\lt{}volume-name\gt{} - Um die Katalog-Eintr\"{a}ge eines Volumes zu l\"{o}schen, muss der - {\bf VolStatus} entweder Full, Used oder Append sein, ansonsten werden - keine Eintr\"{a}ge entfernt. + For a Volume to be pruned, the {\bf VolStatus} must be Full, Used, or + Append, otherwise the pruning will not take place. \item [purge] \index[general]{purge} - Das purge-Kommando entfernt die angegebenen Katalog-Eintr\"{a}ge - ohne den Aufbewahrungszeitraum zu beachten. Dieses Kommando arbeitet nur - auf der Katalog-Datenbank und l\"{o}scht keine Dateien von den Volumes. - Mit diesem Kommando k\"{o}nnen auch versehentlich aktuelle Eintr\"{a}ge, - die eventuell dringend ben\"{o}tigt werden, aus der Katalog-Datenbank - gel\"{o}scht werden. Wir empfehlen Ihnen daher, dieses Kommando nur zu benutzen, - wenn Sie wirklich wissen was Sie tun. - Das purge-Kommando kann folgenderma{\ss}en aufgerufen werden: + The Purge command will delete associated Catalog database records from + Jobs and Volumes without considering the retention period. {\bf Purge} + works only on the Catalog database and does not affect data written to + Volumes. This command can be dangerous because you can delete catalog + records associated with current backups of files, and we recommend that + you do not use it unless you know what you are doing. The permitted + forms of {\bf purge} are: -\footnotesize -\begin{verbatim} -purge files jobid=|job=|client= +purge files jobid=\lt{}jobid\gt{}|job=\lt{}job-name\gt{}|client=\lt{}client-name\gt{} -purge jobs client= (of all jobs) +purge jobs client=\lt{}client-name\gt{} (of all jobs) -purge volume|volume= (of all jobs) -\end{verbatim} -\normalsize +purge volume|volume=\lt{}vol-name\gt{} (of all jobs) - Damit das purge-Kommando Volume-Eintr\"{a}ge aus der Katalog-Datenbank - entfernen kann, muss der {\bf VolStatus} entweder Full, Error, Used oder - Append sein. +For the {\bf purge} command to work on Volume Catalog database records the +{\bf VolStatus} must be Append, Full, Used, or Error. - Die Daten auf den Volumes werden durch dieses Kommando nicht ver\"{a}ndert. +The actual data written to the Volume will be unaffected by this command. -\item [quit] - \index[general]{quit} - Das quit-Kommando beendet das Consolen-Programm. Die Console sendet das quit- - Kommando an den Director-Dienst und wartet auf seine Best\"{a}tigung. Falls der - Director mit der Aus\"{u}hrung von anderen Kommandos besch\"{a}ftigt ist, - kann es einen Moment dauern, bis das quit ausgef\"{u}hrt werden kann. In dem - Fall k\"{o}nnen Sie durch Eingabe von {\bf .quit} die Console sofort beenden. +\item[python] + \index[general]{python} + The python command takes a single argument {\bf restart}: + +python restart + + This causes the Python interpreter in the Director to be reinitialized. + This can be helpful for testing because once the Director starts and the + Python interpreter is initialized, there is no other way to make it + accept any changes to the startup script {\bf DirStartUp.py}. For more + details on Python scripting, please see the \ilink{Python + Scripting}{PythonChapter} chapter of this manual. \item [query] \index[general]{query} - Das query-Kommando liest die vordefinierten SQL-Komandos aus der Datei, - die unter QueryFile in der Konfiguration des Director-Dienstes angegeben ist, ein. - Danach k\"{o}nnen Sie aus der Liste der verf\"{u}gbaren SQL-Anweisungen eine - zur Ausf\"{u}hrung ausw\"{a}hlen. + This command reads a predefined SQL query from the query file (the name and + location of the query file is defined with the QueryFile resource record in + the Director's configuration file). You are prompted to select a query from + the file, and possibly enter one or more parameters, then the command is + submitted to the Catalog database SQL engine. -Die folgenden Anweisungen sind momentan vordefiniert (Version 2.2.7): +The following queries are currently available (version 2.2.7): \footnotesize \begin{verbatim} @@ -934,128 +870,122 @@ Available queries: 15: List Volumes Bacula thinks are in changer 16: List Volumes likely to need replacement from age or errors Choose a query (1-16): - \end{verbatim} \normalsize +\item [quit] + \index[general]{quit} + This command terminates the console program. The console program sends the + {\bf quit} request to the Director and waits for acknowledgment. If the + Director is busy doing a previous command for you that has not terminated, it + may take some time. You may quit immediately by issuing the {\bf .quit} + command (i.e. quit preceded by a period). + \item [relabel] \index[general]{relabel} \index[general]{relabel} - Das relabel-Kommando wird benutzt um ein neues label auf ein bereits - gelabeltes physikalisches Volume zu schreiben. Das Kommando wird wie folgt - aufgerufen: - -\footnotesize -\begin{verbatim} -relabel storage= oldvolume= - volume= -\end{verbatim} -\normalsize + This command is used to label physical volumes. The full form of this + command is: - Wenn Sie einen Parameter nicht angeben, wird die Console Sie danach fragen. - Damit der alte Volume-Name (das label) \"{u}berschrieben werden kann, - muss der {\bf VolStatus} entweder Purged oder Recycle sein, was automatisch - passiert, wenn die entsprechenden Aufbewahrungszeitr\"{a}ume abgelaufen sind - (oder alle Datei- und Job-Eintr\"{a}ge dieses Volumes mit dem purge-Kommando - aus der Katalog-Datenbank entfernt wurden). +relabel storage=\lt{}storage-name\gt{} oldvolume=\lt{}old-volume-name\gt{} + volume=\lt{}newvolume-name\gt{} + + If you leave out any part, you will be prompted for it. In order for + the Volume (old-volume-name) to be relabeled, it must be in the catalog, + and the volume status must be marked {\bf Purged} or {\bf Recycle}. + This happens automatically as a result of applying retention periods, or + you may explicitly purge the volume using the {\bf purge} command. - Wenn das Volume erfolgreich relabelt wurde, sind alle Daten auf dem Volume verloren - und k\"{o}nnen nicht wiederhergestellt werden. + Once the volume is physically relabeled, the old data previously written + on the Volume is lost and cannot be recovered. \item [release] \index[general]{release} - Das release-Kommando veranla{\ss}t den Storage-Dienst, dass im angegebenen Ger\"{a}t - befindliche Tape zur\"{u}ckzuspulen und das label beim n\"{a}chsten Zugriff neu einzulesen. + This command is used to cause the Storage daemon to rewind (release) the + current tape in the drive, and to re-read the Volume label the next time + the tape is used. -\footnotesize -\begin{verbatim} -release storage= -\end{verbatim} -\normalsize +release storage=\lt{}storage-name\gt{} - Nach dem release-Kommando ist das Ger\"{a}t weiterhin von Bacula ge\"{o}ffnet - (au{\ss}er Sie haben "`Always Open"' in der Storage-Dienst-Konfiguration auf "`No"' gesetzt), - andere Proze{\ss}e/Programme k\"{o}nnen also nicht auf das Ger\"{a}t zugreifen. - Allerdings k\"{o}nnen Sie bei einigen Laufwerken, nach dem release-Kommando, - das Tape gegen ein anderes austauschen, da Bacula weiss, dass es das label - neu einlesen muss. Falls Sie mit anderen Programmen auf das Ger\"{a}t zugreifen wollen, - m\"{u}ssen Sie das unmount-Kommando verwenden, nur dann gibt Bacula das Ger\"{a}t komplett frei. + After a release command, the device is still kept open by Bacula (unless + Always Open is set to No in the Storage Daemon's configuration) so it + cannot be used by another program. However, with some tape drives, the + operator can remove the current tape and to insert a different one, and + when the next Job starts, Bacula will know to re-read the tape label to + find out what tape is mounted. If you want to be able to use the drive + with another program (e.g. {\bf mt}), you must use the {\bf unmount} + command to cause Bacula to completely release (close) the device. \item [reload] \index[general]{reload} - Das reload-Kommando veranla{\ss}t den Director-Dienst seine Konfigurations-Dateien - neu einzulesen und mit der aktuellen Konfiguration weiterzuarbeiten. Die neue - Konfiguration wird dabei sofort f\"{u}r alle neuen Jobs g\"{u}ltig. - Wenn Sie die Zeitpl\"{a}ne (Schedules) \"{a}ndern, bedenken Sie bitte, dass Bacula - die geplanten Jobs bis zu zwei Stunden im vorraus berechnet und es dadurch zu einer - Verz\"{o}gerung kommen kann, bis die neue Konfiguration g\"{u}ltig wird. Jobs die bereits - in der Warteschlange sind (deren eigentliche Startzeit also schon vorbei ist), werden - mit den alten Konfigurations-Werten abgearbeitet. Neue Jobs werden die neue Konfiguration - benutzen. Wenn Sie das reload-Kommando ausf\"{u}hren w\"{a}hrend Jobs laufen, - wird die neue Konfiguration solange zur\"{u}ckgehalten, bis alle Jobs beendet sind - und erst dann wirksam. Sie k\"{o}nnen bis zu zehn Konfigurations\"{a}nderungen - durchf\"{u}hren w\"{a}hrend Jobs laufen, erst danach wird der Director-Dienst - eine Meldung ausgeben, dass er nicht mehr unterschiedliche Konfigurationen - im Speicher vorhalten kann. - - Auch wenn es m\"{o}glich ist, die Director-Konfiguration zur Laufzeit neu zu laden, - und auch dann wenn Jobs laufen, sollten Sie bei der n\"{a}chsten Gelegenheit - den Director-Dienst neu starten um Seiteneffekte auszuschlie{\ss}en. Das neue Einlesen - der Konfiguration ist ein sehr komplexer Vorgang und nur nach dem Neustart - k\"{o}nnen Sie sicher sein, dass nur noch mit der neuen Konfiguration gearbeitet wird. + The reload command causes the Director to re-read its configuration + file and apply the new values. The new values will take effect + immediately for all new jobs. However, if you change schedules, + be aware that the scheduler pre-schedules jobs up to two hours in + advance, so any changes that are to take place during the next two + hours may be delayed. Jobs that have already been scheduled to run + (i.e. surpassed their requested start time) will continue with the + old values. New jobs will use the new values. Each time you issue + a reload command while jobs are running, the prior config values + will queued until all jobs that were running before issuing + the reload terminate, at which time the old config values will + be released from memory. The Directory permits keeping up to + ten prior set of configurations before it will refuse a reload + command. Once at least one old set of config values has been + released it will again accept new reload commands. + + While it is possible to reload the Director's configuration on the fly, + even while jobs are executing, this is a complex operation and not + without side effects. Accordingly, if you have to reload the Director's + configuration while Bacula is running, it is advisable to restart the + Director at the next convenient opportunity. \label{restore_command} \item [restore] \index[general]{restore} - Das restore-Kommando erlaubt es Ihnen auf verschiedenen Wegen, einen oder mehrere Jobs (JobIDs) - zur Wiederherstellung auszuw\"{a}hlen. Nachdem die JobIDs ausgew\"{a}hlt wurden, - erstellt der Director-Dienst aus den dazugeh\"{o}hrigen Datei-Eintr\"{a}gen - einen internen Verzeichnis-Baum in dem Sie dann die Dateien und Verzeichnisse - zur Wiederherstellung markieren k\"{o}nnen. Dieser restore-Modus der Console - verh\"{a}hlt sich \"{a}hnlich dem Unix-Standard-Kommando {\bf restore}. - -\footnotesize -\begin{verbatim} -restore storage= client= - where= pool= fileset= - restoreclient= + The restore command allows you to select one or more Jobs (JobIds) to be + restored using various methods. Once the JobIds are selected, the File + records for those Jobs are placed in an internal Bacula directory tree, + and the restore enters a file selection mode that allows you to + interactively walk up and down the file tree selecting individual files + to be restored. This mode is somewhat similar to the standard Unix {\bf + restore} program's interactive file selection mode. + +restore storage=\lt{}storage-name\gt{} client=\lt{}backup-client-name\gt{} + where=\lt{}path\gt{} pool=\lt{}pool-name\gt{} fileset=\lt{}fileset-name\gt{} + restoreclient=\lt{}restore-client-name\gt{} select current all done -\end{verbatim} -\normalsize - Wobei {\bf current}, falls angegeben, das restore-Kommando dazu veranla{\ss}t, - automatisch das aktuellste Backup zur Wiederherstellung auszuw\"{a}hlen. - Das Schl\"{u}sselwort {\bf all} w\"{a}hlt automatisch alle Dateien aus. - Falls Sie einen ben\"{o}tigten Parameter nicht angeben, wird das restore-Kommando - Sie danach fragen. F\"{u}r weitere Informationen zum {\bf restore}-Kommando - lesen Sie bitte das \ilink{Restore Kapitel}{RestoreChapter} dieses Handbuchs. + Where {\bf current}, if specified, tells the restore command to + automatically select a restore to the most current backup. If not + specified, you will be prompted. The {\bf all} specification tells the + restore command to restore all files. If it is not specified, you will + be prompted for the files to restore. For details of the {\bf restore} + command, please see the \ilink{Restore Chapter}{RestoreChapter} of this + manual. - Das Schl\"{u}sselwort {\bf client} gibt sowohl den Client an, auf dem das Backup - gemacht wurde, als auch den Client auf dem das Backup widerhergestellt werden soll. - Durch Angabe des {\bf restoreclient} k\"{o}nnen Sie allerdings auch einen anderen Client - w\"{a}hlen, auf dem das Backup statt dessen wiederhergestellt werden soll. + The client keyword initially specifies the client from which the backup + was made and the client to which the restore will be make. However, + if the restoreclient keyword is specified, then the restore is written + to that client. \item [run] \index[general]{run} - Das run-Kommando erlaubt es Ihnen, Jobs in den Zeitplan des Director-Dienstes einzuf\"{u}gen, - die sofort gestartet werden sollen. Das run-Kommando kann wie folgend aufgerufen werden: + This command allows you to schedule jobs to be run immediately. The full form + of the command is: -\footnotesize -\begin{verbatim} -run job= client= - fileset= level= - storage= where= - when= spooldata=yes|no yes -\end{verbatim} -\normalsize +run job=\lt{}job-name\gt{} client=\lt{}client-name\gt{} + fileset=\lt{}FileSet-name\gt{} level=\lt{}level-keyword\gt{} + storage=\lt{}storage-name\gt{} where=\lt{}directory-prefix\gt{} + when=\lt{}universal-time-specification\gt{} spooldata=yes|no yes - Jede ben\"{o}tigte Information, die nicht angegeben wurde, wird zur Auswahl aufgelistet. - Bevor der Job in den Zeitplan des Directors eingef\"{u}gt wird, werden Sie - aufgefordert die Parameter zu best\"{a}tigen, zu \"{a}ndern oder den Job abzubrechen. - Falls Sie das Schl\"{u}sselwort {\bf yes} angegeben haben, wird der Job ohne Nachfrage - in den Zeitplan aufgenommen. + Any information that is needed but not specified will be listed for + selection, and before starting the job, you will be prompted to accept, + reject, or modify the parameters of the job to be run, unless you have + specified {\bf yes}, in which case the job will be immediately sent to + the scheduler. - Ein Beispiel: + On my system, when I enter a run command, I get the following prompt: \footnotesize \begin{verbatim} @@ -1071,11 +1001,11 @@ The defined Job resources are: 8: RufusVerify 9: Watchdog Select Job resource (1-9): - + \end{verbatim} \normalsize -Nach der Auswahl der Nummer 5 erscheint: +If I then select number 5, I am prompted with: \footnotesize \begin{verbatim} @@ -1088,13 +1018,12 @@ Storage: DLTDrive Pool: Default When: 2003-04-23 17:08:18 OK to run? (yes/mod/no): - + \end{verbatim} \normalsize -Wenn Sie jetzt {\bf yes} eingeben, wird der Job gestartet, -falls Sie {\bf mod} ausw\"{a}hlen, -erscheint diese Liste der ver\"{a}nderbaren Parameter: +If I now enter {\bf yes}, the Job will be run. If I enter {\bf mod}, I will +be presented with the following prompt. \footnotesize \begin{verbatim} @@ -1107,18 +1036,17 @@ Parameters to modify: 6: When 7: Pool Select parameter to modify (1-7): - + \end{verbatim} \normalsize -Wenn Sie den Job zum Beispiel erst zu einem sp\"{a}teren Zeitpunkt starten wollen, -k\"{o}nnen Sie \"{u}ber die Auswahl Nr. 6 "`When"', die Startzeit anpassen. -Die Zeit muss im Format YYYY-MM-DD HH:MM:SS angegeben werden. +If you wish to start a job at a later time, you can do so by setting the When +time. Use the {\bf mod} option and select {\bf When} (no. 6). Then enter the +desired start time in YYYY-MM-DD HH:MM:SS format. -Der Parameter spooldata kann nicht \"{u}ber diese Auswahlliste ge\"{a}ndert werden. -Er muss beim Starten des run-Kommandos auf der Kommandozeile mit angegeben werden. -Wir er nicht gesetzt, \"{u}bernimmt das run-Kommando die spooldata-Option aus -der Job-, Storage- oder Schedule-Konfiguration. +The spooldata argument of the run command cannot be modified through the menu +and is only accessible by setting its value on the intial command line. If +no spooldata flag is set, the job, storage or schedule flag is used. \item [setdebug] \index[general]{setdebug} @@ -1126,86 +1054,85 @@ der Job-, Storage- oder Schedule-Konfiguration. \index[general]{debugging} \index[general]{debugging Win32} \index[general]{Windows!debugging} - Das setdebug-Kommando wird benutzt um den Debug-Level f\"{u}r die verschiedenen - Dienste zu setzen (der Debug-Level bestimmt die Menge der ausgegebenen Programm-Informationen, - die z.B. zur Fehlersuche verwendet werden k\"{o}nnen). - Es wird wie folgt aufgerufen: + This command is used to set the debug level in each daemon. The form of this + command is: -\footnotesize -\begin{verbatim} -setdebug level=nn [trace=0/1 client= | dir | director | - storage= | all] -\end{verbatim} -\normalsize +setdebug level=nn [trace=0/1 client=\lt{}client-name\gt{} | dir | director | + storage=\lt{}storage-name\gt{} | all] - Wenn trace=1 gesetzt wird, schreibt der gew\"{a}hlte Dienst alle Ausgaben - in eine Datei ("`Dienst-Name"'.trace) in seinem konfigurierten Arbeitsverzeichnis. - Das ist vor allem bei Windows-Systemen n\"{u}tzlich, da sich dort die Programm-Ausgaben - nicht \"{u}ber die Kommandozeile in Dateien umlenken lassen, bzw. keine Ausgaben - im Terminal dargetestellt werden. Im Trace-Modus wird jede Programm-Ausgabe der Trace-Datei - angeh\"{a}ngt. Diese Datei muss von Hand durch den Benutzer gel\"{o}scht werden. + If trace=1 is set, then tracing will be enabled, and the daemon will be + placed in trace mode, which means that all debug output as set by the + debug level will be directed to the file {\bf bacula.trace} in the + current directory of the daemon. Normally, tracing is needed only for + Win32 clients where the debug output cannot be written to a terminal or + redirected to a file. When tracing, each debug output message is + appended to the trace file. You must explicitly delete the file when + you are done. \item [setip] \index[general]{setip} - erm\"{o}glicht dem Client seine aktuelle IP-Adresse dem Director-Dienst - mitzuteilen, falls er dazu autorisiert ist. + Sets new client address -- if authorized. + \item [show] \index[general]{show} \index[general]{show} - Das show-Kommando zeigt die Konfiguration des Director-Dienstes an. - Diese Kommando wird haupts\"{a}chlich zur Fehlersuche durch die Entwickler - benutzt. Die folgenden Schl\"{u}sselw\"{o}rter k\"{o}nnen angegeben werden: - catalogs, clients, counters, devices, directors,filesets, jobs, messages, - pools, schedules, storages, all, help. Bitte beachten Sie den Unterschied zum - list-Kommando, welches den Inhalt der Katalog-Datenbank anzeigt. + The show command will list the Director's resource records as defined in + the Director's configuration file (normally {\bf bacula-dir.conf}). + This command is used mainly for debugging purposes by developers. + The following keywords are accepted on the + show command line: catalogs, clients, counters, devices, directors, + filesets, jobs, messages, pools, schedules, storages, all, help. + Please don't confuse this command + with the {\bf list}, which displays the contents of the catalog. \item [sqlquery] \index[general]{sqlquery} - Das sqlquery-Kommando versetzt die Console in den SQL-Abfrage-Modus. - Nach diesem Kommando k\"{o}nnen Sie, auch \"{u}ber mehrere Zeilen, eine - SQL-Anweisung eingeben. Nachdem die Anweisung mit einem Semikolon (;) abgeschlossen - ist, wird sie direkt an die Datenbank \"{u}bergeben. Nach der Ausgabe des Ergebnisses - wird wieder eine neue SQL-Anweisung erwartet. Den SQL-Abfrage-Modus k\"{o}nnen Sie - durch die Eingabe eines Punktes (.), als erstes Zeichen in der Eingabezeile, beenden. - - Mittels dieses Kommandos k\"{o}nnen Sie direkt die Katalog-Datenbank abfragen. - Seihen Sie bitte vorsichtig, damit Sie nicht aus Versehen Datenbank-Eintr\"{a}ge - \"{a}ndern oder l\"{o}schen. Lesen Sie bitte auch die Beschreibung des query-Kommandos - weiter unten, mit dem Sie einfacher und sicherer Datenbank-Abfragen durchf\"{u}hren k\"{o}nnen. - - Abh\"{a}ngig von dem von Ihnen verwendeten Datenbank-Systems (MySQL, PostgreSQL - oder SQLite) haben Sie mehr oder weniger M\"{o}glichkeiten direkte - Datenbank-Abfragen durchzuf\"{u}hren. - Mehr Informationen finden Sie in der Beschreibung Ihrer Datenbank. + The sqlquery command puts the Console program into SQL query mode where + each line you enter is concatenated to the previous line until a + semicolon (;) is seen. The semicolon terminates the command, which is + then passed directly to the SQL database engine. When the output from + the SQL engine is displayed, the formation of a new SQL command begins. + To terminate SQL query mode and return to the Console command prompt, + you enter a period (.) in column 1. + + Using this command, you can query the SQL catalog database directly. + Note you should really know what you are doing otherwise you could + damage the catalog database. See the {\bf query} command below for + simpler and safer way of entering SQL queries. + + Depending on what database engine you are using (MySQL, PostgreSQL or + SQLite), you will have somewhat different SQL commands available. For + more detailed information, please refer to the MySQL, PostgreSQL or + SQLite documentation. \item [status] \index[general]{status} - Das status-Kommando zeigt den momentanen Status des gew\"{a}hlten Dienstes an - (Director, Storage oder eines Clients). Beim Storage-Dienst k\"{o}nnen Sie - sich den Laufwerks-Status oder den Inhalt des Autochangers anzeigen lassen. - Der Client zeigt Informationen \"{u}ber aktuell laufende Jobs und deren - Geschwindigkeit an. Es kann wie folgt aufgerufen werden: -\footnotesize -\begin{verbatim} -status [all | dir= | director [days=nnn] | - client= | [slots] storage= ] -\end{verbatim} -\normalsize + This command will display the status of all components. For the director, it + will display the next jobs that are scheduled during the next 24 hours as + well as the status of currently running jobs. For the Storage Daemon, you + will have drive status or autochanger content. The File Daemon will give you + information about current jobs like average speed or file accounting. The + full form of this command is: + +status [all | dir=\lt{}dir-name\gt{} | director [days=nnn] | + client=\lt{}client-name\gt{} | [slots] storage=\lt{}storage-name\gt{}] - Wenn Sie das Kommando {\bf status dir} ausf\"{u}hren, listet die Console - die momentan laufenden Jobs, alle f\"{u}r die n\"{a}chsten 24 Stunden - geplanten Jobs und die letzten 10 beendeten Jobs, sowie deren Status auf. - Die Liste der geplanten Jobs enth\"{a}lt auch den Namen des Volumes, - das voraussichtlich benutzt wird. Beachten Sie dabei bitte diese beiden Punkte: - 1. um das Volume zu ermitteln wird dieselbe Funktion benutzt wie in dem Moment - wo der Backup-Job startet, allerdings werden die Ablaufzeitr\"{a}ume der Volumes - nicht in Betracht gezogen; 2. das angezeigte Volume ist die nur bestm\"{o}gliche - Sch\"{a}tzung, da das Volume eventuell in der zwischenzeit andersweitig benutzt - oder auch durch vorher laufende Jobs vollgeschrieben werden k\"{o}nnte. + If you do a {\bf status dir}, the console will list any currently + running jobs, a summary of all jobs scheduled to be run in the next 24 + hours, and a listing of the last ten terminated jobs with their statuses. + The scheduled jobs summary will include the Volume name to be used. You + should be aware of two things: 1. to obtain the volume name, the code + goes through the same code that will be used when the job runs, but it + does not do pruning nor recycling of Volumes; 2. The Volume listed is + at best a guess. The Volume actually used may be different because of + the time difference (more durations may expire when the job runs) and + another job could completely fill the Volume requiring a new one. + + In the Running Jobs listing, you may find the following types of + information: - In der Liste der laufenden Jobs finden Sie diese Informationen: \footnotesize \begin{verbatim} @@ -1217,29 +1144,29 @@ status [all | dir= | director [days=nnn] | \end{verbatim} \normalsize - Wenn Sie sich diese Ausgabe von unten nach oben anschauen, sehen Sie, - dass JobId 5343 (Rufus) gerade l\"{a}uft. JobId 5348 (Minou) wartet darauf, - dass der Job 5343 beendet wird, da dieser momentan die Storage-Resource verwendet, - daher die Meldung: "`waiting on max Storage jobs"'. JobId 5349 (CatalogBackup) - hat eine geringere Priorit\"{a}t und wartet daher auf die Beendigung der - Jobs mit h\"{o}heren Priorit\"{a}ten. Zuoberst steht die JobId 2507 (MatouVerify), - die als letzte dieser JobIds geplant wurde, da schon andere wartende und - laufende JobIds vorhanden sind, hat sie nur den Status "`waiting execution"'. - - Das Kommando {\bf status dir} zeigt standardm\"{a}{\ss}ig nur die f\"{u}r - heute und morgen geplanten Jobs an. Falls Sie die geplanten Jobs der n\"{a}chsten - drei Tage sehen m\"{o}chten um, zum Beispiel am Freitag zu kontrollieren, - welche Volumes am Freitag, am Wochenende und am Montag benutzt werden, - k\"{o}nnen Sie die Option {\bf days=3} verwenden. {\bf days=0} zeigt nur die - f\"{u}r heute geplanten Jobs an. - - Falls Ihre Jobs also nicht wie gew\"{u}nscht starten, k\"{o}nnen - Sie sich mit dem Kommando {\bf status dir} einen \"{U}berblick \"{u}ber - die momentan laufenden und wartenden Jobs, sowie den Grund des wartens, - verschaffen. Genauere Informationen bekommen Sie meistens, wenn Sie - das Kommando {\bf status storage=xxx} verwenden. Als Beispiel sind hier die - Ausgaben die dieses Kommando auf einem Storage im Leerlauf anzeigt: - + Looking at the above listing from bottom to top, obviously JobId 5343 + (Rufus) is running. JobId 5348 (Minou) is waiting for JobId 5343 to + finish because it is using the Storage resource, hence the "waiting on + max Storage jobs". JobId 5349 has a lower priority than all the other + jobs so it is waiting for higher priority jobs to finish, and finally, + JobId 2507 (MatouVerify) is waiting because only one job can run at a + time, hence it is simply "waiting execution" + + If you do a {\bf status dir}, it will by default list the first + occurrence of all jobs that are scheduled today and tomorrow. If you + wish to see the jobs that are scheduled in the next three days (e.g. on + Friday you want to see the first occurrence of what tapes are scheduled + to be used on Friday, the weekend, and Monday), you can add the {\bf + days=3} option. Note, a {\bf days=0} shows the first occurrence of jobs + scheduled today only. If you have multiple run statements, the first + occurrence of each run statement for the job will be displayed for the + period specified. + + If your job seems to be blocked, you can get a general idea of the + problem by doing a {\bf status dir}, but you can most often get a + much more specific indication of the problem by doing a + {\bf status storage=xxx}. For example, on an idle test system, when + I do {\bf status storage=File}, I get: \footnotesize \begin{verbatim} status storage=File @@ -1269,8 +1196,6 @@ Pool="*unknown*" Slot 2 is loaded in drive 0. Total Bytes Read=0 Blocks Read=0 Bytes/block=0 Positioned at File=0 Block=0 -Device "Dummy" is not open or does not exist. -No DEVICE structure. Device "DVD-Writer" (/dev/hdc) is not open. Device "File" (/tmp) is not open. @@ -1281,12 +1206,11 @@ In Use Volume status: \end{verbatim} \normalsize -Ganz oben sind unter "`Running Jobs"' und "`Jobs waiting .."' keine Eintr\"{a}ge, -was bedeutet, dass momentan kein Job l\"{a}uft und damit auch keine Ger\"{a}te -benutzt werden. Jetzt wird der Autochanger mit dem {\bf unmount}-Kommando -freigegeben und ein Job gestartet der das Ger\"{a}t vom Typ "`File (/tmp)"' -benutzen soll. Daraufhin gibt das Kommando {\bf status storage=xxx} diese -Meldungen aus: +Now, what this tells me is that no jobs are running and that none of +the devices are in use. Now, if I {\bf unmount} the autochanger, which +will not be used in this example, and then start a Job that uses the +File device, the job will block. When I re-issue the status storage +command, I get for the Device status: \footnotesize \begin{verbatim} @@ -1298,8 +1222,6 @@ Autochanger "DDS-4-changer" with devices: Device "DDS-4" (/dev/nst0) is not open. Device is BLOCKED. User unmounted. Drive 0 is not loaded. -Device "Dummy" is not open or does not exist. -No DEVICE structure. Device "DVD-Writer" (/dev/hdc) is not open. Device "File" (/tmp) is not open. @@ -1309,27 +1231,28 @@ Device "File" (/tmp) is not open. \end{verbatim} \normalsize -Der Autochanger ist, durch das {\bf unmount}-Kommando, im Status "`BLOCKED. User unmounted"'. -Das Device File, mit dem der Job gestartet wurde, ist im Status "`BLOCKED waiting for media"', -Bacula wartet jetzt darauf, dass Sie ein Volume labeln und mounten. +Now, here it should be clear that if a job were running that wanted +to use the Autochanger (with two devices), it would block because +the user unmounted the device. The real problem for the Job I started +using the "File" device is that the device is blocked waiting for +media -- that is Bacula needs you to label a Volume. \item [time] \index[general]{time} - Gibt die aktuelle Uhrzeit aus. + Prints the current time. \item [trace] \index[general]{trace} - Schaltet das Mitschneiden der Dienst-Ausgaben in eine Datei ein oder aus. - Siehe setdebug Kommando. + Turn on/off trace to file. \item [umount] \index[general]{umount} - identisch mit unmount (in Anlehnung an das Unix-Kommando umount). + For old-time Unix guys. See the unmount command for full details. \item [unmount] \index[general]{unmount} - Das unmount-Kommando veranlasst den Storage-Dienst dazu, dass angegebene Ger\"{a}t - freizugeben. Der Aufruf dieses Kommandos ist identisch mit dem mount-Kommando: + This command causes the indicated Bacula Storage daemon to unmount the + specified device. The forms of the command are the same as the mount command: \footnotesize \begin{verbatim} unmount storage= [ drive= ] @@ -1338,31 +1261,33 @@ unmount [ jobid= | job= ] \end{verbatim} \normalsize - Nachdem ein Ger\"{a}t mit dem unmount-Kommando freigegeben wurde, kann - Bacula es so lange nicht verwenden, bis es wieder mit dem mount-Kommando - ge\"{o}ffnet wird. Falls Bacula das Ger\"{a}t zwischenzeitlich f\"{u}r einen - Job ben\"{o}tigt, wird Bacula in regelm\"{a}{\ss}igen Abst\"{a}nden den Benutzer - informieren, dass Ger\"{a}t zu mounten. + Once you unmount a storage device, Bacula will no longer be able to use + it until you issue a mount command for that device. If Bacula needs to + access that device, it will block and issue mount requests periodically + to the operator. - Wenn das Ger\"{a}t ein Autochanger ist, wird das angebene Laufwerk - zudem entladen. Wenn keine Laufwerk angegeben ist, wird Laufwerk 1 verwendet. + If the device you are unmounting is an autochanger, it will unload + the drive you have specified on the command line. If no drive is + specified, it will assume drive 1. \label{UpdateCommand} \item [update] \index[general]{update} - Das update-Kommando aktualisiert die Katalog-Datenbank entsprechend der angegebenen - Option. M\"{o}glich sind Pool- oder Volume-Eintr\"{a}ge oder auch die Volumes - in den Slots eines Autochangers mit Barcode-Unterst\"{u}tzung. Im Falle der Pool-Eintr\"{a}ge - werden die aktuellen Information aus den Konfigurations-Dateien des Director-Dienstes gelesen. - Die folgenden Schl\"{u}sselw\"{o}rter k\"{o}nnen angegeben werden: + This command will update the catalog for either a specific Pool record, a Volume + record, or the Slots in an autochanger with barcode capability. In the case + of updating a Pool record, the new information will be automatically taken + from the corresponding Director's configuration resource record. It can be + used to increase the maximum number of volumes permitted or to set a maximum + number of volumes. The following main keywords may be specified: \footnotesize \begin{verbatim} media, volume, pool, slots, stats \end{verbatim} \normalsize -Falls Sie Volumes aktualisieren, werden Sie nach den zu \"{a}ndernden Parametern gefragt. -Folgende Volume-Parameter k\"{o}nnen angepasst werden: +In the case of updating a Volume, you will be prompted for which value you +wish to change. The following Volume parameters may be changed: + \footnotesize \begin{verbatim} @@ -1385,188 +1310,209 @@ Folgende Volume-Parameter k\"{o}nnen angepasst werden: \end{verbatim} \normalsize - Bei Auswahl von {\bf Pool} wird Bacula das gew\"{a}hlte Volume in den angegebenen - Pool verschieben. - - Bei Auswahl von {\bf Volume from Pool}, {\bf All Volumes from Pool} und {\bf All Volumes - from all Pools} werden alle Volumes im entsprechenden Pool so angepasst, wie es aktuell - in der Konfiguration des Director-Dienstes steht. Das betrifft folgende Eintr\"{a}ge: + For slots {\bf update slots}, Bacula will obtain a list of slots and + their barcodes from the Storage daemon, and for each barcode found, it + will automatically update the slot in the catalog Media record to + correspond to the new value. This is very useful if you have moved + cassettes in the magazine, or if you have removed the magazine and + inserted a different one. As the slot of each Volume is updated, the + InChanger flag for that Volume will also be set, and any other Volumes + in the Pool that were last mounted on the same Storage device + will have their InChanger flag turned off. This permits + Bacula to know what magazine (tape holder) is currently in the + autochanger. + + If you do not have barcodes, you can accomplish the same thing in + version 1.33 and later by using the {\bf update slots scan} command. + The {\bf scan} keyword tells Bacula to physically mount each tape and to + read its VolumeName. + + For Pool {\bf update pool}, Bacula will move the Volume record from its + existing pool to the pool specified. + + For {\bf Volume from Pool}, {\bf All Volumes from Pool} and {\bf All Volumes + from all Pools}, the following values are updated from the Pool record: Recycle, RecyclePool, VolRetention, VolUseDuration, MaxVolJobs, MaxVolFiles, - und MaxVolBytes. (RecyclePool ist erst ab Version \gt 2.1.4 verf\"{u}gbar.) + and MaxVolBytes. (RecyclePool feature is available with bacula 2.1.4 or + higher.) - Durch das Kommando {\bf update slots} holt sich Bacula eine aktuelle Liste der - Volume-Barcodes in den Slots des Autochangers. F\"{u}r jeden gefundenen Barcode - wird automatisch der Slot des Volumes in der Katalog-Datenbank angepasst. - Das ist n\"{u}tzlich, falls Sie Volumes in den Magazinen verschoben oder gewechselt haben. - Beim aktualisieren der Slots wird auch das InChanger-Flag der Volumes im Katalog angepasst, - dadurch weiss Bacula welche Volumes im Autochanger verf\"{u}gbar sind. - - Falls Ihr Autochanger keine Barcodes unterst\"{u}tzt, k\"{o}nnen Sie die - Volumes im Autochanger mit dem Kommando {\bf update slots scan} aktualisieren. - Das Schl\"{u}sselwort {\bf scan} teilt Bacula (nur Version \gt 1.33) mit, - dass es alle Volumes nacheinandern mounten soll, um das Tape-Label einzulesen. - - Das update-Kommando kann wie folgt aufgerufen werden: + The full form of the update command with all command line arguments is: \footnotesize \begin{verbatim} update volume=xxx pool=yyy slots volstatus=xxx VolRetention=ddd VolUse=ddd MaxVolJobs=nnn MaxVolBytes=nnn Recycle=yes|no slot=nnn enabled=n recyclepool=zzz - + \end{verbatim} \normalsize \item [use] \index[general]{use} - Das use-Kommando wird verwendet um dem Director-Dienst mitzuteilen, welche Katalog- - Datenbank verwendet werden soll. Da es normalerweise nur eine Datenbank gibt, - wird diese immer automatisch ausgew\"{a}hlt. Fall Sie jedoch mehrere Katalog-Eintr\"{a}ge - in der Konfiguration des Director-Dienstes angegeben haben, k\"{o}nnen Sie mittels - des use-Kommandos von einem Katalog zum anderen wechseln. + This command allows you to specify which Catalog database to use. Normally, +you will be using only one database so this will be done automatically. In +the case that you are using more than one database, you can use this command +to switch from one to another. -\footnotesize -\begin{verbatim} -use -\end{verbatim} -\normalsize +use \lt{}database-name\gt{} \item [var] \label{var} \index[general]{var name} - Das var-Kommando akzeptiert eine Zeichenkette (auch in Anf\"{u}hrungstrichen) - und f\"{u}hrt Variablen-Ersetzungen durch, wie sie auch mit der {\bf LabelFormat} - Zeichenkette geschehen. Der einzige Unterschied ist, dass beim Ausf\"{u}hren des - var-Kommandos kein Job l\"{a}uft und daher andere Werte verwendet werden anstelle von - den Job-spezifischen. Allerdings werden Sie trotzdem einen Eindruck davon erhalten, was - f\"{u}r eine Ausgabe zu erwarten ist. + This command takes a string or quoted string and does variable expansion on + it the same way variable expansion is done on the {\bf LabelFormat} string. + Thus, for the most part, you can test your LabelFormat strings. The + difference between the {\bf var} command and the actual LabelFormat process + is that during the var command, no job is running so "dummy" values are + used in place of Job specific variables. Generally, however, you will get a + good idea of what is going to happen in the real case. \item [version] \index[general]{version} - Das version-Kommando gibt die Version des Director-Dienstes aus. + The command prints the Director's version. \item [wait] \index[general]{wait} - Das wait-Kommando wartet solange bis keine Jobs mehr laufen. Es kann - in Batch-Programmen verwendet werden, die z.B. \"{u}ber den cron-Dienst - gestartet werden und eine bestimmte Aktion erst ausf\"{u}hren sollen, - wenn der Director im Leerlauf ist. - Das wait-Kommando kennt die folgenden Optionen: + The wait command causes the Director to pause until there are no jobs + running. This command is useful in a batch situation such as regression + testing where you wish to start a job and wait until that job completes + before continuing. This command now has the following options: \footnotesize \begin{verbatim} wait [jobid=nn] [jobuid=unique id] [job=job name] \end{verbatim} \normalsize - Wenn eine der Optionen angegeben ist, wartet das wait-Kommando darauf, - dass sich der spezifizierte Job beendet. + If specified with a specific JobId, ... the wait command will wait + for that particular job to terminate before continuing. + \end{description} \label{dotcommands} -\section{Spezielle Punkt-Kommandos} -\index[general]{Kommandos!Spezielle Punkt-} -\index[general]{Spezielle Punkt-Kommandos} +\section{Special dot Commands} +\index[general]{Commands!Special dot} +\index[general]{Special dot Commands} -Es gibt eine Reihen von Kommandos die mit einem Punkt (.) beginnen. -Diese Kommandos sind prinzipiell f\"{u}r die Verwendung in Batch-Programmen -oder Benutzerschnittstellen gedacht. Sie werden normalerweise nicht durch einen -Benutzer in der Console ausgef\"{u}hrt. Hier ist eine \"{U}bersicht: +There is a list of commands that are prefixed with a period (.). These +commands are intended to be used either by batch programs or graphical user +interface front-ends. They are not normally used by interactive users. Once +GUI development begins, this list will be considerably expanded. The following +is the list of dot commands: \footnotesize \begin{verbatim} -.backups job=xxx zeigt die Backups des angegebenen Jobs an -.clients listet alle Client-Namen auf -.defaults client=xxx fileset=yyy zeigt die Defaults des angegebenen Clients an -.die verursacht einen Segment-Fault des Directors (zur Fehlersuche) -.dir im Datei-Auswahl-Modus des restore-Kommandos werden die Ausgaben - durch ein Komma getrennt, statt durch Leerzeichen wie beim dir +.backups job=xxx list backups for specified job +.clients list all client names +.defaults client=xxx fileset=yyy list defaults for specified client +.die cause the Director to segment fault (for debugging) +.dir when in tree mode prints the equivalent to the dir command, + but with fields separated by commas rather than spaces. .exit quit -.filesets zeigt alle FileSet-Namen an -.help zeigt die Hilfe unformatiert an -.jobs zeigt alle Job-Namen an -.levels zeigt alle Backup-Level an -.messages siehe messages -.msgs zeigt die message-Konfigurations-Namen an -.pools zeigt alle Pool-Namen an +.filesets list all fileset names +.help help command output +.jobs list all job names +.levels list all levels +.messages get quick messages +.msgs return any queued messages +.pools list all pool names .quit quit -.status holt Status-Ausgaben -.storage zeigt die Namen der Storage-Einträge an -.types zeigt die Job-Typen an +.status get status output +.storage return storage resource names +.types list job types \end{verbatim} \normalsize \label{atcommands} -\section{Spezielle @-Kommandos} -\index[general]{Kommandos!Spezielle @-} -\index[general]{Spezielle @-Kommandos} +\section{Special At (@) Commands} +\index[general]{Commands!Special At @} +\index[general]{Special At (@) Commands} -Normalerweise werden alle eingegebenen Kommandos direkt zur Ausf\"{u}hrung an den -Director-Dienst, welcher eventuell auf einem anderen Computer l\"{a}uft, geschickt. -Allerdings gibt es eine kleine Anzahl {\bf @}-Kommandos, die mit einem @ beginnen, -und die nicht durch den Director, sondern durch die Console selbst, ausgef\"{u}hrt werden. -Diese Kommandos sind nur in der Terminal(tty)-Version der Console implementiert, aber nicht in der -GNOME-Version. Diese Kommandos sind: +Normally, all commands entered to the Console program are immediately +forwarded to the Director, which may be on another machine, to be executed. +However, there is a small list of {\bf at} commands, all beginning with an at +character (@), that will not be sent to the Director, but rather interpreted +by the Console program directly. Note, these commands are implemented only in +the tty console program and not in the GNOME Console. These commands are: \begin{description} \item [@input \lt{}filename\gt{}] \index[general]{@input \lt{}filename\gt{}} - Liest und f\"{u}hrt die Kommandos aus der angegebenen Datei aus. + Read and execute the commands contained in the file specified. \item [@output \lt{}filename\gt{} w/a] \index[general]{@output \lt{}filename\gt{} w/a} - Schreibt die Ausgaben der Console in die angegebene Datei. - Entweder wird die Datei \"{u}berschrieben (Option w) oder es wird an - eine bestehende Datei angeh\"{a}ngt (Option a). Um die Ausgaben wieder an das Terminal - umzuleiten k\"{o}nnen Sie einfach {\bf @output} ohne einen Datei-Namen angeben. - Passen Sie aber auf, dass Sie nicht versehentlich eine bereits bestehende Datei - \"{u}berschreiben. Hier ein Beispiel um alle Ausgaben zu unterdr\"{u}cken: + Send all following output to the filename specified either overwriting the +file (w) or appending to the file (a). To redirect the output to the +terminal, simply enter {\bf @output} without a filename specification. +WARNING: be careful not to overwrite a valid file. A typical example during a +regression test might be: \footnotesize \begin{verbatim} @output /dev/null - weitere Kommandos ... + commands ... @output + \end{verbatim} \normalsize \item [@tee \lt{}filename\gt{} w/a] \index[general]{@tee \lt{}filename\gt{} w/a} - Sendet die Ausgaben an das Terminal und an die angegebene Datei. - Zum Beenden f\"{u}hren Sie {\bf @tee} oder {\bf @output} ohne Datei-Namen aus. + Send all subsequent output to both the specified file and the terminal. It is + turned off by specifying {\bf @tee} or {\bf @output} without a filename. \item [@sleep \lt{}seconds\gt{}] \index[general]{@sleep \lt{}seconds\gt{}} - Schl\"{a}ft die angegebene Zeit in Sekunden. + Sleep the specified number of seconds. \item [@time] \index[general]{@time} - zeigt die aktuelle Zeit und das Datum an. + Print the current time and date. \item [@version] \index[general]{@version} - zeigt die Console-Version an + Print the console's version. \item [@quit] \index[general]{@quit} - quit + quit \item [@exit] \index[general]{@exit} - quit + quit \item [@\# anything] \index[general]{anything} - ein Kommantar + Comment + +\item [@help] + \index[general]{@help} + Get the list of every special @ commands. + +\item [@separator \lt{}char\gt{}] +\index[general]{@separator} + When using bconsole with readline, you can set the command separator to one + of those characters to write commands who require multiple input on one line, + or to put multiple commands on a single line. +\begin{verbatim} + !$%&'()*+,-/:;<>?[]^`{|}~ +\end{verbatim} + + Note, if you use a semicolon (;) as a separator character, which is + common, you will not be able to use the {\bf sql} command, which + requires each command to be terminated by a semicolon. + \end{description} \label{scripting} -\section{Steuern der Console durch ein Shell-Script} -\index[general]{Script!Steuern der Console durch ein Shell-} -\index[general]{Steuern der Console durch ein Shell-Script} +\section{Running the Console from a Shell Script} +\index[general]{Script!Running the Console Program from a Shell} +\index[general]{Running the Console Program from a Shell Script} -Sie k\"{o}nnen viele Console-Aufgaben durch Shell-Scripte vereinfachen. -Wenn Sie zum Beispiel folgende Kommandos in ein Script schreiben: +You can automate many Console tasks by running the console program from a +shell script. For example, if you have created a file containing the following +commands: \footnotesize \begin{verbatim} @@ -1577,29 +1523,28 @@ Wenn Sie zum Beispiel folgende Kommandos in ein Script schreiben: \end{verbatim} \normalsize -wird durch seine Ausf\"{u}hrung das Ger\"{a}t DDS-4 freigegeben und im Falle -eines Autochangers auch entladen. Sie k\"{o}nnen solche Scripte auch in -der Job-Konfiguration als {\bf RunBeforeJob} oder {\bf RunAfterJob} angeben. +when that file is executed, it will unmount the current DDS-4 storage device. +You might want to run this command during a Job by using the {\bf +RunBeforeJob} or {\bf RunAfterJob} records. -Sie k\"{o}nnen die Console auch die Datei mit den Kommandos einlesen lassen, -wenn Sie sie so starten: +It is also possible to run the Console program from file input where the file +contains the commands as follows: \footnotesize \begin{verbatim} -./bconsole -c ./bconsole.conf tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}.html + @(if [ -f imagename_translations ] ; then \ + ./translate_images.pl --from_meaningful_names ${DOC}.html; \ + fi) + (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} . 2>/dev/null; done) @rm -f *.eps *.gif *.jpg *.old web: @echo "Making ${DOC} web" + @rm -rf ${DOC} @mkdir -p ${DOC} @rm -f ${DOC}/* @cp -fp ${IMAGES}/*.eps . @rm -f next.eps next.png prev.eps prev.png up.eps up.png - @cp -fp ${IMAGES}/*.eps ${IMAGES}/*.png ${DOC}/ - @rm -f ${DOC}/next.eps ${DOC}/next.png ${DOC}/prev.eps ${DOC}/prev.png ${DOC}/up.eps ${DOC}/up.png @(if [ -f ${DOC}/imagename_translations ] ; then \ ./translate_images.pl --to_meaningful_names ${DOC}/Developer*Guide.html; \ fi) @rm -rf ${DOC}/*.html latex2html -split 4 -local_icons -t "Developer's Guide" -long_titles 4 \ - -contents_in_nav -toc_stars -white -notransparent ${DOC} >tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}/Developer*Guide.html - @cp -f ${DOC}/Developer_s_Guide.html ${DOC}/index.html + -toc_stars -contents_in_nav -init_file latex2html-init.pl \ + -no_antialias -no_antialias_text \ + -white -notransparent ${DOC} >tex.out 2>&1 + @(if [ -f imagename_translations ] ; then \ + ./translate_images.pl --from_meaningful_names ${DOC}.html; \ + fi) + @cp -f ${DOC}/Bacula_Developer_Notes.html ${DOC}/index.html @rm -f *.eps *.gif *.jpg ${DOC}/*.eps *.old @rm -f ${DOC}/idle.png @rm -f ${DOC}/win32-*.png ${DOC}/wx-console*.png ${DOC}/xp-*.png diff --git a/docs/manuals/de/developers/catalog.tex b/docs/manuals/de/developers/catalog.tex index f67866b5..4994d378 100644 --- a/docs/manuals/de/developers/catalog.tex +++ b/docs/manuals/de/developers/catalog.tex @@ -256,7 +256,7 @@ creates a 7.35 MB database. \hline {LStat } & {tinyblob } & {File attributes in base64 encoding } \\ \hline -{MD5 } & {tinyblob } & {MD5 signature in base64 encoding } +{MD5 } & {tinyblob } & {MD5/SHA1 signature in base64 encoding } \\ \hline \end{longtable} @@ -310,6 +310,8 @@ command in the Console program. \hline {EndTime } & {datetime } & {Time/date when Job ended } \\ \hline +{RealEndTime } & {datetime } & {Time/date when original Job ended } \\ + \hline {JobTDate } & {bigint } & {Start day in Unix format but 64 bits; used for Retention period. } \\ \hline @@ -330,6 +332,8 @@ Retention period. } \\ \hline {FileSetId } & {integer } & {Link to FileSet Record } \\ \hline +{PrioJobId } & {integer } & {Link to prior Job Record when migrated } \\ + \hline {PurgedFiles } & {tiny integer } & {Set when all File records purged } \\ \hline {HasBase } & {tiny integer } & {Set when Base Job run } @@ -368,18 +372,28 @@ The Job Type (or simply Type) can have one of the following values: \hline {B } & {Backup Job } \\ \hline +{M } & {Migrated Job } \\ + \hline {V } & {Verify Job } \\ \hline {R } & {Restore Job } \\ \hline {C } & {Console program (not in database) } \\ \hline +{I } & {Internal or system Job } \\ + \hline {D } & {Admin Job } \\ \hline {A } & {Archive Job (not implemented) } \\ \hline +{C } & {Copy Job } \\ + \hline +{M } & {Migration Job } \\ + \hline \end{longtable} +Note, the Job Type values noted above are not kept in an SQL table. + The JobStatus field specifies how the job terminated, and can be one of the following: @@ -397,6 +411,8 @@ following: \hline {T } & {Terminated normally } \\ \hline +{W } & {Terminated normally with warnings } +\\ \hline {E } & {Terminated in Error } \\ \hline {e } & {Non-fatal error } \\ @@ -407,6 +423,8 @@ following: \hline {A } & {Canceled by the user } \\ \hline +{I } & {Incomplete Job } +\\ \hline {F } & {Waiting on the File daemon } \\ \hline {S } & {Waiting on the Storage daemon } \\ @@ -427,10 +445,18 @@ following: \hline {p } & {Waiting for higher priority job to finish } \\ \hline +{i } & {Doing batch insert file records } +\\ \hline +{a } & {SD despooling attributes } +\\ \hline +{l } & {Doing data despooling } +\\ \hline +{L } & {Committing data (last despool) } +\\ \hline -\end{longtable} -\ + +\end{longtable} \addcontentsline{lot}{table}{File Sets Table Layout} \begin{longtable}{|l|l|l|} @@ -458,7 +484,6 @@ particularly important when doing an incremental update. If the user deletes a file or adds a file, we need to ensure that a Full backup is done prior to the next incremental. -\ \addcontentsline{lot}{table}{JobMedia Table Layout} \begin{longtable}{|l|l|p{2.5in}|} @@ -512,7 +537,6 @@ backup. -\ \addcontentsline{lot}{table}{Media Table Layout} \begin{longtable}{|l|l|p{2.4in}|} @@ -532,6 +556,10 @@ backup. \hline {MediaType } & {tinyblob } & {The MediaType supplied by the user } \\ \hline +{MediaTypeId } & {integer } & {The MediaTypeId } \\ + \hline +{LabelType } & {tinyint } & {The type of label on the Volume } \\ + \hline {FirstWritten } & {datetime } & {Time/date when first written } \\ \hline {LastWritten } & {datetime } & {Time/date when last written } \\ @@ -548,6 +576,8 @@ backup. \hline {VolBytes } & {bigint } & {Number of bytes saved in Job } \\ \hline +{VolParts } & {integer } & {The number of parts for a Volume (DVD) } \\ + \hline {VolErrors } & {integer } & {Number of errors during Job } \\ \hline {VolWrites } & {integer } & {Number of writes to media } \\ @@ -559,9 +589,13 @@ backup. {VolStatus } & {enum } & {Status of media: Full, Archive, Append, Recycle, Read-Only, Disabled, Error, Busy } \\ \hline +{Enabled } {tinyint } & {Whether or not Volume can be written } \\ + \hline {Recycle } & {tinyint } & {Whether or not Bacula can recycle the Volumes: Yes, No } \\ \hline +{ActionOnPurge } & {tinyint } & {What happens to a Volume after purging } \\ + \hline {VolRetention } & {bigint } & {64 bit seconds until expiration } \\ \hline {VolUseDuration } & {bigint } & {64 bit seconds volume can be used } \\ @@ -570,6 +604,35 @@ Yes, No } \\ \hline {MaxVolFiles } & {integer } & {maximume EOF marks to put on Volume } \\ \hline +{InChanger } & {tinyint } & {Whether or not Volume in autochanger } \\ + \hline +{StorageId } & {integer } & {Storage record ID } \\ + \hline +{DeviceId } & {integer } & {Device record ID } \\ + \hline +{MediaAddressing } & {integer } & {Method of addressing media } \\ + \hline +{VolReadTime } & {bigint } & {Time Reading Volume } \\ + \hline +{VolWriteTime } & {bigint } & {Time Writing Volume } \\ + \hline +{EndFile } & {integer } & {End File number of Volume } \\ + \hline +{EndBlock } & {integer } & {End block number of Volume } \\ + \hline +{LocationId } & {integer } & {Location record ID } \\ + \hline +{RecycleCount } & {integer } & {Number of times recycled } \\ + \hline +{InitialWrite } & {datetime } & {When Volume first written } \\ + \hline +{ScratchPoolId } & {integer } & {Id of Scratch Pool } \\ + \hline +{RecyclePoolId } & {integer } & {Pool ID where to recycle Volume } \\ + \hline +{Comment } & {blob } & {User text field } \\ + \hline + \end{longtable} @@ -614,13 +677,32 @@ created for each of the NumVols specified in the Pool resource record. \hline {AutoPrune } & {tinyint } & {yes|no for autopruning } \\ \hline -{Recycle } & {tinyint } & {yes|no for allowing auto recycling of Volume } -\\ +{Recycle } & {tinyint } & {yes|no for allowing auto recycling of Volume } \\ + \hline +{ActionOnPurge } & {tinyint } & {Default Volume ActionOnPurge } \\ \hline {PoolType } & {enum } & {Backup, Copy, Cloned, Archive, Migration } \\ \hline +{LabelType } & {tinyint } & {Type of label ANSI/Bacula } \\ + \hline {LabelFormat } & {Tinyblob } & {Label format } \\ \hline +{Enabled } {tinyint } & {Whether or not Volume can be written } \\ + \hline +{ScratchPoolId } & {integer } & {Id of Scratch Pool } \\ + \hline +{RecyclePoolId } & {integer } & {Pool ID where to recycle Volume } \\ + \hline +{NextPoolId } & {integer } & {Pool ID of next Pool } \\ + \hline +{MigrationHighBytes } & {bigint } & {High water mark for migration } \\ + \hline +{MigrationLowBytes } & {bigint } & {Low water mark for migration } \\ + \hline +{MigrationTime } & {bigint } & {Time before migration } \\ + \hline + + \end{longtable} @@ -659,31 +741,26 @@ number of the Media record for the current volume. The {\bf Client} table contains one entry for each machine backed up by Bacula in this database. Normally the Name is a fully qualified domain name. -\ -\addcontentsline{lot}{table}{Unsaved Files Table Layout} +\addcontentsline{lot}{table}{Storage Table Layout} \begin{longtable}{|l|l|l|} \hline -\multicolumn{3}{|l| }{\bf UnsavedFiles } \\ +\multicolumn{3}{|l| }{\bf Storage } \\ \hline \multicolumn{1}{|c| }{\bf Column Name } & \multicolumn{1}{c| }{\bf Data Type } & \multicolumn{1}{c| }{\bf Remark } \\ \hline -{UnsavedId } & {integer } & {Primary Key } \\ +{StorageId } & {integer } & {Unique Id } \\ \hline -{JobId } & {integer } & {JobId corresponding to this record } \\ +{Name } & {tinyblob } & {Resource name of Storage device } \\ \hline -{PathId } & {integer } & {Id of path } \\ +{AutoChanger } & {tinyint } & {Set if it is an autochanger } \\ \hline -{FilenameId } & {integer } & {Id of filename } -\\ \hline \end{longtable} -The {\bf UnsavedFiles} table contains one entry for each file that was not -saved. Note! This record is not yet implemented. +The {\bf Storage} table contains one entry for each Storage used. -\ \addcontentsline{lot}{table}{Counter Table Layout} \begin{longtable}{|l|l|l|} @@ -709,7 +786,140 @@ saved. Note! This record is not yet implemented. The {\bf Counter} table contains one entry for each permanent counter defined by the user. -\ +\addcontentsline{lot}{table}{Job History Table Layout} +\begin{longtable}{|l|l|p{2.5in}|} + \hline +\multicolumn{3}{|l| }{\bf JobHisto } \\ + \hline +\multicolumn{1}{|c| }{\bf Column Name } & \multicolumn{1}{c| }{\bf Data Type +} & \multicolumn{1}{c| }{\bf Remark } \\ + \hline +{JobId } & {integer } & {Primary Key } \\ + \hline +{Job } & {tinyblob } & {Unique Job Name } \\ + \hline +{Name } & {tinyblob } & {Job Name } \\ + \hline +{Type } & {binary(1) } & {Job Type: Backup, Copy, Clone, Archive, Migration +} \\ + \hline +{Level } & {binary(1) } & {Job Level } \\ + \hline +{ClientId } & {integer } & {Client index } \\ + \hline +{JobStatus } & {binary(1) } & {Job Termination Status } \\ + \hline +{SchedTime } & {datetime } & {Time/date when Job scheduled } \\ + \hline +{StartTime } & {datetime } & {Time/date when Job started } \\ + \hline +{EndTime } & {datetime } & {Time/date when Job ended } \\ + \hline +{RealEndTime } & {datetime } & {Time/date when original Job ended } \\ + \hline +{JobTDate } & {bigint } & {Start day in Unix format but 64 bits; used for +Retention period. } \\ + \hline +{VolSessionId } & {integer } & {Unique Volume Session ID } \\ + \hline +{VolSessionTime } & {integer } & {Unique Volume Session Time } \\ + \hline +{JobFiles } & {integer } & {Number of files saved in Job } \\ + \hline +{JobBytes } & {bigint } & {Number of bytes saved in Job } \\ + \hline +{JobErrors } & {integer } & {Number of errors during Job } \\ + \hline +{JobMissingFiles } & {integer } & {Number of files not saved (not yet used) } +\\ + \hline +{PoolId } & {integer } & {Link to Pool Record } \\ + \hline +{FileSetId } & {integer } & {Link to FileSet Record } \\ + \hline +{PrioJobId } & {integer } & {Link to prior Job Record when migrated } \\ + \hline +{PurgedFiles } & {tiny integer } & {Set when all File records purged } \\ + \hline +{HasBase } & {tiny integer } & {Set when Base Job run } +\\ \hline + +\end{longtable} + +The {bf JobHisto} table is the same as the Job table, but it keeps +long term statistics (i.e. it is not pruned with the Job). + + +\addcontentsline{lot}{table}{Log Table Layout} +\begin{longtable}{|l|l|l|} + \hline +\multicolumn{3}{|l| }{\bf Version } \\ + \hline +\multicolumn{1}{|c| }{\bf Column Name } & \multicolumn{1}{c| }{\bf Data Type +} & \multicolumn{1}{c| }{\bf Remark } \\ + \hline +{LogIdId } & {integer } & {Primary Key } +\\ \hline +{JobId } & {integer } & {Points to Job record } +\\ \hline +{Time } & {datetime } & {Time/date log record created } +\\ \hline +{LogText } & {blob } & {Log text } +\\ \hline + +\end{longtable} + +The {\bf Log} table contains a log of all Job output. + +\addcontentsline{lot}{table}{Location Table Layout} +\begin{longtable}{|l|l|l|} + \hline +\multicolumn{3}{|l| }{\bf Location } \\ + \hline +\multicolumn{1}{|c| }{\bf Column Name } & \multicolumn{1}{c| }{\bf Data Type +} & \multicolumn{1}{c| }{\bf Remark } \\ + \hline +{LocationId } & {integer } & {Primary Key } +\\ \hline +{Location } & {tinyblob } & {Text defining location } +\\ \hline +{Cost } & {integer } & {Relative cost of obtaining Volume } +\\ \hline +{Enabled } & {tinyint } & {Whether or not Volume is enabled } +\\ \hline + +\end{longtable} + +The {\bf Location} table defines where a Volume is physically. + + +\addcontentsline{lot}{table}{Location Log Table Layout} +\begin{longtable}{|l|l|l|} + \hline +\multicolumn{3}{|l| }{\bf LocationLog } \\ + \hline +\multicolumn{1}{|c| }{\bf Column Name } & \multicolumn{1}{c| }{\bf Data Type +} & \multicolumn{1}{c| }{\bf Remark } \\ + \hline +{locLogIdId } & {integer } & {Primary Key } +\\ \hline +{Date } & {datetime } & {Time/date log record created } +\\ \hline +{MediaId } & {integer } & {Points to Media record } +\\ \hline +{LocationId } & {integer } & {Points to Location record } +\\ \hline +{NewVolStatus } & {integer } & {enum: Full, Archive, Append, Recycle, Purged + Read-only, Disabled, Error, Busy, Used, Cleaning } +\\ \hline +{Enabled } & {tinyint } & {Whether or not Volume is enabled } +\\ \hline + + +\end{longtable} + +The {\bf Log} table contains a log of all Job output. + \addcontentsline{lot}{table}{Version Table Layout} \begin{longtable}{|l|l|l|} @@ -728,7 +938,6 @@ The {\bf Version} table defines the Bacula database version number. Bacula checks this number before reading the database to ensure that it is compatible with the Bacula binary file. -\ \addcontentsline{lot}{table}{Base Files Table Layout} \begin{longtable}{|l|l|l|} diff --git a/docs/manuals/de/developers/coverpage.tex b/docs/manuals/de/developers/coverpage.tex new file mode 100644 index 00000000..c1aaca82 --- /dev/null +++ b/docs/manuals/de/developers/coverpage.tex @@ -0,0 +1,28 @@ +\newfont{\bighead}{cmr17 at 36pt} +\parskip 10pt +\parindent 0pt + +\title{\includegraphics{\idir bacula-logo.eps} \\ \bigskip + \Huge{Bacula}$^{\normalsize \textregistered}$ \Huge{Developer's Guide} + \begin{center} + \large{It comes in the night and sucks + the essence from your computers. } + \end{center} +} + + +\author{Kern Sibbald} +\date{\vspace{1.0in}\today \\ + This manual documents Bacula version \fullversion \\ + \vspace{0.2in} + Copyright {\copyright} 1999-2009, Free Software Foundation Europe + e.V. \\ + Bacula {\textregistered} is a registered trademark of Kern Sibbald.\\ + \vspace{0.2in} + Permission is granted to copy, distribute and/or modify this document under the terms of the + GNU Free Documentation License, Version 1.2 published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. + A copy of the license is included in the section entitled "GNU Free Documentation License". +} + +\maketitle diff --git a/docs/manuals/de/developers/developers.kilepr b/docs/manuals/de/developers/developers.kilepr index 024c51d0..04d798b1 100644 --- a/docs/manuals/de/developers/developers.kilepr +++ b/docs/manuals/de/developers/developers.kilepr @@ -44,10 +44,10 @@ order=-1 [item:developers.tex] archive=true -column=36 -encoding=UTF-8 +column=0 +encoding= highlight=LaTeX -line=48 +line=73 open=true order=0 @@ -80,10 +80,19 @@ order=-1 [item:generaldevel.tex] archive=true -column=120 +column=62 encoding= -highlight= -line=0 +highlight=LaTeX +line=553 +open=false +order=2 + +[item:git.tex] +archive=true +column=13 +encoding=UTF-8 +highlight=LaTeX +line=339 open=false order=-1 @@ -141,6 +150,15 @@ line=0 open=false order=-1 +[item:pluginAPI.tex] +archive=true +column=32565 +encoding= +highlight= +line=0 +open=false +order=-1 + [item:porting.tex] archive=true column=0 @@ -154,10 +172,10 @@ order=-1 archive=true column=0 encoding= -highlight= +highlight=LaTeX line=0 open=false -order=-1 +order=0 [item:smartall.tex] archive=true diff --git a/docs/manuals/de/developers/developers.tex b/docs/manuals/de/developers/developers.tex index 3aec7edc..902fa8c8 100644 --- a/docs/manuals/de/developers/developers.tex +++ b/docs/manuals/de/developers/developers.tex @@ -1,5 +1,10 @@ %% %% +%% The following characters must be preceded by a backslash +%% to be entered as printable characters: +%% +%% # $ % & ~ _ ^ \ { } +%% \documentclass[10pt,a4paper]{book} @@ -9,6 +14,7 @@ \textheight 10in \textwidth 6.5in + \usepackage{html} \usepackage{float} \usepackage{graphicx} @@ -18,10 +24,14 @@ \usepackage{index} \usepackage{setspace} \usepackage{hyperref} +% \usepackage[linkcolor=black,colorlinks=true]{hyperref} \usepackage{url} - \makeindex +\newindex{dir}{ddx}{dnd}{Director Index} +\newindex{fd}{fdx}{fnd}{File Daemon Index} +\newindex{sd}{sdx}{snd}{Storage Daemon Index} +\newindex{console}{cdx}{cnd}{Console Index} \newindex{general}{idx}{ind}{General Index} \sloppy @@ -29,44 +39,19 @@ \begin{document} \sloppy -\newfont{\bighead}{cmr17 at 36pt} -\parskip 10pt -\parindent 0pt - -\title{\includegraphics{\idir bacula-logo.eps} \\ \bigskip - \Huge{Developers' Guide} - \begin{center} - \large{It comes in the night and sucks - the essence from your computers. } - \end{center} -} - - -\author{Kern Sibbald} -\date{\vspace{1.0in}\today \\ - This manual documents Bacula version \input{version} \\ - \vspace{0.2in} - Copyright \copyright 1999-2009, Free Software Foundation Europe - e.V. \\ - \vspace{0.2in} - Permission is granted to copy, distribute and/or modify this document under the terms of the - GNU Free Documentation License, Version 1.2 published by the Free Software Foundation; - with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. - A copy of the license is included in the section entitled "GNU Free Documentation License". -} - - -\maketitle +\include{coverpage} \clearpage +\pagenumbering{roman} \tableofcontents \clearpage -\listoffigures -\clearpage -\listoftables -\clearpage +\pagestyle{myheadings} +\markboth{Bacula Version \version}{Bacula Version \version} +\pagenumbering{arabic} \include{generaldevel} +\include{git} +\include{pluginAPI} \include{platformsupport} \include{daemonprotocol} \include{director} diff --git a/docs/manuals/de/catalog/do_echo b/docs/manuals/de/developers/do_echo similarity index 100% rename from docs/manuals/de/catalog/do_echo rename to docs/manuals/de/developers/do_echo diff --git a/docs/manuals/de/developers/generaldevel.tex b/docs/manuals/de/developers/generaldevel.tex index f29b0200..33312af4 100644 --- a/docs/manuals/de/developers/generaldevel.tex +++ b/docs/manuals/de/developers/generaldevel.tex @@ -380,301 +380,6 @@ So, end the end, the patch file is: \end{itemize} -\section{Bacula Git repositories} -\index{Git} -\addcontentsline{toc}{subsection}{Git repositories} -As of September 2009, the Bacula source code has been split into -three Git repositories. One is a repository that holds the -main Bacula source code with directories {\bf bacula}, {\bf gui}, -and {\bf regress}. The second repository contains -the directories {\bf docs} directory, and the third repository -contains the {\bf rescue} directory. All three repositories are -hosted on Source Forge. - -Previously everything was in a single SVN repository. -We have split the SVN repository into three because Git -offers significant advantages for ease of managing and integrating -developer's changes. However, one of the disadvantages of Git is that you -must work with the full repository, while SVN allows you to checkout -individual directories. If we put everything into a single Git -repository it would be far bigger than most developers would want -to checkout, so we have separted the docs and rescue into their own -repositories, and moved only the parts that are most actively -worked on by the developers (bacula, gui, and regress) to a the -Git Bacula repository. - -Bacula developers must now have a certain knowledege -of Git. - -\section{Git Usage} -\index{Git Usage} -\addcontentsline{toc}{subsection}{Git Usage} - -Please note that if you are familiar with SVN, Git is similar, -(and better), but there can be a few surprising differences that -can lead to damaging the history of the repository (repo) if -you attempt to force pushing data into the Git repo. - -The Bacula Git repo contains the subdirectories {\bf bacula}, {\bf gui}, -and {\bf regress}. With Git it is not possible to pull only a -single directory, because of the hash code nature of Git, you -must take all or nothing. - -For developers, the most important thing to remember about Git and -the Source Forge repository is not to "force" a {\bf push} to the -repository, and not to use the {\bf rebase} command on the {\bf -master} branch of the repository. Doing so, will possibly rewrite -the Git repository history and cause a lot of problems for the -project. - -You may and should use {\bf rebase} on your own branches that you -want to synchronize with the {\bf master} branch, but please -do not use {\bf rebase} on the {\bf master} branch. The proper -way of merging changes will be discussed below. - -You can get a full copy of the Source Forge Bacula Git repository with the -following command: - -\begin{verbatim} -git clone git://bacula.git.sourceforge.net/gitroot/bacula/bacula trunk -\end{verbatim} - -This will put a read-only copy into the directory {\bf trunk} -in your current directory, and {\bf trunk} will contain -the subdirectories: {\bf bacula}, {\bf gui}, and {\bf regress}. - -If you have write permission, you can get a copy of the Git -repo with: - -\begin{verbatim} -git clone ssh://@bacula.git.sourceforge.net/gitroot/bacula/bacula trunk -\end{verbatim} - -where you replace \verb++ with your Source Forge login -userid, and you must have previously uploaded your public ssh key -to Source Forge. - -The above command needs to be done only once. Thereafter, you can: - -\begin{verbatim} -cd trunk -git pull -\end{verbatim} - -As of August 2009, the size of the repository ({\bf trunk} in the above -example) will be approximately 55 Megabytes. However, if you build -from source in this directory and do a lot of updates and regression -testing, the directory could become several hundred megabytes. - -\subsection{Learning Git} -\index{Learning Git} -If you want to learn more about Git, we recommend that you visit:\\ -\elink{http://book.git-scm.com/}{http://book.git-scm.com/}. - -Some of the differences between Git and SVN are: -\begin{itemize} -\item Your main Git directory is a full Git repository to which you can - and must commit. -\item The Git database is kept in the directory {\bf .git} at the - top level of the directory. -\item all the important Git configuration information is kept in the - file {\bf .git/config} in ASCII format that is easy to manually edit. -\item When you do a {\bf commit} the changes are put in {\bf .git} - rather than in the external repository. -\item You can upload your changes to the external repository using - the command {\bf git push}. -\item You can download all the current changes in the external repository - and merge them into your {\bf master} branch using the command - {\bf gGit pull}. -\item The command {\bf git add} is used to add a new file to the - repository AND to tell Git that you want a file that has changed - to be in the next commit. This has lots of advantages, because - a {\bf git commit} only commits those files that have been - explicitly added. -\item You can add and commit all files modifed in one command - using {\bf git commit -a}. -\item This extra use of {\bf add} allows you to make a number - of changes then add only a few of the files and commit them, - then add more files and commit them until you have committed - everything. This has the advantage of allowing you to more - easily group small changes and commit them. -\item If you {\bf git pull} from the main repository and make - some changes, and before you do a {\bf git push}, someone - else pushes changes to the Git repository, you will probably - get an error message such as: - -\begin{verbatim} - git push - To git@github.com:bacula/bacula.git - ! [rejected] master -> master (non-fast forward) - error: failed to push some refs to 'git@github.com:bacula/bacula.git' -\end{verbatim} - - which is Git's way of telling you that the main repository has changed - and that if you push your changes, they will not be integrated properly. - As we have noted, you should never ask Git to force the push. - See below for an explanation of why. -\item To integrate (merge) your changes properly, you should always do - a {\bf git pull} just prior to doing a {\bf git push}. -\item If Git is unable to merge your changes or finds a conflict it - will tell you and you must do conflict resolution, which is much - easier in Git than in SVN. -\item Resolving conflicts is described below in the {\bf github} section. -\end{itemize} - -If you want to understand why it is not a good idea to force a -push to the repository, look at the following picture: - -\includegraphics[width=0.85\textwidth]{\idir git-edit-commit.eps} - -The above graphic has three lines of circles. Each circle represents -a commit, and time runs from the left to the right. The top line -shows the repository just before you are going to do a push. Note the -point at which you pulled is the circle on the left, your changes are -represented by the circle labeled {\bf Your mods}. It is shown below -to indicate that the changes are only in your local repository. Finally, -there are pushes A and B that came after the time at which you pulled. - -If you were to force your changes into the repository, Git would place them -immediately after the point at which you pulled them, so they would -go before the pushes A and B. However, doing so would rewrite the history -of the repository and make it very difficult for other users to synchronize -since they would have to somehow wedge their changes at some point before the -current HEAD of the repository. This situation is shown by the second line of -pushes. - -What you really want to do is to put your changes after Push B (the current HEAD). -This is shown in the third line of pushes. The best way to accomplish this is to -work in a branch, pull the repository so you have your master equal to HEAD (in first -line), then to rebase your branch on the current master and then commit it. The -exact commands to accomplish this are shown in the next couple of sections. - -\subsection{Publishing your changes} -\index{Publishing} -Since Git is more complex than SVN, it takes a bit of time to learn how -to use it properly, and if you are not careful, you can potentially create -a new history in the repository. In addition, since Git is a distributed -version control system, we prefer to receive a full branch submission rather -than simply a patch. To accomplish this, you must create your changes in -a branch, then {\bf push} them to some public repository -- it can be your -own repository that you publish or another. To simplify this phase for you, we -have created a publich Bacula Git repository on {\bf github} where you can -push your branch containing changes you would like integrated into the Bacula -source code. - -Once you have pushed your branch to {\bf github} or told us where we can pull -from your public repository, one of the senior Bacula devlopers will fetch your -changes, examine them, possibly make comments for changes they would like to -see, and as the final step, the senior developer will commit it to the -Bacula Source Forge Git repository. - -\subsection{github} -\index{github} -If you are going to submit code, you create a login on -the Github website:\\ -\elink{http://github.com/}{http://github.com/}\\ -before you clone the repository. -You must also upload your public ssh key. Please see the instructions for -doing so at the above link. Then you notify one of the senior Bacula developers, -who will authorize your Github user name as a committer to the Bacula repository. Finally, -you clone the Bacula repository with: - -\begin{verbatim} - git clone git@github.com:bacula/bacula.git -\end{verbatim} - -where you replace \verb++ with the name -of a directory that you want Git to create to hold your local Bacula Git -repository. - -Normally, you will work by creating a branch of the master branch of your -repository, make your modifications, then make sure it is up to date, and finally -push it to Github. Assuming you call the Bacula repository {\bf bacula}, you might -use the following commands: - -\begin{verbatim} -cd bacula -git checkout master -git pull -git branch /newbranch -git checkout /newbranch -(edit, ...) -git add -git commit -m "" -... -\end{verbatim} - -Note, we request you to create the branch name ({\bf \verb++/newbranch} with your Github -login name. This guarantees that the branch name will be unique and -easily identified as well. - -When you have completed working on your branch, you will do: - -\begin{verbatim} -cd bacula -git checkout /newbranch -git pull -git rebase master -\end{verbatim} - -If you have completed your edits before anyone has modified the repository, -the {\bf git rebase master} will report that there was nothing to do. Otherwise, -it will merge the changes that were made in the repository before your changes. -If there are any conflicts, Git will tell you. Typically resolving conflicts with -Git is relatively easy. You simply make a diff: - -\begin{verbatim} -git diff -\end{verbatim} - -Then edit each file that was listed in the {\bf git diff} to remove the -conflict, which will be indicated by lines of: - -\begin{verbatim} -<<<<<<< HEAD -text ->>>>>>>> -other text -===== -\end{verbatim} - -where {\bf text} is what is in the Bacula repository, and {\bf other text} -is what you have changed. - -Once you have eliminated the conflict, the {\bf git diff} will show nothing, -and you must do a: - -\begin{verbatim} -git add -\end{verbatim} - -Once you have fixed all the files with conflicts in the above manner, you enter: - -\begin{verbatim} -git rebase --continue -\end{verbatim} - -and your rebase will be complete. - -If for some reason, before doing the --continue, you want to abort the rebase and return to what you had, you enter: - -\begin{verbatim} -git rebase --abort -\end{verbatim} - -Finally to upload your branch, you do: - -\begin{verbatim} -git push origin /newbranch -\end{verbatim} - -If you wish to delete it later, you can use: - -\begin{verbatim} -git push origin :/newbranch -\end{verbatim} - - \section{Developing Bacula} \index{Developing Bacula} \index{Bacula!Developing} diff --git a/docs/manuals/de/developers/git.tex b/docs/manuals/de/developers/git.tex new file mode 100644 index 00000000..6674441c --- /dev/null +++ b/docs/manuals/de/developers/git.tex @@ -0,0 +1,372 @@ +\chapter{Bacula Git Usage} +\label{_GitChapterStart} +\index{Git} +\index{Git!Repo} +\addcontentsline{toc}{section}{Bacula Bit Usage} + +This chapter is intended to help you use the Git source code +repositories to obtain, modify, and submit Bacula source code. + + +\section{Bacula Git repositories} +\index{Git} +\addcontentsline{toc}{subsection}{Git repositories} +As of September 2009, the Bacula source code has been split into +three Git repositories. One is a repository that holds the +main Bacula source code with directories {\bf bacula}, {\bf gui}, +and {\bf regress}. The second repository contains +the directories {\bf docs} directory, and the third repository +contains the {\bf rescue} directory. All three repositories are +hosted on Source Forge. + +Previously everything was in a single SVN repository. +We have split the SVN repository into three because Git +offers significant advantages for ease of managing and integrating +developer's changes. However, one of the disadvantages of Git is that you +must work with the full repository, while SVN allows you to checkout +individual directories. If we put everything into a single Git +repository it would be far bigger than most developers would want +to checkout, so we have separted the docs and rescue into their own +repositories, and moved only the parts that are most actively +worked on by the developers (bacula, gui, and regress) to a the +Git Bacula repository. + +Bacula developers must now have a certain knowledege of Git. + +\section{Git Usage} +\index{Git Usage} +\addcontentsline{toc}{subsection}{Git Usage} + +Please note that if you are familiar with SVN, Git is similar, +(and better), but there can be a few surprising differences that +can be very confusing (nothing worse than converting from CVS to SVN). + +The main Bacula Git repo contains the subdirectories {\bf bacula}, {\bf gui}, +and {\bf regress}. With Git it is not possible to pull only a +single directory, because of the hash code nature of Git, you +must take all or nothing. + +For developers, the most important thing to remember about Git and +the Source Forge repository is not to "force" a {\bf push} to the +repository. Doing so, can possibly rewrite +the Git repository history and cause a lot of problems for the +project. + +You can get a full copy of the Source Forge Bacula Git repository with the +following command: + +\begin{verbatim} +git clone git://bacula.git.sourceforge.net/gitroot/bacula/bacula trunk +\end{verbatim} + +This will put a read-only copy into the directory {\bf trunk} +in your current directory, and {\bf trunk} will contain +the subdirectories: {\bf bacula}, {\bf gui}, and {\bf regress}. +Obviously you can use any name an not just {\bf trunk}. In fact, +once you have the repository in say {\bf trunk}, you can copy the +whole directory to another place and have a fully functional +git repository. + +If you have write permission to the Source Forge +repository, you can get a copy of the Git repo with: + +\begin{verbatim} +git clone ssh://@bacula.git.sourceforge.net/gitroot/bacula/bacula trunk +\end{verbatim} + +where you replace \verb++ with your Source Forge login +userid, and you must have previously uploaded your public ssh key +to Source Forge. + +The above command needs to be done only once. Thereafter, you can: + +\begin{verbatim} +cd trunk +git pull # refresh my repo with the latest code +\end{verbatim} + +As of August 2009, the size of the repository ({\bf trunk} in the above +example) will be approximately 55 Megabytes. However, if you build +from source in this directory and do a lot of updates and regression +testing, the directory could become several hundred megabytes. + +\subsection{Learning Git} +\index{Learning Git} +If you want to learn more about Git, we recommend that you visit:\\ +\elink{http://book.git-scm.com/}{http://book.git-scm.com/}. + +Some of the differences between Git and SVN are: +\begin{itemize} +\item Your main Git directory is a full Git repository to which you can + and must commit. In fact, we suggest you commit frequently. +\item When you commit, the commit goes into your local Git + database. You must use another command to write it to the + master Source Forge repository (see below). +\item The local Git database is kept in the directory {\bf .git} at the + top level of the directory. +\item All the important Git configuration information is kept in the + file {\bf .git/config} in ASCII format that is easy to manually edit. +\item When you do a {\bf commit} the changes are put in {\bf .git} + rather but not in the main Source Forge repository. +\item You can push your changes to the external repository using + the command {\bf git push} providing you have write permission + on the repository. +\item We restrict developers just learning git to have read-only + access until they feel comfortable with git before giving them + write access. +\item You can download all the current changes in the external repository + and merge them into your {\bf master} branch using the command + {\bf git pull}. +\item The command {\bf git add} is used to add a new file to the + repository AND to tell Git that you want a file that has changed + to be in the next commit. This has lots of advantages, because + a {\bf git commit} only commits those files that have been + explicitly added. Note with SVN {\bf add} is used only + to add new files to the repo. +\item You can add and commit all files modifed in one command + using {\bf git commit -a}. +\item This extra use of {\bf add} allows you to make a number + of changes then add only a few of the files and commit them, + then add more files and commit them until you have committed + everything. This has the advantage of allowing you to more + easily group small changes and do individaual commits on them. + By keeping commits smaller, and separated into topics, it makes + it much easier to later select certain commits for backporting. +\item If you {\bf git pull} from the main repository and make + some changes, and before you do a {\bf git push} someone + else pushes changes to the Git repository, your changes will + apply to an older version of the repository you will probably + get an error message such as: + +\begin{verbatim} + git push + To git@github.com:bacula/bacula.git + ! [rejected] master -> master (non-fast forward) + error: failed to push some refs to 'git@github.com:bacula/bacula.git' +\end{verbatim} + + which is Git's way of telling you that the main repository has changed + and that if you push your changes, they will not be integrated properly. + This is very similar to what happens when you do an "svn update" and + get merge conflicts. + As we have noted above, you should never ask Git to force the push. + See below for an explanation of why. +\item To integrate (merge) your changes properly, you should always do + a {\bf git pull} just prior to doing a {\bf git push}. +\item If Git is unable to merge your changes or finds a conflict it + will tell you and you must do conflict resolution, which is much + easier in Git than in SVN. +\item Resolving conflicts is described below in the {\bf github} section. +\end{itemize} + +\section{Step by Step Modifying Bacula Code} +Suppose you want to download Bacula source code, build it, make +a change, then submit your change to the Bacula developers. What +would you do? + +\begin{itemize} +\item Download the Source code:\\ +\begin{verbatim} +git clone ssh://@bacula.git.sourceforge.net/gitroot/bacula/bacula trunk +\end{verbatim} + +\item Configure and Build Bacula:\\ +\begin{verbatim} +./configure (all-your-normal-options) +make +\end{verbatim} + +\item Create a branch to work on: +\begin{verbatim} +cd trunk/bacula +git checkout -b bugfix master +\end{verbatim} + +\item Edit, build, Test, ...\\ +\begin{verbatim} +edit file jcr.h +make +test +\end{verbatim} + +\item commit your work: +\begin{verbatim} +git commit -am "Short comment on what I did" +\end{verbatim} + +\item Possibly repeat the above two items + +\item Switch back to the master branch:\\ +\begin{verbatim} +git checkout master +\end{verbatim} + +\item Pull the latest changes:\\ +\begin{verbatim} +git pull +\end{verbatim} + +\item Get back on your bugfix branch:\\ +\begin{verbatim} +git checkout bugfix +\end{verbatim} + +\item Merge your changes and correct any conflicts:\\ +\begin{verbatim} +git rebase master bugfix +\end{verbatim} + +\item Fix any conflicts:\\ +You will be notified if there are conflicts. The first +thing to do is: + +\begin{verbatim} +git diff +\end{verbatim} + +This will produce a diff of only the files having a conflict. +Fix each file in turn. When it is fixed, the diff for that file +will go away. + +For each file fixed, you must do the same as SVN, inform git with: + +\begin{verbatim} +git add (name-of-file-no-longer-in-conflict) +\end{verbatim} + +\item When all files are fixed do: +\begin{verbatim} +git rebase --continue +\end{verbatim} + +\item When you are ready to send a patch, do the following:\\ +\begin{verbatim} +git checkout bugfix +git format-patch -M master +\end{verbatim} +Look at the files produced. They should be numbered 0001-xxx.patch +where there is one file for each commit you did, number sequentially, +and the xxx is what you put in the commit comment. + +\item If the patch files are good, send them by email to the developers +as attachments. + +\end{itemize} + + + +\subsection{More Details} + +Normally, you will work by creating a branch of the master branch of your +repository, make your modifications, then make sure it is up to date, and finally +create format-patch patches or push it to the Source Forge repo. Assuming +you call the Bacula repository {\bf trunk}, you might use the following +commands: + +\begin{verbatim} +cd trunk +git checkout master +git pull +git checkout -b newbranch master +(edit, ...) +git add +git commit -m "" +... +\end{verbatim} + +When you have completed working on your branch, you will do: + +\begin{verbatim} +cd trunk +git checkout newbranch # ensure I am on my branch +git pull # get latest source code +git rebase master # merge my code +\end{verbatim} + +If you have completed your edits before anyone has modified the repository, +the {\bf git rebase master} will report that there was nothing to do. Otherwise, +it will merge the changes that were made in the repository before your changes. +If there are any conflicts, Git will tell you. Typically resolving conflicts with +Git is relatively easy. You simply make a diff: + +\begin{verbatim} +git diff +\end{verbatim} + +Then edit each file that was listed in the {\bf git diff} to remove the +conflict, which will be indicated by lines of: + +\begin{verbatim} +<<<<<<< HEAD +text +>>>>>>>> +other text +===== +\end{verbatim} + +where {\bf text} is what is in the Bacula repository, and {\bf other text} +is what you have changed. + +Once you have eliminated the conflict, the {\bf git diff} will show nothing, +and you must do a: + +\begin{verbatim} +git add +\end{verbatim} + +Once you have fixed all the files with conflicts in the above manner, you enter: + +\begin{verbatim} +git rebase --continue +\end{verbatim} + +and your rebase will be complete. + +If for some reason, before doing the --continue, you want to abort the rebase and return to what you had, you enter: + +\begin{verbatim} +git rebase --abort +\end{verbatim} + +Finally to make a set of patch files + +\begin{verbatim} +git format-patch -M master +\end{verbatim} + +When you see your changes have been integrated and pushed to the +main repo, you can delete your branch with: + +\begin{verbatim} +git checkout master +git branch -D newbranch +\end{verbatim} + + +\section{Forcing Changes} +If you want to understand why it is not a good idea to force a +push to the repository, look at the following picture: + +\includegraphics[width=0.85\textwidth]{\idir git-edit-commit.eps} + +The above graphic has three lines of circles. Each circle represents +a commit, and time runs from the left to the right. The top line +shows the repository just before you are going to do a push. Note the +point at which you pulled is the circle on the left, your changes are +represented by the circle labeled {\bf Your mods}. It is shown below +to indicate that the changes are only in your local repository. Finally, +there are pushes A and B that came after the time at which you pulled. + +If you were to force your changes into the repository, Git would place them +immediately after the point at which you pulled them, so they would +go before the pushes A and B. However, doing so would rewrite the history +of the repository and make it very difficult for other users to synchronize +since they would have to somehow wedge their changes at some point before the +current HEAD of the repository. This situation is shown by the second line of +pushes. + +What you really want to do is to put your changes after Push B (the current HEAD). +This is shown in the third line of pushes. The best way to accomplish this is to +work in a branch, pull the repository so you have your master equal to HEAD (in first +line), then to rebase your branch on the current master and then commit it. The +exact commands to accomplish this are shown in the next couple of sections. diff --git a/docs/manuals/de/developers/gui-interface.tex b/docs/manuals/de/developers/gui-interface.tex new file mode 100644 index 00000000..2733cda9 --- /dev/null +++ b/docs/manuals/de/developers/gui-interface.tex @@ -0,0 +1,102 @@ +%% +%% + +\chapter*{Implementing a GUI Interface} +\label{_ChapterStart} +\index[general]{Interface!Implementing a Bacula GUI } +\index[general]{Implementing a Bacula GUI Interface } +\addcontentsline{toc}{section}{Implementing a Bacula GUI Interface} + +\section{General} +\index[general]{General } +\addcontentsline{toc}{subsection}{General} + +This document is intended mostly for developers who wish to develop a new GUI +interface to {\bf Bacula}. + +\subsection{Minimal Code in Console Program} +\index[general]{Program!Minimal Code in Console } +\index[general]{Minimal Code in Console Program } +\addcontentsline{toc}{subsubsection}{Minimal Code in Console Program} + +Until now, I have kept all the Catalog code in the Directory (with the +exception of dbcheck and bscan). This is because at some point I would like to +add user level security and access. If we have code spread everywhere such as +in a GUI this will be more difficult. The other advantage is that any code you +add to the Director is automatically available to both the tty console program +and the GNOME program. The major disadvantage is it increases the size of the +code -- however, compared to Networker the Bacula Director is really tiny. + +\subsection{GUI Interface is Difficult} +\index[general]{GUI Interface is Difficult } +\index[general]{Difficult!GUI Interface is } +\addcontentsline{toc}{subsubsection}{GUI Interface is Difficult} + +Interfacing to an interactive program such as Bacula can be very difficult +because the interfacing program must interpret all the prompts that may come. +This can be next to impossible. There are are a number of ways that Bacula is +designed to facilitate this: + +\begin{itemize} +\item The Bacula network protocol is packet based, and thus pieces of +information sent can be ASCII or binary. +\item The packet interface permits knowing where the end of a list is. +\item The packet interface permits special ``signals'' to be passed rather +than data. +\item The Director has a number of commands that are non-interactive. They +all begin with a period, and provide things such as the list of all Jobs, +list of all Clients, list of all Pools, list of all Storage, ... Thus the GUI +interface can get to virtually all information that the Director has in a +deterministic way. See \lt{}bacula-source\gt{}/src/dird/ua\_dotcmds.c for +more details on this. +\item Most console commands allow all the arguments to be specified on the +command line: e.g. {\bf run job=NightlyBackup level=Full} +\end{itemize} + +One of the first things to overcome is to be able to establish a conversation +with the Director. Although you can write all your own code, it is probably +easier to use the Bacula subroutines. The following code is used by the +Console program to begin a conversation. + +\footnotesize +\begin{verbatim} +static BSOCK *UA_sock = NULL; +static JCR *jcr; +... + read-your-config-getting-address-and-pasword; + UA_sock = bnet_connect(NULL, 5, 15, "Director daemon", dir->address, + NULL, dir->DIRport, 0); + if (UA_sock == NULL) { + terminate_console(0); + return 1; + } + jcr.dir_bsock = UA_sock; + if (!authenticate_director(\&jcr, dir)) { + fprintf(stderr, "ERR=%s", UA_sock->msg); + terminate_console(0); + return 1; + } + read_and_process_input(stdin, UA_sock); + if (UA_sock) { + bnet_sig(UA_sock, BNET_TERMINATE); /* send EOF */ + bnet_close(UA_sock); + } + exit 0; +\end{verbatim} +\normalsize + +Then the read\_and\_process\_input routine looks like the following: + +\footnotesize +\begin{verbatim} + get-input-to-send-to-the-Director; + bnet_fsend(UA_sock, "%s", input); + stat = bnet_recv(UA_sock); + process-output-from-the-Director; +\end{verbatim} +\normalsize + +For a GUI program things will be a bit more complicated. Basically in the very +inner loop, you will need to check and see if any output is available on the +UA\_sock. For an example, please take a look at the GNOME GUI interface code +in: \lt{}bacula-source\>/src/gnome-console/console.c diff --git a/docs/manuals/es/concepts/pluginAPI.tex b/docs/manuals/de/developers/pluginAPI.tex similarity index 100% rename from docs/manuals/es/concepts/pluginAPI.tex rename to docs/manuals/de/developers/pluginAPI.tex diff --git a/docs/manuals/de/developers/regression.tex b/docs/manuals/de/developers/regression.tex new file mode 100644 index 00000000..2d4c90ba --- /dev/null +++ b/docs/manuals/de/developers/regression.tex @@ -0,0 +1,619 @@ +%% +%% + +\chapter{Bacula Regression Testing} +\label{_ChapterStart8} +\index{Testing!Bacula Regression} +\index{Bacula Regression Testing} +\addcontentsline{toc}{section}{Bacula Regression Testing} + +\section{General} +\index{General} +\addcontentsline{toc}{section}{General} + +This document is intended mostly for developers who wish to ensure that their +changes to Bacula don't introduce bugs in the base code. However, you +don't need to be a developer to run the regression scripts, and we +recommend them before putting your system into production, and before each +upgrade, especially if you build from source code. They are +simply shell scripts that drive Bacula through bconsole and then typically +compare the input and output with {\bf diff}. + +You can find the existing regression scripts in the Bacula developer's +{\bf git} repository on SourceForge. We strongly recommend that you {\bf +clone} the repository because afterwards, you can easily get pull the +updates that have been made. + +To get started, we recommend that you create a directory named {\bf +bacula}, under which you will put the current source code and the current +set of regression scripts. Below, we will describe how to set this up. + +The top level directory that we call {\bf bacula} can be named anything you +want. Note, all the standard regression scripts run as non-root and can be +run on the same machine as a production Bacula system (the developers run +it this way). + +To create the directory structure for the current trunk and to +clone the repository, do the following (note, we assume you +are working in your home directory in a non-root account): + +\footnotesize +\begin{verbatim} +cd +git clone git://bacula.git.sourceforge.net/gitroot/bacula bacula +\end{verbatim} +\normalsize + +This will create the directory {\bf bacula} and populate it with +three directories: {\bf bacula}, {\bf gui}, and {\bf regress}. +{\bf bacula} contains the Bacula source code; {\bf gui} contains +certain gui programs that you will not need, and {\bf regress} contains +all the regression scripts. The above should be needed only +once. Thereafter to update to the latest code, you do: + +\footnotesize +\begin{verbatim} +cd bacula +git pull +\end{verbatim} +\normalsize + +If you want to test with SQLite and it is not installed on your system, +you will need to download the latest depkgs release from Source Forge and +unpack it into {\bf depkgs}, then simply: + +\footnotesize +\begin{verbatim} +cd depkgs +make +\end{verbatim} +\normalsize + + +There are two different aspects of regression testing that this document will +discuss: 1. Running the Regression Script, 2. Writing a Regression test. + +\section{Running the Regression Script} +\index{Running the Regression Script} +\index{Script!Running the Regression} +\addcontentsline{toc}{section}{Running the Regression Script} + +There are a number of different tests that may be run, such as: the standard +set that uses disk Volumes and runs under any userid; a small set of tests +that write to tape; another set of tests where you must be root to run them. +Normally, I run all my tests as non-root and very rarely run the root +tests. The tests vary in length, and running the full tests including disk +based testing, tape based testing, autochanger based testing, and multiple +drive autochanger based testing can take 3 or 4 hours. + +\subsection{Setting the Configuration Parameters} +\index{Setting the Configuration Parameters} +\index{Parameters!Setting the Configuration} +\addcontentsline{toc}{subsection}{Setting the Configuration Parameters} + +There is nothing you need to change in the source directory. + +To begin: + +\footnotesize +\begin{verbatim} +cd bacula/regress +\end{verbatim} +\normalsize + + +The +very first time you are going to run the regression scripts, you will +need to create a custom config file for your system. +We suggest that you start by: + +\footnotesize +\begin{verbatim} +cp prototype.conf config +\end{verbatim} +\normalsize + +Then you can edit the {\bf config} file directly. + +\footnotesize +\begin{verbatim} + +# Where to get the source to be tested +BACULA_SOURCE="${HOME}/bacula/bacula" + +# Where to send email !!!!! Change me !!!!!!! +EMAIL=your-name@your-domain.com +SMTP_HOST="localhost" + +# Full "default" path where to find sqlite (no quotes!) +SQLITE3_DIR=${HOME}/depkgs/sqlite3 +SQLITE_DIR=${HOME}/depkgs/sqlite + +TAPE_DRIVE="/dev/nst0" +# if you don't have an autochanger set AUTOCHANGER to /dev/null +AUTOCHANGER="/dev/sg0" +# For two drive tests -- set to /dev/null if you do not have it +TAPE_DRIVE1="/dev/null" + +# This must be the path to the autochanger including its name +AUTOCHANGER_PATH="/usr/sbin/mtx" + +# Set your database here +#WHICHDB="--with-sqlite=${SQLITE_DIR}" +#WHICHDB="--with-sqlite3=${SQLITE3_DIR}" +#WHICHDB="--with-mysql" +WHICHDB="--with-postgresql" + +# Set this to "--with-tcp-wrappers" or "--without-tcp-wrappers" +TCPWRAPPERS="--with-tcp-wrappers" + +# Set this to "" to disable OpenSSL support, "--with-openssl=yes" +# to enable it, or provide the path to the OpenSSL installation, +# eg "--with-openssl=/usr/local" +OPENSSL="--with-openssl" + +# You may put your real host name here, but localhost is valid also +# and it has the advantage that it works on a non-newtworked machine +HOST="localhost" + +\end{verbatim} +\normalsize + +\begin{itemize} +\item {\bf BACULA\_SOURCE} should be the full path to the Bacula source code + that you wish to test. It will be loaded configured, compiled, and + installed with the "make setup" command, which needs to be done only + once each time you change the source code. + +\item {\bf EMAIL} should be your email addres. Please remember to change this + or I will get a flood of unwanted messages. You may or may not want to see + these emails. In my case, I don't need them so I direct it to the bit bucket. + +\item {\bf SMTP\_HOST} defines where your SMTP server is. + +\item {\bf SQLITE\_DIR} should be the full path to the sqlite package, must + be build before running a Bacula regression, if you are using SQLite. This + variable is ignored if you are using MySQL or PostgreSQL. To use PostgreSQL, + edit the Makefile and change (or add) WHICHDB?=``\verb{--{with-postgresql''. For + MySQL use ``WHICHDB=''\verb{--{with-mysql``. + + The advantage of using SQLite is that it is totally independent of any + installation you may have running on your system, and there is no + special configuration or authorization that must be done to run it. + With both MySQL and PostgreSQL, you must pre-install the packages, + initialize them and ensure that you have authorization to access the + database and create and delete tables. + +\item {\bf TAPE\_DRIVE} is the full path to your tape drive. The base set of + regression tests do not use a tape, so this is only important if you want to + run the full tests. Set this to /dev/null if you do not have a tape drive. + +\item {\bf TAPE\_DRIVE1} is the full path to your second tape drive, if + have one. The base set of + regression tests do not use a tape, so this is only important if you want to + run the full two drive tests. Set this to /dev/null if you do not have a + second tape drive. + +\item {\bf AUTOCHANGER} is the name of your autochanger control device. Set this to + /dev/null if you do not have an autochanger. + +\item {\bf AUTOCHANGER\_PATH} is the full path including the program name for + your autochanger program (normally {\bf mtx}. Leave the default value if you + do not have one. + +\item {\bf TCPWRAPPERS} defines whether or not you want the ./configure + to be performed with tcpwrappers enabled. + +\item {\bf OPENSSL} used to enable/disable SSL support for Bacula + communications and data encryption. + +\item {\bf HOST} is the hostname that it will use when building the + scripts. The Bacula daemons will be named -dir, -fd, + ... It is also the name of the HOST machine that to connect to the + daemons by the network. Hence the name should either be your real + hostname (with an appropriate DNS or /etc/hosts entry) or {\bf + localhost} as it is in the default file. + +\item {\bf bin} is the binary location. + +\item {\bf scripts} is the bacula scripts location (where we could find + database creation script, autochanger handler, etc.) + +\end{itemize} + +\subsection{Building the Test Bacula} +\index{Building the Test Bacula} +\index{Bacula!Building the Test} +\addcontentsline{toc}{subsection}{Building the Test Bacula} + +Once the above variables are set, you can build the Makefile by entering: + +\footnotesize +\begin{verbatim} +./config xxx.conf +\end{verbatim} +\normalsize + +Where xxx.conf is the name of the conf file containing your system parameters. +This will build a Makefile from Makefile.in, and you should not need to +do this again unless you want to change the database or other regression +configuration parameter. + + +\subsection{Setting up your SQL engine} +\index{Setting up your SQL engine} +\addcontentsline{toc}{subsection}{Setting up your SQL engine} +If you are using SQLite or SQLite3, there is nothing more to do; you can +simply run the tests as described in the next section. + +If you are using MySQL or PostgreSQL, you will need to establish an +account with your database engine for the user name {\bf regress} and +you will need to manually create a database named {\bf regress} that can be +used by user name regress, which means you will have to give the user +regress sufficient permissions to use the database named regress. +There is no password on the regress account. + +You have probably already done this procedure for the user name and +database named bacula. If not, the manual describes roughly how to +do it, and the scripts in bacula/regress/build/src/cats named +create\_mysql\_database, create\_postgresql\_database, grant\_mysql\_privileges, +and grant\_postgresql\_privileges may be of a help to you. + +Generally, to do the above, you will need to run under root to +be able to create databases and modify permissions within MySQL and +PostgreSQL. + + +\subsection{Running the Disk Only Regression} +\index{Regression!Running the Disk Only} +\index{Running the Disk Only Regression} +\addcontentsline{toc}{subsection}{Running the Disk Only Regression} + +The simplest way to copy the source code, configure it, compile it, link +it, and run the tests is to use a helper script: + +\footnotesize +\begin{verbatim} +./do_disk +\end{verbatim} +\normalsize + + + + +This will run the base set of tests using disk Volumes. +If you are testing on a +non-Linux machine several of the of the tests may not be run. In any case, +as we add new tests, the number will vary. It will take about 1 hour +and you don't need to be root +to run these tests (I run under my regular userid). The result should be +something similar to: + +\footnotesize +\begin{verbatim} +Test results + ===== auto-label-test OK 12:31:33 ===== + ===== backup-bacula-test OK 12:32:32 ===== + ===== bextract-test OK 12:33:27 ===== + ===== bscan-test OK 12:34:47 ===== + ===== bsr-opt-test OK 12:35:46 ===== + ===== compressed-test OK 12:36:52 ===== + ===== compressed-encrypt-test OK 12:38:18 ===== + ===== concurrent-jobs-test OK 12:39:49 ===== + ===== data-encrypt-test OK 12:41:11 ===== + ===== encrypt-bug-test OK 12:42:00 ===== + ===== fifo-test OK 12:43:46 ===== + ===== backup-bacula-fifo OK 12:44:54 ===== + ===== differential-test OK 12:45:36 ===== + ===== four-concurrent-jobs-test OK 12:47:39 ===== + ===== four-jobs-test OK 12:49:22 ===== + ===== incremental-test OK 12:50:38 ===== + ===== query-test OK 12:51:37 ===== + ===== recycle-test OK 12:53:52 ===== + ===== restore2-by-file-test OK 12:54:53 ===== + ===== restore-by-file-test OK 12:55:40 ===== + ===== restore-disk-seek-test OK 12:56:29 ===== + ===== six-vol-test OK 12:57:44 ===== + ===== span-vol-test OK 12:58:52 ===== + ===== sparse-compressed-test OK 13:00:00 ===== + ===== sparse-test OK 13:01:04 ===== + ===== two-jobs-test OK 13:02:39 ===== + ===== two-vol-test OK 13:03:49 ===== + ===== verify-vol-test OK 13:04:56 ===== + ===== weird-files2-test OK 13:05:47 ===== + ===== weird-files-test OK 13:06:33 ===== + ===== migration-job-test OK 13:08:15 ===== + ===== migration-jobspan-test OK 13:09:33 ===== + ===== migration-volume-test OK 13:10:48 ===== + ===== migration-time-test OK 13:12:59 ===== + ===== hardlink-test OK 13:13:50 ===== + ===== two-pool-test OK 13:18:17 ===== + ===== fast-two-pool-test OK 13:24:02 ===== + ===== two-volume-test OK 13:25:06 ===== + ===== incremental-2disk OK 13:25:57 ===== + ===== 2drive-incremental-2disk OK 13:26:53 ===== + ===== scratch-pool-test OK 13:28:01 ===== +Total time = 0:57:55 or 3475 secs + +\end{verbatim} +\normalsize + +and the working tape tests are run with + +\footnotesize +\begin{verbatim} +make full_test +\end{verbatim} +\normalsize + + +\footnotesize +\begin{verbatim} +Test results + + ===== Bacula tape test OK ===== + ===== Small File Size test OK ===== + ===== restore-by-file-tape test OK ===== + ===== incremental-tape test OK ===== + ===== four-concurrent-jobs-tape OK ===== + ===== four-jobs-tape OK ===== +\end{verbatim} +\normalsize + +Each separate test is self contained in that it initializes to run Bacula from +scratch (i.e. newly created database). It will also kill any Bacula session +that is currently running. In addition, it uses ports 8101, 8102, and 8103 so +that it does not intefere with a production system. + +Alternatively, you can do the ./do\_disk work by hand with: + +\footnotesize +\begin{verbatim} +make setup +\end{verbatim} +\normalsize + +The above will then copy the source code within +the regression tree (in directory regress/build), configure it, and build it. +There should be no errors. If there are, please correct them before +continuing. From this point on, as long as you don't change the Bacula +source code, you should not need to repeat any of the above steps. If +you pull down a new version of the source code, simply run {\bf make setup} +again. + + +Once Bacula is built, you can run the basic disk only non-root regression test +by entering: + +\footnotesize +\begin{verbatim} +make test +\end{verbatim} +\normalsize + + +\subsection{Other Tests} +\index{Other Tests} +\index{Tests!Other} +\addcontentsline{toc}{subsection}{Other Tests} + +There are a number of other tests that can be run as well. All the tests are a +simply shell script keep in the regress directory. For example the ''make +test`` simply executes {\bf ./all-non-root-tests}. The other tests, which +are invoked by directly running the script are: + +\begin{description} + +\item [all\_non-root-tests] + \index{all\_non-root-tests} + All non-tape tests not requiring root. This is the standard set of tests, +that in general, backup some data, then restore it, and finally compares the +restored data with the original data. + +\item [all-root-tests] + \index{all-root-tests} + All non-tape tests requiring root permission. These are a relatively small +number of tests that require running as root. The amount of data backed up +can be quite large. For example, one test backs up /usr, another backs up +/etc. One or more of these tests reports an error -- I'll fix it one day. + +\item [all-non-root-tape-tests] + \index{all-non-root-tape-tests} + All tape test not requiring root. There are currently three tests, all run +without being root, and backup to a tape. The first two tests use one volume, +and the third test requires an autochanger, and uses two volumes. If you +don't have an autochanger, then this script will probably produce an error. + +\item [all-tape-and-file-tests] + \index{all-tape-and-file-tests} + All tape and file tests not requiring root. This includes just about +everything, and I don't run it very often. +\end{description} + +\subsection{If a Test Fails} +\index{Fails!If a Test} +\index{If a Test Fails} +\addcontentsline{toc}{subsection}{If a Test Fails} + +If you one or more tests fail, the line output will be similar to: + +\footnotesize +\begin{verbatim} + !!!!! concurrent-jobs-test failed!!! !!!!! +\end{verbatim} +\normalsize + +If you want to determine why the test failed, you will need to rerun the +script with the debug output turned on. You do so by defining the +environment variable {\bf REGRESS\_DEBUG} with commands such as: + +\begin{verbatim} +REGRESS_DEBUG=1 +export REGRESS_DEBUG +\end{verbatim} + +Then from the "regress" directory (all regression scripts assume that +you have "regress" as the current directory), enter: + +\begin{verbatim} +tests/test-name +\end{verbatim} + +where test-name should be the name of a test script -- for example: +{\bf tests/backup-bacula-test}. + +\section{Testing a Binary Installation} +\index{Test!Testing a Binary Installation} + +If you have installed your Bacula from a binary release such as (rpms or debs), +you can still run regression tests on it. +First, make sure that your regression {\bf config} file uses the same catalog backend as +your installed binaries. Then define the variables \texttt{bin} and \texttt{scripts} variables +in your config file. + +Example: +\begin{verbatim} +bin=/opt/bacula/bin +scripts=/opt/bacula/scripts +\end{verbatim} + +The \texttt{./scripts/prepare-other-loc} will tweak the regress scripts to use +your binary location. You will need to run it manually once before you run any +regression tests. + +\begin{verbatim} +$ ./scripts/prepare-other-loc +$ ./tests/backup-bacula-test +... +\end{verbatim} + +All regression scripts must be run by hand or by calling the test scripts. +These are principally scripts that begin with {\bf all\_...} such as {\bf all\_disk\_tests}, +{\bf ./all\_test} ... +None of the +{\bf ./do\_disk}, {\bf ./do\_all}, {\bf ./nightly...} scripts will work. + +If you want to switch back to running the regression scripts from source, first +remove the {\bf bin} and {\bf scripts} variables from your {\bf config} file and +rerun the {\bf make setup} step. + +\section{Running a Single Test} +\index{Running a Single Test} +\addcontentsline{toc}{section}{Running a Single Test} + +If you wish to run a single test, you can simply: + +\begin{verbatim} +cd regress +tests/ +\end{verbatim} + +or, if the source code has been updated, you would do: + +\begin{verbatim} +cd bacula +git pull +cd regress +make setup +tests/backup-to-null +\end{verbatim} + + +\section{Writing a Regression Test} +\index{Test!Writing a Regression} +\index{Writing a Regression Test} +\addcontentsline{toc}{section}{Writing a Regression Test} + +Any developer, who implements a major new feature, should write a regression +test that exercises and validates the new feature. Each regression test is a +complete test by itself. It terminates any running Bacula, initializes the +database, starts Bacula, then runs the test by using the console program. + +\subsection{Running the Tests by Hand} +\index{Hand!Running the Tests by} +\index{Running the Tests by Hand} +\addcontentsline{toc}{subsection}{Running the Tests by Hand} + +You can run any individual test by hand by cd'ing to the {\bf regress} +directory and entering: + +\footnotesize +\begin{verbatim} +tests/ +\end{verbatim} +\normalsize + +\subsection{Directory Structure} +\index{Structure!Directory} +\index{Directory Structure} +\addcontentsline{toc}{subsection}{Directory Structure} + +The directory structure of the regression tests is: + +\footnotesize +\begin{verbatim} + regress - Makefile, scripts to start tests + |------ scripts - Scripts and conf files + |-------tests - All test scripts are here + | + |------------------ -- All directories below this point are used + | for testing, but are created from the + | above directories and are removed with + | "make distclean" + | + |------ bin - This is the install directory for + | Bacula to be used testing + |------ build - Where the Bacula source build tree is + |------ tmp - Most temp files go here + |------ working - Bacula working directory + |------ weird-files - Weird files used in two of the tests. +\end{verbatim} +\normalsize + +\subsection{Adding a New Test} +\index{Adding a New Test} +\index{Test!Adding a New} +\addcontentsline{toc}{subsection}{Adding a New Test} + +If you want to write a new regression test, it is best to start with one of +the existing test scripts, and modify it to do the new test. + +When adding a new test, be extremely careful about adding anything to any of +the daemons' configuration files. The reason is that it may change the prompts +that are sent to the console. For example, adding a Pool means that the +current scripts, which assume that Bacula automatically selects a Pool, will +now be presented with a new prompt, so the test will fail. If you need to +enhance the configuration files, consider making your own versions. + +\subsection{Running a Test Under The Debugger} +\index{Debugger} +\addcontentsline{toc}{subsection}{Running a Test Under The Debugger} +You can run a test under the debugger (actually run a Bacula daemon +under the debugger) by first setting the environment variable +{\bf REGRESS\_WAIT} with commands such as: + +\begin{verbatim} +REGRESS_WAIT=1 +export REGRESS_WAIT +\end{verbatim} + +Then executing the script. When the script prints the following line: + +\begin{verbatim} +Start Bacula under debugger and enter anything when ready ... +\end{verbatim} + +You start the Bacula component you want to run under the debugger in a +different shell window. For example: + +\begin{verbatim} +cd .../regress/bin +gdb bacula-sd +(possibly set breakpoints, ...) +run -s -f +\end{verbatim} + +Then enter any character in the window with the above message. +An error message will appear saying that the daemon you are debugging +is already running, which is the case. You can simply ignore the +error message. diff --git a/docs/manuals/de/main.tex b/docs/manuals/de/main.tex new file mode 100644 index 00000000..245c6ccf --- /dev/null +++ b/docs/manuals/de/main.tex @@ -0,0 +1,167 @@ +%% +%% +%% The following characters must be preceded by a backslash +%% to be entered as printable characters: +%% +%% # $ % & ~ _ ^ \ { } +%% + +\documentclass[10pt,a4paper]{book} + +\topmargin -0.5in +\oddsidemargin 0.0in +\evensidemargin 0.0in +\textheight 10in +\textwidth 6.5in + + +\usepackage{html} +\usepackage{float} +\usepackage{graphicx} +\usepackage{bacula} +\usepackage{longtable} +\usepackage{makeidx} +\usepackage{index} +\usepackage{setspace} +\usepackage{hyperref} +% \usepackage[linkcolor=black,colorlinks=true]{hyperref} +\usepackage{url} + +\makeindex +\newindex{dir}{ddx}{dnd}{Director Index} +\newindex{fd}{fdx}{fnd}{File Daemon Index} +\newindex{sd}{sdx}{snd}{Storage Daemon Index} +\newindex{console}{cdx}{cnd}{Console Index} +\newindex{general}{idx}{ind}{General Index} + +\sloppy + +\begin{document} +\sloppy + +\newfont{\bighead}{cmr17 at 36pt} +\parskip 10pt +\parindent 0pt + +\title{\includegraphics{\idir bacula-logo.eps} \\ \bigskip + \Huge{Bacula}$^{\normalsize \textregistered}$ \Huge{Concepts and Overview Guide} + \begin{center} + \large{It comes in the night and sucks + the essence from your computers. } + \end{center} +} + + +\author{Kern Sibbald} +\date{\vspace{1.0in}\today \\ + This manual documents Bacula version \fullversion \\ + \vspace{0.2in} + Copyright {\copyright} 1999-2009, Free Software Foundation Europe + e.V. \\ + Bacula {\textregistered} is a registered trademark of Kern Sibbald.\\ + \vspace{0.2in} + Permission is granted to copy, distribute and/or modify this document under the terms of the + GNU Free Documentation License, Version 1.2 published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. + A copy of the license is included in the section entitled "GNU Free Documentation License". +} + +\maketitle + +\clearpage +\pagenumbering{roman} +\tableofcontents +\clearpage + +\pagestyle{myheadings} +\markboth{Bacula Version \version}{Bacula Version \version} +\pagenumbering{arabic} + +\part{Concepts and Overview} +\include{concepts/general} +\include{concepts/newfeatures} +\include{concepts/pluginAPI} +\include{concepts/state} +\include{concepts/requirements} +\include{concepts/supportedoses} +\include{concepts/supporteddrives} +\include{concepts/tutorial} +\include{concepts/restore} +\include{concepts/recycling} +\include{concepts/disk} +\include{concepts/pools} +\include{concepts/migration} +\include{concepts/strategies} +\include{concepts/autochangers} +\include{concepts/supportedchangers} +\include{concepts/spooling} +\include{concepts/statistics} +\include{concepts/ansi-labels} +\include{concepts/win32} +\include{concepts/rescue} +\include{concepts/tls} +\include{concepts/dataencryption} +\include{concepts/verify} +\include{concepts/bootstrap} + +\part{Installation and Configuration} +\include{install/quickstart} +\include{install/installation} +\include{install/critical} +\include{install/configure} +\include{install/dirdconf} +\include{install/filedconf} +\include{install/storedconf} +\include{install/messagesres} +\include{install/consoleconf} +\include{install/monitorconf} +\include{install/security} + +\part{Console and Operators} +\include{console/bconsole} +\include{console/gui} + +\part{Catalog Database} +\include{catalog/catmaintenance} +\include{catalog/mysql} +\include{catalog/postgresql} +\include{catalog/sqlite} + +\part{Problem and Resolution} +\include{problems/faq} +\include{problems/tips} +\include{problems/tapetesting} +\include{problems/firewalls} +\include{problems/kaboom} + +\part{Utility Programs} +\include{utility/progs} +\include{utility/bimagemgr-chapter} +\include{utility/rpm-faq} + +\part{Miscellaneous} +\include{misc/python} +\include{misc/vars} +\include{misc/stunnel} +\include{misc/dvd} +\include{misc/internaldb} + +\part{Annexes} +\include{concepts/license} +\include{concepts/fdl} +\include{concepts/gpl} +\include{concepts/lesser} +\include{concepts/projects} +\include{concepts/thanks} +\include{concepts/bugs} + + +% pull in the index +\clearpage +\printindex[general] +\printindex[dir] +\printindex[fd] +\printindex[sd] +\printindex[console] + +\end{document} diff --git a/docs/manuals/fr/install/Makefile.in b/docs/manuals/de/main/Makefile.in similarity index 82% rename from docs/manuals/fr/install/Makefile.in rename to docs/manuals/de/main/Makefile.in index 0edc87f6..e7d83401 100644 --- a/docs/manuals/fr/install/Makefile.in +++ b/docs/manuals/de/main/Makefile.in @@ -1,6 +1,5 @@ # -# -# Makefile for LaTeX +# Makefile for Bacula LaTeX Manual # # To build everything do # make tex @@ -36,7 +35,8 @@ IMAGES=../../../images -DOC=install +DOC=main +MAINDOC=Bacula_Main_Reference.html first_rule: all @@ -81,22 +81,26 @@ html: fi) latex2html -white -no_subdir -split 0 -toc_stars -white -notransparent \ -init_file latex2html-init.pl ${DOC} >tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}.html + @(if [ -f imagename_translations ] ; then \ + ./translate_images.pl --from_meaningful_names ${DOC}.html; \ + fi) + (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} . 2>/dev/null; done) @echo "Done making html" web: @echo "Making web" + @rm -rf ${DOC} @mkdir -p ${DOC} @cp -fp ${IMAGES}/*.eps . @rm -f next.eps next.png prev.eps prev.png up.eps up.png - @cp -fp ${IMAGES}/*.eps ${DOC}/ - @cp -fp ${IMAGES}/*.eps ${IMAGES}/*.png ${DOC}/ - @rm -f ${DOC}/xp-*.png - @rm -f ${DOC}/next.eps ${DOC}/next.png ${DOC}/prev.eps ${DOC}/prev.png ${DOC}/up.eps ${DOC}/up.png - @rm -rf ${DOC}/*.html - latex2html -split 3 -local_icons -t "Bacula Installation and Configuration Guide" -long_titles 4 \ - -toc_stars -contents_in_nav -init_file latex2html-init.pl -white -notransparent ${DOC} >tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}/Bacula_Instal_Config_Guide.html + latex2html -split 3 -local_icons -t "Bacula Main Reference" -long_titles 4 \ + -toc_stars -contents_in_nav -init_file latex2html-init.pl \ + -no_antialias -no_antialias_text \ + -white -notransparent ${DOC} >tex.out 2>&1 + @(if [ -f imagename_translations ] ; then \ + ./translate_images.pl --from_meaningful_names ${DOC}.html; \ + fi) + @cp -f ${DOC}/${MAINDOC} ${DOC}/index.html @echo "Done making web" show: xdvi ${DOC} diff --git a/docs/manuals/es/concepts/STYLE b/docs/manuals/de/main/STYLE similarity index 99% rename from docs/manuals/es/concepts/STYLE rename to docs/manuals/de/main/STYLE index 6cd70564..ccdf2368 100644 --- a/docs/manuals/es/concepts/STYLE +++ b/docs/manuals/de/main/STYLE @@ -73,4 +73,3 @@ don't assume all BSD is "FreeBSD" don't assume all "kernel" is Linux. If it is Linux, be clear. - diff --git a/docs/manuals/es/concepts/ansi-labels.tex b/docs/manuals/de/main/ansi-labels.tex similarity index 100% rename from docs/manuals/es/concepts/ansi-labels.tex rename to docs/manuals/de/main/ansi-labels.tex diff --git a/docs/manuals/de/install/autochangerres.tex b/docs/manuals/de/main/autochangerres.tex similarity index 100% rename from docs/manuals/de/install/autochangerres.tex rename to docs/manuals/de/main/autochangerres.tex diff --git a/docs/manuals/es/concepts/autochangers.tex b/docs/manuals/de/main/autochangers.tex similarity index 100% rename from docs/manuals/es/concepts/autochangers.tex rename to docs/manuals/de/main/autochangers.tex diff --git a/docs/manuals/es/concepts/bootstrap.tex b/docs/manuals/de/main/bootstrap.tex similarity index 100% rename from docs/manuals/es/concepts/bootstrap.tex rename to docs/manuals/de/main/bootstrap.tex diff --git a/docs/manuals/es/concepts/bugs.tex b/docs/manuals/de/main/bugs.tex similarity index 100% rename from docs/manuals/es/concepts/bugs.tex rename to docs/manuals/de/main/bugs.tex diff --git a/docs/manuals/es/catalog/catmaintenance.tex b/docs/manuals/de/main/catmaintenance.tex similarity index 95% rename from docs/manuals/es/catalog/catmaintenance.tex rename to docs/manuals/de/main/catmaintenance.tex index 3766c7ae..b22208e8 100644 --- a/docs/manuals/es/catalog/catmaintenance.tex +++ b/docs/manuals/de/main/catmaintenance.tex @@ -271,6 +271,32 @@ the MySQL documentation, which can be found at: \elink{http://dev.mysql.com/doc/refman/5.0/en/gone-away.html} {http://dev.mysql.com/doc/refman/5.0/en/gone-away.html} +\section{MySQL Temporary Tables} +When doing backups with large numbers of files, MySQL creates some +temporary tables. When these tables are small they can be held in +system memory, but as they approach some size, they +spool off to disk. The default location for these temp tables is +/tmp. Once that space fills up, Bacula daemons such as the Storage +daemon doing spooling can get strange errors. E.g. + +\footnotesize +\begin{verbatim} +Fatal error: spool.c:402 Spool data read error. +Fatal error: backup.c:892 Network send error to SD. ERR=Connection reset by +peer +\end{verbatim} +\normalsize + +What you need to do is setup MySQL to use a different (larger) temp +directory, which can be set in the /etc/my.cnf with these variables +set: + +\footnotesize +\begin{verbatim} + tmpdir=/path/to/larger/tmpdir + bdb_tmpdir=/path/to/larger/tmpdir +\end{verbatim} +\normalsize \label{RepairingPSQL} \section{Repairing Your PostgreSQL Database} @@ -343,10 +369,10 @@ Several users have reported finding that their database did not have all the indexes in the default configuration. In addition, you may find that because of your own usage patterns, you need additional indexes. -The most important indexes for performance are the three indexes on the +The most important indexes for performance are the two indexes on the {\bf File} table. The first index is on {\bf FileId} and is automatically made because it is the unique key used to access the table. The other -two are the JobId index and the (Filename, PathId) index. If these Indexes +one is the (JobId, PathId, Filename) index. If these Indexes are not present, your performance may suffer a lot. \subsection{PostgreSQL Indexes} @@ -367,10 +393,12 @@ are created, you can create the two additional indexes using: \begin{verbatim} psql bacula CREATE INDEX file_jobid_idx on file (jobid); -CREATE INDEX file_fp_idx on file (filenameid, pathid); +CREATE INDEX file_jpf_idx on file (jobid, pathid, filenameid); \end{verbatim} \normalsize +Make sure that you doesn't have an index on File (filenameid, pathid). + \subsection{MySQL Indexes} On MySQL, you can check if you have the proper indexes by: @@ -440,7 +468,7 @@ create them with the following commands: \begin{verbatim} sqlite /bacula.db CREATE INDEX file_jobid_idx on File (JobId); -CREATE INDEX file_jfp_idx on File (JobId, FilenameId, PathId); +CREATE INDEX file_jfp_idx on File (JobId, PathId, FilenameId); \end{verbatim} \normalsize diff --git a/docs/manuals/de/catalog/check_tex.pl b/docs/manuals/de/main/check_tex.pl similarity index 100% rename from docs/manuals/de/catalog/check_tex.pl rename to docs/manuals/de/main/check_tex.pl diff --git a/docs/manuals/es/install/configure.tex b/docs/manuals/de/main/configure.tex similarity index 97% rename from docs/manuals/es/install/configure.tex rename to docs/manuals/de/main/configure.tex index a3dbc50b..4a2dece6 100644 --- a/docs/manuals/es/install/configure.tex +++ b/docs/manuals/de/main/configure.tex @@ -134,6 +134,15 @@ so by including other files using the syntax @{\bf filename} where {\bf filename} is the full path and filename of another file. The @filename specification can be given anywhere a primitive token would appear. +If you wish include all files in a specific directory, you can use the following: +\begin{verbatim} +# Include subfiles associated with configuration of clients. +# They define the bulk of the Clients, Jobs, and FileSets. +# Remember to "reload" the Director after adding a client file. +# +@|"sh -c 'for f in /etc/bacula/clientdefs/*.conf ; do echo @${f} ; done'" +\end{verbatim} + \label{DataTypes} \subsection{Recognized Primitive Data Types} \index[general]{Types!Recognized Primitive Data } @@ -194,7 +203,7 @@ constructs such as {\bf \$HOME} are interpreted to be their correct values. A 64 bit integer value. Typically these are values such as bytes that can exceed 4 billion and thus require a 64 bit value. -\item [yes|no] +\item [yes\vb{}no] \index[dir]{yes or no } Either a {\bf yes} or a {\bf no}. diff --git a/docs/manuals/es/install/consoleconf.tex b/docs/manuals/de/main/consoleconf.tex similarity index 100% rename from docs/manuals/es/install/consoleconf.tex rename to docs/manuals/de/main/consoleconf.tex diff --git a/docs/manuals/de/main/coverpage.tex b/docs/manuals/de/main/coverpage.tex new file mode 100644 index 00000000..d6aa6a5c --- /dev/null +++ b/docs/manuals/de/main/coverpage.tex @@ -0,0 +1,28 @@ +\newfont{\bighead}{cmr17 at 36pt} +\parskip 10pt +\parindent 0pt + +\title{\includegraphics{\idir bacula-logo.eps} \\ \bigskip + \Huge{Bacula}$^{\normalsize \textregistered}$ \Huge{Bacula Main Reference} + \begin{center} + \large{It comes in the night and sucks + the essence from your computers. } + \end{center} +} + + +\author{Kern Sibbald} +\date{\vspace{1.0in}\today \\ + This manual documents Bacula version \fullversion \\ + \vspace{0.2in} + Copyright {\copyright} 1999-2009, Free Software Foundation Europe + e.V. \\ + Bacula {\textregistered} is a registered trademark of Kern Sibbald.\\ + \vspace{0.2in} + Permission is granted to copy, distribute and/or modify this document under the terms of the + GNU Free Documentation License, Version 1.2 published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. + A copy of the license is included in the section entitled "GNU Free Documentation License". +} + +\maketitle diff --git a/docs/manuals/es/install/critical.tex b/docs/manuals/de/main/critical.tex similarity index 100% rename from docs/manuals/es/install/critical.tex rename to docs/manuals/de/main/critical.tex diff --git a/docs/manuals/es/concepts/dataencryption.tex b/docs/manuals/de/main/dataencryption.tex similarity index 100% rename from docs/manuals/es/concepts/dataencryption.tex rename to docs/manuals/de/main/dataencryption.tex diff --git a/docs/manuals/es/install/dirdconf.tex b/docs/manuals/de/main/dirdconf.tex similarity index 97% rename from docs/manuals/es/install/dirdconf.tex rename to docs/manuals/de/main/dirdconf.tex index b07fbbfd..e262af1a 100644 --- a/docs/manuals/es/install/dirdconf.tex +++ b/docs/manuals/de/main/dirdconf.tex @@ -419,7 +419,7 @@ the FileSets may be the same). specify here followed by the date and time the job was scheduled for execution. This directive is required. -\item [Enabled = \lt{}yes|no\gt{}] +\item [Enabled = \lt{}yes\vb{}no\gt{}] \index[dir]{Enable} \index[dir]{Directive!Enable} This directive allows you to enable or disable automatic execution @@ -510,7 +510,7 @@ For a {\bf Backup} Job, the Level may be one of the following: different FileSet. \item The Job was a Full, Differential, or Incremental backup. \item The Job terminated normally (i.e. did not fail or was not canceled). -\item The Job started no longer ago than {\bf Max Full Age}. +\item The Job started no longer ago than {\bf Max Full Interval}. \end{itemize} If all the above conditions do not hold, the Director will upgrade the @@ -573,7 +573,7 @@ For a {\bf Backup} Job, the Level may be one of the following: different FileSet. \item The Job was a FULL backup. \item The Job terminated normally (i.e. did not fail or was not canceled). -\item The Job started no longer ago than {\bf Max Full Age}. +\item The Job started no longer ago than {\bf Max Full Interval}. \end{itemize} If all the above conditions do not hold, the Director will upgrade the @@ -712,23 +712,26 @@ For a {\bf Verify} Job, the Level may be one of the following: have been deleted. \end{description} -\item [Accurate = \lt{}yes|no\gt{}] +\item [Accurate = \lt{}yes\vb{}no\gt{}] \index[dir]{Accurate} - In accurate mode, FileDaemon known exactly which files were present - after last backup. So it is able to handle deleted or renamed files. + In accurate mode, the File daemon knowns exactly which files were present + after the last backup. So it is able to handle deleted or renamed files. - When restoring a fileset for a specified date (including "most - recent"), Bacula is able to give you exactly the files and + When restoring a FileSet for a specified date (including "most + recent"), Bacula is able to restore exactly the files and directories that existed at the time of the last backup prior to - that date. + that date including ensuring that deleted files are actually deleted, + and renamed directories are restored properly. - In this mode, FileDaemon have to keep all files in memory. So you have - to check that your memory and swap are sufficent. + In this mode, the File daemon must keep data concerning all files in + memory. So you do not have sufficient memory, the restore may + either be terribly slow or fail. - $$ memory = \sum_{i=1}^{n}(strlen(path_i + file_i) + sizeof(CurFile))$$ +%% $$ memory = \sum_{i=1}^{n}(strlen(path_i + file_i) + sizeof(CurFile))$$ - For 500.000 files (typical desktop linux system), it will take - around 64MB of RAM on your FileDaemon. + For 500.000 files (a typical desktop linux system), it will require + approximately 64 Megabytes of RAM on your File daemon to hold the + required information. \item [Verify Job = \lt{}Job-Resource-Name\gt{}] \index[dir]{Verify Job} @@ -966,9 +969,9 @@ during working hours. We can see it like \texttt{Max Start Delay + Max Run \addcontentsline{lof}{figure}{Job time control directives} \includegraphics{\idir different_time.eps} -\item [Max Full Age = \lt{}time\gt{}] -\index[dir]{Max Full Age} -\index[dir]{Directive!Max Full Age} +\item [Max Full Interval = \lt{}time\gt{}] +\index[dir]{Max Full Interval} +\index[dir]{Directive!Max Full Interval} The time specifies the maximum allowed age (counting from start time) of the most recent successful Full backup that is required in order to run Incremental or Differential backup jobs. If the most recent Full backup @@ -978,7 +981,7 @@ during working hours. We can see it like \texttt{Max Start Delay + Max Run considered. \label{PreferMountedVolumes} -\item [Prefer Mounted Volumes = \lt{}yes|no\gt{}] +\item [Prefer Mounted Volumes = \lt{}yes\vb{}no\gt{}] \index[dir]{Prefer Mounted Volumes} \index[dir]{Directive!Prefer Mounted Volumes} If the Prefer Mounted Volumes directive is set to {\bf yes} (default @@ -1014,7 +1017,7 @@ during working hours. We can see it like \texttt{Max Start Delay + Max Run pools so that Bacula will be forced to mount Volumes from those Pools on different drives. -\item [Prune Jobs = \lt{}yes|no\gt{}] +\item [Prune Jobs = \lt{}yes\vb{}no\gt{}] \index[dir]{Prune Jobs} \index[dir]{Directive!Prune Jobs} Normally, pruning of Jobs from the Catalog is specified on a Client by @@ -1024,7 +1027,7 @@ during working hours. We can see it like \texttt{Max Start Delay + Max Run default is {\bf no}. -\item [Prune Files = \lt{}yes|no\gt{}] +\item [Prune Files = \lt{}yes\vb{}no\gt{}] \index[dir]{Prune Files} \index[dir]{Directive!Prune Files} Normally, pruning of Files from the Catalog is specified on a Client by @@ -1033,7 +1036,7 @@ during working hours. We can see it like \texttt{Max Start Delay + Max Run yes}, it will override the value specified in the Client resource. The default is {\bf no}. -\item [Prune Volumes = \lt{}yes|no\gt{}] +\item [Prune Volumes = \lt{}yes\vb{}no\gt{}] \index[dir]{Prune Volumes} \index[dir]{Directive!Prune Volumes} Normally, pruning of Volumes from the Catalog is specified on a Client @@ -1046,13 +1049,13 @@ during working hours. We can see it like \texttt{Max Start Delay + Max Run \index[dir]{RunScript} \index[dir]{Directive!Run Script} - This directive is implemented in version 1.39.22 and later. The RunScript directive behaves like a resource in that it requires opening and closing braces around a number of directives that make up the body of the runscript. - The specified {\bf Command} (see below for details) is run as an - external program prior or after the current Job. This is optional. + The specified {\bf Command} (see below for details) is run as an external + program prior or after the current Job. This is optional. By default, the + program is executed on the Client side like in \texttt{ClientRunXXXJob}. \textbf{Console} options are special commands that are sent to the director instead of the OS. At this time, console command ouputs are redirected to log with @@ -1454,7 +1457,7 @@ RunScript { Note, please see the notes above in {\bf RunScript} concerning Windows clients. -\item [Rerun Failed Levels = \lt{}yes|no\gt{}] +\item [Rerun Failed Levels = \lt{}yes\vb{}no\gt{}] \index[dir]{Rerun Failed Levels} \index[dir]{Directive!Rerun Failed Levels} If this directive is set to {\bf yes} (default no), and Bacula detects that @@ -1472,7 +1475,7 @@ RunScript { when checking for failed levels, which means that any FileSet change will trigger a rerun. -\item [Spool Data = \lt{}yes|no\gt{}] +\item [Spool Data = \lt{}yes\vb{}no\gt{}] \index[dir]{Spool Data} \index[dir]{Directive!Spool Data} @@ -1487,7 +1490,7 @@ RunScript { NOTE: When this directive is set to yes, Spool Attributes is also automatically set to yes. -\item [Spool Attributes = \lt{}yes|no\gt{}] +\item [Spool Attributes = \lt{}yes\vb{}no\gt{}] \index[dir]{Spool Attributes} \index[dir]{Directive!Spool Attributes} \index[dir]{slow} @@ -1594,7 +1597,7 @@ RunScript { if the backed up file already exists, Bacula skips restoring this file. \end{description} -\item [Prefix Links=\lt{}yes|no\gt{}] +\item [Prefix Links=\lt{}yes\vb{}no\gt{}] \index[dir]{Prefix Links} \index[dir]{Directive!Prefix Links} If a {\bf Where} path prefix is specified for a recovery job, apply it @@ -1618,7 +1621,7 @@ RunScript { documented under \ilink{ Maximum Concurrent Jobs}{DirMaxConJobs} in the Director's resource. -\item [Reschedule On Error = \lt{}yes|no\gt{}] +\item [Reschedule On Error = \lt{}yes\vb{}no\gt{}] \index[dir]{Reschedule On Error} \index[dir]{Directive!Reschedule On Error} If this directive is enabled, and the job terminates in error, the job @@ -1743,7 +1746,7 @@ priority ones. This insures that Bacula will examine the jobs in the correct order, and that your priority scheme will be respected. \label{AllowMixedPriority} -\item [Allow Mixed Priority = \lt{}yes|no\gt{}] +\item [Allow Mixed Priority = \lt{}yes\vb{}no\gt{}] \index[dir]{Allow Mixed Priority} This directive is only implemented in version 2.5 and later. When set to {\bf yes} (default {\bf no}), this job may run even if lower @@ -1760,7 +1763,7 @@ correct order, and that your priority scheme will be respected. be run until the priority 5 job has finished. \label{WritePartAfterJob} -\item [Write Part After Job = \lt{}yes|no\gt{}] +\item [Write Part After Job = \lt{}yes\vb{}no\gt{}] \index[dir]{Write Part After Job} \index[dir]{Directive!Write Part After Job} This directive is only implemented in version 1.37 and later. @@ -1910,7 +1913,7 @@ upgraded from another type to a full backup. specifies to use the Pool named {\bf Incremental} if the job is an incremental backup. -\item [SpoolData=yes|no] +\item [SpoolData=yes\vb{}no] \index[dir]{SpoolData} \index[dir]{Directive!SpoolData} tells Bacula to request the Storage daemon to spool data to a disk file @@ -1928,7 +1931,7 @@ incremental backup. This directive is available only in Bacula version 2.3.5 or later. -\item [WritePartAfterJob=yes|no] +\item [WritePartAfterJob=yes\vb{}no] \index[dir]{WritePartAfterJob} \index[dir]{Directive!WritePartAfterJob} tells Bacula to request the Storage daemon to write the current part @@ -2223,7 +2226,7 @@ console run command. This directive is required. The default is 180 days. \label{AutoPrune} -\item [AutoPrune = \lt{}yes|no\gt{}] +\item [AutoPrune = \lt{}yes\vb{}no\gt{}] \index[dir]{AutoPrune} \index[dir]{Directive!AutoPrune} If AutoPrune is set to {\bf yes} (default), Bacula (version 1.20 or greater) @@ -2398,7 +2401,7 @@ the Director. check so that you don't try to write data for a DLT onto an 8mm device. \label{Autochanger1} -\item [Autochanger = \lt{}yes|no\gt{}] +\item [Autochanger = \lt{}yes\vb{}no\gt{}] \index[dir]{Autochanger} \index[dir]{Directive!Autochanger} If you specify {\bf yes} for this command (the default is {\bf no}), @@ -2439,6 +2442,17 @@ the Director. turn data spooling on as documented in the \ilink{Data Spooling}{SpoolingChapter} chapter of this manual. +\item [AllowCompression = \lt{}yes\vb{}no\gt{}] + \label{AllowCompression} + \index[dir]{AllowCompression} + \index[dir]{Directive!AllowCompression} + + This directive is optional, and if you specify {\bf No} (the default is {\bf + Yes}), it will cause backups jobs running on this storage resource to run + without client File Daemon compression. This effectively overrides + compression options in FileSets used by jobs which use this storage + resource. + \item [Heartbeat Interval = \lt{}time-interval\gt{}] \index[dir]{Heartbeat Interval} \index[dir]{Directive!Heartbeat} @@ -2596,7 +2610,7 @@ The Pool Resource defined in the Director's configuration file the Job resource or in the Pool, but it must be specified in one or the other. If not configuration error will result. -\item [Use Volume Once = \lt{}yes|no\gt{}] +\item [Use Volume Once = \lt{}yes\vb{}no\gt{}] \index[dir]{Use Volume Once} \index[dir]{Directive!Use Volume Once} This directive if set to {\bf yes} specifies that each volume is to be @@ -2726,7 +2740,7 @@ The Pool Resource defined in the Director's configuration file must use the \ilink{\bf update volume}{UpdateCommand} command in the Console. -\item [Catalog Files = \lt{}yes|no\gt{}] +\item [Catalog Files = \lt{}yes\vb{}no\gt{}] \index[dir]{Catalog Files} \index[dir]{Directive!Catalog Files} This directive defines whether or not you want the names of the files @@ -2739,7 +2753,7 @@ The Pool Resource defined in the Director's configuration file restore} command nor any other command that references File entries. \label{PoolAutoPrune} -\item [AutoPrune = \lt{}yes|no\gt{}] +\item [AutoPrune = \lt{}yes\vb{}no\gt{}] \index[dir]{AutoPrune} \index[dir]{Directive!AutoPrune} If AutoPrune is set to {\bf yes} (default), Bacula (version 1.20 or @@ -2777,7 +2791,6 @@ The Pool Resource defined in the Director's configuration file Bacula does not automatically recycle a Volume. It attempts to keep the Volume data intact as long as possible before over writing the Volume. - By defining multiple Pools with different Volume Retention periods, you may effectively have a set of tapes that is recycled weekly, another Pool of tapes that is recycled monthly and so on. However, one must @@ -2797,6 +2810,21 @@ The Pool Resource defined in the Director's configuration file what is stored for the Volume. To change the value for an existing Volume you must use the {\bf update} command in the Console. +\item [Action On Purge = \lt{Truncate}] +\index[dir]{actiononpurge} + +This directive \textbf{ActionOnPurge=Truncate} instructs Bacula to truncate +the volume when it is purged. It is useful to prevent disk based volumes from +consuming too much space. + +\begin{verbatim} +Pool { + Name = Default + Action On Purge = Truncate + ... +} +\end{verbatim} + \label{PoolScratchPool} \item [ScratchPool = \lt{}pool-resource-name\gt{}] \index[dir]{ScrachPool} @@ -2829,7 +2857,7 @@ The Pool Resource defined in the Director's configuration file \label{PoolRecycle} -\item [Recycle = \lt{}yes|no\gt{}] +\item [Recycle = \lt{}yes\vb{}no\gt{}] \index[dir]{Recycle} \index[dir]{Directive!Recycle} This directive specifies whether or not Purged Volumes may be recycled. @@ -2858,7 +2886,7 @@ The Pool Resource defined in the Director's configuration file \label{RecycleOldest} -\item [Recycle Oldest Volume = \lt{}yes|no\gt{}] +\item [Recycle Oldest Volume = \lt{}yes\vb{}no\gt{}] \index[dir]{Recycle Oldest Volume} \index[dir]{Directive!Recycle Oldest Volume} This directive instructs the Director to search for the oldest used @@ -2882,7 +2910,7 @@ The Pool Resource defined in the Director's configuration file \label{RecycleCurrent} -\item [Recycle Current Volume = \lt{}yes|no\gt{}] +\item [Recycle Current Volume = \lt{}yes\vb{}no\gt{}] \index[dir]{Recycle Current Volume} \index[dir]{Directive!Recycle Current Volume} If Bacula needs a new Volume, this directive instructs Bacula to Prune @@ -2905,7 +2933,7 @@ The Pool Resource defined in the Director's configuration file \label{PurgeOldest} -\item [Purge Oldest Volume = \lt{}yes|no\gt{}] +\item [Purge Oldest Volume = \lt{}yes\vb{}no\gt{}] \index[dir]{Purge Oldest Volume} \index[dir]{Directive!Purge Oldest Volume} This directive instructs the Director to search for the oldest used @@ -3105,7 +3133,7 @@ defined. by MySQL and PostgreSQL and is ignored by SQLite if provided. This directive is optional. -%% \item [Multiple Connections = \lt{}yes|no\gt{}] +%% \item [Multiple Connections = \lt{}yes\vb{}no\gt{}] %% \index[dir]{Multiple Connections} %% \index[dir]{Directive!Multiple Connections} %% By default, this directive is set to no. In that case, each job that uses diff --git a/docs/manuals/es/concepts/disk.tex b/docs/manuals/de/main/disk.tex similarity index 100% rename from docs/manuals/es/concepts/disk.tex rename to docs/manuals/de/main/disk.tex diff --git a/docs/manuals/de/concepts/do_echo b/docs/manuals/de/main/do_echo similarity index 100% rename from docs/manuals/de/concepts/do_echo rename to docs/manuals/de/main/do_echo diff --git a/docs/manuals/es/catalog/fdl.tex b/docs/manuals/de/main/fdl.tex similarity index 100% rename from docs/manuals/es/catalog/fdl.tex rename to docs/manuals/de/main/fdl.tex diff --git a/docs/manuals/es/install/filedconf.tex b/docs/manuals/de/main/filedconf.tex similarity index 99% rename from docs/manuals/es/install/filedconf.tex rename to docs/manuals/de/main/filedconf.tex index c969770b..f7a8921b 100644 --- a/docs/manuals/es/install/filedconf.tex +++ b/docs/manuals/de/main/filedconf.tex @@ -287,7 +287,7 @@ permitted to contact this Client. This password must be the same as the password specified in the Client resource in the Director's configuration file. This directive is required. -\item [Monitor = \lt{}yes|no\gt{}] +\item [Monitor = \lt{}yes\vb{}no\gt{}] \index[fd]{Monitor} \index[fd]{Directive!Monitor} If Monitor is set to {\bf no} (default), this director will have full access diff --git a/docs/manuals/es/install/fileset.tex b/docs/manuals/de/main/fileset.tex similarity index 93% rename from docs/manuals/es/install/fileset.tex rename to docs/manuals/de/main/fileset.tex index 691bf6ee..357621d5 100644 --- a/docs/manuals/es/install/fileset.tex +++ b/docs/manuals/de/main/fileset.tex @@ -52,7 +52,7 @@ defined for each Backup job. \index[dir]{Directive!Name} The name of the FileSet resource. This directive is required. -\item [Ignore FileSet Changes = \lt{}yes|no\gt{}] +\item [Ignore FileSet Changes = \lt{}yes\vb{}no\gt{}] \index[dir]{Ignore FileSet Changes} \index[dir]{Directive!Ignore FileSet Changes} Normally, if you modify the FileSet Include or Exclude lists, @@ -70,7 +70,7 @@ defined for each Backup job. Exclude, Bacula will force a Full backup to ensure that everything is properly backed up. -\item [Enable VSS = \lt{}yes|no\gt{}] +\item [Enable VSS = \lt{}yes\vb{}no\gt{}] \index[dir]{Enable VSS} \index[dir]{Directive!Enable VSS} If this directive is set to {\bf yes} the File daemon will be notified @@ -102,7 +102,7 @@ defined for each Backup job. The Include resource must contain a list of directories and/or files to be processed in the backup job. Normally, all files found in all subdirectories of any directory in the Include File list will be backed up. -Note, see below for the definition of \lt{}file-list\gt{}. +Note, see below for the definition of \lt{}file-list\gt{}. The Include resource may also contain one or more Options resources that specify options such as compression to be applied to all or any subset of the files found when processing the file-list for backup. Please see @@ -252,6 +252,9 @@ The directives within an Options resource may be one of the following: compression levels greater than six generally give very little extra compression and are rather CPU intensive. + You can overwrite this option per Storage resource with + \ilink{AllowCompression}{AllowCompression} option. + \item [signature=SHA1] \index[dir]{signature} \index[dir]{SHA1} @@ -275,6 +278,22 @@ The directives within an Options resource may be one of the following: bytes per file to your catalog. We strongly recommend that this option or the SHA1 option be specified as a default for all files. + +\item[basejob=\lt{}options\gt{}] +\index[dir]{basejob} +\index[dir]{Directive!basejob} + +The options letters specified are used when running a {\bf Backup Level=Full} +with BaseJobs. The options letters are the same than in the \textbf{verify=} +option below. + +\item[accurate=\lt{}options\gt{}] +\index[dir]{accurate} +\index[dir]{Directive!accurate} + The options letters specified are used when running a {\bf Backup + Level=Incremental/Differential} in Accurate mode. The options + letters are the same than in the \textbf{verify=} option below. + \item [verify=\lt{}options\gt{}] \index[dir]{verify} \index[dir]{Directive!verify} @@ -325,7 +344,7 @@ The directives within an Options resource may be one of the following: Level=DiskToCatalog} verify is {\bf pins5} i.e. compare permission bits, inodes, number of links, size, and MD5 changes. -\item [onefs=yes|no] +\item [onefs=yes\vb{}no] \index[dir]{onefs} \index[dir]{Directive!onefs} If set to {\bf yes} (the default), {\bf Bacula} will remain on a single @@ -432,7 +451,7 @@ Change: 2005-11-06 12:36:48.000000000 +0100 that it did not specify {\bf /var}, then {\bf /var} will not be backed up. -\item [honor nodump flag=\lt{}yes|no\gt{}] +\item [honor nodump flag=\lt{}yes\vb{}no\gt{}] \index[dir]{honornodumpflag} \index[dir]{Directive!honornodumpflag} If your file system supports the {\bf nodump} flag (e. g. most @@ -447,7 +466,7 @@ Change: 2005-11-06 12:36:48.000000000 +0100 \label{portable} -\item [portable=yes|no] +\item [portable=yes\vb{}no] \index[dir]{portable} \index[dir]{Directive!portable} If set to {\bf yes} (default is {\bf no}), the Bacula File daemon will @@ -462,7 +481,7 @@ Change: 2005-11-06 12:36:48.000000000 +0100 default ({\bf no}) so that the maximum information concerning your files is saved. -\item [recurse=yes|no] +\item [recurse=yes\vb{}no] \index[dir]{recurse} \index[dir]{Directive!recurse} If set to {\bf yes} (the default), Bacula will recurse (or descend) into @@ -473,7 +492,7 @@ Change: 2005-11-06 12:36:48.000000000 +0100 contained in the subdirectories. Normally, you will want the default ({\bf yes}). -\item [sparse=yes|no] +\item [sparse=yes\vb{}no] \index[dir]{sparse} \index[dir]{Directive!sparse} Enable special code that checks for sparse files such as created by @@ -511,7 +530,7 @@ Change: 2005-11-06 12:36:48.000000000 +0100 really sparse. \label{readfifo} -\item [readfifo=yes|no] +\item [readfifo=yes\vb{}no] \index[dir]{readfifo} \index[dir]{Directive!readfifo} If enabled, tells the Client to read the data on a backup and write the @@ -534,7 +553,7 @@ Change: 2005-11-06 12:36:48.000000000 +0100 exec > /dev/null \end{verbatim} -\item [noatime=yes|no] +\item [noatime=yes\vb{}no] \index[dir]{noatime} \index[dir]{Directive!noatime} If enabled, and if your Operating System supports the O\_NOATIME file @@ -554,7 +573,7 @@ Change: 2005-11-06 12:36:48.000000000 +0100 silently ignored by Bacula. -\item [mtimeonly=yes|no] +\item [mtimeonly=yes\vb{}no] \index[dir]{mtimeonly} \index[dir]{Directive!mtimeonly} If enabled, tells the Client that the selection of files during @@ -564,7 +583,7 @@ Change: 2005-11-06 12:36:48.000000000 +0100 st\_mtime and the st\_ctime values. In general, it is not recommended to use this option. -\item [keepatime=yes|no] +\item [keepatime=yes\vb{}no] \index[dir]{keepatime} \index[dir]{Directive!keepatime} The default is {\bf no}. When enabled, Bacula will reset the st\_atime @@ -584,7 +603,7 @@ Change: 2005-11-06 12:36:48.000000000 +0100 to use {\bf mtimeonly = yes} as well as keepatime (thanks to Rudolf Cejka for this tip). -\item [checkfilechanges=yes|no] +\item [checkfilechanges=yes\vb{}no] \index[dir]{checkfilechanges} \index[dir]{Directive!checkfilechanges} On versions 2.0.4 or greater, @@ -598,7 +617,7 @@ Change: 2005-11-06 12:36:48.000000000 +0100 In general, it is recommended to use this option. -\item [hardlinks=yes|no] +\item [hardlinks=yes\vb{}no] \index[dir]{hardlinks} \index[dir]{Directive!hardlinks} When enabled (default), this directive will cause hard links to be @@ -756,14 +775,14 @@ Change: 2005-11-06 12:36:48.000000000 +0100 more. -\item [exclude=yes|no] +\item [exclude=yes\vb{}no] \index[dir]{exclude} \index[dir]{Directive!exclude} The default is {\bf no}. When enabled, any files matched within the Options will be excluded from the backup. \label{ACLSupport} -\item [aclsupport=yes|no] +\item [aclsupport=yes\vb{}no] \index[dir]{aclsupport} \index[dir]{Directive!aclsupport} The default is {\bf no}. If this option is set to yes, and you have the @@ -779,7 +798,7 @@ Change: 2005-11-06 12:36:48.000000000 +0100 filesystem with ACLs, then you restore them to a different filesystem (perhaps reiserfs) that does not have ACLs, the ACLs will be ignored. -\item [ignore case=yes|no] +\item [ignore case=yes\vb{}no] \index[dir]{ignore case} \index[dir]{Directive!ignore case} The default is {\bf no}. On Windows systems, you will almost surely @@ -830,7 +849,7 @@ Change: 2005-11-06 12:36:48.000000000 +0100 This option is not implemented in Unix/Linux systems. -\item [hfsplussupport=yes|no] +\item [hfsplussupport=yes\vb{}no] \index[dir]{hfsplussupport} \index[dir]{Directive!hfsplussupport} This option allows you to turn on support for Mac OSX HFS plus @@ -875,7 +894,7 @@ Include { \end{verbatim} \normalsize -\item Any name beginning with a vertical bar (|) is assumed to be the name of +\item Any name beginning with a vertical bar (\vb) is assumed to be the name of a program. This program will be executed on the Director's machine at the time the Job starts (not when the Director reads the configuration file), and any output from that program will be assumed to be a list of @@ -1093,6 +1112,50 @@ Include { \item A file-list may not contain wild-cards. Use directives in the Options resource if you wish to specify wild-cards or regular expression matching. + +\item +\index[general]{IgnoreDir} +The {\bf ExcludeDirContaining = \lt{}filename\gt{}} is a directive that +can be added to the Include section of the FileSet resource. If the specified +filename ({\bf filename-string}) is found on the Client in any directory to be +backed up, the whole directory will be ignored (not backed up). For example: + +\begin{verbatim} + # List of files to be backed up + FileSet { + Name = "MyFileSet" + Include { + Options { + signature = MD5 + } + File = /home + Exclude Dir Containing = .excludeme + } + } +\end{verbatim} + +But in /home, there may be hundreds of directories of users and some +people want to indicate that they don't want to have certain +directories backed up. For example, with the above FileSet, if +the user or sysadmin creates a file named {\bf .excludeme} in +specific directories, such as + +\begin{verbatim} + /home/user/www/cache/.excludeme + /home/user/temp/.excludeme +\end{verbatim} + +then Bacula will not backup the two directories named: + +\begin{verbatim} + /home/user/www/cache + /home/user/temp +\end{verbatim} + +NOTE: subdirectories will not be backed up. That is, the directive +applies to the two directories in question and any children (be they +files, directories, etc). + \end{itemize} \section{FileSet Examples} @@ -1386,6 +1449,70 @@ FileSet { \end{verbatim} \normalsize + +The following example shows how to back up only the My Pictures directory inside +the My Documents directory for all users in C:/Documents and Settings, i.e. +everything matching the pattern: + +C:/Documents and Settings/*/My Documents/My Pictures/* + +To understand how this can be achieved, there are two important points to +remember: + +Firstly, Bacula walks over the filesystem depth-first starting from the File = +lines. It stops descending when a directory is excluded, so you must include +all ancestor directories of each directory containing files to be included. + +Secondly, each directory and file is compared to the Options clauses in the +order they appear in the FileSet. When a match is found, no further clauses +are compared and the directory or file is either included or excluded. + +The FileSet resource definition below implements this by including specifc +directories and files and excluding everything else. + +\footnotesize +\begin{verbatim} +FileSet { + Name = "AllPictures" + + Include { + + File = "C:/Documents and Settings" + + Options { + signature = SHA1 + verify = s1 + IgnoreCase = yes + + # Include all users' directories so we reach the inner ones. Unlike a + # WildDir pattern ending in *, this RegExDir only matches the top-level + # directories and not any inner ones. + RegExDir = "^C:/Documents and Settings/[^/]+$" + + # Ditto all users' My Documents directories. + WildDir = "C:/Documents and Settings/*/My Documents" + + # Ditto all users' My Documents/My Pictures directories. + WildDir = "C:/Documents and Settings/*/My Documents/My Pictures" + + # Include the contents of the My Documents/My Pictures directories and + # any subdirectories. + Wild = "C:/Documents and Settings/*/My Documents/My Pictures/*" + } + + Options { + Exclude = yes + IgnoreCase = yes + + # Exclude everything else, in particular any files at the top level and + # any other directories or files in the users' directories. + Wild = "C:/Documents and Settings/*" + } + } +} +\end{verbatim} +\normalsize + \section{Backing up Raw Partitions} \index[general]{Backing up!Partitions } \index[general]{Backing up Raw Partitions } diff --git a/docs/manuals/de/catalog/fix_tex.pl b/docs/manuals/de/main/fix_tex.pl similarity index 100% rename from docs/manuals/de/catalog/fix_tex.pl rename to docs/manuals/de/main/fix_tex.pl diff --git a/docs/manuals/de/main/general.tex b/docs/manuals/de/main/general.tex new file mode 100644 index 00000000..ab0f100b --- /dev/null +++ b/docs/manuals/de/main/general.tex @@ -0,0 +1,522 @@ +%% +%% + +\chapter{What is Bacula?} +\label{GeneralChapter} +\index[general]{Bacula!What is } +\index[general]{What is Bacula? } + +Bacula is a set of computer programs that permits the system +administrator to manage backup, recovery, and verification of computer data +across a network of computers of different kinds. Bacula can also run entirely +upon a single computer and can backup to various types of media, including tape +and disk. + +In technical terms, it is a +network Client/Server based backup program. Bacula is relatively easy to use +and efficient, while offering many advanced storage management features that +make it easy to find and recover lost or damaged files. Due to its modular +design, Bacula is scalable from small single computer systems to systems +consisting of hundreds of computers located over a large network. + +\section{Who Needs Bacula?} +\index[general]{Who Needs Bacula? } +\index[general]{Bacula!Who Needs } + +If you are currently using a program such as tar, dump, or +bru to backup your computer data, and you would like a network solution, more +flexibility, or catalog services, Bacula will most likely provide the +additional features you want. However, if you are new to Unix systems or do +not have offsetting experience with a sophisticated backup package, the Bacula project does not +recommend using Bacula as it is much more difficult to setup and use than +tar or dump. + +If you want Bacula to behave like the above mentioned simple +programs and write over any tape that you put in the drive, then you will find +working with Bacula difficult. Bacula is designed to protect your data +following the rules you specify, and this means reusing a tape only +as the last resort. It is possible to "force" Bacula to write +over any tape in the drive, but it is easier and more efficient to use a +simpler program for that kind of operation. + +If you would like a backup program that can write +to multiple volumes (i.e. is not limited by your tape drive capacity), Bacula +can most likely fill your needs. In addition, quite a number of Bacula users +report that Bacula is simpler to setup and use than other equivalent programs. + +If you are currently using a sophisticated commercial package such as Legato +Networker. ARCserveIT, Arkeia, or PerfectBackup+, you may be interested in +Bacula, which provides many of the same features and is free software +available under the GNU Version 2 software license. + +\section{Bacula Components or Services} +\index[general]{Bacula Components or Services } +\index[general]{Services!Bacula Components or } + +Bacula is made up of the following five major components or services: +Director, Console, File, Storage, and Monitor services. + + +\addcontentsline{lof}{figure}{Bacula Applications} +\includegraphics{\idir bacula-applications.eps} +(thanks to Aristedes Maniatis for this graphic and the one below) +% TODO: move the thanks to Credits section in preface + +\subsection*{Bacula Director} + \label{DirDef} + The Bacula Director service is the program that supervises + all the backup, restore, verify and archive operations. The system + administrator uses the Bacula Director to schedule backups and to + recover files. For more details see the Director Services Daemon Design + Document in the Bacula Developer's Guide. The Director runs as a daemon + (or service) in the background. +% TODO: tell reader where this Developer's Guide is at? + \label{UADef} + +\subsection*{Bacula Console} + + The Bacula Console service is the program that allows the + administrator or user to communicate with the Bacula Director + Currently, the Bacula Console is available in three versions: + text-based console interface, GNOME-based interface, and a + wxWidgets graphical interface. + The first and simplest is to run the Console program in a shell window + (i.e. TTY interface). Most system administrators will find this + completely adequate. The second version is a GNOME GUI interface that + is far from complete, but quite functional as it has most the + capabilities of the shell Console. The third version is a wxWidgets GUI + with an interactive file restore. It also has most of the capabilities + of the shell console, allows command completion with tabulation, and + gives you instant help about the command you are typing. For more + details see the \ilink{Bacula Console Design Document}{_ConsoleChapter}. + +\subsection*{Bacula File} + \label{FDDef} + The Bacula File service (also known as the Client program) is the software + program that is installed on the machine to be backed up. + It is specific to the + operating system on which it runs and is responsible for providing the + file attributes and data when requested by the Director. The File + services are also responsible for the file system dependent part of + restoring the file attributes and data during a recovery operation. For + more details see the File Services Daemon Design Document in the Bacula + Developer's Guide. This program runs as a daemon on the machine to be + backed up. + In addition to Unix/Linux File daemons, there is a Windows File daemon + (normally distributed in binary format). The Windows File daemon runs + on current Windows versions (NT, 2000, XP, 2003, and possibly Me and + 98). +% TODO: maybe do not list Windows here as that is listed elsewhere +% TODO: remove "possibly"? +% TODO: mention Vista? + +\subsection*{Bacula Storage} + \label{SDDef} + The Bacula Storage services consist of the software programs that + perform the storage and recovery of the file attributes and data to the + physical backup media or volumes. In other words, the Storage daemon is + responsible for reading and writing your tapes (or other storage media, + e.g. files). For more details see the Storage Services Daemon Design + Document in the Bacula Developer's Guide. The Storage services runs as + a daemon on the machine that has the backup device (usually a tape + drive). +% TODO: may switch e.g. to "for example" or "such as" as appropriate +% TODO: is "usually" correct? Maybe "such as" instead? + +\subsection*{Catalog} + \label{DBDefinition} + The Catalog services are comprised of the software programs + responsible for maintaining the file indexes and volume databases for + all files backed up. The Catalog services permit the system + administrator or user to quickly locate and restore any desired file. + The Catalog services sets Bacula apart from simple backup programs like + tar and bru, because the catalog maintains a record of all Volumes used, + all Jobs run, and all Files saved, permitting efficient restoration and + Volume management. Bacula currently supports three different databases, + MySQL, PostgreSQL, and SQLite, one of which must be chosen when building + Bacula. + + The three SQL databases currently supported (MySQL, PostgreSQL or + SQLite) provide quite a number of features, including rapid indexing, + arbitrary queries, and security. Although the Bacula project plans to support other + major SQL databases, the current Bacula implementation interfaces only + to MySQL, PostgreSQL and SQLite. For the technical and porting details + see the Catalog Services Design Document in the developer's documented. + + The packages for MySQL and PostgreSQL are available for several operating + systems. + Alternatively, installing from the + source is quite easy, see the \ilink{ Installing and Configuring + MySQL}{MySqlChapter} chapter of this document for the details. For + more information on MySQL, please see: + \elink{www.mysql.com}{http://www.mysql.com}. Or see the \ilink{ + Installing and Configuring PostgreSQL}{PostgreSqlChapter} chapter of this + document for the details. For more information on PostgreSQL, please + see: \elink{www.postgresql.org}{http://www.postgresql.org}. + + Configuring and building SQLite is even easier. For the details of + configuring SQLite, please see the \ilink{ Installing and Configuring + SQLite}{SqlLiteChapter} chapter of this document. + +\subsection*{Bacula Monitor} + \label{MonDef} + A Bacula Monitor service is the program that allows the + administrator or user to watch current status of Bacula Directors, + Bacula File Daemons and Bacula Storage Daemons. + Currently, only a GTK+ version is available, which works with GNOME, + KDE, or any window manager that supports the FreeDesktop.org system tray + standard. + + To perform a successful save or restore, the following four daemons must be + configured and running: the Director daemon, the File daemon, the Storage + daemon, and the Catalog service (MySQL, PostgreSQL or SQLite). + +\section{Bacula Configuration} +\index[general]{Configuration!Bacula } +\index[general]{Bacula Configuration } + +In order for Bacula to understand your system, what clients you want backed +up and how, you must create a number of configuration files containing +resources (or objects). The following presents an overall picture of this: + +\addcontentsline{lof}{figure}{Bacula Objects} +\includegraphics{\idir bacula-objects.eps} + +\section{Conventions Used in this Document} +\index[general]{Conventions Used in this Document } +\index[general]{Document!Conventions Used in this } + +Bacula is in a state of evolution, and as a consequence, this manual +will not always agree with the code. If an item in this manual is preceded by +an asterisk (*), it indicates that the particular feature is not implemented. +If it is preceded by a plus sign (+), it indicates that the feature may be +partially implemented. +% TODO: search for plus sign and asterisk and "IMPLEMENTED" and fix for printed book + +If you are reading this manual as supplied in a released version of the +software, the above paragraph holds true. If you are reading the online +version of the manual, +\elink{ www.bacula.org}{http://www.bacula.org}, please bear in +mind that this version describes the current version in development (in the +CVS) that may contain features not in the released version. Just the same, it +generally lags behind the code a bit. +% TODO: is this still true? there are separate websites + +\section{Quick Start} +\index[general]{Quick Start } +\index[general]{Start!Quick } + +To get Bacula up and running quickly, the author recommends +that you first scan the +Terminology section below, then quickly review the next chapter entitled +\ilink{The Current State of Bacula}{StateChapter}, then the +\ilink{Getting Started with Bacula}{QuickStartChapter}, which will +give you a quick overview of getting Bacula running. After which, you should +proceed to the chapter on +\ilink{Installing Bacula}{InstallChapter}, then +\ilink{How to Configure Bacula}{ConfigureChapter}, and finally the +chapter on +\ilink{ Running Bacula}{TutorialChapter}. + +\section{Terminology} +\index[general]{Terminology } + +\begin{description} + +\item [Administrator] + \index[fd]{Administrator } + The person or persons responsible for administrating the Bacula system. + +\item [Backup] + \index[fd]{Backup } + The term Backup refers to a Bacula Job that saves files. + +\item [Bootstrap File] + \index[fd]{Bootstrap File } + The bootstrap file is an ASCII file containing a compact form of + commands that allow Bacula or the stand-alone file extraction utility + (bextract) to restore the contents of one or more Volumes, for + example, the current state of a system just backed up. With a bootstrap + file, Bacula can restore your system without a Catalog. You can create + a bootstrap file from a Catalog to extract any file or files you wish. + +\item [Catalog] + \index[fd]{Catalog } + The Catalog is used to store summary information about the Jobs, + Clients, and Files that were backed up and on what Volume or Volumes. + The information saved in the Catalog permits the administrator or user + to determine what jobs were run, their status as well as the important + characteristics of each file that was backed up, and most importantly, + it permits you to choose what files to restore. + The Catalog is an + online resource, but does not contain the data for the files backed up. + Most of the information stored in the catalog is also stored on the + backup volumes (i.e. tapes). Of course, the tapes will also have a + copy of the file data in addition to the File Attributes (see below). + + The catalog feature is one part of Bacula that distinguishes it from + simple backup and archive programs such as dump and tar. + +\item [Client] + \index[fd]{Client } + In Bacula's terminology, the word Client refers to the machine being + backed up, and it is synonymous with the File services or File daemon, + and quite often, it is referred to it as the FD. A Client is defined in a + configuration file resource. + +\item [Console] + \index[fd]{Console } + The program that interfaces to the Director allowing the user or system + administrator to control Bacula. + +\item [Daemon] + \index[fd]{Daemon } + Unix terminology for a program that is always present in the background to + carry out a designated task. On Windows systems, as well as some Unix + systems, daemons are called Services. + +\item [Directive] + \index[fd]{Directive } + The term directive is used to refer to a statement or a record within a + Resource in a configuration file that defines one specific setting. For + example, the {\bf Name} directive defines the name of the Resource. + +\item [Director] + \index[fd]{Director } + The main Bacula server daemon that schedules and directs all Bacula + operations. Occasionally, the project refers to the Director as DIR. + +\item [Differential] + \index[fd]{Differential } + A backup that includes all files changed since the last Full save started. + Note, other backup programs may define this differently. + +\item [File Attributes] + \index[fd]{File Attributes } + The File Attributes are all the information necessary about a file to + identify it and all its properties such as size, creation date, modification + date, permissions, etc. Normally, the attributes are handled entirely by + Bacula so that the user never needs to be concerned about them. The + attributes do not include the file's data. + +\item [File Daemon] + \index[fd]{File Daemon } + The daemon running on the client computer to be backed up. This is also + referred to as the File services, and sometimes as the Client services or the + FD. + +\label{FileSetDef} +\item [FileSet] +\index[fd]{a name } + A FileSet is a Resource contained in a configuration file that defines + the files to be backed up. It consists of a list of included files or + directories, a list of excluded files, and how the file is to be stored + (compression, encryption, signatures). For more details, see the + \ilink{FileSet Resource definition}{FileSetResource} in the Director + chapter of this document. + +\item [Incremental] + \index[fd]{Incremental } + A backup that includes all files changed since the last Full, Differential, + or Incremental backup started. It is normally specified on the {\bf Level} + directive within the Job resource definition, or in a Schedule resource. + +\label{JobDef} +\item [Job] +\index[fd]{a name } + A Bacula Job is a configuration resource that defines the work that + Bacula must perform to backup or restore a particular Client. It + consists of the {\bf Type} (backup, restore, verify, etc), the {\bf + Level} (full, incremental,...), the {\bf FileSet}, and {\bf Storage} the + files are to be backed up (Storage device, Media Pool). For more + details, see the \ilink{Job Resource definition}{JobResource} in the + Director chapter of this document. +% TODO: clean up "..." for book + +\item [Monitor] + \index[fd]{Monitor } + The program that interfaces to all the daemons allowing the user or + system administrator to monitor Bacula status. + +\item [Resource] + \index[fd]{Resource } + A resource is a part of a configuration file that defines a specific + unit of information that is available to Bacula. It consists of several + directives (individual configuration statements). For example, the {\bf + Job} resource defines all the properties of a specific Job: name, + schedule, Volume pool, backup type, backup level, ... +% TODO: clean up "..." for book + +\item [Restore] + \index[fd]{Restore } + A restore is a configuration resource that describes the operation of + recovering a file from backup media. It is the inverse of a save, + except that in most cases, a restore will normally have a small set of + files to restore, while normally a Save backs up all the files on the + system. Of course, after a disk crash, Bacula can be called upon to do + a full Restore of all files that were on the system. +% TODO: Why? Why say "Of course"?? + +% TODO: define "Save" +% TODO: define "Full" + +\item [Schedule] + \index[fd]{Schedule } + A Schedule is a configuration resource that defines when the Bacula Job + will be scheduled for execution. To use the Schedule, the Job resource + will refer to the name of the Schedule. For more details, see the + \ilink{Schedule Resource definition}{ScheduleResource} in the Director + chapter of this document. + +\item [Service] + \index[fd]{Service } + This is a program that remains permanently in memory awaiting + instructions. In Unix environments, services are also known as + {\bf daemons}. + +\item [Storage Coordinates] + \index[fd]{Storage Coordinates } + The information returned from the Storage Services that uniquely locates + a file on a backup medium. It consists of two parts: one part pertains + to each file saved, and the other part pertains to the whole Job. + Normally, this information is saved in the Catalog so that the user + doesn't need specific knowledge of the Storage Coordinates. The Storage + Coordinates include the File Attributes (see above) plus the unique + location of the information on the backup Volume. + +\item [Storage Daemon] + \index[fd]{Storage Daemon } + The Storage daemon, sometimes referred to as the SD, is the code that + writes the attributes and data to a storage Volume (usually a tape or + disk). + +\item [Session] + \index[sd]{Session } + Normally refers to the internal conversation between the File daemon and + the Storage daemon. The File daemon opens a {\bf session} with the + Storage daemon to save a FileSet or to restore it. A session has a + one-to-one correspondence to a Bacula Job (see above). + +\item [Verify] + \index[sd]{Verify } + A verify is a job that compares the current file attributes to the + attributes that have previously been stored in the Bacula Catalog. This + feature can be used for detecting changes to critical system files + similar to what a file integrity checker like Tripwire does. + One of the major advantages of + using Bacula to do this is that on the machine you want protected such + as a server, you can run just the File daemon, and the Director, Storage + daemon, and Catalog reside on a different machine. As a consequence, if + your server is ever compromised, it is unlikely that your verification + database will be tampered with. + + Verify can also be used to check that the most recent Job data written + to a Volume agrees with what is stored in the Catalog (i.e. it compares + the file attributes), *or it can check the Volume contents against the + original files on disk. + +\item [*Archive] + \index[fd]{*Archive } + An Archive operation is done after a Save, and it consists of removing the + Volumes on which data is saved from active use. These Volumes are marked as + Archived, and may no longer be used to save files. All the files contained + on an Archived Volume are removed from the Catalog. NOT YET IMPLEMENTED. + +\item [Retention Period] + \index[fd]{Retention Period } + There are various kinds of retention periods that Bacula recognizes. + The most important are the {\bf File} Retention Period, {\bf Job} + Retention Period, and the {\bf Volume} Retention Period. Each of these + retention periods applies to the time that specific records will be kept + in the Catalog database. This should not be confused with the time that + the data saved to a Volume is valid. + + The File Retention Period determines the time that File records are kept + in the catalog database. This period is important for two reasons: the + first is that as long as File records remain in the database, you + can "browse" the database with a console program and restore any + individual file. Once the File records are removed or pruned from the + database, the individual files of a backup job can no longer be + "browsed". The second reason for carefully choosing the File Retention + Period is because the volume of + the database File records use the most storage space in the + database. As a consequence, you must ensure that regular "pruning" of + the database file records is done to keep your database from growing + too large. (See the Console {\bf prune} + command for more details on this subject). + + The Job Retention Period is the length of time that Job records will be + kept in the database. Note, all the File records are tied to the Job + that saved those files. The File records can be purged leaving the Job + records. In this case, information will be available about the jobs + that ran, but not the details of the files that were backed up. + Normally, when a Job record is purged, all its File records will also be + purged. + + The Volume Retention Period is the minimum of time that a Volume will be + kept before it is reused. Bacula will normally never overwrite a Volume + that contains the only backup copy of a file. Under ideal conditions, + the Catalog would retain entries for all files backed up for all current + Volumes. Once a Volume is overwritten, the files that were backed up on + that Volume are automatically removed from the Catalog. However, if + there is a very large pool of Volumes or a Volume is never overwritten, + the Catalog database may become enormous. To keep the Catalog to a + manageable size, the backup information should be removed from the + Catalog after the defined File Retention Period. Bacula provides the + mechanisms for the catalog to be automatically pruned according to the + retention periods defined. + +\item [Scan] + \index[sd]{Scan } + A Scan operation causes the contents of a Volume or a series of Volumes + to be scanned. These Volumes with the information on which files they + contain are restored to the Bacula Catalog. Once the information is + restored to the Catalog, the files contained on those Volumes may be + easily restored. This function is particularly useful if certain + Volumes or Jobs have exceeded their retention period and have been + pruned or purged from the Catalog. Scanning data from Volumes into the + Catalog is done by using the {\bf bscan} program. See the \ilink{ bscan + section}{bscan} of the Bacula Utilities Chapter of this manual for more + details. + +\item [Volume] + \index[sd]{Volume } + A Volume is an archive unit, normally a tape or a named disk file where + Bacula stores the data from one or more backup jobs. All Bacula Volumes + have a software label written to the Volume by Bacula so that it + identifies what Volume it is really reading. (Normally there should be + no confusion with disk files, but with tapes, it is easy to mount the + wrong one.) +\end{description} + +\section{What Bacula is Not} +\index[general]{What Bacula is Not} + +Bacula is a backup, restore and verification program and is not a +complete disaster recovery system in itself, but it can be a key part of one +if you plan carefully and follow the instructions included in the +\ilink{ Disaster Recovery}{RescueChapter} Chapter of this manual. + +With proper planning, as mentioned in the Disaster Recovery chapter, +Bacula can be a central component of your disaster recovery system. For +example, if you have created an emergency boot disk, and/or a Bacula Rescue disk to +save the current partitioning information of your hard disk, and maintain a +complete Bacula backup, it is possible to completely recover your system from +"bare metal" that is starting from an empty disk. + +If you have used the {\bf WriteBootstrap} record in your job or some other +means to save a valid bootstrap file, you will be able to use it to extract +the necessary files (without using the catalog or manually searching for the +files to restore). + +\section{Interactions Between the Bacula Services} +\index[general]{Interactions Between the Bacula Services} +\index[general]{Services!Interactions Between the Bacula} + +The following block diagram shows the typical interactions between the Bacula +Services for a backup job. Each block represents in general a separate process +(normally a daemon). In general, the Director oversees the flow of +information. It also maintains the Catalog. + +\addcontentsline{lof}{figure}{Interactions between Bacula Services} +\includegraphics{\idir flow.eps} diff --git a/docs/manuals/es/concepts/gpl.tex b/docs/manuals/de/main/gpl.tex similarity index 100% rename from docs/manuals/es/concepts/gpl.tex rename to docs/manuals/de/main/gpl.tex diff --git a/docs/manuals/de/catalog/index.perl b/docs/manuals/de/main/index.perl similarity index 100% rename from docs/manuals/de/catalog/index.perl rename to docs/manuals/de/main/index.perl diff --git a/docs/manuals/es/install/installation.tex b/docs/manuals/de/main/install.tex similarity index 96% rename from docs/manuals/es/install/installation.tex rename to docs/manuals/de/main/install.tex index f6a9349a..83b62a96 100644 --- a/docs/manuals/es/install/installation.tex +++ b/docs/manuals/de/main/install.tex @@ -27,23 +27,23 @@ them. the Bacula SVN. The released files are: \begin{description} -\item [bacula-2.2.8.tar.gz] +\item [bacula-3.0.3.tar.gz] This is the primary source code release for Bacula. On each - release the version number (2.2.8) will be updated. + release the version number (3.0.3) will be updated. -\item [bacula-docs-2.2.8.tar.gz] +\item [bacula-docs-3.0.3.tar.gz] This file contains a copy of the docs directory with the documents prebuild. English HTML directory, single HTML file, and pdf file. The French and German translations are in progress, but are not built. -\item [bacula-gui-2.2.8.tar.gz] +\item [bacula-gui-3.0.3.tar.gz] This file contains the non-core GUI programs. Currently, it contains bacula-web, a PHP program for producing management viewing of your Bacula job status in a browser; and bimagemgr a browser program for burning CDROM images with Bacula Volumes. -\item [bacula-rescue-2.0.0.tar.gz] +\item [bacula-rescue-3.0.3.tar.gz] This is the Bacula Rescue CDROM code. Note, the version number of this package is not tied to the Bacula release version, so it will be different. Using this code, you can burn a CDROM @@ -59,10 +59,10 @@ them. This package evolves slower than the Bacula source code, so there may not always be a new release of the rescue package when making minor updates to the Bacula code. For example, when releasing - Bacula version 2.2.8, the rescue package may still be at version - 2.0.0 if there were no updates. + Bacula version 3.0.3, the rescue package may still be at a prior + version if there were no updates. -\item [winbacula-2.2.8.exe] +\item [winbacula-3.0.3.exe] This file is the 32 bit Windows installer for installing the Windows client (File daemon) on a Windows machine. This client will also run on 64 bit Windows machines. @@ -70,6 +70,16 @@ them. also optionally load the Win32 Director and the Win32 Storage daemon. +\item [win64bacula-3.0.3.exe] + This file is the 64 bit Windows installer for installing + the Windows client (File daemon) on a Windows machine. + This client will only run on 64 bit Windows OS machines. + It will not run on 32 bit machines or 32 bit Windows OSes. + The win64bacula release is necessary for Volume Shadow + Copy (VSS) to work on Win64 OSes. This installer + installs only the FD, the Director and Storage daemon + are not included. + \end{description} \label{upgrading1} @@ -80,7 +90,25 @@ them. If you are upgrading from one Bacula version to another, you should first carefully read the ReleaseNotes of all major versions between your current -version and the version to which you are upgrading. If the Bacula catalog +version and the version to which you are upgrading. In many upgrades, +especially for minor patch upgrades (e.g. between 3.0.0 and 3.0.1) there +will be no database upgrade, and hence the process is rather simple. + +With version 3.0.0 and later, you {\bf must} ensure that on any one +machine that all components of Bacula are running on exactly the +same version. Prior to version 3.0.0, it was possible to run a +lower level FD with a newer Director and SD. This is no longer the +case. + +As always, we attempt to support older File daemons. This avoids the +need to do a simultaneous upgrade of many machines. For exactly what +older versions of the FD are supported, please see the ReleaseNotes +for the new version. In any case, you must always upgrade both the +Director and the Storage daemon at the same time, and you must also +upgrade any File daemon that is running on the same machine as a Director +or a Storage daemon (see the prior paragraph). + +If the Bacula catalog database has been upgraded (as it is almost every major release), you will either need to reinitialize your database starting from scratch (not normally a good idea), or save an ASCII copy of your database, then proceed @@ -244,7 +272,7 @@ for compatibility with Bacula. Typically, a dependency package will be named {\bf depkgs-ddMMMyy.tar.gz} where {\bf dd} is the day we release it, {\bf MMM} is the abbreviated month (e.g. Jan), and {\bf yy} is the year. An actual -example is: {\bf depkgs-07Apr02.tar.gz}. To install and build this package (if +example is: {\bf depkgs-24Jul09.tar.gz}. To install and build this package (if needed), you do the following: \begin{enumerate} @@ -693,15 +721,13 @@ customize your installation. \item [ {-}{-}enable-bat ] \label{enablebat} \index[general]{{-}{-}enable-bat} - If you have Qt4 >= 4.2 installed on your computer including the + If you have Qt4 >= 4.3 installed on your computer including the libqt4 and libqt4-devel (libqt4-dev on Debian) libraries, and you want to use the Bacula Administration Tool (bat) GUI Console interface to Bacula, you must specify this option. Doing so will build everything in the {\bf src/qt-console} directory. The build with enable-bat will work only with a full Bacula build (i.e. it will not work with a client-only - build). In addition to the Qt4 libraries, linking bat requires - the qwt package installed on your system. Please see the next - configure option (with-qwt) for how to build the qwt package. + build). Qt4 is available on OpenSUSE 10.2, CentOS 5, Fedora, and Debian. If it is not available on your system, you can download the {\bf depkgs-qt} @@ -713,8 +739,10 @@ customize your installation. \item [ {-}{-}with-qwt=\lt{}path\gt{} ] \index[general]{{-}{-}with-qwt} - To build bat, you need the qwt graphics package installed on - your system. The path specified must be an absolute path and + The qwt package is a graphics library for Qt. If it is included + during the building of bat, you will get one extra graphical function. + At the current time, we recommend not including this option when + building bat. The path specified must be an absolute path and not relative. The qwt package is available for download from @@ -726,12 +754,12 @@ customize your installation. --with-qwt=/usr/lib/qwt-5.0.2 \end{verbatim} - Alternatively, you can download the Bacula depkgs package (currently - version 11Jul07) and build it, then assuming that you have put it + Alternatively, you can download the Bacula depkgs-qt package (currently + version 28Jul09) and build it, then assuming that you have put it into a directory named bacula, you would specify: \begin{verbatim} - --with-qwt=$HOME/bacula/depkgs/qwt + --with-qwt=$HOME/bacula/depkgs-qt/qwt \end{verbatim} Some packages such as Debian do not adhere to the standard of diff --git a/docs/manuals/de/catalog/latex2html-init.pl b/docs/manuals/de/main/latex2html-init.pl similarity index 100% rename from docs/manuals/de/catalog/latex2html-init.pl rename to docs/manuals/de/main/latex2html-init.pl diff --git a/docs/manuals/es/concepts/lesser.tex b/docs/manuals/de/main/lesser.tex similarity index 100% rename from docs/manuals/es/concepts/lesser.tex rename to docs/manuals/de/main/lesser.tex diff --git a/docs/manuals/es/concepts/license.tex b/docs/manuals/de/main/license.tex similarity index 100% rename from docs/manuals/es/concepts/license.tex rename to docs/manuals/de/main/license.tex diff --git a/docs/manuals/es/concepts/concepts.kilepr b/docs/manuals/de/main/main.kilepr similarity index 92% rename from docs/manuals/es/concepts/concepts.kilepr rename to docs/manuals/de/main/main.kilepr index d3b53ac2..7b053a4b 100644 --- a/docs/manuals/es/concepts/concepts.kilepr +++ b/docs/manuals/de/main/main.kilepr @@ -3,7 +3,7 @@ img_extIsRegExp=false img_extensions=.eps .jpg .jpeg .png .pdf .ps .fig .gif kileprversion=2 kileversion=2.0 -lastDocument=requirements.tex +lastDocument=version.tex masterDocument= name=Concepts pkg_extIsRegExp=false @@ -116,12 +116,12 @@ order=-1 [item:general.tex] archive=true -column=40 +column=0 encoding= -highlight=LaTeX -line=16 -open=true -order=2 +highlight= +line=0 +open=false +order=-1 [item:gpl.tex] archive=true @@ -161,22 +161,13 @@ order=-1 [item:newfeatures.tex] archive=true -column=0 +column=12 encoding=UTF-8 highlight=LaTeX -line=516 +line=341 open=true order=0 -[item:pluginAPI.tex] -archive=true -column=0 -encoding= -highlight= -line=0 -open=false -order=-1 - [item:pools.tex] archive=true column=2147483647 @@ -215,12 +206,12 @@ order=-1 [item:requirements.tex] archive=true -column=89 -encoding=UTF-8 -highlight=LaTeX -line=48 -open=true -order=3 +column=7864421 +encoding= +highlight= +line=0 +open=false +order=-1 [item:rescue.tex] archive=true @@ -252,11 +243,11 @@ order=-1 [item:state.tex] archive=true column=0 -encoding=UTF-8 -highlight=LaTeX -line=42 -open=true -order=5 +encoding= +highlight= +line=0 +open=false +order=-1 [item:strategies.tex] archive=true @@ -296,12 +287,12 @@ order=-1 [item:supportedoses.tex] archive=true -column=78 -encoding=UTF-8 -highlight=LaTeX -line=74 -open=true -order=4 +column=0 +encoding= +highlight= +line=0 +open=false +order=-1 [item:thanks.tex] archive=true diff --git a/docs/manuals/es/concepts/concepts.tex b/docs/manuals/de/main/main.tex similarity index 60% rename from docs/manuals/es/concepts/concepts.tex rename to docs/manuals/de/main/main.tex index bd9b3917..884539e3 100644 --- a/docs/manuals/es/concepts/concepts.tex +++ b/docs/manuals/de/main/main.tex @@ -39,34 +39,7 @@ \begin{document} \sloppy -\newfont{\bighead}{cmr17 at 36pt} -\parskip 10pt -\parindent 0pt - -\title{\includegraphics{\idir bacula-logo.eps} \\ \bigskip - \Huge{Bacula}$^{\normalsize \textregistered}$ \Huge{Guía de Conceptos y Panorama General} - \begin{center} - \large{It comes in the night and sucks - the essence from your computers. } - \end{center} -} - - -\author{Kern Sibbald} -\date{\vspace{1.0in}\today \\ - Este manual documenta la versión Bacula \fullversion \\ - \vspace{0.2in} - Derecho de Autor {\copyright} 1999-2009, Free Software Foundation Europe - e.V. \\ - Bacula {\textregistered} es una marca registrada de Kern Sibbald.\\ - \vspace{0.2in} - Permission is granted to copy, distribute and/or modify this document under the terms of the - GNU Free Documentation License, Version 1.2 published by the Free Software Foundation; - with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. - A copy of the license is included in the section entitled "GNU Free Documentation License". -} - -\maketitle +\include{coverpage} \clearpage \pagenumbering{roman} @@ -78,12 +51,25 @@ \pagenumbering{arabic} \include{general} \include{newfeatures} -\include{pluginAPI} \include{state} \include{requirements} \include{supportedoses} \include{supporteddrives} + +\include{quickstart} % install +\include{install} % install +\include{critical} % install + \include{tutorial} + +\include{configure} % install +\include{dirdconf} % install +\include{filedconf} % install +\include{storedconf} % install +\include{messagesres} % install +\include{consoleconf} % install +\include{monitorconf} % install + \include{restore} \include{recycling} \include{disk} @@ -94,13 +80,21 @@ \include{supportedchangers} \include{spooling} \include{statistics} -\include{python} \include{ansi-labels} \include{win32} \include{rescue} \include{tls} \include{dataencryption} \include{verify} + +\include{mysql} % catalog +\include{postgresql} % catalog +\include{sqlite} % catalog +\include{catmaintenance} %catalog + +\include{tapetesting} % install +\include{security} % install + \include{bootstrap} \include{license} \include{fdl} @@ -109,9 +103,6 @@ \include{projects} \include{thanks} \include{bugs} -\include{vars} -\include{stunnel} -\include{dvd} % pull in the index \clearpage diff --git a/docs/manuals/es/install/messagesres.tex b/docs/manuals/de/main/messagesres.tex similarity index 94% rename from docs/manuals/es/install/messagesres.tex rename to docs/manuals/de/main/messagesres.tex index 0c80a8ee..784602c7 100644 --- a/docs/manuals/es/install/messagesres.tex +++ b/docs/manuals/de/main/messagesres.tex @@ -11,9 +11,9 @@ to which they should be sent. Even though each daemon has a full message handler, within the File daemon and the Storage daemon, you will normally choose to send all the appropriate -messages back to the Director. This permits all the messages associated with a -single Job to be combined in the Director and sent as a single email message -to the user, or logged together in a single file. +messages back to the Director. This permits all the messages associated with +a single Job to be combined in the Director and sent as a single email message +to the user, or logged together in a single file. Each message that Bacula generates (i.e. that each daemon generates) has an associated type such as INFO, WARNING, ERROR, FATAL, etc. Using the message @@ -80,10 +80,10 @@ in a message resource. {\bf mail -s "Bacula Message" \lt{}recipients\gt{}} -In many cases, depending on your machine, this command may not work. Using -the {\bf MailCommand}, you can specify exactly how to send the mail. -During the processing of the {\bf command} part, normally specified as a -quoted string, the following substitutions will be used: +In many cases, depending on your machine, this command may not work. +However, by using the {\bf MailCommand}, you can specify exactly how to +send the mail. During the processing of the {\bf command} part, normally +specified as a quoted string, the following substitutions will be used: \begin{itemize} \item \%\% = \% @@ -188,10 +188,18 @@ The {\bf destination} may be one of the following: the {\bf address} field. Note, for the moment, the {\bf address} field is ignored and the message is always sent to the LOG\_DAEMON facility with level LOG\_ERR. See {\bf man 3 syslog} for more details. Example: + \begin{verbatim} syslog = all, !skipped \end{verbatim} + Although the {\bf syslog} destination is not used in the default Bacula + config files, in certain cases where Bacula encounters errors in trying + to deliver a message, as a last resort, it will send it to the system + {\bf syslog} to prevent loss of the message, so you might occassionally + check the {\bf syslog} for Bacula output (normally {\bf + /var/log/syslog}). + \item [mail] \index[general]{mail} Send the message to the email addresses that are given as a comma diff --git a/docs/manuals/es/concepts/migration.tex b/docs/manuals/de/main/migration.tex similarity index 93% rename from docs/manuals/es/concepts/migration.tex rename to docs/manuals/de/main/migration.tex index ee2e7a50..25d139a2 100644 --- a/docs/manuals/es/concepts/migration.tex +++ b/docs/manuals/de/main/migration.tex @@ -46,9 +46,9 @@ be migrated, with one exception noted below. In addition, the Pool to which the selected Job or Jobs will be migrated is defined by the {\bf Next Pool = ...} in the Pool resource specified for the Migration Job. -Bacula permits pools to contain Volumes with different Media Types. +Bacula permits Pools to contain Volumes with different Media Types. However, when doing migration, this is a very undesirable condition. For -migration to work properly, you should use pools containing only Volumes of +migration to work properly, you should use Pools containing only Volumes of the same Media Type for all migration jobs. The migration job normally is either manually started or starts @@ -92,28 +92,38 @@ are used to define a Migration job. \begin{description} \item [Pool = \lt{}Pool-name\gt{}] The Pool specified in the Migration control Job is not a new directive for the Job resource, but it is - particularly important because it determines what Pool will be examined for - finding JobIds to migrate. The exception to this is when {\bf Selection - Type = SQLQuery}, in which case no Pool is used, unless you - specifically include it in the SQL query. Note, the Pool resource - referenced must contain a {\bf Next Pool = ...} directive to define - the Pool to which the data will be migrated. + particularly important because it determines what Pool will be examined + for finding JobIds to migrate. The exception to this is when {\bf + Selection Type = SQLQuery}, and although a Pool directive must still be + specified, no Pool is used, unless you specifically include it in the + SQL query. Note, in any case, the Pool resource defined by the Pool + directove must contain a {\bf Next Pool = ...} directive to define the + Pool to which the data will be migrated. \item [Type = Migrate] {\bf Migrate} is a new type that defines the job that is run as being a Migration Job. A Migration Job is a sort of control job and does not have any Files associated with it, and in that sense they are more or less like - an Admin job. Migration jobs simply check to see if there is anything to + an Admin job. Migration jobs simply check to see if there is anything to Migrate then possibly start and control new Backup jobs to migrate the data - from the specified Pool to another Pool. + from the specified Pool to another Pool. Note, any original JobId that + is migrated will be marked as having been migrated, and the original + JobId can nolonger be used for restores; all restores will be done from + the new migrated Job. + \item [Type = Copy] {\bf Copy} is a new type that defines the job that is run as being a Copy Job. A Copy Job is a sort of control job and does not have any Files associated with it, and in that sense they are more or less like - an Admin job. Copy jobs simply check to see if there is anything to + an Admin job. Copy jobs simply check to see if there is anything to Copy then possibly start and control new Backup jobs to copy the data - from the specified Pool to another Pool. + from the specified Pool to another Pool. Note that when a copy is + made, the original JobIds are left unchanged. The new copies can not + be used for restoration unless you specifically choose them by JobId. + If you subsequently delete a JobId that has a copy, the copy will be + automatically upgraded to a Backup rather than a Copy, and it will + subsequently be used for restoration. \item [Selection Type = \lt{}Selection-type-keyword\gt{}] The \lt{}Selection-type-keyword\gt{} determines how the migration job diff --git a/docs/manuals/de/install/monitorconf.tex b/docs/manuals/de/main/monitorconf.tex similarity index 100% rename from docs/manuals/de/install/monitorconf.tex rename to docs/manuals/de/main/monitorconf.tex diff --git a/docs/manuals/de/concepts/mtx-changer.txt b/docs/manuals/de/main/mtx-changer.txt similarity index 100% rename from docs/manuals/de/concepts/mtx-changer.txt rename to docs/manuals/de/main/mtx-changer.txt diff --git a/docs/manuals/es/catalog/mysql.tex b/docs/manuals/de/main/mysql.tex similarity index 96% rename from docs/manuals/es/catalog/mysql.tex rename to docs/manuals/de/main/mysql.tex index 75cc6f0e..fb937269 100644 --- a/docs/manuals/es/catalog/mysql.tex +++ b/docs/manuals/de/main/mysql.tex @@ -39,15 +39,28 @@ mysql-server-.rpm mysql-devel-.rpm \end{verbatim} \normalsize + +If you wish to install them from debs, you will probably need the +following: + +\footnotesize +\begin{verbatim} +mysql-server-.deb +mysql-client-.deb +libmysqlclient15-dev-.deb +libmysqlclient15off-.deb +\end{verbatim} +\normalsize + The names of the packages may vary from distribution to -distribution. It is important to have the devel package loaded as +distribution. It is important to have the {\bf devel} or {\bf dev} package loaded as it contains the libraries and header files necessary to build Bacula. There may be additional packages that are required to install the above, for example, zlib and openssl. Once these packages are installed, you will be able to build Bacula (using the files installed with the mysql package, then run MySQL using the -files installed with mysql-server. If you have installed MySQL by rpms, +files installed with mysql-server. If you have installed MySQL by debs or rpms, please skip Phase I below, and return to complete the installation of Bacula, then come back to Phase II of the MySQL installation when indicated to do so. diff --git a/docs/manuals/es/concepts/newfeatures.tex b/docs/manuals/de/main/newfeatures.tex similarity index 94% rename from docs/manuals/es/concepts/newfeatures.tex rename to docs/manuals/de/main/newfeatures.tex index dab12d10..f2c0812b 100644 --- a/docs/manuals/es/concepts/newfeatures.tex +++ b/docs/manuals/de/main/newfeatures.tex @@ -9,8 +9,22 @@ This chapter presents the new features that are currently under development in the 3.1.x versions to be released as Bacula version 3.2.0 sometime in late 2009 or early 2010. +\section{Truncate volume after purge} +\label{sec:actiononpurge} -\section{Maximum concurent jobs for Devices} +The Pool directive \textbf{ActionOnPurge=Truncate} instructs Bacula to truncate +the volume when it is purged. It is useful to prevent disk based volumes from +consuming too much space. + +\begin{verbatim} +Pool { + Name = Default + Action On Purge = Truncate + ... +} +\end{verbatim} + +\section{Maximum Concurent Jobs for Devices} \label{sec:maximumconcurentjobdevice} {\bf Maximum Concurrent Jobs} is a new Device directive in the Storage @@ -31,7 +45,8 @@ your incremental jobs use another Storage Daemon with lots of disks, Bacula will switch automatically from one Storage Daemon to an other within the same Restore job. -You must upgrade your File Daemon to version 3.0.3 to use this feature. +You must upgrade your File Daemon to version 3.1.3 or greater to use this +feature. This project was funded by Bacula Systems with the help of Equiinet. @@ -98,14 +113,42 @@ FileSet { This project was funded by Bacula Systems. +\section{AllowCompression = \lt{}yes\vb{}no\gt{}} +\index[dir]{AllowCompression} + +This new directive may be added to Storage resource within the Director's +configuration to allow users to selectively disable the client compression for +any job which writes to this storage resource. + +For example: +\begin{verbatim} +Storage { + Name = UltriumTape + Address = ultrium-tape + Password = storage_password # Password for Storage Daemon + Device = Ultrium + Media Type = LTO 3 + AllowCompression = No # Tape drive has hardware compression +} +\end{verbatim} +The above example would cause any jobs running with the UltriumTape storage +resource to run without compression from the client file daemons. This +effectively overrides any compression settings defined at the FileSet level. + +This feature is probably most useful if you have a tape drive which supports +hardware compression. By setting the \texttt{AllowCompression = No} directive +for your tape drive storage resource, you can avoid additional load on the file +daemon and possibly speed up tape backups. -\section{Accurate Fileset options} +This project was funded by Collaborative Fusion, Inc. + +\section{Accurate Fileset Options} \label{sec:accuratefileset} -In previous version, the accurate code was using file time creation and -modification to determine if a file was modified or not. Now you can specify -witch attribute to use (time, size, checksum, permission, owner, group, -\dots). +In previous versions, the accurate code used the file creation and modification +times to determine if a file was modified or not. Now you can specify which +attributes to use (time, size, checksum, permission, owner, group, \dots), +similar to the Verify options. \begin{verbatim} FileSet { @@ -158,43 +201,63 @@ FileSet { compare the SHA1 signature \end{description} -\textbf{Important note:} If you decide to use checksum in Accurate jobs, the -File Daemon will have to read all files even if they won't be saved. It -increases the I/O load, but also the security. By default, Bacula will -check modification/creation time and size. +\textbf{Important note:} If you decide to use checksum in Accurate jobs, +the File Daemon will have to read all files even if they normally would not +be saved. This increases the I/O load, but also the accuracy of the +deduplication. By default, Bacula will check modification/creation time +and size. + +\section{Tab-completion for Bconsole} +\label{sec:tabcompletion} + +If you build \texttt{bconsole} with readline support, you will be able to use +the new auto-completion mode. This mode supports all commands, gives help +inside command, and lists resources when required. It works also in the restore +mode. + +To use this feature, you should have readline development package loaded on +your system, and use the following option in configure. +\begin{verbatim} +./configure --with-readline=/usr/include/readline --disable-conio ... +\end{verbatim} + +The new bconsole won't be able to tab-complete with older directors. \section{Bvfs API} \label{sec:bvfs} -To help developers in restore GUI interfaces, we have added new \textsl{dot - commands} that permit to browse the catalog in a very simple way. +To help developers of restore GUI interfaces, we have added new \textsl{dot + commands} that permit browsing the catalog in a very simple way. \begin{itemize} -\item \texttt{.update [jobid=x,y,z]} This command is required to update the - Bvfs cache in the catalog. You need to run it before any access to the Bvfs - layer. -\item \texttt{.lsdirs jobid=x,y,z path=/path | pathid=101} This command will - list all directories in the specified \texttt{path} or \texttt{pathid}. Using - \texttt{pathid} avoids problems with caracters encoding. -\item \texttt{.lsfiles jobid=x,y,z path=/path | pathid=101} This command will - list all files in the specified \texttt{path} or \texttt{pathid}. Using - \texttt{pathid} avoids problems with caracters encoding. +\item \texttt{.bvfs\_update [jobid=x,y,z]} This command is required to update + the Bvfs cache in the catalog. You need to run it before any access to the + Bvfs layer. + +\item \texttt{.bvfs\_lsdirs jobid=x,y,z path=/path | pathid=101} This command + will list all directories in the specified \texttt{path} or + \texttt{pathid}. Using \texttt{pathid} avoids problems with character + encoding of path/filenames. + +\item \texttt{.bvfs\_lsfiles jobid=x,y,z path=/path | pathid=101} This command + will list all files in the specified \texttt{path} or \texttt{pathid}. Using + \texttt{pathid} avoids problems with character encoding. \end{itemize} You can use \texttt{limit=xxx} and \texttt{offset=yyy} to limit the amount of data that will be displayed. \begin{verbatim} -* .update jobid=1,2 -* .update -* .lsdir path=/ jobid=1,2 +* .bvfs_update jobid=1,2 +* .bvfs_update +* .bvfs_lsdir path=/ jobid=1,2 \end{verbatim} -\section{Testing your tape drive} +\section{Testing your Tape Drive} \label{sec:btapespeed} To determine the best configuration of your tape drive, you can run the new -\texttt{speed} command available in \texttt{btape}. +\texttt{speed} command available in the \texttt{btape} program. This command can have the following arguments: \begin{itemize} @@ -238,7 +301,7 @@ of your hardware chain. (cpu, memory, scsi card, cable, drive, tape). You can change the block size in the Storage Daemon configuration file. -\section{New {\bf Block Checksum} Device directive} +\section{New {\bf Block Checksum} Device Directive} You may now turn off the Block Checksum (CRC32) code that Bacula uses when writing blocks to a Volume. This is done by adding: @@ -247,7 +310,7 @@ done by adding: Block Checksum = no \end{verbatim} -doing so can reduce the Storage daemon CPU speed slightly. It +doing so can reduce the Storage daemon CPU usage slightly. It will also permit Bacula to read a Volume that has corrupted data. The default is {\bf yes} -- i.e. the checksum is computed on write @@ -255,11 +318,23 @@ and checked on read. We do not recommend to turn this off particularly on older tape drives or for disk Volumes where doing so may allow corrupted data -to be undetected. +to go undetected. \section{New Bat Features} -\subsection{Media information view} +\subsection{Media List View} + +By clicking on ``Media'', you can see the list of all your volumes. You will be +able to filter by Pool, Media Type, Location,\dots And sort the result directly +in the table. The old ``Media'' view is now known as ``Pool''. +\begin{figure}[htbp] + \centering + \includegraphics[width=13cm]{\idir bat-mediaview.eps} + \label{fig:mediaview} +\end{figure} + + +\subsection{Media Information View} By double-clicking on a volume (on the Media list, in the Autochanger content or in the Job information panel), you can access a detailed overview of your @@ -271,7 +346,7 @@ Volume. (cf \ref{fig:mediainfo}.) \label{fig:mediainfo} \end{figure} -\subsection{Job information view} +\subsection{Job Information View} By double-clicking on a Job record (on the Job run list or in the Media information panel), you can access a detailed overview of your Job. (cf @@ -283,7 +358,7 @@ information panel), you can access a detailed overview of your Job. (cf \label{fig:jobinfo} \end{figure} -\subsection{Autochanger content view} +\subsection{Autochanger Content View} By double-clicking on a Storage record (on the Storage list panel), you can access a detailed overview of your Autochanger. (cf \ref{fig:jobinfo}.) @@ -294,17 +369,20 @@ access a detailed overview of your Autochanger. (cf \ref{fig:jobinfo}.) \label{fig:achcontent} \end{figure} +\section{Console Timeout Option} +You can now use the -u option of bconsole to set a timeout for each command. + \chapter{New Features in Released Version 3.0.2} This chapter presents the new features added to the Released Bacula Version 3.0.2. -\section{Full restore from a given JobId} +\section{Full Restore from a Given JobId} \index[general]{Restore menu} This feature allows selecting a single JobId and having Bacula automatically select all the other jobs that comprise a full backup up to -and including the selected JobId. +and including the selected date (through JobId). Assume we start with the following jobs: \begin{verbatim} @@ -327,11 +405,12 @@ To select the JobIds, you have the following choices: 1: List last 20 Jobs run 2: List Jobs where a given File is saved ... - 12: Select full restore to a specified JobId + 12: Select full restore to a specified Job date 13: Cancel Select item: (1-13): 12 -Enter JobId to restore: 5 +Enter JobId to get the state to restore: 5 +Selecting jobs to build the Full state at 2009-07-15 11:45:45 You have selected the following JobIds: 1,3,5 Building directory tree for JobId(s) 1,3,5 ... +++++++++++++++++++ @@ -1319,7 +1398,7 @@ directory (eg C:\verb+\+Program Files\verb+\+Bacula\verb+\+bin). The Exchange AP named esebcli2.dll and is found in C:\verb+\+Program Files\verb+\+Exchsrvr\verb+\+bin on a default Exchange installation. -\subsection{Backup up} +\subsection{Backing Up} To back up an Exchange server the Fileset definition must contain at least {\bf Plugin = "exchange:/@EXCHANGE/Microsoft Information Store"} for the backup to work correctly. The 'exchange:' bit tells Bacula to look diff --git a/docs/manuals/de/concepts/pools.tex b/docs/manuals/de/main/pools.tex similarity index 100% rename from docs/manuals/de/concepts/pools.tex rename to docs/manuals/de/main/pools.tex diff --git a/docs/manuals/es/catalog/postgresql.tex b/docs/manuals/de/main/postgresql.tex similarity index 89% rename from docs/manuals/es/catalog/postgresql.tex rename to docs/manuals/de/main/postgresql.tex index f688ff17..0d22a7be 100644 --- a/docs/manuals/es/catalog/postgresql.tex +++ b/docs/manuals/de/main/postgresql.tex @@ -98,6 +98,14 @@ directory or PostgreSQL is installed in a default location, you do not need to specify the directory). This is needed so that Bacula can find the necessary include headers and library files for interfacing to PostgreSQL. +An important thing to note here is that {\bf Bacula} makes two connections +to the PostgreSQL server for each backup job that is currently running. If +you are intending to run a large number of concurrent jobs, check the value +of {\bf max\_connections} in your PostgreSQL configuration file to ensure +that it is larger than the setting {\bf Maximum Concurrent Jobs} +in your director configuration. {\bf Setting this too low will result in +some backup jobs failing to run correctly!} + {\bf Bacula} will install scripts for manipulating the database (create, delete, make tables etc) into the main installation directory. These files will be of the form *\_bacula\_* (e.g. create\_bacula\_database). These files @@ -116,23 +124,10 @@ user). \begin{enumerate} \item cd \lt{}install-directory\gt{} - This directory contains the Bacula catalog interface routines. - -\item ./create\_bacula\_database + This directory contains the Bacula catalog interface routines. - This script creates the PostgreSQL {\bf bacula} database. - Before running this command, you should carefully think about - what encoding sequence you want for the text fields (paths, files, ...). - Ideally, the encoding should be set to UTF8. However, many Unix systems - have filenames that are not encoded in UTF8, either because you have - not set UTF8 as your default character set or because you have imported - files from elsewhere (e.g. MacOS X). For this reason, Bacula uses - SQL\_ASCII as the default encoding. If you want to change this, - please modify the script before running it, but be forewarned that - Bacula backups will fail if PostgreSQL finds any non-UTF8 sequences. - - If running the script fails, it is probably because the database is - owned by a user other than yourself. On many systems, the database +\item Create the database owner ({\bf bacula}) + On many systems, the PostreSQL master owner is {\bf pgsql} and on others such as Red Hat and Fedora it is {\bf postgres}. You can find out which it is by examining your /etc/passwd file. To create a new user under either your name or with say the name @@ -142,15 +137,33 @@ user). su (enter root password) su pgsql (or postgres) - createuser kern (or perhaps bacula) + createuser bacula Shall the new user be allowed to create databases? (y/n) y Shall the new user be allowed to create more new users? (y/n) (choose what you want) exit \end{verbatim} - - At this point, you should be able to execute the - ./create\_bacula\_database command. + Normally the {\bf bacula} user must be able to create new databases, + if you use the script in the next item, + or you will have to create one for it, but it does not need to + create new users. + +\item ./create\_bacula\_database + + This script creates the PostgreSQL {\bf bacula} database. + Before running this command, you should carefully think about + what encoding sequence you want for the text fields (paths, files, ...). + We strongly recommend that you use the default value of SQL\_ASCII + that is in the create\_bacula\_database script. Please be warned + that if you change this value, your backups may fail. After running + the script, you can check with the command: + +\begin{verbatim} + psql -l +\end{verbatim} + + and the column marked {\bf Encoding} should be {\bf SQL\_ASCII} for + all your Bacula databases (normally {\bf bacula}). \item ./make\_bacula\_tables @@ -179,8 +192,9 @@ PostgreSQL-directory/bin/psql --command \\dp bacula \normalsize Also, I had an authorization problem with the password. In the end, -I had to modify my {\bf pg\_hba.conf} file (in /var/lib/pgsql/data on my machine) -from: +I had to modify my {\bf pg\_hba.conf} file (in /var/lib/pgsql/data on my machine +in /var/lib/postgresql/8.x on others, and in /etc/postgres/8.x/main on +still others -- what a mess!) from: \footnotesize \begin{verbatim} @@ -196,7 +210,7 @@ my regression scripts without having a password. A more secure way to perform database authentication is with md5 password hashes. Begin by editing the {\bf pg\_hba.conf} file, and -just prior the the existing ``local'' and ``host'' lines, add the line: +above the existing ``local'' and ``host'' lines, add the line: \footnotesize \begin{verbatim} @@ -204,14 +218,14 @@ just prior the the existing ``local'' and ``host'' lines, add the line: \end{verbatim} \normalsize -and restart the Postgres database server (frequently, this can be done +then restart the Postgres database server (frequently, this can be done using "/etc/init.d/postgresql restart" or "service postgresql restart") to put this new authentication rule into effect. Next, become the Postgres administrator, postgres, either by logging on as the postgres user, or by using su to become root and then using -su - postgres to become postgres. Add a password to the bacula -database for the bacula user using: +{\bf su - postgres} or {\bf su - pgsql} to become postgres. +Add a password to the {\bf bacula} database for the {\bf bacula} user using: \footnotesize \begin{verbatim} @@ -301,8 +315,8 @@ device name for your machine. \index[general]{Installing PostgreSQL from RPMs} If you are installing PostgreSQL from RPMs, you will need to install both the PostgreSQL binaries and the client libraries. The client -libraries are usually found in a devel package, so you must -install: +libraries are usually found in a {\bf devel} or {\bf dev} package, so you must +install the following for rpms: \footnotesize \begin{verbatim} @@ -313,6 +327,21 @@ install: \end{verbatim} \normalsize + +and the following for debs: + +\footnotesize +\begin{verbatim} + postgresql + postgresql-common + postgresql-client + postgresql-client-common + libpq5 + libpq-dev +\end{verbatim} +\normalsize + + These will be similar with most other package managers too. After installing from rpms, you will still need to run the scripts that set up the database and create the tables as described above. diff --git a/docs/manuals/es/install/quickstart.tex b/docs/manuals/de/main/quickstart.tex similarity index 100% rename from docs/manuals/es/install/quickstart.tex rename to docs/manuals/de/main/quickstart.tex diff --git a/docs/manuals/es/concepts/recycling.tex b/docs/manuals/de/main/recycling.tex similarity index 100% rename from docs/manuals/es/concepts/recycling.tex rename to docs/manuals/de/main/recycling.tex diff --git a/docs/manuals/de/main/requirements.tex b/docs/manuals/de/main/requirements.tex new file mode 100644 index 00000000..9dbeed98 --- /dev/null +++ b/docs/manuals/de/main/requirements.tex @@ -0,0 +1,67 @@ +%% +%% + +\chapter{System Requirements} +\label{SysReqs} +\index[general]{System Requirements } +\index[general]{Requirements!System } + +\begin{itemize} +\item {\bf Bacula} has been compiled and run on OpenSuSE Linux, FreeBSD, and + Solaris systems. +\item It requires GNU C++ version 2.95 or higher to compile. You can try with + other compilers and older versions, but you are on your own. We have + successfully compiled and used Bacula using GNU C++ version 4.1.3. + Note, in general GNU C++ is a separate package (e.g. RPM) from GNU C, so you + need them both loaded. On Red Hat systems, the C++ compiler is part of the + {\bf gcc-c++} rpm package. +\item There are certain third party packages that Bacula may need. Except for + MySQL and PostgreSQL, they can all be found in the {\bf depkgs} and {\bf + depkgs1} releases. However, most current Linux and FreeBSD systems + provide these as system packages. +\item The minimum versions for each of the databases supported by Bacula + are: + + \begin{itemize} + \item MySQL 4.1 + \item PostgreSQL 7.4 + \item SQLite 2.8.16 or SQLite 3 + \end{itemize} + +\item If you want to build the Win32 binaries, please see the + README.mingw32 file in the src/win32 directory. We cross-compile the + Win32 release on Linux. We provide documentation on building the Win32 + version, but due to the complexity, you are pretty much on your own + if you want to build it yourself. +\item {\bf Bacula} requires a good implementation of pthreads to work. This + is not the case on some of the BSD systems. +\item The source code has been written with portability in mind and is mostly + POSIX compatible. Thus porting to any POSIX compatible operating system + should be relatively easy. +\item The GNOME Console program is developed and tested under GNOME 2.x. + GNOME 1.4 is no longer supported. +\item The wxWidgets Console program is developed and tested with the latest + stable ANSI or Unicode version of + \elink{wxWidgets}{\url{http://www.wxwidgets.org/}} (2.6.1). It works fine with the + Windows and GTK+-2.x version of wxWidgets, and should also work on other + platforms supported by wxWidgets. +\item The Tray Monitor program is developed for GTK+-2.x. It needs GNOME less + or equal to 2.2, KDE greater or equal to 3.1 or any window manager supporting + the + \elink{ FreeDesktop system tray + standard}{\url{http://www.freedesktop.org/Standards/systemtray-spec}}. +\item If you want to enable command line editing and history, you will need + to have /usr/include/termcap.h and either the termcap or the ncurses library + loaded (libtermcap-devel or ncurses-devel). +\item If you want to use DVD as backup medium, you will need to download the + \elink{dvd+rw-tools 5.21.4.10.8}{\url{http://fy.chalmers.se/~appro/linux/DVD+RW/}}, + apply the patch that is in the {\bf patches} directory of the main + source tree + to make these tools compatible with Bacula, then compile and install them. + There is also a patch for dvd+rw-tools version 6.1, and we hope that the + patch is integrated into a later version. + Do not use the dvd+rw-tools provided by your distribution, unless you + are sure it contains the patch. dvd+rw-tools without the patch will not + work with Bacula. DVD media is not recommended for serious or important + backups because of its low reliability. +\end{itemize} diff --git a/docs/manuals/es/concepts/rescue.tex b/docs/manuals/de/main/rescue.tex similarity index 100% rename from docs/manuals/es/concepts/rescue.tex rename to docs/manuals/de/main/rescue.tex diff --git a/docs/manuals/es/concepts/restore.tex b/docs/manuals/de/main/restore.tex similarity index 100% rename from docs/manuals/es/concepts/restore.tex rename to docs/manuals/de/main/restore.tex diff --git a/docs/manuals/de/install/security.tex b/docs/manuals/de/main/security.tex similarity index 100% rename from docs/manuals/de/install/security.tex rename to docs/manuals/de/main/security.tex diff --git a/docs/manuals/es/concepts/spooling.tex b/docs/manuals/de/main/spooling.tex similarity index 98% rename from docs/manuals/es/concepts/spooling.tex rename to docs/manuals/de/main/spooling.tex index 0a45868f..b7d883a3 100644 --- a/docs/manuals/es/concepts/spooling.tex +++ b/docs/manuals/de/main/spooling.tex @@ -54,18 +54,18 @@ The following directives can be used to control data spooling. \item To turn data spooling on/off at the Job level in the Job resource in the Director's conf file (default {\bf no}). -{\bf SpoolData = yes|no} +{\bf SpoolData = yes\vb{}no} \item To override the Job specification in a Schedule Run directive in the Director's conf file. -{\bf SpoolData = yes|no} +{\bf SpoolData = yes\vb{}no} \item To override the Job specification in a bconsole session using the \texttt{run} command. Please note that this does {\bf not } refer to a configuration statement, but to an argument for the run command. -{\bf SpoolData=yes|no} +{\bf SpoolData=yes\vb{}no} \item To limit the the maximum spool file size for a particular job in the Job resource diff --git a/docs/manuals/es/catalog/sqlite.tex b/docs/manuals/de/main/sqlite.tex similarity index 100% rename from docs/manuals/es/catalog/sqlite.tex rename to docs/manuals/de/main/sqlite.tex diff --git a/docs/manuals/de/main/state.tex b/docs/manuals/de/main/state.tex new file mode 100644 index 00000000..c9291aa5 --- /dev/null +++ b/docs/manuals/de/main/state.tex @@ -0,0 +1,250 @@ +%% +%% + +\chapter{The Current State of Bacula} +\label{StateChapter} +\index[general]{Current State of Bacula } + +In other words, what is and what is not currently implemented and functional. + +\section{What is Implemented} +\index[general]{Implemented!What} +\index[general]{What is Implemented} + +\begin{itemize} +\item Job Control + \begin{itemize} + \item Network backup/restore with centralized Director. + \item Internal scheduler for automatic + \ilink{Job}{JobDef} execution. + \item Scheduling of multiple Jobs at the same time. + \item You may run one Job at a time or multiple simultaneous Jobs + (sometimes called multiplexing). + \item Job sequencing using priorities. + \item \ilink{Console}{UADef} interface to the Director allowing complete + control. A shell, Qt4 GUI, GNOME GUI and wxWidgets GUI versions of + the Console program are available. Note, the Qt4 GUI program called + the Bacula Administration tool or bat, offers many additional + features over the shell program. + \end{itemize} + +\item Security + \begin{itemize} + \item Verification of files previously cataloged, permitting a Tripwire like + capability (system break-in detection). + \item CRAM-MD5 password authentication between each component (daemon). + \item Configurable + \ilink{TLS (SSL) communications encryption}{CommEncryption} between each + component. + \item Configurable + \ilink{Data (on Volume) encryption}{DataEncryption} + on a Client by Client basis. + \item Computation of MD5 or SHA1 signatures of the file data if requested. + \end{itemize} + + +\item Restore Features + \begin{itemize} + \item Restore of one or more files selected interactively either for the + current backup or a backup prior to a specified time and date. + \item Restore of a complete system starting from bare metal. This is mostly + automated for Linux systems and partially automated for Solaris. See + \ilink{Disaster Recovery Using Bacula}{RescueChapter}. This is also + reported to work on Win2K/XP systems. + \item Listing and Restoration of files using stand-alone {\bf bls} and {\bf + bextract} tool programs. Among other things, this permits extraction of files + when Bacula and/or the catalog are not available. Note, the recommended way + to restore files is using the restore command in the Console. These programs + are designed for use as a last resort. + \item Ability to restore the catalog database rapidly by using bootstrap + files (previously saved). + \item Ability to recreate the catalog database by scanning backup Volumes + using the {\bf bscan} program. + \end{itemize} + +\item SQL Catalog + \begin{itemize} + \item Catalog database facility for remembering Volumes, Pools, Jobs, and + Files backed up. + \item Support for MySQL, PostgreSQL, and SQLite Catalog databases. + \item User extensible queries to the MySQL, PostgreSQL and SQLite databases. + \end{itemize} + +\item Advanced Volume and Pool Management + \begin{itemize} + \item Labeled Volumes, preventing accidental overwriting (at least by + Bacula). + \item Any number of Jobs and Clients can be backed up to a single Volume. + That is, you can backup and restore Linux, Unix, Sun, and Windows machines to + the same Volume. + \item Multi-volume saves. When a Volume is full, {\bf Bacula} automatically + requests the next Volume and continues the backup. + \item + \ilink{Pool and Volume}{PoolResource} library management + providing Volume flexibility (e.g. monthly, weekly, daily Volume sets, Volume + sets segregated by Client, ...). + \item Machine independent Volume data format. Linux, Solaris, and Windows + clients can all be backed up to the same Volume if desired. + \item The Volume data format is upwards compatible so that old Volumes + can always be read. + \item A flexible + \ilink{message}{MessagesChapter} handler including routing + of messages from any daemon back to the Director and automatic email + reporting. + \item Data spooling to disk during backup with subsequent write to tape from + the spooled disk files. This prevents tape "shoe shine" during + Incremental/Differential backups. + \end{itemize} + +\item Advanced Support for most Storage Devices + \begin{itemize} + \item Autochanger support using a simple shell interface that can interface + to virtually any autoloader program. A script for {\bf mtx} is provided. + \item Support for autochanger barcodes -- automatic tape labeling from + barcodes. + \item Automatic support for multiple autochanger magazines either using + barcodes or by reading the tapes. + \item Support for multiple drive autochangers. + \item Raw device backup/restore. Restore must be to the same device. + \item All Volume blocks (approximately 64K bytes) contain a data checksum. + \item Migration support -- move data from one Pool to another or + one Volume to another. + \item Supports writing to DVD. + \end{itemize} + +\item Multi-Operating System Support + \begin{itemize} + \item Programmed to handle arbitrarily long filenames and messages. + \item GZIP compression on a file by file basis done by the Client program if + requested before network transit. + \item Saves and restores POSIX ACLs on most OSes if enabled. + \item Access control lists for Consoles that permit restricting user access + to only their data. + \item Support for save/restore of files larger than 2GB. + \item Support for 64 bit machines, e.g. amd64, Sparc. + \item Support ANSI and IBM tape labels. + \item Support for Unicode filenames (e.g. Chinese) on Win32 machines on + version 1.37.28 and greater. + \item Consistent backup of open files on Win32 systems (WinXP, Win2003, + and Vista) + but not Win2000, using Volume Shadow Copy (VSS). + \item Support for path/filename lengths of up to 64K on Win32 machines + (unlimited on Unix/Linux machines). + \end{itemize} + +\item Miscellaneous + \begin{itemize} + \item Multi-threaded implementation. + \item A comprehensive and extensible + \ilink{configuration file}{DirectorChapter} for each daemon. + \end{itemize} +\end{itemize} + +\section{Advantages Over Other Backup Programs} +\index[general]{Advantages of Bacula Over Other Backup Programs } +\index[general]{Programs!Advantages of Bacula Over Other Backup } + +\begin{itemize} +\item Since there is a client for each machine, you can backup + and restore clients of any type ensuring that all attributes + of files are properly saved and restored. +\item It is also possible to backup clients without any client + software by using NFS or Samba. However, if possible, we + recommend running a Client File daemon on each machine to be + backed up. +\item Bacula handles multi-volume backups. +\item A full comprehensive SQL standard database of all files backed up. This + permits online viewing of files saved on any particular Volume. +\item Automatic pruning of the database (removal of old records) thus + simplifying database administration. +\item Any SQL database engine can be used making Bacula very flexible. + Drivers currently exist for MySQL, PostgreSQL, and SQLite. +\item The modular but integrated design makes Bacula very scalable. +\item Since Bacula uses client file servers, any database or + other application can be properly shutdown by Bacula using the + native tools of the system, backed up, then restarted (all + within a Bacula Job). +\item Bacula has a built-in Job scheduler. +\item The Volume format is documented and there are simple C programs to + read/write it. +\item Bacula uses well defined (IANA registered) TCP/IP ports -- no rpcs, no + shared memory. +\item Bacula installation and configuration is relatively simple compared to + other comparable products. +\item According to one user Bacula is as fast as the big major commercial + applications. +\item According to another user Bacula is four times as fast as another + commercial application, probably because that application stores its catalog + information in a large number of individual files rather than an SQL database + as Bacula does. +\item Aside from several GUI administrative interfaces, Bacula has a + comprehensive shell administrative interface, which allows the + administrator to use tools such as ssh to administrate any part of + Bacula from anywhere (even from home). +\item Bacula has a Rescue CD for Linux systems with the following features: + \begin{itemize} + \item You build it on your own system from scratch with one simple command: + make -- well, then make burn. + \item It uses your kernel + \item It captures your current disk parameters and builds scripts that allow + you to automatically repartition a disk and format it to put it back to what + you had before. + \item It has a script that will restart your networking (with the right IP + address) + \item It has a script to automatically mount your hard disks. + \item It has a full Bacula FD statically linked + \item You can easily add additional data/programs, ... to the disk. + \end{itemize} + +\end{itemize} + +\section{Current Implementation Restrictions} +\index[general]{Current Implementation Restrictions } +\index[general]{Restrictions!Current Implementation } + +\begin{itemize} +\item It is very unusual to attempt to restore two Jobs + that ran simultaneously in a single restore, but if + you do, please be aware that unless you had + data spooling turned on and the spool file held the full + contents of both Jobs during the backup, the restore will not + work correctly. In other terms, Bacula cannot restore + two jobs in the same restore if the Jobs' data blocks were + intermixed on the backup medium. The problem is resolved by + simply doing two restores, one for each Job. +\item Bacula can generally restore any backup made from one client + to any other client. However, if the architecture is significantly + different (i.e. 32 bit architecture to 64 bit or Win32 to Unix), + some restrictions may apply (e.g. Solaris door files do not exist + on other Unix/Linux machines; there are reports that Zlib compression + written with 64 bit machines does not always read correctly on a 32 bit + machine). +\end{itemize} + +\section{Design Limitations or Restrictions} +\index[general]{Restrictions!Design Limitations or } +\index[general]{Design Limitations or Restrictions } + +\begin{itemize} +\item Names (resource names, Volume names, and such) defined in Bacula + configuration files are limited to a fixed number of + characters. Currently the limit is defined as 127 characters. Note, + this does not apply to filenames, which may be arbitrarily long. +\item Command line input to some of the stand alone tools -- e.g. btape, + bconsole is restricted to several hundred characters maximum. +\end{itemize} + +\section{Items to Note} +\index[general]{Items to Note} +\begin{itemize} +\item Bacula's Differential and Incremental \textsl{normal} backups are based + on time stamps. Consequently, if you move files into an existing directory + or move a whole directory into the backup fileset after a Full backup, those + files will probably not be backed up by an Incremental save because they will + have old dates. This problem is corrected by using Accurate mode backups + or by explicitly updating the date/time stamp on all moved files. +\item In older versions of Bacula ($<=$ 3.0.x), if you have over 4 billion file + entries stored in your database, the database FileId is likely to overflow. +\item In non \textsl{Accurate} mode, files deleted after a Full save will be + included in a restoration. This is typical for most similar backup programs. +\end{itemize} diff --git a/docs/manuals/es/concepts/statistics.tex b/docs/manuals/de/main/statistics.tex similarity index 100% rename from docs/manuals/es/concepts/statistics.tex rename to docs/manuals/de/main/statistics.tex diff --git a/docs/manuals/es/install/storedconf.tex b/docs/manuals/de/main/storedconf.tex similarity index 89% rename from docs/manuals/es/install/storedconf.tex rename to docs/manuals/de/main/storedconf.tex index 2d80a369..5c9e28da 100644 --- a/docs/manuals/es/install/storedconf.tex +++ b/docs/manuals/de/main/storedconf.tex @@ -106,7 +106,7 @@ have one and only one Storage resource definition. \item [Maximum Concurrent Jobs = \lt{}number\gt{}] \index[sd]{Maximum Concurrent Jobs} \index[sd]{Directive!Maximum Concurrent Jobs} - where \lt{}number\gt{} is the maximum number of Jobs that should run + where \lt{}number\gt{} is the maximum number of Jobs that may run concurrently. The default is set to 10, but you may set it to a larger number. Each contact from the Director (e.g. status request, job start request) is considered as a Job, so if you want to be able to do a {\bf @@ -223,7 +223,7 @@ values in the Director's configuration file. Specifies the password that must be supplied by the above named Director. This directive is required. -\item [Monitor = \lt{}yes|no\gt{}] +\item [Monitor = \lt{}yes\vb{}no\gt{}] \index[sd]{Monitor} \index[sd]{Directive!Monitor} If Monitor is set to {\bf no} (default), this director will have full @@ -289,13 +289,13 @@ specified within the Device resource are specific to the Device. in the Solaris (Sun) archive specification {\bf /dev/rmt/0mbn} is what is needed in this case. Bacula does not support SysV tape drive behavior. - As noted above, normally the Archive Device is the name of a tape drive, but - you may also specify an absolute path to an existing directory. If the Device - is a directory Bacula will write to file storage in the specified directory, - and the filename used will be the Volume name as specified in the Catalog. - If you want to write into more than one directory (i.e. to spread the load to - different disk drives), you will need to define two Device resources, each - containing an Archive Device with a different directory. + As noted above, normally the Archive Device is the name of a tape drive, but + you may also specify an absolute path to an existing directory. If the + Device is a directory Bacula will write to file storage in the specified + directory, and the filename used will be the Volume name as specified in the + Catalog. If you want to write into more than one directory (i.e. to spread + the load to different disk drives), you will need to define two Device + resources, each containing an Archive Device with a different directory. \label{SetupFifo} In addition to a tape device name or a directory name, Bacula will accept the name of a FIFO. A FIFO is a special kind of file that connects two programs @@ -409,7 +409,7 @@ Device { unique Media Type. \label{Autochanger} -\item [Autochanger = {\it Yes|No}] +\item [Autochanger = {\it yes\vb{}no}] \index[sd]{Autochanger} \index[sd]{Directive!Autochanger} If {\bf Yes}, this device belongs to an automatic tape changer, and you @@ -465,21 +465,21 @@ Changer Command = "/path/mtx-changer %c %o %S %a %d" \item [Alert Command = {\it name-string}] \index[sd]{Alert Command} - The {\bf name-string} specifies an external program to be called at the + The {\bf name-string} specifies an external program to be called at the completion of each Job after the device is released. The purpose of this - command is to check for Tape Alerts, which are present when something is - wrong with your tape drive (at least for most modern tape drives). The same - substitution characters that may be specified in the Changer Command may also - be used in this string. For more information, please see the - \ilink{Autochangers}{AutochangersChapter} chapter of this manual. + command is to check for Tape Alerts, which are present when something is + wrong with your tape drive (at least for most modern tape drives). The same + substitution characters that may be specified in the Changer Command may + also be used in this string. For more information, please see the + \ilink{Autochangers}{AutochangersChapter} chapter of this manual. - Note, it is not necessary to have an autochanger to use this command. The - example below uses the {\bf tapeinfo} program that comes with the {\bf mtx} - package, but it can be used on any tape drive. However, you will need to - specify a {\bf Changer Device} directive in your Device resource (see above) - so that the generic SCSI device name can be edited into the command (with the - \%c). + Note, it is not necessary to have an autochanger to use this command. The + example below uses the {\bf tapeinfo} program that comes with the {\bf mtx} + package, but it can be used on any tape drive. However, you will need to + specify a {\bf Changer Device} directive in your Device resource (see above) + so that the generic SCSI device name can be edited into the command (with + the \%c). An example of the use of this command to print Tape Alerts in the Job report is: @@ -518,7 +518,7 @@ bacula-sd Alert: TapeAlert[32]: Interface: Problem with SCSI interface the past -- the default mtx-changer script works for any number of drives. -\item [Autoselect = {\it Yes|No}] +\item [Autoselect = {\it yes\vb{}no}] \index[sd]{Autoselect} \index[sd]{Directive!Autoselect} If this directive is set to {\bf yes} (default), and the Device @@ -529,6 +529,16 @@ bacula-sd Alert: TapeAlert[32]: Interface: Problem with SCSI interface for reserving a drive for something special such as a high priority backup or restore operations. +\item[Maximum Concurent Jobs = {\it num}] +\index[sd]{MaximumConcurentJobs} + +{\bf Maximum Concurrent Jobs} is a directive that permits setting the maximum +number of Jobs that can run concurrently on a specified Device. Using this +directive, it is possible to have different Jobs using multiple drives, because +when the Maximum Concurrent Jobs limit is reached, the Storage Daemon will +start new Jobs on any other available compatible drive. This facilitates +writing to multiple drives with multiple Jobs that all use the same Pool. + \item [Maximum Changer Wait = {\it time}] \index[sd]{Maximum Changer Wait} \index[sd]{Directive!Maximum Changer Wait} @@ -554,7 +564,7 @@ bacula-sd Alert: TapeAlert[32]: Interface: Problem with SCSI interface for a open before timing out. If this time is exceeded, Bacula will cancel the job. The default is 5 minutes. -\item [Always Open = {\it Yes|No}] +\item [Always Open = {\it yes\vb{}no}] \index[sd]{Always Open} \index[sd]{Directive!Always Open} If {\bf Yes} (default), Bacula will always keep the device open unless @@ -570,10 +580,11 @@ bacula-sd Alert: TapeAlert[32]: Interface: Problem with SCSI interface Always Open = yes}. This also ensures that the drive is available when Bacula needs it. - If you have {\bf Always Open = yes} (recommended) and you want to use the - drive for something else, simply use the {\bf unmount} command in the Console - program to release the drive. However, don't forget to remount the drive with - {\bf mount} when the drive is available or the next Bacula job will block. + If you have {\bf Always Open = yes} (recommended) and you want to use the + drive for something else, simply use the {\bf unmount} command in the + Console program to release the drive. However, don't forget to remount the + drive with {\bf mount} when the drive is available or the next Bacula job + will block. For File storage, this directive is ignored. For a FIFO storage device, you must set this to {\bf No}. @@ -607,7 +618,7 @@ bacula-sd Alert: TapeAlert[32]: Interface: Problem with SCSI interface \ilink{description of Offline On Unmount}{NoTapeInDrive} in the Tape Testing chapter. -\item [Close on Poll= {\it Yes|No}] +\item [Close on Poll= {\it yes\vb{}no}] \index[sd]{Close on Poll} \index[sd]{Directive!Close on Poll} If {\bf Yes}, Bacula close the device (equivalent to an unmount except no @@ -628,7 +639,7 @@ bacula-sd Alert: TapeAlert[32]: Interface: Problem with SCSI interface starts that needs the the drive. \label{removablemedia} -\item [Removable media = {\it Yes|No}] +\item [Removable media = {\it yes\vb{}no}] \index[sd]{Removable media} \index[sd]{Directive!Removable media} If {\bf Yes}, this device supports removable media (for example, tapes @@ -653,7 +664,7 @@ bacula-sd Alert: TapeAlert[32]: Interface: Problem with SCSI interface {\bf Removable Media}. -\item [Random access = {\it Yes|No}] +\item [Random access = {\it yes\vb{}no}] \index[sd]{Random access} \index[sd]{Directive!Random access} If {\bf Yes}, the archive device is assumed to be a random access medium @@ -663,7 +674,7 @@ bacula-sd Alert: TapeAlert[32]: Interface: Problem with SCSI interface {\bf No} for non-random access devices such as tapes and named pipes. -\item [Requires Mount = {\it Yes|No}] +\item [Requires Mount = {\it yes\vb{}no}] \index[sd]{Requires Mount } When this directive is enabled, the Storage daemon will submit a {\bf Mount Command} before attempting to open the device. @@ -738,6 +749,20 @@ the editing codes that can be used in this directive. If you need to specify multiple commands, create a shell script. +\item[Block Checksum = {\it yes/no}] + + You may turn off the Block Checksum (CRC32) code that Bacula uses when + writing blocks to a Volume. Doing so can reduce the Storage daemon CPU usage + slightly. It will also permit Bacula to read a Volume that has corrupted + data. + + The default is {\bf yes} -- i.e. the checksum is computed on write and + checked on read. + + \textbf{We do not recommend to turn this off} particularly on older tape + drives or for disk Volumes where doing so may allow corrupted data to go + undetected. + \item [Minimum block size = {\it size-in-bytes}] \index[sd]{Minimum block size} \index[sd]{Directive!Minimum block size} @@ -804,20 +829,21 @@ the editing codes that can be used in this directive. The maximum {\bf size-in-bytes} possible is 2,000,000. -\item [Hardware End of Medium = {\it Yes|No}] +\item [Hardware End of Medium = {\it yes\vb{}no}] \index[sd]{Hardware End of Medium} \index[sd]{Directive!Hardware End of Medium} - If {\bf No}, the archive device is not required to support end of medium - ioctl request, and the storage daemon will use the forward space file - function to find the end of the recorded data. If {\bf Yes}, the archive - device must support the {\tt ioctl} {\tt MTEOM} call, which will position the - tape to the end of the recorded data. In addition, your SCSI driver must keep - track of the file number on the tape and report it back correctly by the - {\bf MTIOCGET} ioctl. Note, some SCSI drivers will correctly forward space to - the end of the recorded data, but they do not keep track of the file number. - On Linux machines, the SCSI driver has a {\bf fast-eod} option, which if set - will cause the driver to lose track of the file number. You should ensure - that this option is always turned off using the {\bf mt} program. + If {\bf No}, the archive device is not required to support end of medium + ioctl request, and the storage daemon will use the forward space file + function to find the end of the recorded data. If {\bf Yes}, the archive + device must support the {\tt ioctl} {\tt MTEOM} call, which will position + the tape to the end of the recorded data. In addition, your SCSI driver must + keep track of the file number on the tape and report it back correctly by + the {\bf MTIOCGET} ioctl. Note, some SCSI drivers will correctly forward + space to the end of the recorded data, but they do not keep track of the + file number. On Linux machines, the SCSI driver has a {\bf fast-eod} + option, which if set will cause the driver to lose track of the file + number. You should ensure that this option is always turned off using the + {\bf mt} program. Default setting for Hardware End of Medium is {\bf Yes}. This function is used before appending to a tape to ensure that no previously written data is @@ -826,7 +852,7 @@ the editing codes that can be used in this directive. supports this function. All modern (after 1998) tape drives support this feature. -\item [Fast Forward Space File = {\it Yes|No}] +\item [Fast Forward Space File = {\it yes\vb{}no}] \index[sd]{Fast Forward Space File} \index[sd]{Directive!Fast Forward Space File} If {\bf No}, the archive device is not required to support keeping track of @@ -840,7 +866,7 @@ the editing codes that can be used in this directive. Default setting for Fast Forward Space File is {\bf Yes}. -\item [Use MTIOCGET = {\it Yes|No}] +\item [Use MTIOCGET = {\it yes\vb{}no}] \index[sd]{Use MTIOCGET} \index[sd]{Directive!Use MTIOCGET} If {\bf No}, the operating system is not required to support keeping track of @@ -852,40 +878,40 @@ the editing codes that can be used in this directive. on a few *BSD systems. Operating systems known to work correctly are Solaris, Linux and FreeBSD. -\item [BSF at EOM = {\it Yes|No}] +\item [BSF at EOM = {\it yes\vb{}no}] \index[sd]{BSF at EOM} \index[sd]{Directive!BSF at EOM} - If {\bf No}, the default, no special action is taken by Bacula with the End - of Medium (end of tape) is reached because the tape will be positioned after - the last EOF tape mark, and Bacula can append to the tape as desired. - However, on some systems, such as FreeBSD, when Bacula reads the End of - Medium (end of tape), the tape will be positioned after the second EOF tape - mark (two successive EOF marks indicated End of Medium). If Bacula appends - from that point, all the appended data will be lost. The solution for such - systems is to specify {\bf BSF at EOM} which causes Bacula to backspace over - the second EOF mark. Determination of whether or not you need this directive - is done using the {\bf test} command in the {\bf btape} program. - -\item [TWO EOF = {\it Yes|No}] + If {\bf No}, the default, no special action is taken by Bacula with the End + of Medium (end of tape) is reached because the tape will be positioned after + the last EOF tape mark, and Bacula can append to the tape as desired. + However, on some systems, such as FreeBSD, when Bacula reads the End of + Medium (end of tape), the tape will be positioned after the second EOF tape + mark (two successive EOF marks indicated End of Medium). If Bacula appends + from that point, all the appended data will be lost. The solution for such + systems is to specify {\bf BSF at EOM} which causes Bacula to backspace over + the second EOF mark. Determination of whether or not you need this directive + is done using the {\bf test} command in the {\bf btape} program. + +\item [TWO EOF = {\it yes\vb{}no}] \index[sd]{TWO EOF} \index[sd]{Directive!TWO EOF} - If {\bf Yes}, Bacula will write two end of file marks when terminating a tape --- i.e. after the last job or at the end of the medium. If {\bf No}, the -default, Bacula will only write one end of file to terminate the tape. + If {\bf Yes}, Bacula will write two end of file marks when terminating a + tape -- i.e. after the last job or at the end of the medium. If {\bf No}, + the default, Bacula will only write one end of file to terminate the tape. -\item [Backward Space Record = {\it Yes|No}] +\item [Backward Space Record = {\it yes\vb{}no}] \index[sd]{Backward Space Record} \index[sd]{Directive!Backward Space Record} - If {\it Yes}, the archive device supports the {\tt MTBSR ioctl} to backspace - records. If {\it No}, this call is not used and the device must be rewound - and advanced forward to the desired position. Default is {\bf Yes} for non - random-access devices. This function if enabled is used at the end of a - Volume after writing the end of file and any ANSI/IBM labels to determine whether - or not the last block was written correctly. If you turn this function off, - the test will not be done. This causes no harm as the re-read process is - precautionary rather than required. - -\item [Backward Space File = {\it Yes|No}] + If {\it Yes}, the archive device supports the {\tt MTBSR ioctl} to backspace + records. If {\it No}, this call is not used and the device must be rewound + and advanced forward to the desired position. Default is {\bf Yes} for non + random-access devices. This function if enabled is used at the end of a + Volume after writing the end of file and any ANSI/IBM labels to determine + whether or not the last block was written correctly. If you turn this + function off, the test will not be done. This causes no harm as the re-read + process is precautionary rather than required. + +\item [Backward Space File = {\it yes\vb{}no}] \index[sd]{Backward Space File} \index[sd]{Directive!Backward Space File} If {\it Yes}, the archive device supports the {\bf MTBSF} and {\bf MTBSF @@ -894,7 +920,7 @@ default, Bacula will only write one end of file to terminate the tape. advanced forward to the desired position. Default is {\bf Yes} for non random-access devices. -\item [Forward Space Record = {\it Yes|No}] +\item [Forward Space Record = {\it yes\vb{}no}] \index[sd]{Forward Space Record} \index[sd]{Directive!Forward Space Record} If {\it Yes}, the archive device must support the {\bf MTFSR ioctl} to @@ -902,14 +928,14 @@ default, Bacula will only write one end of file to terminate the tape. advance the position on the device. Default is {\bf Yes} for non random-access devices. -\item [Forward Space File = {\it Yes|No}] +\item [Forward Space File = {\it yes\vb{}no}] \index[sd]{Forward Space File} \index[sd]{Directive!Forward Space File} If {\bf Yes}, the archive device must support the {\tt MTFSF ioctl} to forward space by file marks. If {\it No}, data must be read to advance the position on the device. Default is {\bf Yes} for non random-access devices. -\item [Offline On Unmount = {\it Yes|No}] +\item [Offline On Unmount = {\it yes\vb{}no}] \index[sd]{Offline On Unmount} \index[sd]{Directive!Offline On Unmount} The default for this directive is {\bf No}. If {\bf Yes} the archive device @@ -931,6 +957,17 @@ default, Bacula will only write one end of file to terminate the tape. \ilink{description of Offline On Unmount}{NoTapeInDrive} in the Tape Testing chapter. +\item [Maximum Concurrent Jobs = \lt{}number\gt{}] + \index[sd]{Device Maximum Concurrent Jobs} + \index[sd]{Directive!Device Maximum Concurrent Jobs} + \index[sd]{Directive!New in 3.0.3} + where \lt{}number\gt{} is the maximum number of Jobs that can run + concurrently on a specified Device. Using this directive, it is possible + to have different Jobs using multiple drives, because when + the Maximum Concurrent Jobs limit is + reached, the Storage Daemon will start new Jobs on any other available + compatible drive. This facilitates writing to multiple drives with + multiple Jobs that all use the same Pool. \item [Maximum Volume Size = {\it size}] \index[sd]{Maximum Volume Size} @@ -975,7 +1012,7 @@ default, Bacula will only write one end of file to terminate the tape. {\bf Maximum Volume Bytes} directive in the Director's Pool resource, which does the same thing but on a Pool (Volume) basis. -\item [Block Positioning = {\it yes|no}] +\item [Block Positioning = {\it yes\vb{}no}] \index[sd]{Block Positioning} \index[sd]{Directive!Block Positioning} This directive tells Bacula not to use block positioning when doing restores. @@ -1008,8 +1045,8 @@ default, Bacula will only write one end of file to terminate the tape. \item [Maximum Spool Size = {\it bytes}] \index[sd]{Maximum Spool Size} \index[sd]{Directive!Maximum Spool Size} - where the bytes specify the maximum spool size for all jobs that are running. - The default is no limit. + where the bytes specify the maximum spool size for all jobs that are + running. The default is no limit. \item [Maximum Job Spool Size = {\it bytes}] \index[sd]{Maximum Job Spool Size} @@ -1078,7 +1115,7 @@ apply to removable filesystems such as USB in addition to DVD. \begin{description} -\item [Requires Mount = {\it Yes|No}] +\item [Requires Mount = {\it yes\vb{}no}] \index[sd]{Requires Mount} \index[sd]{Directive!Requires Mount} You must set this directive to {\bf yes} for DVD-writers, and to {\bf no} for @@ -1218,7 +1255,7 @@ Similar consideration should be given to all other Command parameters. \begin{description} -\item [Label media = {\it Yes|No}] +\item [Label media = {\it yes\vb{}no}] \index[sd]{Label media} \index[sd]{Directive!Label media} If {\bf Yes}, permits this device to automatically label blank media @@ -1229,7 +1266,7 @@ Similar consideration should be given to all other Command parameters. when the tape has been recycled. The automatic labeling feature is most useful when writing to disk rather than tape volumes. -\item [Automatic mount = {\it Yes|No}] +\item [Automatic mount = {\it yes\vb{}no}] \index[sd]{Automatic mount} \index[sd]{Directive!Automatic mount} If {\bf Yes} (the default), permits the daemon to examine the device to diff --git a/docs/manuals/de/concepts/strategies.tex b/docs/manuals/de/main/strategies.tex similarity index 100% rename from docs/manuals/de/concepts/strategies.tex rename to docs/manuals/de/main/strategies.tex diff --git a/docs/manuals/de/concepts/supportedchangers.tex b/docs/manuals/de/main/supportedchangers.tex similarity index 100% rename from docs/manuals/de/concepts/supportedchangers.tex rename to docs/manuals/de/main/supportedchangers.tex diff --git a/docs/manuals/de/main/supporteddrives.tex b/docs/manuals/de/main/supporteddrives.tex new file mode 100644 index 00000000..005ba405 --- /dev/null +++ b/docs/manuals/de/main/supporteddrives.tex @@ -0,0 +1,158 @@ +%% +%% + +\chapter{Supported Tape Drives} +\label{SupportedDrives} +\index[general]{Drives!Supported Tape } +\index[general]{Supported Tape Drives } + +Bacula uses standard operating system calls (read, write, ioctl) to +interface to tape drives. As a consequence, it relies on having a +correctly written OS tape driver. Bacula is known to work perfectly well +with SCSI tape drivers on FreeBSD, Linux, Solaris, and Windows machines, +and it may work on other *nix machines, but we have not tested it. +Recently there are many new drives that use IDE, ATAPI, or +SATA interfaces rather than SCSI. On Linux the OnStream drive, which uses +the OSST driver is one such +example, and it is known to work with Bacula. In addition a number of such +tape drives (i.e. OS drivers) seem to work on Windows systems. However, +non-SCSI tape drives (other than the OnStream) that use ide-scis, ide-tape, +or other non-scsi drivers do not function correctly with Bacula (or any +other demanding tape application) as of today (April 2007). If you +have purchased a non-SCSI tape drive for use with Bacula on Linux, there +is a good chance that it will not work. We are working with the kernel +developers to rectify this situation, but it will not be resolved in the +near future. + +Even if your drive is on the list below, please check the +\ilink{Tape Testing Chapter}{btape1} of this manual for +procedures that you can use to verify if your tape drive will work with +Bacula. If your drive is in fixed block mode, it may appear to work with +Bacula until you attempt to do a restore and Bacula wants to position the +tape. You can be sure only by following the procedures suggested above and +testing. + +It is very difficult to supply a list of supported tape drives, or drives that +are known to work with Bacula because of limited feedback (so if you use +Bacula on a different drive, please let us know). Based on user feedback, the +following drives are known to work with Bacula. A dash in a column means +unknown: + +\addcontentsline{lot}{table}{Supported Tape Drives} +\begin{longtable}{|p{2.0in}|l|l|p{2.5in}|l|} + \hline +\multicolumn{1}{|c| }{\bf OS } & \multicolumn{1}{c| }{\bf Man. } & +\multicolumn{1}{c| }{\bf Media } & \multicolumn{1}{c| }{\bf Model } & +\multicolumn{1}{c| }{\bf Capacity } \\ + \hline {- } & {ADIC } & {DLT } & {Adic Scalar 100 DLT } & {100GB } \\ + \hline {- } & {ADIC } & {DLT } & {Adic Fastor 22 DLT } & {- } \\ + \hline {FreeBSD 5.4-RELEASE-p1 amd64 } & {Certance} & {LTO } & {AdicCertance CL400 LTO Ultrium 2 } & {200GB } \\ + \hline {- } & {- } & {DDS } & {Compaq DDS 2,3,4 } & {- } \\ + \hline {SuSE 8.1 Pro} & {Compaq} & {AIT } & {Compaq AIT 35 LVD } & {35/70GB } \\ + \hline {- } & {Exabyte } & {- } & {Exabyte drives less than 10 years old } & {- } \\ + \hline {- } & {Exabyte } & {- } & {Exabyte VXA drives } & {- } \\ + \hline {- } & {HP } & {Travan 4 } & {Colorado T4000S } & {- } \\ + \hline {- } & {HP } & {DLT } & {HP DLT drives } & {- } \\ + \hline {- } & {HP } & {LTO } & {HP LTO Ultrium drives } & {- } \\ + \hline {- } & {IBM} & {??} & {3480, 3480XL, 3490, 3490E, 3580 and 3590 drives} & {- } \\ + \hline {FreeBSD 4.10 RELEASE } & {HP } & {DAT } & {HP StorageWorks DAT72i } & {- } \\ + \hline {- } & {Overland } & {LTO } & {LoaderXpress LTO } & {- } \\ + \hline {- } & {Overland } & {- } & {Neo2000 } & {- } \\ + \hline {- } & {OnStream } & {- } & {OnStream drives (see below) } & {- } \\ + \hline {FreeBSD 4.11-Release} & {Quantum } & {SDLT } & {SDLT320 } & {160/320GB } \\ + \hline {- } & {Quantum } & {DLT } & {DLT-8000 } & {40/80GB } \\ + \hline {Linux } & {Seagate } & {DDS-4 } & {Scorpio 40 } & {20/40GB } \\ + \hline {FreeBSD 4.9 STABLE } & {Seagate } & {DDS-4 } & {STA2401LW } & {20/40GB } \\ + \hline {FreeBSD 5.2.1 pthreads patched RELEASE } & {Seagate } & {AIT-1 } & {STA1701W} & {35/70GB } \\ + \hline {Linux } & {Sony } & {DDS-2,3,4 } & {- } & {4-40GB } \\ + \hline {Linux } & {Tandberg } & {- } & {Tandbert MLR3 } & {- } \\ + \hline {FreeBSD } & {Tandberg } & {- } & {Tandberg SLR6 } & {- } \\ + \hline {Solaris } & {Tandberg } & {- } & {Tandberg SLR75 } & {- } \\ + \hline + +\end{longtable} + +There is a list of \ilink{supported autochangers}{Models} in the Supported +Autochangers chapter of this document, where you will find other tape drives +that work with Bacula. + +\section{Unsupported Tape Drives} +\label{UnSupportedDrives} +\index[general]{Unsupported Tape Drives } +\index[general]{Drives!Unsupported Tape } + +Previously OnStream IDE-SCSI tape drives did not work with Bacula. As of +Bacula version 1.33 and the osst kernel driver version 0.9.14 or later, they +now work. Please see the testing chapter as you must set a fixed block size. + +QIC tapes are known to have a number of particularities (fixed block size, and +one EOF rather than two to terminate the tape). As a consequence, you will +need to take a lot of care in configuring them to make them work correctly +with Bacula. + +\section{FreeBSD Users Be Aware!!!} +\index[general]{FreeBSD Users Be Aware } +\index[general]{Aware!FreeBSD Users Be } + +Unless you have patched the pthreads library on FreeBSD 4.11 systems, you will +lose data when Bacula spans tapes. This is because the unpatched pthreads +library fails to return a warning status to Bacula that the end of the tape is +near. This problem is fixed in FreeBSD systems released after 4.11. Please see the +\ilink{Tape Testing Chapter}{FreeBSDTapes} of this manual for +{\bf important} information on how to configure your tape drive for +compatibility with Bacula. + +\section{Supported Autochangers} +\index[general]{Autochangers!Supported } +\index[general]{Supported Autochangers } + +For information on supported autochangers, please see the +\ilink{Autochangers Known to Work with Bacula}{Models} +section of the Supported Autochangers chapter of this manual. + +\section{Tape Specifications} +\index[general]{Specifications!Tape} +\index[general]{Tape Specifications} +If you want to know what tape drive to buy that will work with Bacula, +we really cannot tell you. However, we can say that if you are going +to buy a drive, you should try to avoid DDS drives. The technology is +rather old and DDS tape drives need frequent cleaning. DLT drives are +generally much better (newer technology) and do not need frequent +cleaning. + +Below, you will find a table of DLT and LTO tape specifications that will +give you some idea of the capacity and speed of modern tapes. The +capacities that are listed are the native tape capacity without compression. +All modern drives have hardware compression, and manufacturers often list +compressed capacity using a compression ration of 2:1. The actual compression +ratio will depend mostly on the data you have to backup, but I find that +1.5:1 is a much more reasonable number (i.e. multiply the value shown in +the table by 1.5 to get a rough average of what you will probably see). +The transfer rates are rounded to the nearest GB/hr. All values are provided +by various manufacturers. + +The Media Type is what is designated by the manufacturers and you are not +required to use (but you may) the same name in your Bacula conf resources. + + +\begin{tabular}{|c|c|c|c} +Media Type & Drive Type & Media Capacity & Transfer Rate \\ \hline +DDS-1 & DAT & 2 GB & ?? GB/hr \\ \hline +DDS-2 & DAT & 4 GB & ?? GB/hr \\ \hline +DDS-3 & DAT & 12 GB & 5.4 GB/hr \\ \hline +Travan 40 & Travan & 20 GB & ?? GB/hr \\ \hline +DDS-4 & DAT & 20 GB & 11 GB/hr \\ \hline +VXA-1 & Exabyte & 33 GB & 11 GB/hr \\ \hline +DAT-72 & DAT & 36 GB & 13 GB/hr \\ \hline +DLT IV & DLT8000 & 40 GB & 22 GB/hr \\ \hline +VXA-2 & Exabyte & 80 GB & 22 GB/hr \\ \hline +Half-high Ultrium 1 & LTO 1 & 100 GB & 27 GB/hr \\ \hline +Ultrium 1 & LTO 1 & 100 GB & 54 GB/hr \\ \hline +Super DLT 1 & SDLT 220 & 110 GB & 40 GB/hr \\ \hline +VXA-3 & Exabyte & 160 GB & 43 GB/hr \\ \hline +Super DLT I & SDLT 320 & 160 GB & 58 GB/hr \\ \hline +Ultrium 2 & LTO 2 & 200 GB & 108 GB/hr \\ \hline +Super DLT II & SDLT 600 & 300 GB & 127 GB/hr \\ \hline +VXA-4 & Exabyte & 320 GB & 86 GB/hr \\ \hline +Ultrium 3 & LTO 3 & 400 GB & 216 GB/hr \\ \hline +\end{tabular} diff --git a/docs/manuals/de/main/supportedoses.tex b/docs/manuals/de/main/supportedoses.tex new file mode 100644 index 00000000..bf4d9376 --- /dev/null +++ b/docs/manuals/de/main/supportedoses.tex @@ -0,0 +1,90 @@ +%% +%% + +\chapter{Supported Operating Systems} +\label{SupportedOSes} +\index[general]{Systems!Supported Operating } +\index[general]{Supported Operating Systems } + +\begin{itemize} +\item[X] Fully supported +\item[$\star$] The are reported to work in many cases. However they are NOT + supported by the bacula's project. +\end{itemize} + + +\begin{tabular}[h]{|l|l|c|c|c|} + \hline + Operating Systems & Version & Client \small{Daemon} & Director \small{Daemon} & Storage \small{Daemon} \\ + \hline + \hline + GNU/Linux + & All & X & X & X \\ + \hline + FreeBSD & $\geq$ 5.0 & X & X & X + \\ + \hline + Solaris & $\geq$ 8 & X & X & X \\ + \hline + OpenSolaris & ~ & X & X & X \\ + \hline + \hline + MS Windows 32bit& Win98/Me & X & ~ & ~ \\ + \hline + ~ & WinNT/2K & X & $\star$ & $\star$ \\ + \hline + ~ & XP & X & $\star$ & $\star$ \\ + ~ & 2008/Vista & X & $\star$ & $\star$ \\ + MS Windows 64bit& 2008/Vista & X & ~ & ~ \\ + \hline + \hline + MacOS X/Darwin & ~ & X & ~ & ~ \\ + \hline + OpenBSD & ~ & X & $\star$ & ~ \\ + \hline + NetBSD & ~ & X & $\star$ & ~ \\ + \hline + Irix & ~ & $\star$ & ~ & ~ \\ + \hline + True64 & ~ & $\star$ & ~ & ~ \\ + \hline + AIX & $\geq$ 4.3 & $\star$ & ~ & ~ \\ + \hline + BSDI & ~ & $\star$ & ~ & ~ \\ + \hline + HPUX & ~ & $\star$ & ~ & ~ \\ + \hline +\end{tabular} + +\section*{Important notes} + +\begin{itemize} +\item By GNU/Linux, we mean 32/64bit Gentoo, Red Hat, Fedora, Mandriva, + Debian, OpenSuSE, Ubuntu, Kubuntu, \dots + +\item For FreeBSD older than version 5.0, + please see some {\bf important} considerations in the + \ilink{ Tape Modes on FreeBSD}{FreeBSDTapes} section of the + Tape Testing chapter of this manual. + +\item MS Windows Director and Storage daemon are available + in the binary Client installer + +\item For MacOSX see \elink{http://fink.sourceforge.net/ for obtaining the packages}{http://fink.sourceforge.net/} +\end{itemize} + +See the Porting chapter of the Bacula Developer's Guide for information on +porting to other systems. + +If you have a older Red Hat Linux system running the 2.4.x kernel and you have +the directory {\bf /lib/tls} installed on your system (normally by default), +bacula will {\bf NOT} run. This is the new pthreads library and it is +defective. You must remove this directory prior to running Bacula, or you can +simply change the name to {\bf /lib/tls-broken}) then you must reboot your +machine (one of the few times Linux must be rebooted). If you are not able to +remove/rename /lib/tls, an alternative is to set the environment variable +"LD\_ASSUME\_KERNEL=2.4.19" prior to executing Bacula. For this option, you do +not need to reboot, and all programs other than Bacula will continue to use +/lib/tls. +The above mentioned {\bf /lib/tls} problem does not occur with Linux 2.6 kernels. + diff --git a/docs/manuals/de/concepts/thanks.tex b/docs/manuals/de/main/thanks.tex similarity index 100% rename from docs/manuals/de/concepts/thanks.tex rename to docs/manuals/de/main/thanks.tex diff --git a/docs/manuals/de/concepts/tls.tex b/docs/manuals/de/main/tls.tex similarity index 100% rename from docs/manuals/de/concepts/tls.tex rename to docs/manuals/de/main/tls.tex diff --git a/docs/manuals/de/catalog/translate_images.pl b/docs/manuals/de/main/translate_images.pl similarity index 100% rename from docs/manuals/de/catalog/translate_images.pl rename to docs/manuals/de/main/translate_images.pl diff --git a/docs/manuals/de/main/tutorial.tex b/docs/manuals/de/main/tutorial.tex new file mode 100644 index 00000000..1dd8bd0a --- /dev/null +++ b/docs/manuals/de/main/tutorial.tex @@ -0,0 +1,1357 @@ +%% +%% + +\chapter{A Brief Tutorial} +\label{TutorialChapter} +\index[general]{Brief Tutorial } +\index[general]{Tutorial!Brief } + +This chapter will guide you through running Bacula. To do so, we assume you +have installed Bacula, possibly in a single file as shown in the previous +chapter, in which case, you can run Bacula as non-root for these tests. +However, we assume that you have not changed the .conf files. If you have +modified the .conf files, please go back and uninstall Bacula, then reinstall +it, but do not make any changes. The examples in this chapter use the default +configuration files, and will write the volumes to disk in your {\bf /tmp} +directory, in addition, the data backed up will be the source directory where +you built Bacula. As a consequence, you can run all the Bacula daemons for +these tests as non-root. Please note, in production, your File daemon(s) must +run as root. See the Security chapter for more information on this subject. + +% TODO: use crossreferences above +% TODO: add a section here + +The general flow of running Bacula is: + +\begin{enumerate} +\item cd \lt{}install-directory\gt{} +\item Start the Database (if using MySQL or PostgreSQL) +\item Start the Daemons with {\bf ./bacula start} +\item Start the Console program to interact with the Director +\item Run a job +\item When the Volume fills, unmount the Volume, if it is a tape, label a new + one, and continue running. In this chapter, we will write only to disk files + so you won't need to worry about tapes for the moment. +\item Test recovering some files from the Volume just written to ensure the + backup is good and that you know how to recover. Better test before disaster + strikes +\item Add a second client. + \end{enumerate} + +Each of these steps is described in more detail below. + +\section{Before Running Bacula} +\index[general]{Bacula!Before Running } +\index[general]{Before Running Bacula } + +% TODO: some of this content is already covered once or twice critical +% TODO: or quickstart. Consolidate! + +Before running Bacula for the first time in production, we recommend that you +run the {\bf test} command in the {\bf btape} program as described in the +\ilink{Utility Program Chapter}{btape} of this manual. This will +help ensure that Bacula functions correctly with your tape drive. If you have +a modern HP, Sony, or Quantum DDS or DLT tape drive running on Linux or +Solaris, you can probably skip this test as Bacula is well tested with these +drives and systems. For all other cases, you are {\bf strongly} encouraged to +run the test before continuing. {\bf btape} also has a {\bf fill} command that +attempts to duplicate what Bacula does when filling a tape and writing on the +next tape. You should consider trying this command as well, but be forewarned, +it can take hours (about four hours on my drive) to fill a large capacity tape. + +\section{Starting the Database} +\label{StartDB} +\index[general]{Starting the Database } +\index[general]{Database!Starting the } + +If you are using MySQL or PostgreSQL as the Bacula database, you should start +it before you attempt to run a job to avoid getting error messages from Bacula +when it starts. The scripts {\bf startmysql} and {\bf stopmysql} are what I +(Kern) use to start and stop my local MySQL. Note, if you are using SQLite, +you will not want to use {\bf startmysql} or {\bf stopmysql}. If you are +running this in production, you will probably want to find some way to +automatically start MySQL or PostgreSQL after each system reboot. + +If you are using SQLite (i.e. you specified the {\bf \verb:--:with-sqlite=xxx} option +on the {\bf ./configure} command, you need do nothing. SQLite is automatically +started by {\bf Bacula}. + +\section{Starting the Daemons} +\label{StartDaemon} +\index[general]{Starting the Daemons } +\index[general]{Daemons!Starting the } + +Assuming you have built from source or have installed the rpms, +to start the three daemons, from your installation directory, simply enter: + +./bacula start + +The {\bf bacula} script starts the Storage daemon, the File daemon, and the +Director daemon, which all normally run as daemons in the background. If you +are using the autostart feature of Bacula, your daemons will either be +automatically started on reboot, or you can control them individually with the +files {\bf bacula-dir}, {\bf bacula-fd}, and {\bf bacula-sd}, which are +usually located in {\bf /etc/init.d}, though the actual location is system +dependent. +Some distributions may do this differently. + +Note, on Windows, currently only the File daemon is ported, and it must be +started differently. Please see the +\ilink{Windows Version of Bacula}{Win32Chapter} Chapter of this +manual. + +The rpm packages configure the daemons to run as user=root and group=bacula. +The rpm installation also creates the group bacula if it does not exist on the +system. Any users that you add to the group bacula will have access to files +created by the daemons. To disable or alter this behavior edit the daemon +startup scripts: + +\begin{itemize} +\item /etc/bacula/bacula +\item /etc/init.d/bacula-dir +\item /etc/init.d/bacula-sd +\item /etc/init.d/bacula-fd + \end{itemize} + +and then restart as noted above. + +The +\ilink{installation chapter}{InstallChapter} of this manual +explains how you can install scripts that will automatically restart the +daemons when the system starts. + +\section{Using the Director to Query and Start Jobs} +\index[general]{Jobs!Querying or Starting Jobs} +\index[general]{Querying or starting Jobs} +% TODO: section name is too long; maybe use "Using the Console Program" ?? + +To communicate with the director and to query the state of Bacula or run jobs, +from the top level directory, simply enter: + +./bconsole + +Alternatively to running the command line console, if you have +Qt4 installed and used the {\bf \verb:--:enable-bat} on the configure command, +you may use the Bacula Administration Tool ({\bf bat}): + +./bat + +Which has a graphical interface, and many more features than bconsole. + +Two other possibilities are to run the GNOME console +{\bf bgnome-console} or the wxWidgets program {\bf bwx-console}. + +For simplicity, here we will describe only the {\bf ./bconsole} program. Most +of what is described here applies equally well to {\bf ./bat}, +{\bf ./bgnome-console}, and to {\bf bwx-console}. + +The {\bf ./bconsole} runs the Bacula Console program, which connects to the +Director daemon. Since Bacula is a network program, you can run the Console +program anywhere on your network. Most frequently, however, one runs it on the +same machine as the Director. Normally, the Console program will print +something similar to the following: + +\footnotesize +\begin{verbatim} +[kern@polymatou bin]$ ./bconsole +Connecting to Director lpmatou:9101 +1000 OK: HeadMan Version: 2.1.8 (14 May 2007) +* +\end{verbatim} +\normalsize + +the asterisk is the console command prompt. + +Type {\bf help} to see a list of available commands: + +\footnotesize +\begin{verbatim} +*help + Command Description + ======= =========== + add add media to a pool + autodisplay autodisplay [on|off] -- console messages + automount automount [on|off] -- after label + cancel cancel [ | ] -- cancel a job + create create DB Pool from resource + delete delete [pool= | media volume=] + disable disable -- disable a job + enable enable -- enable a job + estimate performs FileSet estimate, listing gives full listing + exit exit = quit + gui gui [on|off] -- non-interactive gui mode + help print this command + list list [pools | jobs | jobtotals | media | +files ]; from catalog + label label a tape + llist full or long list like list command + memory print current memory usage + messages messages + mount mount + prune prune expired records from catalog + purge purge records from catalog + python python control commands + quit quit + query query catalog + restore restore files + relabel relabel a tape + release release + reload reload conf file + run run + status status [[slots] storage | dir | client]= + setdebug sets debug level + setip sets new client address -- if authorized + show show (resource records) [jobs | pools | ... | all] + sqlquery use SQL to query catalog + time print current time + trace turn on/off trace to file + unmount unmount + umount umount for old-time Unix guys + update update Volume, Pool or slots + use use catalog xxx + var does variable expansion + version print Director version + wait wait until no jobs are running [ | | ] +* +\end{verbatim} +\normalsize + +Details of the console program's commands are explained in the +\ilink{Console Chapter}{_ConsoleChapter} of this manual. + +\section{Running a Job} +\label{Running} +\index[general]{Job!Running a } +\index[general]{Running a Job } + +At this point, we assume you have done the following: + +\begin{itemize} +\item Configured Bacula with {\bf ./configure \verb:--:your-options} +\item Built Bacula using {\bf make} +\item Installed Bacula using {\bf make install} +\item Have created your database with, for example, {\bf + ./create\_sqlite\_database} +\item Have created the Bacula database tables with, {\bf + ./make\_bacula\_tables} +\item Have possibly edited your {\bf bacula-dir.conf} file to personalize it + a bit. BE CAREFUL! if you change the Director's name or password, you will + need to make similar modifications in the other .conf files. For the moment + it is probably better to make no changes. +\item You have started Bacula with {\bf ./bacula start} +\item You have invoked the Console program with {\bf ./bconsole} +\end{itemize} + +Furthermore, we assume for the moment you are using the default configuration +files. + +At this point, enter the following command: + +\footnotesize +\begin{verbatim} +show filesets +\end{verbatim} +\normalsize + +and you should get something similar to: + +\footnotesize +\begin{verbatim} +FileSet: name=Full Set + O M + N + I /home/kern/bacula/regress/build + N + E /proc + E /tmp + E /.journal + E /.fsck + N +FileSet: name=Catalog + O M + N + I /home/kern/bacula/regress/working/bacula.sql + N +\end{verbatim} +\normalsize + +This is a pre-defined {\bf FileSet} that will backup the Bacula source +directory. The actual directory names printed should correspond to your system +configuration. For testing purposes, we have chosen a directory of moderate +size (about 40 Megabytes) and complexity without being too big. The FileSet +{\bf Catalog} is used for backing up Bacula's catalog and is not of interest +to us for the moment. The {\bf I} entries are the files or directories that +will be included in the backup and the {\bf E} are those that will be +excluded, and the {\bf O} entries are the options specified for +the FileSet. You can change what is backed up by editing {\bf bacula-dir.conf} +and changing the {\bf File =} line in the {\bf FileSet} resource. + +Now is the time to run your first backup job. We are going to backup your +Bacula source directory to a File Volume in your {\bf /tmp} directory just to +show you how easy it is. Now enter: + +\footnotesize +\begin{verbatim} +status dir +\end{verbatim} +\normalsize + +and you should get the following output: + +\footnotesize +\begin{verbatim} +rufus-dir Version: 1.30 (28 April 2003) +Daemon started 28-Apr-2003 14:03, 0 Jobs run. +Console connected at 28-Apr-2003 14:03 +No jobs are running. +Level Type Scheduled Name +================================================================= +Incremental Backup 29-Apr-2003 01:05 Client1 +Full Backup 29-Apr-2003 01:10 BackupCatalog +==== +\end{verbatim} +\normalsize + +where the times and the Director's name will be different according to your +setup. This shows that an Incremental job is scheduled to run for the Job {\bf +Client1} at 1:05am and that at 1:10, a {\bf BackupCatalog} is scheduled to +run. Note, you should probably change the name {\bf Client1} to be the name of +your machine, if not, when you add additional clients, it will be very +confusing. For my real machine, I use {\bf Rufus} rather than {\bf Client1} as +in this example. + +Now enter: + +\footnotesize +\begin{verbatim} +status client +\end{verbatim} +\normalsize + +and you should get something like: + +\footnotesize +\begin{verbatim} +The defined Client resources are: + 1: rufus-fd +Item 1 selected automatically. +Connecting to Client rufus-fd at rufus:8102 +rufus-fd Version: 1.30 (28 April 2003) +Daemon started 28-Apr-2003 14:03, 0 Jobs run. +Director connected at: 28-Apr-2003 14:14 +No jobs running. +==== +\end{verbatim} +\normalsize + +In this case, the client is named {\bf rufus-fd} your name will be different, +but the line beginning with {\bf rufus-fd Version ...} is printed by your File +daemon, so we are now sure it is up and running. + +Finally do the same for your Storage daemon with: + +\footnotesize +\begin{verbatim} +status storage +\end{verbatim} +\normalsize + +and you should get: + +\footnotesize +\begin{verbatim} +The defined Storage resources are: + 1: File +Item 1 selected automatically. +Connecting to Storage daemon File at rufus:8103 +rufus-sd Version: 1.30 (28 April 2003) +Daemon started 28-Apr-2003 14:03, 0 Jobs run. +Device /tmp is not open. +No jobs running. +==== +\end{verbatim} +\normalsize + +You will notice that the default Storage daemon device is named {\bf File} and +that it will use device {\bf /tmp}, which is not currently open. + +Now, let's actually run a job with: + +\footnotesize +\begin{verbatim} +run +\end{verbatim} +\normalsize + +you should get the following output: + +\footnotesize +\begin{verbatim} +Using default Catalog name=MyCatalog DB=bacula +A job name must be specified. +The defined Job resources are: + 1: Client1 + 2: BackupCatalog + 3: RestoreFiles +Select Job resource (1-3): +\end{verbatim} +\normalsize + +Here, Bacula has listed the three different Jobs that you can run, and you +should choose number {\bf 1} and type enter, at which point you will get: + +\footnotesize +\begin{verbatim} +Run Backup job +JobName: Client1 +FileSet: Full Set +Level: Incremental +Client: rufus-fd +Storage: File +Pool: Default +When: 2003-04-28 14:18:57 +OK to run? (yes/mod/no): +\end{verbatim} +\normalsize + +At this point, take some time to look carefully at what is printed and +understand it. It is asking you if it is OK to run a job named {\bf Client1} +with FileSet {\bf Full Set} (we listed above) as an Incremental job on your +Client (your client name will be different), and to use Storage {\bf File} and +Pool {\bf Default}, and finally, it wants to run it now (the current time +should be displayed by your console). + +Here we have the choice to run ({\bf yes}), to modify one or more of the above +parameters ({\bf mod}), or to not run the job ({\bf no}). Please enter {\bf +yes}, at which point you should immediately get the command prompt (an +asterisk). If you wait a few seconds, then enter the command {\bf messages} +you will get back something like: + +\footnotesize +\begin{verbatim} +28-Apr-2003 14:22 rufus-dir: Last FULL backup time not found. Doing + FULL backup. +28-Apr-2003 14:22 rufus-dir: Start Backup JobId 1, + Job=Client1.2003-04-28_14.22.33 +28-Apr-2003 14:22 rufus-sd: Job Client1.2003-04-28_14.22.33 waiting. + Cannot find any appendable volumes. +Please use the "label" command to create a new Volume for: + Storage: FileStorage + Media type: File + Pool: Default +\end{verbatim} +\normalsize + +The first message, indicates that no previous Full backup was done, so Bacula +is upgrading our Incremental job to a Full backup (this is normal). The second +message indicates that the job started with JobId 1., and the third message +tells us that Bacula cannot find any Volumes in the Pool for writing the +output. This is normal because we have not yet created (labeled) any Volumes. +Bacula indicates to you all the details of the volume it needs. + +At this point, the job is BLOCKED waiting for a Volume. You can check this if +you want by doing a {\bf status dir}. In order to continue, we must create a +Volume that Bacula can write on. We do so with: + +\footnotesize +\begin{verbatim} +label +\end{verbatim} +\normalsize + +and Bacula will print: + +\footnotesize +\begin{verbatim} +The defined Storage resources are: + 1: File +Item 1 selected automatically. +Enter new Volume name: +\end{verbatim} +\normalsize + +at which point, you should enter some name beginning with a letter and +containing only letters and numbers (period, hyphen, and underscore) are also +permitted. For example, enter {\bf TestVolume001}, and you should get back: + +\footnotesize +\begin{verbatim} +Defined Pools: + 1: Default +Item 1 selected automatically. +Connecting to Storage daemon File at rufus:8103 ... +Sending label command for Volume "TestVolume001" Slot 0 ... +3000 OK label. Volume=TestVolume001 Device=/tmp +Catalog record for Volume "TestVolume002", Slot 0 successfully created. +Requesting mount FileStorage ... +3001 OK mount. Device=/tmp +\end{verbatim} +\normalsize + +Finally, enter {\bf messages} and you should get something like: + +\footnotesize +\begin{verbatim} +28-Apr-2003 14:30 rufus-sd: Wrote label to prelabeled Volume + "TestVolume001" on device /tmp +28-Apr-2003 14:30 rufus-dir: Bacula 1.30 (28Apr03): 28-Apr-2003 14:30 +JobId: 1 +Job: Client1.2003-04-28_14.22.33 +FileSet: Full Set +Backup Level: Full +Client: rufus-fd +Start time: 28-Apr-2003 14:22 +End time: 28-Apr-2003 14:30 +Files Written: 1,444 +Bytes Written: 38,988,877 +Rate: 81.2 KB/s +Software Compression: None +Volume names(s): TestVolume001 +Volume Session Id: 1 +Volume Session Time: 1051531381 +Last Volume Bytes: 39,072,359 +FD termination status: OK +SD termination status: OK +Termination: Backup OK +28-Apr-2003 14:30 rufus-dir: Begin pruning Jobs. +28-Apr-2003 14:30 rufus-dir: No Jobs found to prune. +28-Apr-2003 14:30 rufus-dir: Begin pruning Files. +28-Apr-2003 14:30 rufus-dir: No Files found to prune. +28-Apr-2003 14:30 rufus-dir: End auto prune. +\end{verbatim} +\normalsize + +If you don't see the output immediately, you can keep entering {\bf messages} +until the job terminates, or you can enter, {\bf autodisplay on} and your +messages will automatically be displayed as soon as they are ready. + +If you do an {\bf ls -l} of your {\bf /tmp} directory, you will see that you +have the following item: + +\footnotesize +\begin{verbatim} +-rw-r----- 1 kern kern 39072153 Apr 28 14:30 TestVolume001 +\end{verbatim} +\normalsize + +This is the file Volume that you just wrote and it contains all the data of +the job just run. If you run additional jobs, they will be appended to this +Volume unless you specify otherwise. + +You might ask yourself if you have to label all the Volumes that Bacula is +going to use. The answer for disk Volumes, like the one we used, is no. It is +possible to have Bacula automatically label volumes. For tape Volumes, you +will most likely have to label each of the Volumes you want to use. + +If you would like to stop here, you can simply enter {\bf quit} in the Console +program, and you can stop Bacula with {\bf ./bacula stop}. To clean up, simply +delete the file {\bf /tmp/TestVolume001}, and you should also re-initialize +your database using: + +\footnotesize +\begin{verbatim} +./drop_bacula_tables +./make_bacula_tables +\end{verbatim} +\normalsize + +Please note that this will erase all information about the previous jobs that +have run, and that you might want to do it now while testing but that normally +you will not want to re-initialize your database. + +If you would like to try restoring the files that you just backed up, read the +following section. +\label{restoring} + +\section{Restoring Your Files} +\index[general]{Files!Restoring Your } +\index[general]{Restoring Your Files } + +If you have run the default configuration and the save of the Bacula source +code as demonstrated above, you can restore the backed up files in the Console +program by entering: + +\footnotesize +\begin{verbatim} +restore all +\end{verbatim} +\normalsize + +where you will get: + +\footnotesize +\begin{verbatim} +First you select one or more JobIds that contain files +to be restored. You will be presented several methods +of specifying the JobIds. Then you will be allowed to +select which files from those JobIds are to be restored. + +To select the JobIds, you have the following choices: + 1: List last 20 Jobs run + 2: List Jobs where a given File is saved + 3: Enter list of comma separated JobIds to select + 4: Enter SQL list command + 5: Select the most recent backup for a client + 6: Select backup for a client before a specified time + 7: Enter a list of files to restore + 8: Enter a list of files to restore before a specified time + 9: Find the JobIds of the most recent backup for a client + 10: Find the JobIds for a backup for a client before a specified time + 11: Enter a list of directories to restore for found JobIds + 12: Cancel +Select item: (1-12): +\end{verbatim} +\normalsize + +As you can see, there are a number of options, but for the current +demonstration, please enter {\bf 5} to do a restore of the last backup you +did, and you will get the following output: + +\footnotesize +\begin{verbatim} +Defined Clients: + 1: rufus-fd +Item 1 selected automatically. +The defined FileSet resources are: + 1: 1 Full Set 2003-04-28 14:22:33 +Item 1 selected automatically. ++-------+-------+----------+---------------------+---------------+ +| JobId | Level | JobFiles | StartTime | VolumeName | ++-------+-------+----------+---------------------+---------------+ +| 1 | F | 1444 | 2003-04-28 14:22:33 | TestVolume002 | ++-------+-------+----------+---------------------+---------------+ +You have selected the following JobId: 1 +Building directory tree for JobId 1 ... +1 Job inserted into the tree and marked for extraction. +The defined Storage resources are: + 1: File +Item 1 selected automatically. +You are now entering file selection mode where you add and +remove files to be restored. All files are initially added. +Enter "done" to leave this mode. +cwd is: / +$ +\end{verbatim} +\normalsize + +where I have truncated the listing on the right side to make it more readable. +As you can see by starting at the top of the listing, Bacula knows what client +you have, and since there was only one, it selected it automatically, likewise +for the FileSet. Then Bacula produced a listing containing all the jobs that +form the current backup, in this case, there is only one, and the Storage +daemon was also automatically chosen. Bacula then took all the files that were +in Job number 1 and entered them into a {\bf directory tree} (a sort of in +memory representation of your filesystem). At this point, you can use the {\bf +cd} and {\bf ls} ro {\bf dir} commands to walk up and down the directory tree +and view what files will be restored. For example, if I enter {\bf cd +/home/kern/bacula/bacula-1.30} and then enter {\bf dir} I will get a listing +of all the files in the Bacula source directory. On your system, the path will +be somewhat different. For more information on this, please refer to the +\ilink{Restore Command Chapter}{RestoreChapter} of this manual for +more details. + +To exit this mode, simply enter: + +\footnotesize +\begin{verbatim} +done +\end{verbatim} +\normalsize + +and you will get the following output: + +\footnotesize +\begin{verbatim} +Bootstrap records written to + /home/kern/bacula/testbin/working/restore.bsr +The restore job will require the following Volumes: + + TestVolume001 +1444 files selected to restore. +Run Restore job +JobName: RestoreFiles +Bootstrap: /home/kern/bacula/testbin/working/restore.bsr +Where: /tmp/bacula-restores +Replace: always +FileSet: Full Set +Backup Client: rufus-fd +Restore Client: rufus-fd +Storage: File +JobId: *None* +When: 2005-04-28 14:53:54 +OK to run? (yes/mod/no): +\end{verbatim} +\normalsize + +If you answer {\bf yes} your files will be restored to {\bf +/tmp/bacula-restores}. If you want to restore the files to their original +locations, you must use the {\bf mod} option and explicitly set {\bf Where:} +to nothing (or to /). We recommend you go ahead and answer {\bf yes} and after +a brief moment, enter {\bf messages}, at which point you should get a listing +of all the files that were restored as well as a summary of the job that looks +similar to this: + +\footnotesize +\begin{verbatim} +28-Apr-2005 14:56 rufus-dir: Bacula 2.1.8 (08May07): 08-May-2007 14:56:06 +Build OS: i686-pc-linux-gnu suse 10.2 +JobId: 2 +Job: RestoreFiles.2007-05-08_14.56.06 +Restore Client: rufus-fd +Start time: 08-May-2007 14:56 +End time: 08-May-2007 14:56 +Files Restored: 1,444 +Bytes Restored: 38,816,381 +Rate: 9704.1 KB/s +FD Errors: 0 +FD termination status: OK +SD termination status: OK +Termination: Restore OK +08-May-2007 14:56 rufus-dir: Begin pruning Jobs. +08-May-2007 14:56 rufus-dir: No Jobs found to prune. +08-May-2007 14:56 rufus-dir: Begin pruning Files. +08-May-2007 14:56 rufus-dir: No Files found to prune. +08-May-2007 14:56 rufus-dir: End auto prune. +\end{verbatim} +\normalsize + +After exiting the Console program, you can examine the files in {\bf +/tmp/bacula-restores}, which will contain a small directory tree with all the +files. Be sure to clean up at the end with: + +\footnotesize +\begin{verbatim} +rm -rf /tmp/bacula-restore +\end{verbatim} +\normalsize + +\section{Quitting the Console Program} +\index[general]{Program!Quitting the Console } +\index[general]{Quitting the Console Program } + +Simply enter the command {\bf quit}. +\label{SecondClient} + +\section{Adding a Second Client} +\index[general]{Client!Adding a Second } +\index[general]{Adding a Second Client } + +If you have gotten the example shown above to work on your system, you may be +ready to add a second Client (File daemon). That is you have a second machine +that you would like backed up. The only part you need installed on the other +machine is the binary {\bf bacula-fd} (or {\bf bacula-fd.exe} for Windows) and +its configuration file {\bf bacula-fd.conf}. You can start with the same {\bf +bacula-fd.conf} file that you are currently using and make one minor +modification to it to create the conf file for your second client. Change the +File daemon name from whatever was configured, {\bf rufus-fd} in the example +above, but your system will have a different name. The best is to change it to +the name of your second machine. For example: + +\footnotesize +\begin{verbatim} +... +# +# "Global" File daemon configuration specifications +# +FileDaemon { # this is me + Name = rufus-fd + FDport = 9102 # where we listen for the director + WorkingDirectory = /home/kern/bacula/working + Pid Directory = /var/run +} +... +\end{verbatim} +\normalsize + +would become: + +\footnotesize +\begin{verbatim} +... +# +# "Global" File daemon configuration specifications +# +FileDaemon { # this is me + Name = matou-fd + FDport = 9102 # where we listen for the director + WorkingDirectory = /home/kern/bacula/working + Pid Directory = /var/run +} +... +\end{verbatim} +\normalsize + +where I show just a portion of the file and have changed {\bf rufus-fd} to +{\bf matou-fd}. The names you use are your choice. For the moment, I recommend +you change nothing else. Later, you will want to change the password. + +Now you should install that change on your second machine. Then you need to +make some additions to your Director's configuration file to define the new +File daemon or Client. Starting from our original example which should be +installed on your system, you should add the following lines (essentially +copies of the existing data but with the names changed) to your Director's +configuration file {\bf bacula-dir.conf}. + +\footnotesize +\begin{verbatim} +# +# Define the main nightly save backup job +# By default, this job will back up to disk in /tmp +Job { + Name = "Matou" + Type = Backup + Client = matou-fd + FileSet = "Full Set" + Schedule = "WeeklyCycle" + Storage = File + Messages = Standard + Pool = Default + Write Bootstrap = "/home/kern/bacula/working/matou.bsr" +} +# Client (File Services) to backup +Client { + Name = matou-fd + Address = matou + FDPort = 9102 + Catalog = MyCatalog + Password = "xxxxx" # password for + File Retention = 30d # 30 days + Job Retention = 180d # six months + AutoPrune = yes # Prune expired Jobs/Files +} +\end{verbatim} +\normalsize + +Then make sure that the Address parameter in the Storage resource is set to +the fully qualified domain name and not to something like "localhost". The +address specified is sent to the File daemon (client) and it must be a fully +qualified domain name. If you pass something like "localhost" it will not +resolve correctly and will result in a time out when the File daemon fails to +connect to the Storage daemon. + +That is all that is necessary. I copied the existing resource to create a +second Job (Matou) to backup the second client (matou-fd). It has the name +{\bf Matou}, the Client is named {\bf matou-fd}, and the bootstrap file name +is changed, but everything else is the same. This means that Matou will be +backed up on the same schedule using the same set of tapes. You may want to +change that later, but for now, let's keep it simple. + +The second change was to add a new Client resource that defines {\bf matou-fd} +and has the correct address {\bf matou}, but in real life, you may need a +fully qualified domain name or an IP address. I also kept the password the +same (shown as xxxxx for the example). + +At this point, if you stop Bacula and restart it, and start the Client on the +other machine, everything will be ready, and the prompts that you saw above +will now include the second machine. + +To make this a real production installation, you will possibly want to use +different Pool, or a different schedule. It is up to you to customize. In any +case, you should change the password in both the Director's file and the +Client's file for additional security. + +For some important tips on changing names and passwords, and a diagram of what +names and passwords must match, please see +\ilink{Authorization Errors}{AuthorizationErrors} in the FAQ chapter +of this manual. + +\section{When The Tape Fills} +\label{FullTape} +\index[general]{Fills!When The Tape } +\index[general]{When The Tape Fills } + +If you have scheduled your job, typically nightly, there will come a time when +the tape fills up and {\bf Bacula} cannot continue. In this case, Bacula will +send you a message similar to the following: + +\footnotesize +\begin{verbatim} +rufus-sd: block.c:337 === Write error errno=28: ERR=No space left + on device +\end{verbatim} +\normalsize + +This indicates that Bacula got a write error because the tape is full. Bacula +will then search the Pool specified for your Job looking for an appendable +volume. In the best of all cases, you will have properly set your Retention +Periods and you will have all your tapes marked to be Recycled, and {\bf +Bacula} will automatically recycle the tapes in your pool requesting and +overwriting old Volumes. For more information on recycling, please see the +\ilink{Recycling chapter}{RecyclingChapter} of this manual. If you +find that your Volumes were not properly recycled (usually because of a +configuration error), please see the +\ilink{Manually Recycling Volumes}{manualrecycling} section of +the Recycling chapter. + +If like me, you have a very large set of Volumes and you label them with the +date the Volume was first writing, or you have not set up your Retention +periods, Bacula will not find a tape in the pool, and it will send you a +message similar to the following: + +\footnotesize +\begin{verbatim} +rufus-sd: Job kernsave.2002-09-19.10:50:48 waiting. Cannot find any + appendable volumes. +Please use the "label" command to create a new Volume for: + Storage: SDT-10000 + Media type: DDS-4 + Pool: Default +\end{verbatim} +\normalsize + +Until you create a new Volume, this message will be repeated an hour later, +then two hours later, and so on doubling the interval each time up to a +maximum interval of one day. + +The obvious question at this point is: What do I do now? + +The answer is simple: first, using the Console program, close the tape drive +using the {\bf unmount} command. If you only have a single drive, it will be +automatically selected, otherwise, make sure you release the one specified on +the message (in this case {\bf STD-10000}). + +Next, you remove the tape from the drive and insert a new blank tape. Note, on +some older tape drives, you may need to write an end of file mark ({\bf mt \ +-f \ /dev/nst0 \ weof}) to prevent the drive from running away when Bacula +attempts to read the label. + +Finally, you use the {\bf label} command in the Console to write a label to +the new Volume. The {\bf label} command will contact the Storage daemon to +write the software label, if it is successful, it will add the new Volume to +the Pool, then issue a {\bf mount} command to the Storage daemon. See the +previous sections of this chapter for more details on labeling tapes. + +The result is that Bacula will continue the previous Job writing the backup to +the new Volume. + +If you have a Pool of volumes and Bacula is cycling through them, instead of +the above message "Cannot find any appendable volumes.", Bacula may ask you +to mount a specific volume. In that case, you should attempt to do just that. +If you do not have the volume any more (for any of a number of reasons), you +can simply mount another volume from the same Pool, providing it is +appendable, and Bacula will use it. You can use the {\bf list volumes} command +in the console program to determine which volumes are appendable and which are +not. + +If like me, you have your Volume retention periods set correctly, but you have +no more free Volumes, you can relabel and reuse a Volume as follows: + +\begin{itemize} +\item Do a {\bf list volumes} in the Console and select the oldest Volume for + relabeling. +\item If you have setup your Retention periods correctly, the Volume should + have VolStatus {\bf Purged}. +\item If the VolStatus is not set to Purged, you will need to purge the + database of Jobs that are written on that Volume. Do so by using the command + {\bf purge jobs volume} in the Console. If you have multiple Pools, you will +be prompted for the Pool then enter the VolumeName (or MediaId) when +requested. +\item Then simply use the {\bf relabel} command to relabel the Volume. + \end{itemize} + +To manually relabel the Volume use the following additional steps: + +\begin{itemize} +\item To delete the Volume from the catalog use the {\bf delete volume} + command in the Console and select the VolumeName (or MediaId) to be deleted. + +\item Use the {\bf unmount} command in the Console to unmount the old tape. +\item Physically relabel the old Volume that you deleted so that it can be + reused. +\item Insert the old Volume in the tape drive. +\item From a command line do: {\bf mt \ -f \ /dev/st0 \ rewind} and {\bf mt \ + -f \ /dev/st0 \ weof}, where you need to use the proper tape drive name for + your system in place of {\bf /dev/st0}. +\item Use the {\bf label} command in the Console to write a new Bacula label + on your tape. +\item Use the {\bf mount} command in the Console if it is not automatically + done, so that Bacula starts using your newly labeled tape. + \end{itemize} + +\section{Other Useful Console Commands} +\index[general]{Commands!Other Useful Console } +\index[general]{Other Useful Console Commands } + +\begin{description} + +\item [status dir] + \index[console]{status dir } + Print a status of all running jobs and jobs scheduled in the next 24 hours. + +\item [status] + \index[console]{status } + The console program will prompt you to select a daemon type, then will +request the daemon's status. + +\item [status jobid=nn] + \index[console]{status jobid } + Print a status of JobId nn if it is running. The Storage daemon is contacted +and requested to print a current status of the job as well. + +\item [list pools] + \index[console]{list pools } + List the pools defined in the Catalog (normally only Default is used). + +\item [list media] + \index[console]{list media } + Lists all the media defined in the Catalog. + +\item [list jobs] + \index[console]{list jobs } + Lists all jobs in the Catalog that have run. + +\item [list jobid=nn] + \index[console]{list jobid } + Lists JobId nn from the Catalog. + +\item [list jobtotals] + \index[console]{list jobtotals } + Lists totals for all jobs in the Catalog. + +\item [list files jobid=nn] + \index[console]{list files jobid } + List the files that were saved for JobId nn. + +\item [list jobmedia] + \index[console]{list jobmedia } + List the media information for each Job run. + +\item [messages] + \index[console]{messages } + Prints any messages that have been directed to the console. + +\item [unmount storage=storage-name] + \index[console]{unmount storage } + Unmounts the drive associated with the storage device with the name {\bf +storage-name} if the drive is not currently being used. This command is used +if you wish Bacula to free the drive so that you can use it to label a tape. + + +\item [mount storage=storage-name] + \index[sd]{mount storage } + Causes the drive associated with the storage device to be mounted again. When +Bacula reaches the end of a volume and requests you to mount a new volume, +you must issue this command after you have placed the new volume in the +drive. In effect, it is the signal needed by Bacula to know to start reading +or writing the new volume. + +\item [quit] + \index[sd]{quit } + Exit or quit the console program. +\end{description} + +Most of the commands given above, with the exception of {\bf list}, will +prompt you for the necessary arguments if you simply enter the command name. + +\section{Debug Daemon Output} +\index[general]{Debug Daemon Output } +\index[general]{Output!Debug Daemon } + +If you want debug output from the daemons as they are running, start the +daemons from the install directory as follows: + +\footnotesize +\begin{verbatim} +./bacula start -d100 +\end{verbatim} +\normalsize + +This can be particularly helpful if your daemons do not start correctly, +because direct daemon output to the console is normally directed to the +NULL device, but with the debug level greater than zero, the output +will be sent to the starting terminal. + +To stop the three daemons, enter the following from the install directory: + +\footnotesize +\begin{verbatim} +./bacula stop +\end{verbatim} +\normalsize + +The execution of {\bf bacula stop} may complain about pids not found. This is +OK, especially if one of the daemons has died, which is very rare. + +To do a full system save, each File daemon must be running as root so that it +will have permission to access all the files. None of the other daemons +require root privileges. However, the Storage daemon must be able to open the +tape drives. On many systems, only root can access the tape drives. Either run +the Storage daemon as root, or change the permissions on the tape devices to +permit non-root access. MySQL and PostgreSQL can be installed and run with any +userid; root privilege is not necessary. + +\section{Patience When Starting Daemons or Mounting Blank Tapes} + +When you start the Bacula daemons, the Storage daemon attempts to open all +defined storage devices and verify the currently mounted Volume (if +configured). Until all the storage devices are verified, the Storage daemon +will not accept connections from the Console program. If a tape was previously +used, it will be rewound, and on some devices this can take several minutes. +As a consequence, you may need to have a bit of patience when first contacting +the Storage daemon after starting the daemons. If you can see your tape drive, +once the lights stop flashing, the drive will be ready to be used. + +The same considerations apply if you have just mounted a blank tape in a drive +such as an HP DLT. It can take a minute or two before the drive properly +recognizes that the tape is blank. If you attempt to {\bf mount} the tape with +the Console program during this recognition period, it is quite possible that +you will hang your SCSI driver (at least on my Red Hat Linux system). As a +consequence, you are again urged to have patience when inserting blank tapes. +Let the device settle down before attempting to access it. + +\section{Difficulties Connecting from the FD to the SD} +\index[general]{Difficulties Connecting from the FD to the SD} +\index[general]{SD!Difficulties Connecting from the FD to the SD} + +If you are having difficulties getting one or more of your File daemons to +connect to the Storage daemon, it is most likely because you have not used a +fully qualified domain name on the {\bf Address} directive in the +Director's Storage resource. That is the resolver on the File daemon's machine +(not on the Director's) must be able to resolve the name you supply into an IP +address. An example of an address that is guaranteed not to work: {\bf +localhost}. An example that may work: {\bf megalon}. An example that is more +likely to work: {\bf magalon.mydomain.com}. On Win32 if you don't have a good +resolver (often true on older Win98 systems), you might try using an IP +address in place of a name. + +If your address is correct, then make sure that no other program is using the +port 9103 on the Storage daemon's machine. The Bacula port numbers are +authorized by IANA, and should not be used by other programs, but apparently +some HP printers do use these port numbers. A {\bf netstat -a} on the Storage +daemon's machine can determine who is using the 9103 port (used for FD to SD +communications in Bacula). + +\section{Daemon Command Line Options} +\index[general]{Daemon Command Line Options } +\index[general]{Options!Daemon Command Line } + +Each of the three daemons (Director, File, Storage) accepts a small set of +options on the command line. In general, each of the daemons as well as the +Console program accepts the following options: + +\begin{description} + +\item [-c \lt{}file\gt{}] + \index[sd]{-c \lt{}file\gt{} } + Define the file to use as a configuration file. The default is the daemon + name followed by {\bf .conf} i.e. {\bf bacula-dir.conf} for the Director, + {\bf bacula-fd.conf} for the File daemon, and {\bf bacula-sd} for the Storage + daemon. + +\item [-d nn] + \index[sd]{-d nn } + Set the debug level to {\bf nn}. Higher levels of debug cause more + information to be displayed on STDOUT concerning what the daemon is doing. + +\item [-f] + Run the daemon in the foreground. This option is needed to run the daemon + under the debugger. + +\item [-g ] + Run the daemon under this group. This must be a group name, not a GID. + +\item [-s] + Do not trap signals. This option is needed to run the daemon under the + debugger. + +\item [-t] + Read the configuration file and print any error messages, then immediately + exit. Useful for syntax testing of new configuration files. + +\item [-u ] + Run the daemon as this user. This must be a user name, not a UID. + +\item [-v] + Be more verbose or more complete in printing error and informational + messages. Recommended. + +\item [-?] + Print the version and list of options. + +\end{description} + + +\section{Creating a Pool} +\label{Pool} +\index[general]{Pool!Creating a } +\index[general]{Creating a Pool } + +Creating the Pool is automatically done when {\bf Bacula} starts, so if you +understand Pools, you can skip to the next section. + +When you run a job, one of the things that Bacula must know is what Volumes to +use to backup the FileSet. Instead of specifying a Volume (tape) directly, you +specify which Pool of Volumes you want Bacula to consult when it wants a tape +for writing backups. Bacula will select the first available Volume from the +Pool that is appropriate for the Storage device you have specified for the Job +being run. When a volume has filled up with data, {\bf Bacula} will change its +VolStatus from {\bf Append} to {\bf Full}, and then {\bf Bacula} will use the +next volume and so on. If no appendable Volume exists in the Pool, the +Director will attempt to recycle an old Volume, if there are still no +appendable Volumes available, {\bf Bacula} will send a message requesting the +operator to create an appropriate Volume. + +{\bf Bacula} keeps track of the Pool name, the volumes contained in the Pool, +and a number of attributes of each of those Volumes. + +When Bacula starts, it ensures that all Pool resource definitions have been +recorded in the catalog. You can verify this by entering: + +\footnotesize +\begin{verbatim} +list pools +\end{verbatim} +\normalsize + +to the console program, which should print something like the following: + +\footnotesize +\begin{verbatim} +*list pools +Using default Catalog name=MySQL DB=bacula ++--------+---------+---------+---------+----------+-------------+ +| PoolId | Name | NumVols | MaxVols | PoolType | LabelFormat | ++--------+---------+---------+---------+----------+-------------+ +| 1 | Default | 3 | 0 | Backup | * | +| 2 | File | 12 | 12 | Backup | File | ++--------+---------+---------+---------+----------+-------------+ +* +\end{verbatim} +\normalsize + +If you attempt to create the same Pool name a second time, {\bf Bacula} will +print: + +\footnotesize +\begin{verbatim} +Error: Pool Default already exists. +Once created, you may use the {\bf update} command to +modify many of the values in the Pool record. +\end{verbatim} +\normalsize + +\label{Labeling} + +\section{Labeling Your Volumes} +\index[general]{Volumes!Labeling Your } +\index[general]{Labeling Your Volumes } + +Bacula requires that each Volume contains a software label. There are several +strategies for labeling volumes. The one I use is to label them as they are +needed by {\bf Bacula} using the console program. That is when Bacula needs a +new Volume, and it does not find one in the catalog, it will send me an email +message requesting that I add Volumes to the Pool. I then use the {\bf label} +command in the Console program to label a new Volume and to define it in the +Pool database, after which Bacula will begin writing on the new Volume. +Alternatively, I can use the Console {\bf relabel} command to relabel a Volume +that is no longer used providing it has VolStatus {\bf Purged}. + +Another strategy is to label a set of volumes at the start, then use them as +{\bf Bacula} requests them. This is most often done if you are cycling through +a set of tapes, for example using an autochanger. For more details on +recycling, please see the +\ilink{Automatic Volume Recycling}{RecyclingChapter} chapter of +this manual. + +If you run a Bacula job, and you have no labeled tapes in the Pool, Bacula +will inform you, and you can create them "on-the-fly" so to speak. In my +case, I label my tapes with the date, for example: {\bf DLT-18April02}. See +below for the details of using the {\bf label} command. + +\section{Labeling Volumes with the Console Program} +\index[general]{Labeling Volumes with the Console Program } +\index[general]{Program!Labeling Volumes with the Console } + +Labeling volumes is normally done by using the console program. + +\begin{enumerate} +\item ./bconsole +\item label + \end{enumerate} + +If Bacula complains that you cannot label the tape because it is already +labeled, simply {\bf unmount} the tape using the {\bf unmount} command in the +console, then physically mount a blank tape and re-issue the {\bf label} +command. + +Since the physical storage media is different for each device, the {\bf label} +command will provide you with a list of the defined Storage resources such as +the following: + +\footnotesize +\begin{verbatim} +The defined Storage resources are: + 1: File + 2: 8mmDrive + 3: DLTDrive + 4: SDT-10000 +Select Storage resource (1-4): +\end{verbatim} +\normalsize + +At this point, you should have a blank tape in the drive corresponding to the +Storage resource that you select. + +It will then ask you for the Volume name. + +\footnotesize +\begin{verbatim} +Enter new Volume name: +\end{verbatim} +\normalsize + +If Bacula complains: + +\footnotesize +\begin{verbatim} +Media record for Volume xxxx already exists. +\end{verbatim} +\normalsize + +It means that the volume name {\bf xxxx} that you entered already exists in +the Media database. You can list all the defined Media (Volumes) with the {\bf +list media} command. Note, the LastWritten column has been truncated for +proper printing. + +\footnotesize +\begin{verbatim} ++---------------+---------+--------+----------------+-----/~/-+------------+-----+ +| VolumeName | MediaTyp| VolStat| VolBytes | LastWri | VolReten | Recy| ++---------------+---------+--------+----------------+---------+------------+-----+ +| DLTVol0002 | DLT8000 | Purged | 56,128,042,217 | 2001-10 | 31,536,000 | 0 | +| DLT-07Oct2001 | DLT8000 | Full | 56,172,030,586 | 2001-11 | 31,536,000 | 0 | +| DLT-08Nov2001 | DLT8000 | Full | 55,691,684,216 | 2001-12 | 31,536,000 | 0 | +| DLT-01Dec2001 | DLT8000 | Full | 55,162,215,866 | 2001-12 | 31,536,000 | 0 | +| DLT-28Dec2001 | DLT8000 | Full | 57,888,007,042 | 2002-01 | 31,536,000 | 0 | +| DLT-20Jan2002 | DLT8000 | Full | 57,003,507,308 | 2002-02 | 31,536,000 | 0 | +| DLT-16Feb2002 | DLT8000 | Full | 55,772,630,824 | 2002-03 | 31,536,000 | 0 | +| DLT-12Mar2002 | DLT8000 | Full | 50,666,320,453 | 1970-01 | 31,536,000 | 0 | +| DLT-27Mar2002 | DLT8000 | Full | 57,592,952,309 | 2002-04 | 31,536,000 | 0 | +| DLT-15Apr2002 | DLT8000 | Full | 57,190,864,185 | 2002-05 | 31,536,000 | 0 | +| DLT-04May2002 | DLT8000 | Full | 60,486,677,724 | 2002-05 | 31,536,000 | 0 | +| DLT-26May02 | DLT8000 | Append | 1,336,699,620 | 2002-05 | 31,536,000 | 1 | ++---------------+---------+--------+----------------+-----/~/-+------------+-----+ +\end{verbatim} +\normalsize + +Once Bacula has verified that the volume does not already exist, it will +prompt you for the name of the Pool in which the Volume (tape) is to be +created. If there is only one Pool (Default), it will be automatically +selected. + +If the tape is successfully labeled, a Volume record will also be created in +the Pool. That is the Volume name and all its other attributes will appear +when you list the Pool. In addition, that Volume will be available for backup +if the MediaType matches what is requested by the Storage daemon. + +When you labeled the tape, you answered very few questions about it -- +principally the Volume name, and perhaps the Slot. However, a Volume record in +the catalog database (internally known as a Media record) contains quite a few +attributes. Most of these attributes will be filled in from the default values +that were defined in the Pool (i.e. the Pool holds most of the default +attributes used when creating a Volume). + +It is also possible to add media to the pool without physically labeling the +Volumes. This can be done with the {\bf add} command. For more information, +please see the +\ilink{Console Chapter}{_ConsoleChapter} of this manual. diff --git a/docs/manuals/es/concepts/verify.tex b/docs/manuals/de/main/verify.tex similarity index 100% rename from docs/manuals/es/concepts/verify.tex rename to docs/manuals/de/main/verify.tex diff --git a/docs/manuals/es/concepts/win32.tex b/docs/manuals/de/main/win32.tex similarity index 100% rename from docs/manuals/es/concepts/win32.tex rename to docs/manuals/de/main/win32.tex diff --git a/docs/manuals/de/misc/Makefile.in b/docs/manuals/de/misc/Makefile.in index 8301f292..dced9585 100644 --- a/docs/manuals/de/misc/Makefile.in +++ b/docs/manuals/de/misc/Makefile.in @@ -37,6 +37,7 @@ IMAGES=../../../images DOC=misc +MAINDOC=Bacula_Miscellaneous_Guide.html first_rule: all @@ -72,29 +73,30 @@ html: @echo "Making html" @cp -fp ${IMAGES}/*.eps . @rm -f next.eps next.png prev.eps prev.png up.eps up.png - @(if [ -f imagename_translations ] ; then \ - ./translate_images.pl --from_meaningful_names ${DOC}.html; \ - fi) latex2html -white -no_subdir -split 0 -toc_stars -white \ -init_file latex2html-init.pl ${DOC} >tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}.html + @(if [ -f imagename_translations ] ; then \ + ./translate_images.pl --from_meaningful_names ${DOC}/${MAINDOC}; \ + fi) (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} . 2>/dev/null; done) @echo "Done making html" web: @echo "Making web" + @rm -rf ${DOC} @mkdir -p ${DOC} @cp -fp ${IMAGES}/*.eps . @rm -f next.eps next.png prev.eps prev.png up.eps up.png - @cp -fp ${IMAGES}/*.eps ${DOC}/ - @cp -fp ${IMAGES}/*.eps ${IMAGES}/*.png ${DOC}/ @rm -f ${DOC}/xp-*.png @rm -f ${DOC}/next.eps ${DOC}/next.png ${DOC}/prev.eps ${DOC}/prev.png ${DOC}/up.eps ${DOC}/up.png - @rm -rf ${DOC}/*.html - latex2html -split 3 -local_icons -t "Miscellaneous Guide" -long_titles 4 \ - -toc_stars -contents_in_nav -init_file latex2html-init.pl -white ${DOC} >tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}/Miscel_Guide.html - (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} . 2>/dev/null; done) + latex2html -split 3 -local_icons -t "Bacula Miscellaneous Guide" -long_titles 4 \ + -toc_stars -contents_in_nav -init_file latex2html-init.pl \ + -no_antialias -no_antialias_text \ + -white -notransparent ${DOC} >tex.out 2>&1 + @(if [ -f imagename_translations ] ; then \ + ./translate_images.pl --from_meaningful_names ${DOC}/${MAINDOC}; \ + fi) + @cp -f ${DOC}/${MAINDOC} ${DOC}/index.html @echo "Done making web" show: xdvi ${DOC} diff --git a/docs/manuals/de/misc/coverpage.tex b/docs/manuals/de/misc/coverpage.tex index 513bbf65..37dc9314 100644 --- a/docs/manuals/de/misc/coverpage.tex +++ b/docs/manuals/de/misc/coverpage.tex @@ -3,7 +3,7 @@ \parindent 0pt \title{\includegraphics{\idir bacula-logo.eps} \\ \bigskip - \Huge{Bacula}$^{\normalsize \textregistered}$ \Huge{Miscellaneous Guide} + \Huge{Bacula}$^{\normalsize \textregistered}$ \Huge{Bacula Miscellaneous Guide} \begin{center} \large{It comes in the night and sucks the essence from your computers. } diff --git a/docs/manuals/es/catalog/internaldb.tex b/docs/manuals/de/misc/internaldb.tex similarity index 100% rename from docs/manuals/es/catalog/internaldb.tex rename to docs/manuals/de/misc/internaldb.tex diff --git a/docs/manuals/de/misc/misc.kilepr b/docs/manuals/de/misc/misc.kilepr index 11c12315..9dc8bfa5 100644 --- a/docs/manuals/de/misc/misc.kilepr +++ b/docs/manuals/de/misc/misc.kilepr @@ -51,6 +51,15 @@ line=0 open=false order=-1 +[item:internaldb.tex] +archive=true +column=25 +encoding= +highlight= +line=0 +open=false +order=-1 + [item:lesser.tex] archive=true column=0 diff --git a/docs/manuals/de/misc/misc.tex b/docs/manuals/de/misc/misc.tex index 86fe4a0c..59351e52 100644 --- a/docs/manuals/de/misc/misc.tex +++ b/docs/manuals/de/misc/misc.tex @@ -50,6 +50,7 @@ \include{stunnel} \include{dvd} \include{projects} +\include{internaldb} \include{license} \include{fdl} \include{gpl} diff --git a/docs/manuals/de/catalog/Makefile.in b/docs/manuals/de/old/catalog/Makefile.in similarity index 100% rename from docs/manuals/de/catalog/Makefile.in rename to docs/manuals/de/old/catalog/Makefile.in diff --git a/docs/manuals/de/catalog/catalog.css b/docs/manuals/de/old/catalog/catalog.css similarity index 100% rename from docs/manuals/de/catalog/catalog.css rename to docs/manuals/de/old/catalog/catalog.css diff --git a/docs/manuals/de/catalog/catalog.kilepr b/docs/manuals/de/old/catalog/catalog.kilepr similarity index 100% rename from docs/manuals/de/catalog/catalog.kilepr rename to docs/manuals/de/old/catalog/catalog.kilepr diff --git a/docs/manuals/de/catalog/catalog.tex b/docs/manuals/de/old/catalog/catalog.tex similarity index 100% rename from docs/manuals/de/catalog/catalog.tex rename to docs/manuals/de/old/catalog/catalog.tex diff --git a/docs/manuals/de/catalog/catmaintenance.tex b/docs/manuals/de/old/catalog/catmaintenance.tex similarity index 100% rename from docs/manuals/de/catalog/catmaintenance.tex rename to docs/manuals/de/old/catalog/catmaintenance.tex diff --git a/docs/manuals/de/concepts/check_tex.pl b/docs/manuals/de/old/catalog/check_tex.pl similarity index 100% rename from docs/manuals/de/concepts/check_tex.pl rename to docs/manuals/de/old/catalog/check_tex.pl diff --git a/docs/manuals/de/install/do_echo b/docs/manuals/de/old/catalog/do_echo similarity index 100% rename from docs/manuals/de/install/do_echo rename to docs/manuals/de/old/catalog/do_echo diff --git a/docs/manuals/de/catalog/fdl.tex b/docs/manuals/de/old/catalog/fdl.tex similarity index 100% rename from docs/manuals/de/catalog/fdl.tex rename to docs/manuals/de/old/catalog/fdl.tex diff --git a/docs/manuals/de/concepts/fix_tex.pl b/docs/manuals/de/old/catalog/fix_tex.pl similarity index 100% rename from docs/manuals/de/concepts/fix_tex.pl rename to docs/manuals/de/old/catalog/fix_tex.pl diff --git a/docs/manuals/de/concepts/index.perl b/docs/manuals/de/old/catalog/index.perl similarity index 100% rename from docs/manuals/de/concepts/index.perl rename to docs/manuals/de/old/catalog/index.perl diff --git a/docs/manuals/de/catalog/internaldb.tex b/docs/manuals/de/old/catalog/internaldb.tex similarity index 100% rename from docs/manuals/de/catalog/internaldb.tex rename to docs/manuals/de/old/catalog/internaldb.tex diff --git a/docs/manuals/de/concepts/latex2html-init.pl b/docs/manuals/de/old/catalog/latex2html-init.pl similarity index 100% rename from docs/manuals/de/concepts/latex2html-init.pl rename to docs/manuals/de/old/catalog/latex2html-init.pl diff --git a/docs/manuals/de/catalog/mysql.tex b/docs/manuals/de/old/catalog/mysql.tex similarity index 100% rename from docs/manuals/de/catalog/mysql.tex rename to docs/manuals/de/old/catalog/mysql.tex diff --git a/docs/manuals/de/catalog/postgresql.tex b/docs/manuals/de/old/catalog/postgresql.tex similarity index 100% rename from docs/manuals/de/catalog/postgresql.tex rename to docs/manuals/de/old/catalog/postgresql.tex diff --git a/docs/manuals/de/catalog/setup.sm b/docs/manuals/de/old/catalog/setup.sm similarity index 100% rename from docs/manuals/de/catalog/setup.sm rename to docs/manuals/de/old/catalog/setup.sm diff --git a/docs/manuals/de/catalog/sqlite.tex b/docs/manuals/de/old/catalog/sqlite.tex similarity index 100% rename from docs/manuals/de/catalog/sqlite.tex rename to docs/manuals/de/old/catalog/sqlite.tex diff --git a/docs/manuals/de/concepts/translate_images.pl b/docs/manuals/de/old/catalog/translate_images.pl similarity index 100% rename from docs/manuals/de/concepts/translate_images.pl rename to docs/manuals/de/old/catalog/translate_images.pl diff --git a/docs/manuals/de/concepts/Makefile.in b/docs/manuals/de/old/concepts/Makefile.in similarity index 100% rename from docs/manuals/de/concepts/Makefile.in rename to docs/manuals/de/old/concepts/Makefile.in diff --git a/docs/manuals/de/concepts/STYLE b/docs/manuals/de/old/concepts/STYLE similarity index 100% rename from docs/manuals/de/concepts/STYLE rename to docs/manuals/de/old/concepts/STYLE diff --git a/docs/manuals/de/concepts/ansi-labels.tex b/docs/manuals/de/old/concepts/ansi-labels.tex similarity index 100% rename from docs/manuals/de/concepts/ansi-labels.tex rename to docs/manuals/de/old/concepts/ansi-labels.tex diff --git a/docs/manuals/de/concepts/autochangerres.tex b/docs/manuals/de/old/concepts/autochangerres.tex similarity index 100% rename from docs/manuals/de/concepts/autochangerres.tex rename to docs/manuals/de/old/concepts/autochangerres.tex diff --git a/docs/manuals/de/concepts/autochangers.tex b/docs/manuals/de/old/concepts/autochangers.tex similarity index 100% rename from docs/manuals/de/concepts/autochangers.tex rename to docs/manuals/de/old/concepts/autochangers.tex diff --git a/docs/manuals/de/concepts/bootstrap.tex b/docs/manuals/de/old/concepts/bootstrap.tex similarity index 100% rename from docs/manuals/de/concepts/bootstrap.tex rename to docs/manuals/de/old/concepts/bootstrap.tex diff --git a/docs/manuals/de/concepts/bugs.tex b/docs/manuals/de/old/concepts/bugs.tex similarity index 100% rename from docs/manuals/de/concepts/bugs.tex rename to docs/manuals/de/old/concepts/bugs.tex diff --git a/docs/manuals/de/install/check_tex.pl b/docs/manuals/de/old/concepts/check_tex.pl similarity index 100% rename from docs/manuals/de/install/check_tex.pl rename to docs/manuals/de/old/concepts/check_tex.pl diff --git a/docs/manuals/de/concepts/concepts.kilepr b/docs/manuals/de/old/concepts/concepts.kilepr similarity index 100% rename from docs/manuals/de/concepts/concepts.kilepr rename to docs/manuals/de/old/concepts/concepts.kilepr diff --git a/docs/manuals/de/concepts/concepts.tex b/docs/manuals/de/old/concepts/concepts.tex similarity index 100% rename from docs/manuals/de/concepts/concepts.tex rename to docs/manuals/de/old/concepts/concepts.tex diff --git a/docs/manuals/de/concepts/dataencryption.tex b/docs/manuals/de/old/concepts/dataencryption.tex similarity index 100% rename from docs/manuals/de/concepts/dataencryption.tex rename to docs/manuals/de/old/concepts/dataencryption.tex diff --git a/docs/manuals/de/concepts/disk.tex b/docs/manuals/de/old/concepts/disk.tex similarity index 100% rename from docs/manuals/de/concepts/disk.tex rename to docs/manuals/de/old/concepts/disk.tex diff --git a/docs/manuals/es/catalog/do_echo b/docs/manuals/de/old/concepts/do_echo similarity index 100% rename from docs/manuals/es/catalog/do_echo rename to docs/manuals/de/old/concepts/do_echo diff --git a/docs/manuals/de/concepts/dvd.tex b/docs/manuals/de/old/concepts/dvd.tex similarity index 100% rename from docs/manuals/de/concepts/dvd.tex rename to docs/manuals/de/old/concepts/dvd.tex diff --git a/docs/manuals/de/concepts/fdl.tex b/docs/manuals/de/old/concepts/fdl.tex similarity index 100% rename from docs/manuals/de/concepts/fdl.tex rename to docs/manuals/de/old/concepts/fdl.tex diff --git a/docs/manuals/de/install/fix_tex.pl b/docs/manuals/de/old/concepts/fix_tex.pl similarity index 100% rename from docs/manuals/de/install/fix_tex.pl rename to docs/manuals/de/old/concepts/fix_tex.pl diff --git a/docs/manuals/de/concepts/general.tex b/docs/manuals/de/old/concepts/general.tex similarity index 100% rename from docs/manuals/de/concepts/general.tex rename to docs/manuals/de/old/concepts/general.tex diff --git a/docs/manuals/de/concepts/gpl.tex b/docs/manuals/de/old/concepts/gpl.tex similarity index 100% rename from docs/manuals/de/concepts/gpl.tex rename to docs/manuals/de/old/concepts/gpl.tex diff --git a/docs/manuals/de/install/index.perl b/docs/manuals/de/old/concepts/index.perl similarity index 100% rename from docs/manuals/de/install/index.perl rename to docs/manuals/de/old/concepts/index.perl diff --git a/docs/manuals/de/install/latex2html-init.pl b/docs/manuals/de/old/concepts/latex2html-init.pl similarity index 100% rename from docs/manuals/de/install/latex2html-init.pl rename to docs/manuals/de/old/concepts/latex2html-init.pl diff --git a/docs/manuals/de/concepts/lesser.tex b/docs/manuals/de/old/concepts/lesser.tex similarity index 100% rename from docs/manuals/de/concepts/lesser.tex rename to docs/manuals/de/old/concepts/lesser.tex diff --git a/docs/manuals/de/concepts/license.tex b/docs/manuals/de/old/concepts/license.tex similarity index 100% rename from docs/manuals/de/concepts/license.tex rename to docs/manuals/de/old/concepts/license.tex diff --git a/docs/manuals/de/concepts/migration.tex b/docs/manuals/de/old/concepts/migration.tex similarity index 100% rename from docs/manuals/de/concepts/migration.tex rename to docs/manuals/de/old/concepts/migration.tex diff --git a/docs/manuals/es/concepts/mtx-changer.txt b/docs/manuals/de/old/concepts/mtx-changer.txt similarity index 100% rename from docs/manuals/es/concepts/mtx-changer.txt rename to docs/manuals/de/old/concepts/mtx-changer.txt diff --git a/docs/manuals/de/concepts/newfeatures.tex b/docs/manuals/de/old/concepts/newfeatures.tex similarity index 100% rename from docs/manuals/de/concepts/newfeatures.tex rename to docs/manuals/de/old/concepts/newfeatures.tex diff --git a/docs/manuals/es/concepts/pools.tex b/docs/manuals/de/old/concepts/pools.tex similarity index 100% rename from docs/manuals/es/concepts/pools.tex rename to docs/manuals/de/old/concepts/pools.tex diff --git a/docs/manuals/de/concepts/projects.tex b/docs/manuals/de/old/concepts/projects.tex similarity index 100% rename from docs/manuals/de/concepts/projects.tex rename to docs/manuals/de/old/concepts/projects.tex diff --git a/docs/manuals/de/concepts/python.tex b/docs/manuals/de/old/concepts/python.tex similarity index 100% rename from docs/manuals/de/concepts/python.tex rename to docs/manuals/de/old/concepts/python.tex diff --git a/docs/manuals/de/concepts/recycling.tex b/docs/manuals/de/old/concepts/recycling.tex similarity index 100% rename from docs/manuals/de/concepts/recycling.tex rename to docs/manuals/de/old/concepts/recycling.tex diff --git a/docs/manuals/de/concepts/requirements.tex b/docs/manuals/de/old/concepts/requirements.tex similarity index 100% rename from docs/manuals/de/concepts/requirements.tex rename to docs/manuals/de/old/concepts/requirements.tex diff --git a/docs/manuals/de/concepts/rescue.tex b/docs/manuals/de/old/concepts/rescue.tex similarity index 100% rename from docs/manuals/de/concepts/rescue.tex rename to docs/manuals/de/old/concepts/rescue.tex diff --git a/docs/manuals/de/concepts/restore.tex b/docs/manuals/de/old/concepts/restore.tex similarity index 100% rename from docs/manuals/de/concepts/restore.tex rename to docs/manuals/de/old/concepts/restore.tex diff --git a/docs/manuals/de/concepts/setup.sm b/docs/manuals/de/old/concepts/setup.sm similarity index 100% rename from docs/manuals/de/concepts/setup.sm rename to docs/manuals/de/old/concepts/setup.sm diff --git a/docs/manuals/de/concepts/spooling.tex b/docs/manuals/de/old/concepts/spooling.tex similarity index 100% rename from docs/manuals/de/concepts/spooling.tex rename to docs/manuals/de/old/concepts/spooling.tex diff --git a/docs/manuals/de/concepts/state.tex b/docs/manuals/de/old/concepts/state.tex similarity index 100% rename from docs/manuals/de/concepts/state.tex rename to docs/manuals/de/old/concepts/state.tex diff --git a/docs/manuals/de/concepts/statistics.tex b/docs/manuals/de/old/concepts/statistics.tex similarity index 100% rename from docs/manuals/de/concepts/statistics.tex rename to docs/manuals/de/old/concepts/statistics.tex diff --git a/docs/manuals/es/concepts/strategies.tex b/docs/manuals/de/old/concepts/strategies.tex similarity index 100% rename from docs/manuals/es/concepts/strategies.tex rename to docs/manuals/de/old/concepts/strategies.tex diff --git a/docs/manuals/de/concepts/stunnel.tex b/docs/manuals/de/old/concepts/stunnel.tex similarity index 100% rename from docs/manuals/de/concepts/stunnel.tex rename to docs/manuals/de/old/concepts/stunnel.tex diff --git a/docs/manuals/es/concepts/supportedchangers.tex b/docs/manuals/de/old/concepts/supportedchangers.tex similarity index 100% rename from docs/manuals/es/concepts/supportedchangers.tex rename to docs/manuals/de/old/concepts/supportedchangers.tex diff --git a/docs/manuals/de/concepts/supporteddrives.tex b/docs/manuals/de/old/concepts/supporteddrives.tex similarity index 100% rename from docs/manuals/de/concepts/supporteddrives.tex rename to docs/manuals/de/old/concepts/supporteddrives.tex diff --git a/docs/manuals/de/concepts/supportedoses.tex b/docs/manuals/de/old/concepts/supportedoses.tex similarity index 100% rename from docs/manuals/de/concepts/supportedoses.tex rename to docs/manuals/de/old/concepts/supportedoses.tex diff --git a/docs/manuals/es/concepts/thanks.tex b/docs/manuals/de/old/concepts/thanks.tex similarity index 100% rename from docs/manuals/es/concepts/thanks.tex rename to docs/manuals/de/old/concepts/thanks.tex diff --git a/docs/manuals/es/concepts/tls.tex b/docs/manuals/de/old/concepts/tls.tex similarity index 100% rename from docs/manuals/es/concepts/tls.tex rename to docs/manuals/de/old/concepts/tls.tex diff --git a/docs/manuals/de/install/translate_images.pl b/docs/manuals/de/old/concepts/translate_images.pl similarity index 100% rename from docs/manuals/de/install/translate_images.pl rename to docs/manuals/de/old/concepts/translate_images.pl diff --git a/docs/manuals/de/concepts/tutorial.tex b/docs/manuals/de/old/concepts/tutorial.tex similarity index 100% rename from docs/manuals/de/concepts/tutorial.tex rename to docs/manuals/de/old/concepts/tutorial.tex diff --git a/docs/manuals/de/concepts/uploaddoc b/docs/manuals/de/old/concepts/uploaddoc similarity index 100% rename from docs/manuals/de/concepts/uploaddoc rename to docs/manuals/de/old/concepts/uploaddoc diff --git a/docs/manuals/de/concepts/vars.tex b/docs/manuals/de/old/concepts/vars.tex similarity index 100% rename from docs/manuals/de/concepts/vars.tex rename to docs/manuals/de/old/concepts/vars.tex diff --git a/docs/manuals/de/concepts/verify.tex b/docs/manuals/de/old/concepts/verify.tex similarity index 100% rename from docs/manuals/de/concepts/verify.tex rename to docs/manuals/de/old/concepts/verify.tex diff --git a/docs/manuals/de/concepts/win32.tex b/docs/manuals/de/old/concepts/win32.tex similarity index 100% rename from docs/manuals/de/concepts/win32.tex rename to docs/manuals/de/old/concepts/win32.tex diff --git a/docs/manuals/es/console/Makefile b/docs/manuals/de/old/console/Makefile.in similarity index 96% rename from docs/manuals/es/console/Makefile rename to docs/manuals/de/old/console/Makefile.in index be059cb2..9af2083b 100644 --- a/docs/manuals/es/console/Makefile +++ b/docs/manuals/de/old/console/Makefile.in @@ -78,7 +78,6 @@ html: latex2html -white -no_subdir -split 0 -toc_stars -white -notransparent \ -init_file latex2html-init.pl ${DOC} >tex.out 2>&1 ./translate_images.pl --to_meaningful_names ${DOC}.html - (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} .; done) @echo "Done making html" web: @@ -94,7 +93,6 @@ web: latex2html -split 3 -local_icons -t "Bacula Console and Operators Guide" -long_titles 4 \ -toc_stars -contents_in_nav -init_file latex2html-init.pl -white -notransparent ${DOC} >tex.out 2>&1 ./translate_images.pl --to_meaningful_names ${DOC}/Bacula_Consol*.html - (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} .; done) @echo "Done making web" show: xdvi ${DOC} diff --git a/docs/manuals/de/old/console/bconsole.tex b/docs/manuals/de/old/console/bconsole.tex new file mode 100644 index 00000000..87c7e602 --- /dev/null +++ b/docs/manuals/de/old/console/bconsole.tex @@ -0,0 +1,1698 @@ +%% +%% + +\chapter{Die Bacula Console} +\label{_ConsoleChapter} +\index[general]{Console!Bacula} +\index[general]{Bacula Console} +\index[general]{Console!Bacula} +\index[general]{Bacula Console} + +Die {\bf Bacula Console} (manchmal auch die Benutzer-Schnittstelle genannt) +ist ein Programm, dass es dem Anwender oder System Administrator erlaubt, +den Bacula-Director-Dienst im laufenden Betrieb zu bedienen. + +Momentan gibt es zwei Versionen des Console-Programms: eine Shell- (TTY) +und eine GNOME GUI-Version. Beide erlauben es dem Administrator oder +autorisierten Benutzern Bacula zu steuern. Sie k\"{o}nnen sich zum Beispiel +den Status eines bestimmten Jobs oder den Inhalt des Katalogs anzeigen lassen, +sowie bestimmte Aktionen mit Tapes und Autochangern durchf\"{u}hren. + +Zus\"{a}tzlich gibt es noch die bwx-Console, die auf wxWidgets aufbaut +und eine M\"{o}glichkeit bietet, den Wiederherstellungsproze{\ss} graphisch zu steuern. +Die bwx-Console befindet sich in einem fr\"{u}hen Entwicklungsstadium und +wurde leider seit einiger Zeit nicht weiterentwickelt. (Trotzdem kann sie sehr hilfreich sein.) + +Da sich alle Bacula-Consolen \"{u}ber das Netzwerk mit dem Director-Dienst verbinden, +ist es nicht notwendig, dass sie auf dem selben Computer laufen. + +Ein gewisses, minimales Grundwissen \"{u}ber die Console ist schon dann notwendig, +wenn Bacula auf mehr als einem Tape schreiben soll. Bacula wird n\"{a}mlich nach einem +leeren Band fragen, falls keines mehr verf\"{u}gbar ist, und erst nach dem mounten +eines neuen Tapes mittels der Console, wird Bacula weiterarbeiten k\"{o}nnen. + +\section{Console Konfiguration} +\index[general]{Console Konfiguration} +\index[general]{Konfiguration!Console} +\index[general]{Console Konfiguration} +\index[general]{Konfiguration!Console} + +Wenn Sie die Bacula-Console starten, liest sie ihre Standard-Konfigurations-Datei +namens {\bf bconsole.conf}, bzw. {\bf bgnome-console.conf} f\"{u}r die GNOME-Console, ein. +Mittels der Kommandozeilen-Option {\bf {-}c} k\"{o}nnen Sie aber auch eine eigene Konfigurations- +Datei angeben. Im einfachsten Fall enth\"{a}llt diese Datei nur den Namen und die +Adresse des Director-Dienstes sowie das Passwort, dass f\"{u}r die Verbindung zum +Director-Dienst ben\"{o}tigt wird. F\"{u}r weitere Informationen zu dieser Datei, +lesen Sie bitte das Kapitel \"{u}ber die +\ilink{Console-Konfiguration-Datei}{ConsoleConfChapter} in diesem Handbuch. + +\section{Benutzung des Console-Programms} +\index[general]{Benutzung des Console-Programms} +\index[general]{Programm!Benutzung des Console-} +\index[general]{Benutzung des Console-Programms} +\index[general]{Programm!Benutzung des Console-} + +Das Console-Programm kann mit den folgenden Optionen gestartet werden: +\footnotesize +\begin{verbatim} +Usage: bconsole [-s] [-c Konfigurations-Datei] [-d Debug-Level] + -c gibt die zu verwendene Konfigurations-Datei an + -dnn setzt den Debug-Level auf nn + -n kein conio + -s keine Signale (*) + -t test - liest die Konfigurations-Datei und beendet sich dann + -? gibt diese Hilfe aus. +\end{verbatim} +\normalsize + +(*) \elink{Signale}{http://de.wikipedia.org/wiki/Signal\_\%28Computer\%29} + +Nach dem Start des Console-Programms zeigt es durch sein Prompt (*) an, +dass es auf Benutzereingaben wartet. (in der GNOME-Console gibt es kein Prompt, +geben Sie die Befehle bitte einfach in der Textbox unten im Fenster ein.) +Sie k\"{o}nnen in jeder Console einfach nur das Kommando eingeben, wenn weitere Parameter +erforderlich sind, wird das Programm Sie danach fragen. Alternativ k\"{o}nnen Sie +nat\"{u}rlich auch das komplette Kommando mit allen ben\"{o}tigten Parametern eingeben +und ausf\"{u}hren. Das normale Befehlsformat ist dieses: + +\footnotesize +\begin{verbatim} + [=] [=] ... +\end{verbatim} +\normalsize + +wobei {\bf Kommando} einer der unten aufgef\"{u}hrten Console-Befehle +und {\bf Parameter} eines der unten aufgelisteten Schl\"{u}sselw\"{o}rter ist, +dem dann meistens ein {\bf Argument} folgt. Alle Befehle k\"{o}nnen in der +k\"{u}rzesten eindeutigen Form eingegeben werden. Falls zwei Befehle mit identischen +Buchstaben anfangen, wird der ausgef\"{u}hrt, der in der Ausgabe des {\bf help}-Kommandos +am weitesten oben steht. Wenn Sie das andere Kommando ausf\"{u}hren m\"{o}chten m\"{u}ssen Sie +dementsprechend mehr Buchstaben eingeben, um es eindeutig anzugeben. Keiner der +Parameter darf abgek\"{u}rzt werden. + +Ein Beispiel: + +\footnotesize +\begin{verbatim} +list files jobid=23 +\end{verbatim} +\normalsize + +zeigt alle gesicherten Dateien mit der JobID 23 an. + +\footnotesize +\begin{verbatim} +show pools +\end{verbatim} +\normalsize + +zeigt alle Pool-Konfigurations-Eintr\"{a}ge an. + +Die maximale L\"{a}nge der eingegebenen Befehle, mit Parametern, ist 511 Zeichen. +Falls Sie die Console \"{u}ber ein Script ansprechen, denken Sie bitte daran, +dass Sie dieses Limit nicht \"{u}berschreiten. + +\section{Beenden des Console-Programms} +\index[general]{Programm!Beenden des Console-} +\index[general]{Beenden des Console-Programms} +\index[general]{Programm!Beenden des Console-} +\index[general]{Beenden des Console-Programms} + +Normalerweise beenden Sie das Console-Programm durch die Eingabe von {\bf quit} oder {\bf exit}. +Allerdings wartet die Console bis der Director-Dienst das Kommando best\"{a}tigt. Wenn der +Director bereits ein l\"{a}nger laufendes Kommando ausf\"{u}hrt, kann es sein, dass das Beenden +der Console einen Moment dauert. Falls Sie die Console sofort verlassen wollen, k\"{o}nnen Sie +in dem Fall das Kommando {\bf .quit} verwenden. + +Momentan gibt es keinen Weg ein laufendes Kommando nach dem Starten abzubrechen (z.B. mit STRG+C). +Allerdings k\"{o}nnen Sie jederzeit, wenn die Console Sie nach einer weiteren Eingabe fragt, +das aktuelle Kommando beenden, indem Sie einen Punkt {\bf .} eingeben. Nach der Eingabe des Punktes, +werden Sie automatisch zum Hauptprompt oder bei verschachtelten Abfragen zum passenden letzten Prompt +zur\"{u}ckgeleitet. Bei einigen Eingaben, wie zum Beispiel der Frage nach einem Volume-Namen, wird +der Punkt als Eingabe gewertet und Sie haben beim n\"{a}chsten Prompt die M\"{o}glichkeit, +das Kommando abzubrechen. + +\label{keywords} +\section{Alphabetische Liste der Console-Schl\"{u}sselw\"{o}rter} +\index[general]{Schl\"{u}sselw\"{o}rter!Alphabetische Liste der Console} +\index[general]{Alphabetische Liste der Console-Schl\"{u}sselw\"{o}rter} +\index[general]{Schl\"{u}sselw\"{o}rter!Alphabetische Liste der Console} +\index[general]{Alphabetische Liste der Console-Schl\"{u}sselw\"{o}rter} +Wenn es nicht anders angegeben ist, ben\"{o}tigt jedes der folgenden Schl\"{u}sselw\"{o}rter +(Parameter der Console-Befehle) ein Argument, welches dem Schl\"{u}sselwort, +getrennt durch ein Gleichheitszeichen, folgt. +Ein Beispiel: +\begin{verbatim} +jobid=536 +\end{verbatim} + +Bitte beachten Sie, dass diese Liste durch die st\"{a}ndig weitergehende +Entwicklung eventuell weder komplett, noch in der richtigen alphabetischen +Reihenfolge sein kann. + +\begin{description} +\item [all] + Parameter des status und show-Kommandos, + dadurch werden alle Komponenten oder Eintr\"{a}ge ausgew\"{a}hlt +\item [allfrompool] + Parameter des update-Kommandos, + gibt an das alle Volumes des (im Parameter pool angegebenen) Pools + aktualisiert werden sollen. +\item [allfrompools] + Parameter des update-Kommandos, + gibt an das alle Volumes aller Pools aktualisiert werden sollen. +\item [before] + Parameter des restore-Kommandos. +\item [bootstrap] + Parameter des restore-Kommandos. +\item [catalog] + im use-Kommando erlaubt, + um den zu benutzenden Katalog auszuw\"{a}hlen +\item [catalogs] + Parameter des show-Kommandos. + Ben\"{o}tigt keine Argumente. +\item [client | fd] +\item [clients] + Parameter des show, list und llist-Kommandos, + bezeichnet alle Clients. Ben\"{o}tigt keine Argumente. +\item [counters] + im show-Kommando erlaubt. + Ben\"{o}tigt keine Argumente. +\item [current] + Parameter des restore-Kommandos. + Ben\"{o}tigt keine Argumente. +\item [days] + definiert die Anzahl der Tage, die das "`list nextvol"'-Kommando + in Betracht ziehen soll. Der Parameter days kann auch im Kommando + "`status director"' verwendet werden, um die geplanten Jobs f\"{u}r die + angegebene Anzahl Tage zu zeigen. +\item [devices] + Parameter des show-Kommandos. + Ben\"{o}tigt keine Argumente. +\item [director | dir] +\item [directors] + Parameter des show-Kommandos. + Ben\"{o}tigt keine Argumente. +\item [directory] + Parameter des restore-Kommandos. + Das Argument gibt das wiederherzustellende Verzeichnis an. +\item [enabled] + Dieser Parameter kann bei den Kommandos "`update volumes"' und "`update slots"' + verwendet werden. Das Argument kann yes, true, no, false, archived, 0,1 oder 2 sein. + 0 ist identisch mit no oder false, 1 mit yes oder true und 2 mit archived. + Archived Volumes werden weder benutzt noch automatisch aus dem Katalog gel\"{o}scht. + Volumes die nicht enabled sind, werden nicht f\"{u}r das Backup oder die Wiederherstellung benutzt. +\item [done] + wird im restore-Kommando benutzt. + Ben\"{o}tigt keine Argumente. +\item [file] + Parameter des restore-Kommandos. +\item [files] + Parameter des list und llist-Kommandos. + Ben\"{o}tigt keine Argumente. +\item [fileset] +\item [filesets] + Parameter des show-Kommandos. + Ben\"{o}tigt keine Argumente. +\item [help] + Parameter des show-Kommandos. + Ben\"{o}tigt keine Argumente. +\item [jobs] + Parameter des show, list und llist-Kommandos. + Ben\"{o}tigt keine Argumente. +\item [jobmedia] + Parameter des list und llist-Kommandos. + Ben\"{o}tigt keine Argumente. +\item [jobtotals] + Parameter des list und llist-Kommandos. + Ben\"{o}tigt keine Argumente. +\item [jobid] + Parameter des list und llist-Kommandos. + Die jobid ist die numerische Jobid, die im Job-Report angezeigt wird. + Sie ist der Index f\"{u}r die Datenbankeintr\"{a}ge des entsprechenden Jobs. + Da sie f\"{u}r alle in der Datenbank existierenden Jobs einzigartig ist, + kann sie erst wiederverwendet werden, wenn der vorherige Job mit dieser Jobid + aus der Datenbank gel\"{o}scht wurde. +\item [job | jobname] + Parameter des list und llist-Kommandos. + Der Job oder JobName entspricht dem Namen den Sie im Job-Eintr\"{a}g + angegeben haben, somit bezieht er sich auf alle Jobs dieses Namens, + die jemals gelaufen sind und deren Eintr\"{a}ge noch im Katalog existieren. +\item [level] +\item [listing] + Parameter des estimate-Kommandos. + Ben\"{o}tigt keine Argumente. +\item [limit] +\item [messages] + Parameter des show-Kommandos. + Ben\"{o}tigt keine Argumente. +\item [media] + Parameter des list und llist-Kommandos. + Ben\"{o}tigt keine Argumente. +\item [nextvol | nextvolume] + Parameter des list und llist-Kommandos. + Ben\"{o}tigt keine Argumente. +\item [on] + Ben\"{o}tigt keine Argumente. +\item [off] + Ben\"{o}tigt keine Argumente. +\item [pool] +\item [pools] + Parameter des show, list und llist-Kommandos. + Ben\"{o}tigt keine Argumente. +\item [restart] + Parameter des python-Kommandos, + dadurch wird der python-Interpreter neu gestartet. Ben\"{o}tigt keine Argumente. +\item [select] + Parameter des restore-Kommandos. + Ben\"{o}tigt keine Argumente. +\item [storages] + Parameter des show-Kommandos. + Ben\"{o}tigt keine Argumente. +\item [schedules] + Parameter des show-Kommandos. + Ben\"{o}tigt keine Argumente. +\item [sd | store | storage] +\item [ujobid] + Parameter des list-Kommandos. + Die ujobid ist eine M\"{o}glichkeit einen Job eindeutig zu identifizieren. + Momentan besteht die ujobid aus dem JobNamen und der Uhrzeit wann der Job gelaufen ist. +\item [volume] +\item [volumes] + Parameter des list und llist-Kommandos. + Ben\"{o}tigt keine Argumente. +\item [where] + Parameter des restore-Kommandos. +\item [yes] + Parameter des restore-Kommandos. + Ben\"{o}tigt keine Argumente. +\end{description} + +\label{list} +\section{Alphabetische Liste der Console-Kommandos} +\index[general]{Kommandos!Alphabetische Liste der Console-} +\index[general]{Alphabetische Liste der Console-Kommandos} +\index[general]{Kommandos!Alphabetische Liste der Console-} +\index[general]{Alphabetische Liste der Console-Kommandos} + +Die folgenden Kommandos sind derzeit verf\"{u}gbar: + +\begin{description} +\item [{add [pool=\lt{}pool-name\gt{} storage=\lt{}storage\gt{} + jobid=\lt{}JobId\gt{}]} ] + \index[general]{add} + Das add-Kommando wird benutzt um Volumes zu einem bestehenden Pool + hinzuzuf\"{u}gen. Dabei wird der Volume-Eintrag in der Datenbank erzeugt + und das Volume dem Pool zugeordnet. Allerdings erfolgt kein physikalischer Zugriff + auf das Volume. Nach dem hinzuf\"{u}gen zu einem Pool geht Bacula davon + aus, dass das Volume wirklich existiert und auch bereits gelabelt ist. + Dieses Kommando wird normalerweise nicht benutzt, da Bacula die Volumes + automatisch beim labeln einem Pool hinzuf\"{u}gt. Allerdings ist es hilfreich, + falls Sie ein Volume aus dem Katalog gel\"{o}scht haben und es sp\"{a}ter wieder + hinzuf\"{u}gen wollen. + + Typischerweise wird das label-Kommando anstelle des add-Kommandos benutzt, da + es au{\ss}er dem labeln des physikalischen Volumes, die identischen Schritte + wie das add-Kommando ausf\"{u}hrt. Das add-Kommando \"{a}ndert nur die Katalog-Eintr\"{a}ge + und nicht die physikalischen Volumes. Die physikalischen Volumes m\"{u}ssen + vorhanden und gelabelt sein (normalerweise mit dem label-Kommando). Trotzdem + kann das add-Kommando sinnvoll sein, wenn Sie zum Beispiel eine bestimmte Anzahl + von Volumes einem Pool hinzuf\"{u}gen wollen, wobei die Volumes erst zu einem + sp\"{a}teren Zeitpunkt gelabelt werden. Auch um ein Volume eines anderen Bacula-Systems + (bzw. anderen Director-Dienstes) zu importieren, kann das add-Kommando benutzt werden. + Die erlaubten Zeichen f\"{u}r einen Volume-Namen finden Sie weiter unten + in der Beschreibung des label-Kommandos. + +\item [autodisplay on/off] + \index[general]{autodisplay on/off} + Das autodisplay-Kommando kennt zwei Parameter: {\bf on} und {\bf off}, + wodurch die automatische Anzeige von Nachrichten in der Console entsprechend + ein- oder ausgeschaltet wird. Der Standardwert ist {\bf off}, was bedeutet, dass + Sie \"{u}ber neue Meldungen benachrichtigt werden, sie aber nicht automatisch + angezeigt werden. In der GNOME-Console ist das automatische Anzeigen dagegen + standardm\"{a}{\ss}ig aktiviert, d.h. neue Meldungen werden automatisch + ausgegeben, wenn sie vom Director-Dienst empfangen wurden (typischerweise innerhalb von + ca. 5 Sekunden nachdem sie generiert wurden). + + Wenn autodisplay auf off steht, m\"{u}ssen Sie neue Nachrichten mit dem + {\bf messages}-Kommando abrufen, um sie sich anzeigen zu lassen. + Wenn autodisplay auf on steht, werden die Nachrichten angezeigt, sobald die Console sie + empfangen hat. + +\item [automount on/off] + \index[general]{automount on/off} + Das automount-Kommando kennt zwei Parameter: {\bf on} und {\bf off}, + die entsprechend das automatische mounten nach dem labeln ({\bf label}-Kommando) + an- oder ausschalten. Der Standardwert ist on. Wenn automount ausgeschaltet ist, + m\"{u}ssen Sie nach dem labeln eines Volumes dieses explizit mounten ({\bf mount}-Kommando), + um es benutzen zu k\"{o}nnen. + +\item [{cancel [jobid=\lt{}number\gt{} job=\lt{}job-name\gt{} ujobid=\lt{}unique-jobid\gt{}]}] + \index[general]{cancel jobid} + Das cancel-Kommando wird benutzt um einen Job abzubrechen und kennt die + Parameter {\bf jobid=nnn} oder {\bf job=xxx}, wobei jobid die numerische JobID ist + und job der Job-Name. Wenn Sie weder job noch jobid angeben, listet die Console + alle in Frage kommenden Jobs auf und erlaubt Ihnen aus dieser Liste den abzubrechenden + Job auszuw\"{a}hlen. + + Wenn ein Job als abzubrechen gekennzeichnet wurde, kann es einige Zeit dauern, + bis er tats\"{a}chlich beendet wird (normalerweise innerhalb einer Minute). + Diese Zeit ist aber abh\"{a}ngig davon, was der Job gerade tut. + +\item [{create [pool=\lt{}pool-name\gt{}]}] + \index[general]{create pool} + Das create-Kommando wird normalerweise nicht benutzt, da die Pool-Eintr\"{a}ge + im Katalog automatisch angelegt werden, wenn der Director-Dienst startet und + er seine Pool-Konfiguration aus den Konfigurations-Dateien einliest. Falls ben\"{o}tigt, + kann mit diesem Kommando ein Pool-Eintrag in der Katalog-Datenbank erstellt werden, + der auf einem Pool-Konfigurations-Eintrag basiert, der in der Director-Dienst-Konfiguration + enthalten ist. Einfach gesagt \"{u}bernimmt dieses Kommando nur den Pool-Eintrag aus der + Konfiguration in die Datenbank. Normalerweise wird diese Kommando automatisch ausgef\"{u}hrt, + wenn der Pool zum ersten mal in einem Job-Eintrag benutzt wird. Wenn Sie dieses Kommando + auf einem bestehenden Pool ausf\"{u}hren, wird der Katalog sofort aktualisiert und enth\"{a}lt + dann die identische Pool-Konfiguration, wie die Konfigurations-Dateien. Nach dem Erstellen + eines Pool in den Konfigurations-Dateien werden Sie allerdings h\"{o}chstwahrscheinlich + das {\bf label}-Kommando benutzen, um ein oder mehrere Volumes dem neuen Pool hinzuzuf\"{u}gen + und die entsprechenden Eintr\"{a}ge im Katalog zu erzeugen, anstatt des create-Kommandos. + + Wenn ein Job gestartet wird und Bacula bemerkt, + dass kein passender Pool-Eintrag im Katalog vorhanden ist, + aber in den Konfigurations-Dateien, dann wird der Pool im Katalog automatisch angelegt. + Wenn Sie m\"{o}chten, dass der Pool-Eintrag sofort (ohne das ein Job mit diesem Pool gestartet wurde) + im Katalog erscheint, k\"{o}nnen Sie einfach diese Kommando ausf\"{u}hren, um diesen Vorgang + zu erzwingen. + +\item [{delete [volume=\lt{}vol-name\gt{} pool=\lt{}pool-name\gt{} job + jobid=\lt{}id\gt{}]}] + \index[general]{delete} + Das delete-Kommando wird benutzt um ein Volume, einen Pool oder einen Job-Eintrag, + sowie jeweils alle dazugeh\"{o}rigen Datenbank-Eintr\"{a}ge, aus dem Katalog zu + entfernen. Das Kommando \"{a}ndert nur die Katalog-Datenbank, es hat keine + Auswirkungen auf die Konfigurations-Dateien oder die Daten auf den Volumes. + Wir empfehlen Ihnen dieses Kommando nur zu benutzen, wenn Sie wirklich wissen was Sie tun. + + Wenn der Parameter {\bf Volume} angegeben wird, wird das entsprechende Volume aus dem Katalog + gel\"{o}scht, wenn ein {\bf Pool} angeben wird, der entsprechende Pool und bei Angabe des Parameters + {\bf Job} der entsprechende Job, sowie alle zu diesem Job geh\"{o}hrenden JobMedia- und + Datei-Eintr\"{a}ge. + Das delete-Kommando kann folgenderma{\ss}en aufgerufen werden: + +\begin{verbatim} +delete pool= oder +\end{verbatim} + +\begin{verbatim} +delete volume= pool= oder +\end{verbatim} + +\begin{verbatim} +delete JobId= JobId= ... oder +\end{verbatim} + +\begin{verbatim} +delete Job JobId=n,m,o-r,t ... +\end{verbatim} + + Das erste Beispiel l\"{o}scht einen Pool-Eintrag aus der Katalog-Datenbank. + Das zweite l\"{o}scht einen Volume-Eintrag aus dem angegebenen Pool + und das dritte Beispiel l\"{o}scht die genannten JobID-Eintr\"{a}ge aus + dem Katalog. Es werden die JobIDs n, m, o, p, q, r und t gel\"{o}scht, + wobei die JobID's n, m, o ... nat\"{u}rlich Zahlen entsprechen m\"{u}ssen. + Wie Sie sehen, kann das delete-Kommando Listen von JobIDs und auch Bereiche + (z.B. o-r) verarbeiten. + +\item [disable job\lt{}job-name\gt{}] + \index[general]{disable} + Das disable-Kommando erlaubt es Ihnen zu verhindern, dass ein Job + automatisch durch den Director-Dienst ausgef\"{u}hrt wird. Wenn Sie den Director-Dienst + neu starten, wird der Status des Jobs wieder auf den Wert gesetzt, der + im Job-Eintrag der Director-Konfiguration eingetragen ist. + +\item [enable job\lt{}job-name\gt{}] + \index[general]{enable} + Das enable-Kommando erlaubt es Ihnen, einen Job der durch das + disable-Kommando aus der automatischen Job-Planung entfernt wurde, + wieder zu aktivieren. Wenn Sie den Director-Dienst neu starten, + wird der Status des Jobs wieder auf den Wert gesetzt, der im + Job-Eintrag der Director-Konfiguration eingetragen ist. + +\label{estimate} +\item [estimate] + \index[general]{estimate} + Mit dem estimate-Kommando k\"{o}nnen Sie sich anzeigen lassen, welche + Dateien durch einen bestimmten Job gesichert werden, ohne diesen Job + ausf\"{u}hren zu m\"{u}ssen. Standardm\"{a}{\ss}ig wird dabei ein Voll-Backup + angenommen. Sie k\"{o}nnen das aber durch den Parameter level entsprechend anpassen, + indem Sie zum Beispiel {\bf level=Incremental} oder {\bf level=Differential} an das + estimate-Kommando mit \"{u}bergeben. Wenn Sie im Aufruf des Kommandos keinen Job-Name + angegeben, wird die Console Ihnen eine Auswahlliste der m\"{o}glichen Jobs anzeigen. + Zus\"{a}tzlich k\"{o}nnen Sie noch die Parameter Client und FileSet angeben. Nach dem + Starten des Kommandos wird der Director-Dienst den Client kontaktieren, der daraufhin + eine Liste der zu sichernden Dateien mit ihrer Gr\"{o}{\ss}e zur\"{u}ckgibt. Bitte beachten + Sie, dass das estimate-Kommando nur die Anzahl der von der Datei belegten Bl\"{o}cke zur + Bestimmung der Dateigr\"{o}{\ss}e einbezieht, so dass die Datenmenge, die das estimate-Kommando + anzeigt, immer etwas gr\"{o}{\ss}er sein wird als das echte Backup. + + Wahlweise k\"{o}nnen Sie noch den Parameter {\bf listing} mit \"{u}bergeben, + dann wird eine Liste aller zu sichernden Dateien ausgegeben. Abh\"{a}ngig vom FileSet + kann diese Liste sehr lang sein und es daher einige Zeit dauern, alle Dateien anzuzeigen. + Das estimate-Kommando kann folgenderma{\ss}en aufgerufen werden: + + +\begin{verbatim} +estimate job= listing client= + fileset= level= +\end{verbatim} + + die Angabe des Jobs ist ausreichend, aber Sie k\"{o}nnen durch Angabe + des Clients, FileSets und/oder des Backup-Levels die entsprechenden Werte \"{u}berschreiben. + +Zum Beispiel k\"{o}nnen Sie folgendes eingeben: + +\footnotesize +\begin{verbatim} + @output /tmp/listing + estimate job=NightlySave listing level=Incremental + @output +\end{verbatim} +\normalsize + + durch das erste Kommando wird die Ausgabe der Console in die Datei + {\bf /tmp/listing} umgeleitet. Dann wird durch das estimate-Kommando + eine Liste aller Dateien erstellt, die beim n\"{a}chsten inkrementellen + Backup des Jobs {\bf NightlySave} gesichert werden. Die Console gibt dabei keine + Meldungen aus, da die Ausgabe ja auf die Datei /tmp/listing zeigt. Durch + das dritte Kommando @output wird die Umleitung der Ausgabe wieder aufgehoben. + Beachten Sie bitte, dass die angezeigten Bytes in der Ausgabe des estimate-Kommandos + \"{u}ber die Angabe der Dateigr\"{o}{\ss}e im Verzeichnis-Eintrag bestimmt wird. + Das kann zu gro{\ss}en Abweichungen bei der ermittelten Backup-Gr\"{o}{\ss}e f\"{u}hren, + falls im FileSet \elink{sparse}{http://de.wikipedia.org/wiki/Sparse-Datei}-Dateien + vorhanden sind. sparse-Dateien finden sich oft auf 64-Bit-Maschinen, wo sie f\"{u}r + bestimmte Systemdateien benutzt werden. Die angezeigten Bytes sind die Gesammtgr\"{o}{\ss}e + der gesicherten Dateien, wenn die FileSet-Option "`sparse"' nicht gesetzt ist. + Momentan gibt es keinen Weg, um mit dem estimate-Kommando die echte Backup-Gr\"{o}{\ss}e + f\"{u}r ein FileSet anzuzeigen, bei dem die sparse-Option gesetzt ist. + +\item [exit] + \index[general]{exit} + Das exit-Kommando beendet die Console. + ++\item [gui] + \index[general]{gui} + Aktiviert den nicht-interaktiven GUI-Modus. +\begin{verbatim} +gui [on|off] +\end{verbatim} + +\item [help] + \index[general]{help} + Das help-Kommando zeigt alle verf\"{u}gbaren Kommandos mit einer kurzen Beschreibung an. + +\item [label] + \index[general]{label} + \index[general]{relabel} + \index[general]{label} + \index[general]{relabel} + Das label-Kommando wird benutzt um physikalische Volumes zu labeln. + Das label-Kommando kann folgenderma{\ss}en aufgerufen werden: + +\begin{verbatim} +label storage= volume= slot= +\end{verbatim} + + Wenn Sie einen der Parameter storage, volume oder slot nicht angeben, + werden Sie von der Console danach gefragt. Der Media-Typ wird automatisch + anhand des Storage-Eintrags in der Director-Konfiguration gesetzt. + Wenn alle ben\"{o}tigten Informationen vorliegen, kontaktiert die + Console den angegebenen Storage-Dienst und sendet das label-Kommando. + Wenn das labeln erfolgreich war, wird ein entsprechender Volume-Eintrag + im passenden Pool erzeugt. + + Im Volume-Name d\"{u}rfen Buchstaben, Zahlen und folgende Sonderzeichen + verwendet werden: Binde- ({\bf -}) und Unterstrich ({\bf \_}), + Doppelpunkt ({\bf :}) und Punkt ({\bf .}). Alle anderen Zeichen, + einschlie{\ss}lich des Leerzeichens, sind nicht erlaubt. + Durch diese Einschr\"{a}nkung soll sichergestellt werden, dass + die Volume-Namen gut lesbar sind und es nicht zu Benutzerfehlern + aufgrund von Sonderzeichen im Namen kommt. + + Bitte beachten Sie, dass Bacula einen Ein-/Ausgabefehler meldet, + wenn ein neues bzw. komplett leeres Volume gelabelt wird. Bacula + versucht den ersten Block des Volumes zu lesen, um ein eventuell schon + vorhandenes label nicht zu \"{u}berschreiben, dieser Versuch erzeugt + den oben genannten Fehler. Um diesen Fehler zu vermeiden, k\"{o}nnen Sie + mit den folgenden Shell-Kommandos ein EOF am den Anfang des Volumes schreiben: + +\footnotesize +\begin{verbatim} + mt rewind + mt weof +\end{verbatim} +\normalsize + +Das label-Kommando kann aufgrund verschiedener Gr\"{u}nde fehlschlagen: + +\begin{enumerate} +\item Der angegebene Volume-Name existiert schon in der Katalog-Datenbank + +\item Der Storage-Dienst hat schon ein Tape oder anderes Volume in dem + ben\"{o}tigten Ger\"{a}t gemountet. In diesem Fall m\"{u}ssen Sie + das Ger\"{a}t erst mit dem {\bf unmount}-Kommando freigeben und dann + ein leeres Volume zum labeln einlegen. + +\item Das Volume ist bereits gelabelt. Bacula wird niemals ein bestehendes label + \"{u}berschreiben, solange das Volume nicht abgelaufen ist und Sie das + {\bf relabel}-Kommando verwenden. + +\item Es ist kein Volume im Ger\"{a}t. +\end{enumerate} + +Es gibt zwei M\"{o}glichkeiten ein bestehendes Bacula-label zu \"{u}berschreiben. +Die brutale Methode ist es, einfach ein EOF an den Anfang des Volumes zu schreiben +(dabei wird das bestehende label durch das EOF \"{u}berschrieben). +Mit dem Programm {\bf mt} k\"{o}nnen Sie das zum Beispiel so tun: + +\footnotesize +\begin{verbatim} + [user@host]$ mt -f /dev/st0 rewind + [user@host]$ mt -f /dev/st0 weof +\end{verbatim} +\normalsize + +Ein Festplatten-Volume k\"{o}nnen Sie auch manuell l\"{o}schen. + +Danach benutzten Sie das label-Kommando, um ein neues label zu erzeugen. +Allerdings kann diese Vorgehensweise Spuren des alten Volumes in der +Katalog-Datenbank hinterlassen. + +Die bevorzugte Methode ein Volume neu zu labeln sollte es sein, +zuerst das Volume als bereinigt (purged) zu markieren. Das passiert entweder automatisch, +wenn die Aufbewahrungszeit (Volume-Retention) f\"{u}r das Volume abl\"{a}uft, +oder kann aber auch mit dem {\bf purge}-Kommando erzwungen werden. +Danach k\"{o}nnen Sie das {\bf relabel}-Kommando, wie weiter unten beschrieben, verwenden. + +Falls Ihr Autochanger Barcode-Labels unterst\"{u}tzt, k\"{o}nnen Sie +alle Volumes im Autochanger, eins nach dem anderen, mit dem Kommando +{\bf label barcodes} labeln. Dabei wird jedes Tape mit Barcode nacheinander +im Laufwerk gemountet und mit der auf dem Barcode enthaltenen Zeichenfolge +als Namen gelabelt. Ein entsprechender Katalog-Eintrag wird automatisch +mit erzeugt. Jedes Volume mit einem Barcode der mit den Zeichen beginnt, +die im Pool-Eintrag als CleaningPrefix konfiguriert sind, wird wie ein +Reinigungsband behandelt und nicht gelabelt. Allerdings wird dabei auch +ein Katalog-Eintrag f\"{u}r das Reinigungsband erstellt. + +Als Beispiel, mit dem Eintrag: +\footnotesize +\begin{verbatim} + Pool { + Name ... + Cleaning Prefix = "CLN" + } +\end{verbatim} +\normalsize + +wird jedes Tape, dessen Barcode mit CLN beginnt, als Reinigungsband betrachtet +und nicht automatisch gemountet. +Das label-Kommando kann folgenderma{\ss}en aufgerufen werden: + +\footnotesize +\begin{verbatim} +label storage=xxx pool=yyy slots=1-5,10 barcodes +\end{verbatim} +\normalsize + +\item [list] + \index[general]{list} + Das list-Kommando zeigt den angegebenen Inhalt der Katalog-Datenbank an. + Die verschiedenen Felder jedes Eintrags werden in einer Zeile ausgegeben. + Die verschiedenen M\"{o}glichkeiten sind: +\footnotesize +\begin{verbatim} + list jobs + + list jobid= (zeigt jobid an) + + list ujobid= (zeigt den job mit dem Namen an) + + list job= (zeigt alle Jobs mit dem Namen an) + + list jobname= (identisch mit dem oberen) + + Im oberen Beispiel kann auch den Parameter limit=nn angegeben + werden, um die Ausgabe des Kommandos auf nn Jobs zu begrenzen + + list jobmedia + + list jobmedia jobid= + + list jobmedia job= + + list files jobid= + + list files job= + + list pools + + list clients + + list jobtotals + + list volumes + + list volumes jobid= + + list volumes pool= + + list volumes job= + + list volume= + + list nextvolume job= + + list nextvol job= + + list nextvol job= days=nnn + +\end{verbatim} +\normalsize + + Die meisten der oben genannten Parameter sollten selbsterkl\"{a}rend sein. + \"{U}blicherweise werden Sie, falls Sie nicht gen\"{u}gend Parameter angeben, + von der Console nach den fehlenden Informationen gefragt. + + Das {\bf list nextvol}-Kommando gibt den Volume-Namen aus, der von dem angegebenen Job + beim n\"{a}chsten Backup benutzt werden wird. Allerdings sollten Sie beachten, dass + das tats\"{a}chlich benutzte Volume von einer Reihe von Faktoren, wie zum Beispiel + von den vorher laufenden Jobs oder der Zeit, wann der Job l\"{a}uft, abh\"{a}ngen kann. + Eventuell wird ein Tape schon voll sein, das aber noch freien Platz hatte, als Sie + das Kommando ausf\"{u}hrten. Dieses Kommando gibt Ihnen also nur einen Hinweis darauf, + welches Tape benutzt werden k\"{o}nnte, aber es kann keine definitive Aussage dar\"{u}ber treffen. + Zus\"{a}tzlich kann dieses Kommando mehrere Seiteneffekte haben, da es den selben + Algorithmus durchl\"{a}uft, wie ein echter Backup-Job. Das bedeutet, dass es dazu f\"{u}hren kann, + dass aufgrund dieses Kommandos Volumes automatisch recycled oder gel\"{o}scht (purged) werden. + Standardm\"{a}{\ss}ig muss der angegebene Job innerhalb der n\"{a}chsten zwei Tage laufen, + ansonsten wird kein Volume f\"{u}r den Job gefunden. Allerdings k\"{o}nnen Sie durch + Angabe des Parameters + {\bf days=nnn} bis zu 50 Tage in die Zukunft angeben, die das Kommando in die Berechnung + mit einbeziehen soll. Falls Sie, zum Beispiel, Freitags sehen wollen, welches Volume am Montag + voraussichtlich benutzt wird, k\"{o}nnen Sie folgendes Kommando benutzen: + {\bf list nextvol job=MyJob days=3}. + + Wenn Sie bestimmte, von Ihnen \"{o}fter ben\"{o}tigte, eigene Kommandos anlegen wollen + um sich bestimmte Inhalte der Katalog-Datenbank anzeigen zu lassen, + k\"{o}nnen Sie diese der Datei {\bf query.sql} hinzu\"{u}gen. Allerdings + erfordert das einiges an Wissen \"{u}ber SQL-Kommandos. Lesen Sie dazu bitte + den Abschnitt \"{u}ber das {\bf query}-Kommando in diesem Kapitel. + + Weiter unten finden Sie auch eine Beispiel-Ausgabe des {\bf llist}-Kommandos, + das Ihnen den kompletten Inhalt des Katalogs zu einem bestimmten Konfigurations-Eintrag + anzeigt. + + Als ein Beispiel, kann Ihnen der Aufruf des Kommandos {\bf list pools} die folgenden + Ausgaben anzeigen: + +\footnotesize +\begin{verbatim} ++------+---------+---------+---------+----------+-------------+ +| PoId | Name | NumVols | MaxVols | PoolType | LabelFormat | ++------+---------+---------+---------+----------+-------------+ +| 1 | Default | 0 | 0 | Backup | * | +| 2 | Recycle | 0 | 8 | Backup | File | ++------+---------+---------+---------+----------+-------------+ +\end{verbatim} +\normalsize + + Wie oben schon angedeutet, zeigt das {\bf list}-Kommando den Inhalt + der Katalog-Datenbank an. Einige Konfigurations-Eintr\"{a}ge, bzw. + \"{A}nderungen an den Konfigurations-Eintr\"{a}gen, werden beim + Start des Director-Dienstes in die Datenbank geschrieben. + Die meisten Einstellungen und \"{A}nderungen werden hingegen + erst im Katalog aktualisiert, wenn sie zum ersten Mal + benutzt werden, so zum Beispiel die Client- und Job-Eintr\"{a}ge. + + Bacula erzeugt den Client-Eintrag also dann, wenn zum ersten Mal + ein Job f\"{u}r diesen Client startet. Durch das {\bf status}-Kommando + wird die Katalog-Datenbank nicht aktualisiert, auch wenn Sie dort + eventuell schon einen Eintrag f\"{u}r den neuen Client in der Liste der + geplanten Jobs sehen. Der Client-Eintrag wird auf alle F\"{a}lle + beim starten des ersten Jobs des Clients erzeugt, egal ob der Job + erfolgreich lief oder nicht. Zus\"{a}tzlich schreibt der Director-Dienst + noch eine weitere Client-Information in die Katalog-Datenbank (die Ausgabe + von "`uname -a"'). + + Wenn Sie alle verf\"{u}gbaren Client-Eintr\"{a}ge der Datenbank (auch aus mehreren + Katalog-Datenbanken, falls konfiguriert) sehen wollen, + k\"{o}nnen Sie auch das {\bf show clients}-Kommando verwenden, das zudem + noch Informationen \"{u}ber die Adresse, den Port und den Katalog-Namen des Clients + (sowie einige andere) ausgibt. + +\item [llist] + \index[general]{llist} + Das llist-Kommando ("`langes list"') benutzt dieselben Parameter wie das oben + beschriebene list-Kommando. Der Unterschied ist, dass das llist-Kommando + den kompletten Inhalt der Katalog-Datenbank, zu der als Parameter angegebenen + Konfiguration, anzeigt. Dabei werden die einzelnen Felder der Datenbank-Eintr\"{a}ge + untereinander, mit einem Feld pro Zeile, ausgegeben. Diese Kommando kann eine + sehr lange Liste an Ausgaben produzieren. + + Wenn Sie anstelle des {\bf list pools}, wie im oberen Beispiel, das + Kommando {\bf llist pools} verwenden, erhalten Sie diese Ausgabe: + +\footnotesize +\begin{verbatim} + PoolId: 1 + Name: Default + NumVols: 0 + MaxVols: 0 + UseOnce: 0 + UseCatalog: 1 + AcceptAnyVolume: 1 + VolRetention: 1,296,000 + VolUseDuration: 86,400 + MaxVolJobs: 0 + MaxVolBytes: 0 + AutoPrune: 0 + Recycle: 1 + PoolType: Backup + LabelFormat: * + + PoolId: 2 + Name: Recycle + NumVols: 0 + MaxVols: 8 + UseOnce: 0 + UseCatalog: 1 + AcceptAnyVolume: 1 + VolRetention: 3,600 + VolUseDuration: 3,600 + MaxVolJobs: 1 + MaxVolBytes: 0 + AutoPrune: 0 + Recycle: 1 + PoolType: Backup + LabelFormat: File +\end{verbatim} +\normalsize + +\item [messages] + \index[general]{messages} + Durch ausf\"{u}hren des messages-Kommandos werden wartende Console-Meldungen + sofort angezeigt. + +\item [memory] + \index[general]{memory} + Gibt die momentane Speichernutzung des Director-Dienstes aus. + +\item [mount] + \index[general]{mount} + Das mount-Kommando veranlasst Bacula dazu, ein Volume in einem physikalischen + Laufwerk zu lesen. Es ist damit m\"{o}glich Bacula mitzuteilen, dass ein neues + Tape im Laufwerk ist und Bacula wird daraufhin versuchen das Label einlesen, + um das Volume richtig zuordnen zu k\"{o}nnen. Normalerweise wird dieses Kommando + nur ausgef\"{u}hrt, wenn kein Volume im Laufwerk war und Bacula Sie auffordert + ein neues einzulegen, oder wenn Sie das Laufwerk vorher mit dem {\bf unmount}-Kommando + freigegeben haben. Falls Sie einen Autochanger benutzen, wird das mount-Kommando + Sie nach dem Slot des Tapes und dem Laufwerk fragen, in welchem das Tape gemountet werden soll. + + Das mount-Kommando kann folgenderma{\ss}en aufgerufen werden + +\footnotesize +\begin{verbatim} +mount storage= [ slot= ] [ + drive= ] + +mount [ jobid= | job= ] +\end{verbatim} +\normalsize + + Wenn Sie in der Ger\"{a}te-Konfiguration des Storage-Dienstes {\bf Automatic Mount = yes} + angegeben haben, wird Bacula automatisch auf das Ger\"{a}t zugreifen, solange Sie es + nicht explizit mit dem {\bf unmount}-Kommando freigegeben haben. + +\item[python] + \index[general]{python} + Das python-Kommando kennt nur den Parameter {\bf restart}: + +\footnotesize +\begin{verbatim} + python restart +\end{verbatim} +\normalsize + + dadurch wird der python-Interpreter des Director-Dienstes neu geladen. + Das kann beim Testen hilfreich sein, da es der einzige Weg ist, den python-Interpreter + nach dem Start des Director-Dienstes dazu zu veranlassen, seine Konfiguration + in der Datei {\bf DirStartUp.py} neu einzulesen. F\"{u}r weiterf\"{u}hrende Informationen + zum Thema python-Scripting lesen Sie bitte das Kapitel \ilink{PythonScripting}{PythonChapter}. + +\label{ManualPruning} +\item [prune] + \index[general]{prune} + Das prune-Kommando erlaubt es Ihnen, abgelaufenen Job- oder Volume-Eintr\"{a}ge + aus der Katalog-Datenbank zu entfernen. Dieses Kommando arbeitet nur auf der + Katalog-Datenbank und l\"{o}scht keine Dateien von den Volumes. Auf jeden Fall + wird ein Aufbewahrungszeitraum (RetentionPeriod) auf die angegebenen Eintr\"{a}ge angewendet, + wenn Sie dieses Kommando ausf\"{u}hren. Falls die Katalog-Eintr\"{a}ge also noch nicht + abgelaufen sind, hat das prune-Kommando auch keine Auswirkungen. Sie k\"{o}nnen + mit diesem Kommando abgelaufene Dateien aus den Job-Eintr\"{a}gen + l\"{o}schen, abgelaufene Jobs oder Statistiken aus dem Katalog entfernen + und Sie k\"{o}nnen veraltete Job- und Datei-Eintr\"{a}ge eines bestimmten + Volumes aus dem Katalog entfernen. + +\footnotesize +\begin{verbatim} +prune files|jobs|volume|stats client= +volume= +\end{verbatim} +\normalsize + + Um die Katalog-Eintr\"{a}ge eines Volumes zu l\"{o}schen, muss der + {\bf VolStatus} entweder Full, Used oder Append sein, ansonsten werden + keine Eintr\"{a}ge entfernt. + +\item [purge] + \index[general]{purge} + Das purge-Kommando entfernt die angegebenen Katalog-Eintr\"{a}ge + ohne den Aufbewahrungszeitraum zu beachten. Dieses Kommando arbeitet nur + auf der Katalog-Datenbank und l\"{o}scht keine Dateien von den Volumes. + Mit diesem Kommando k\"{o}nnen auch versehentlich aktuelle Eintr\"{a}ge, + die eventuell dringend ben\"{o}tigt werden, aus der Katalog-Datenbank + gel\"{o}scht werden. Wir empfehlen Ihnen daher, dieses Kommando nur zu benutzen, + wenn Sie wirklich wissen was Sie tun. + Das purge-Kommando kann folgenderma{\ss}en aufgerufen werden: + +\footnotesize +\begin{verbatim} +purge files jobid=|job=|client= + +purge jobs client= (of all jobs) + +purge volume|volume= (of all jobs) +\end{verbatim} +\normalsize + + Damit das purge-Kommando Volume-Eintr\"{a}ge aus der Katalog-Datenbank + entfernen kann, muss der {\bf VolStatus} entweder Full, Error, Used oder + Append sein. + + Die Daten auf den Volumes werden durch dieses Kommando nicht ver\"{a}ndert. + +\item [quit] + \index[general]{quit} + Das quit-Kommando beendet das Consolen-Programm. Die Console sendet das quit- + Kommando an den Director-Dienst und wartet auf seine Best\"{a}tigung. Falls der + Director mit der Aus\"{u}hrung von anderen Kommandos besch\"{a}ftigt ist, + kann es einen Moment dauern, bis das quit ausgef\"{u}hrt werden kann. In dem + Fall k\"{o}nnen Sie durch Eingabe von {\bf .quit} die Console sofort beenden. + +\item [query] + \index[general]{query} + Das query-Kommando liest die vordefinierten SQL-Komandos aus der Datei, + die unter QueryFile in der Konfiguration des Director-Dienstes angegeben ist, ein. + Danach k\"{o}nnen Sie aus der Liste der verf\"{u}gbaren SQL-Anweisungen eine + zur Ausf\"{u}hrung ausw\"{a}hlen. + +Die folgenden Anweisungen sind momentan vordefiniert (Version 2.2.7): + +\footnotesize +\begin{verbatim} +Available queries: +1: List up to 20 places where a File is saved regardless of the directory +2: List where the most recent copies of a file are saved +3: List last 20 Full Backups for a Client +4: List all backups for a Client after a specified time +5: List all backups for a Client +6: List Volume Attributes for a selected Volume +7: List Volumes used by selected JobId +8: List Volumes to Restore All Files +9: List Pool Attributes for a selected Pool +10: List total files/bytes by Job +11: List total files/bytes by Volume +12: List Files for a selected JobId +13: List Jobs stored on a selected MediaId +14: List Jobs stored for a given Volume name +15: List Volumes Bacula thinks are in changer +16: List Volumes likely to need replacement from age or errors +Choose a query (1-16): + +\end{verbatim} +\normalsize + +\item [relabel] + \index[general]{relabel} + \index[general]{relabel} + Das relabel-Kommando wird benutzt um ein neues label auf ein bereits + gelabeltes physikalisches Volume zu schreiben. Das Kommando wird wie folgt + aufgerufen: + +\footnotesize +\begin{verbatim} +relabel storage= oldvolume= + volume= +\end{verbatim} +\normalsize + + Wenn Sie einen Parameter nicht angeben, wird die Console Sie danach fragen. + Damit der alte Volume-Name (das label) \"{u}berschrieben werden kann, + muss der {\bf VolStatus} entweder Purged oder Recycle sein, was automatisch + passiert, wenn die entsprechenden Aufbewahrungszeitr\"{a}ume abgelaufen sind + (oder alle Datei- und Job-Eintr\"{a}ge dieses Volumes mit dem purge-Kommando + aus der Katalog-Datenbank entfernt wurden). + + Wenn das Volume erfolgreich relabelt wurde, sind alle Daten auf dem Volume verloren + und k\"{o}nnen nicht wiederhergestellt werden. + +\item [release] + \index[general]{release} + Das release-Kommando veranla{\ss}t den Storage-Dienst, dass im angegebenen Ger\"{a}t + befindliche Tape zur\"{u}ckzuspulen und das label beim n\"{a}chsten Zugriff neu einzulesen. + +\footnotesize +\begin{verbatim} +release storage= +\end{verbatim} +\normalsize + + Nach dem release-Kommando ist das Ger\"{a}t weiterhin von Bacula ge\"{o}ffnet + (au{\ss}er Sie haben "`Always Open"' in der Storage-Dienst-Konfiguration auf "`No"' gesetzt), + andere Proze{\ss}e/Programme k\"{o}nnen also nicht auf das Ger\"{a}t zugreifen. + Allerdings k\"{o}nnen Sie bei einigen Laufwerken, nach dem release-Kommando, + das Tape gegen ein anderes austauschen, da Bacula weiss, dass es das label + neu einlesen muss. Falls Sie mit anderen Programmen auf das Ger\"{a}t zugreifen wollen, + m\"{u}ssen Sie das unmount-Kommando verwenden, nur dann gibt Bacula das Ger\"{a}t komplett frei. + +\item [reload] + \index[general]{reload} + Das reload-Kommando veranla{\ss}t den Director-Dienst seine Konfigurations-Dateien + neu einzulesen und mit der aktuellen Konfiguration weiterzuarbeiten. Die neue + Konfiguration wird dabei sofort f\"{u}r alle neuen Jobs g\"{u}ltig. + Wenn Sie die Zeitpl\"{a}ne (Schedules) \"{a}ndern, bedenken Sie bitte, dass Bacula + die geplanten Jobs bis zu zwei Stunden im vorraus berechnet und es dadurch zu einer + Verz\"{o}gerung kommen kann, bis die neue Konfiguration g\"{u}ltig wird. Jobs die bereits + in der Warteschlange sind (deren eigentliche Startzeit also schon vorbei ist), werden + mit den alten Konfigurations-Werten abgearbeitet. Neue Jobs werden die neue Konfiguration + benutzen. Wenn Sie das reload-Kommando ausf\"{u}hren w\"{a}hrend Jobs laufen, + wird die neue Konfiguration solange zur\"{u}ckgehalten, bis alle Jobs beendet sind + und erst dann wirksam. Sie k\"{o}nnen bis zu zehn Konfigurations\"{a}nderungen + durchf\"{u}hren w\"{a}hrend Jobs laufen, erst danach wird der Director-Dienst + eine Meldung ausgeben, dass er nicht mehr unterschiedliche Konfigurationen + im Speicher vorhalten kann. + + Auch wenn es m\"{o}glich ist, die Director-Konfiguration zur Laufzeit neu zu laden, + und auch dann wenn Jobs laufen, sollten Sie bei der n\"{a}chsten Gelegenheit + den Director-Dienst neu starten um Seiteneffekte auszuschlie{\ss}en. Das neue Einlesen + der Konfiguration ist ein sehr komplexer Vorgang und nur nach dem Neustart + k\"{o}nnen Sie sicher sein, dass nur noch mit der neuen Konfiguration gearbeitet wird. + +\label{restore_command} +\item [restore] + \index[general]{restore} + Das restore-Kommando erlaubt es Ihnen auf verschiedenen Wegen, einen oder mehrere Jobs (JobIDs) + zur Wiederherstellung auszuw\"{a}hlen. Nachdem die JobIDs ausgew\"{a}hlt wurden, + erstellt der Director-Dienst aus den dazugeh\"{o}hrigen Datei-Eintr\"{a}gen + einen internen Verzeichnis-Baum in dem Sie dann die Dateien und Verzeichnisse + zur Wiederherstellung markieren k\"{o}nnen. Dieser restore-Modus der Console + verh\"{a}hlt sich \"{a}hnlich dem Unix-Standard-Kommando {\bf restore}. + +\footnotesize +\begin{verbatim} +restore storage= client= + where= pool= fileset= + restoreclient= + select current all done +\end{verbatim} +\normalsize + + Wobei {\bf current}, falls angegeben, das restore-Kommando dazu veranla{\ss}t, + automatisch das aktuellste Backup zur Wiederherstellung auszuw\"{a}hlen. + Das Schl\"{u}sselwort {\bf all} w\"{a}hlt automatisch alle Dateien aus. + Falls Sie einen ben\"{o}tigten Parameter nicht angeben, wird das restore-Kommando + Sie danach fragen. F\"{u}r weitere Informationen zum {\bf restore}-Kommando + lesen Sie bitte das \ilink{Restore Kapitel}{RestoreChapter} dieses Handbuchs. + + Das Schl\"{u}sselwort {\bf client} gibt sowohl den Client an, auf dem das Backup + gemacht wurde, als auch den Client auf dem das Backup widerhergestellt werden soll. + Durch Angabe des {\bf restoreclient} k\"{o}nnen Sie allerdings auch einen anderen Client + w\"{a}hlen, auf dem das Backup statt dessen wiederhergestellt werden soll. + +\item [run] + \index[general]{run} + Das run-Kommando erlaubt es Ihnen, Jobs in den Zeitplan des Director-Dienstes einzuf\"{u}gen, + die sofort gestartet werden sollen. Das run-Kommando kann wie folgend aufgerufen werden: + +\footnotesize +\begin{verbatim} +run job= client= + fileset= level= + storage= where= + when= spooldata=yes|no yes +\end{verbatim} +\normalsize + + Jede ben\"{o}tigte Information, die nicht angegeben wurde, wird zur Auswahl aufgelistet. + Bevor der Job in den Zeitplan des Directors eingef\"{u}gt wird, werden Sie + aufgefordert die Parameter zu best\"{a}tigen, zu \"{a}ndern oder den Job abzubrechen. + Falls Sie das Schl\"{u}sselwort {\bf yes} angegeben haben, wird der Job ohne Nachfrage + in den Zeitplan aufgenommen. + + Ein Beispiel: + +\footnotesize +\begin{verbatim} +A job name must be specified. +The defined Job resources are: + 1: Matou + 2: Polymatou + 3: Rufus + 4: Minimatou + 5: Minou + 6: PmatouVerify + 7: MatouVerify + 8: RufusVerify + 9: Watchdog +Select Job resource (1-9): + +\end{verbatim} +\normalsize + +Nach der Auswahl der Nummer 5 erscheint: + +\footnotesize +\begin{verbatim} +Run Backup job +JobName: Minou +FileSet: Minou Full Set +Level: Incremental +Client: Minou +Storage: DLTDrive +Pool: Default +When: 2003-04-23 17:08:18 +OK to run? (yes/mod/no): + +\end{verbatim} +\normalsize + +Wenn Sie jetzt {\bf yes} eingeben, wird der Job gestartet, +falls Sie {\bf mod} ausw\"{a}hlen, +erscheint diese Liste der ver\"{a}nderbaren Parameter: + +\footnotesize +\begin{verbatim} +Parameters to modify: + 1: Level + 2: Storage + 3: Job + 4: FileSet + 5: Client + 6: When + 7: Pool +Select parameter to modify (1-7): + +\end{verbatim} +\normalsize + +Wenn Sie den Job zum Beispiel erst zu einem sp\"{a}teren Zeitpunkt starten wollen, +k\"{o}nnen Sie \"{u}ber die Auswahl Nr. 6 "`When"', die Startzeit anpassen. +Die Zeit muss im Format YYYY-MM-DD HH:MM:SS angegeben werden. + +Der Parameter spooldata kann nicht \"{u}ber diese Auswahlliste ge\"{a}ndert werden. +Er muss beim Starten des run-Kommandos auf der Kommandozeile mit angegeben werden. +Wir er nicht gesetzt, \"{u}bernimmt das run-Kommando die spooldata-Option aus +der Job-, Storage- oder Schedule-Konfiguration. + +\item [setdebug] + \index[general]{setdebug} + \index[general]{setdebug} + \index[general]{debugging} + \index[general]{debugging Win32} + \index[general]{Windows!debugging} + Das setdebug-Kommando wird benutzt um den Debug-Level f\"{u}r die verschiedenen + Dienste zu setzen (der Debug-Level bestimmt die Menge der ausgegebenen Programm-Informationen, + die z.B. zur Fehlersuche verwendet werden k\"{o}nnen). + Es wird wie folgt aufgerufen: + +\footnotesize +\begin{verbatim} +setdebug level=nn [trace=0/1 client= | dir | director | + storage= | all] +\end{verbatim} +\normalsize + + Wenn trace=1 gesetzt wird, schreibt der gew\"{a}hlte Dienst alle Ausgaben + in eine Datei ("`Dienst-Name"'.trace) in seinem konfigurierten Arbeitsverzeichnis. + Das ist vor allem bei Windows-Systemen n\"{u}tzlich, da sich dort die Programm-Ausgaben + nicht \"{u}ber die Kommandozeile in Dateien umlenken lassen, bzw. keine Ausgaben + im Terminal dargetestellt werden. Im Trace-Modus wird jede Programm-Ausgabe der Trace-Datei + angeh\"{a}ngt. Diese Datei muss von Hand durch den Benutzer gel\"{o}scht werden. + +\item [setip] + \index[general]{setip} + erm\"{o}glicht dem Client seine aktuelle IP-Adresse dem Director-Dienst + mitzuteilen, falls er dazu autorisiert ist. + +\item [show] + \index[general]{show} + \index[general]{show} + Das show-Kommando zeigt die Konfiguration des Director-Dienstes an. + Diese Kommando wird haupts\"{a}chlich zur Fehlersuche durch die Entwickler + benutzt. Die folgenden Schl\"{u}sselw\"{o}rter k\"{o}nnen angegeben werden: + catalogs, clients, counters, devices, directors,filesets, jobs, messages, + pools, schedules, storages, all, help. Bitte beachten Sie den Unterschied zum + list-Kommando, welches den Inhalt der Katalog-Datenbank anzeigt. + +\item [sqlquery] + \index[general]{sqlquery} + Das sqlquery-Kommando versetzt die Console in den SQL-Abfrage-Modus. + Nach diesem Kommando k\"{o}nnen Sie, auch \"{u}ber mehrere Zeilen, eine + SQL-Anweisung eingeben. Nachdem die Anweisung mit einem Semikolon (;) abgeschlossen + ist, wird sie direkt an die Datenbank \"{u}bergeben. Nach der Ausgabe des Ergebnisses + wird wieder eine neue SQL-Anweisung erwartet. Den SQL-Abfrage-Modus k\"{o}nnen Sie + durch die Eingabe eines Punktes (.), als erstes Zeichen in der Eingabezeile, beenden. + + Mittels dieses Kommandos k\"{o}nnen Sie direkt die Katalog-Datenbank abfragen. + Seihen Sie bitte vorsichtig, damit Sie nicht aus Versehen Datenbank-Eintr\"{a}ge + \"{a}ndern oder l\"{o}schen. Lesen Sie bitte auch die Beschreibung des query-Kommandos + weiter unten, mit dem Sie einfacher und sicherer Datenbank-Abfragen durchf\"{u}hren k\"{o}nnen. + + Abh\"{a}ngig von dem von Ihnen verwendeten Datenbank-Systems (MySQL, PostgreSQL + oder SQLite) haben Sie mehr oder weniger M\"{o}glichkeiten direkte + Datenbank-Abfragen durchzuf\"{u}hren. + Mehr Informationen finden Sie in der Beschreibung Ihrer Datenbank. + +\item [status] + \index[general]{status} + Das status-Kommando zeigt den momentanen Status des gew\"{a}hlten Dienstes an + (Director, Storage oder eines Clients). Beim Storage-Dienst k\"{o}nnen Sie + sich den Laufwerks-Status oder den Inhalt des Autochangers anzeigen lassen. + Der Client zeigt Informationen \"{u}ber aktuell laufende Jobs und deren + Geschwindigkeit an. Es kann wie folgt aufgerufen werden: + +\footnotesize +\begin{verbatim} +status [all | dir= | director [days=nnn] | + client= | [slots] storage= ] +\end{verbatim} +\normalsize + + Wenn Sie das Kommando {\bf status dir} ausf\"{u}hren, listet die Console + die momentan laufenden Jobs, alle f\"{u}r die n\"{a}chsten 24 Stunden + geplanten Jobs und die letzten 10 beendeten Jobs, sowie deren Status auf. + Die Liste der geplanten Jobs enth\"{a}lt auch den Namen des Volumes, + das voraussichtlich benutzt wird. Beachten Sie dabei bitte diese beiden Punkte: + 1. um das Volume zu ermitteln wird dieselbe Funktion benutzt wie in dem Moment + wo der Backup-Job startet, allerdings werden die Ablaufzeitr\"{a}ume der Volumes + nicht in Betracht gezogen; 2. das angezeigte Volume ist die nur bestm\"{o}gliche + Sch\"{a}tzung, da das Volume eventuell in der zwischenzeit andersweitig benutzt + oder auch durch vorher laufende Jobs vollgeschrieben werden k\"{o}nnte. + + In der Liste der laufenden Jobs finden Sie diese Informationen: + +\footnotesize +\begin{verbatim} +2507 Catalog MatouVerify.2004-03-13_05.05.02 is waiting execution +5349 Full CatalogBackup.2004-03-13_01.10.00 is waiting for higher + priority jobs to finish +5348 Differe Minou.2004-03-13_01.05.09 is waiting on max Storage jobs +5343 Full Rufus.2004-03-13_01.05.04 is running +\end{verbatim} +\normalsize + + Wenn Sie sich diese Ausgabe von unten nach oben anschauen, sehen Sie, + dass JobId 5343 (Rufus) gerade l\"{a}uft. JobId 5348 (Minou) wartet darauf, + dass der Job 5343 beendet wird, da dieser momentan die Storage-Resource verwendet, + daher die Meldung: "`waiting on max Storage jobs"'. JobId 5349 (CatalogBackup) + hat eine geringere Priorit\"{a}t und wartet daher auf die Beendigung der + Jobs mit h\"{o}heren Priorit\"{a}ten. Zuoberst steht die JobId 2507 (MatouVerify), + die als letzte dieser JobIds geplant wurde, da schon andere wartende und + laufende JobIds vorhanden sind, hat sie nur den Status "`waiting execution"'. + + Das Kommando {\bf status dir} zeigt standardm\"{a}{\ss}ig nur die f\"{u}r + heute und morgen geplanten Jobs an. Falls Sie die geplanten Jobs der n\"{a}chsten + drei Tage sehen m\"{o}chten um, zum Beispiel am Freitag zu kontrollieren, + welche Volumes am Freitag, am Wochenende und am Montag benutzt werden, + k\"{o}nnen Sie die Option {\bf days=3} verwenden. {\bf days=0} zeigt nur die + f\"{u}r heute geplanten Jobs an. + + Falls Ihre Jobs also nicht wie gew\"{u}nscht starten, k\"{o}nnen + Sie sich mit dem Kommando {\bf status dir} einen \"{U}berblick \"{u}ber + die momentan laufenden und wartenden Jobs, sowie den Grund des wartens, + verschaffen. Genauere Informationen bekommen Sie meistens, wenn Sie + das Kommando {\bf status storage=xxx} verwenden. Als Beispiel sind hier die + Ausgaben die dieses Kommando auf einem Storage im Leerlauf anzeigt: + +\footnotesize +\begin{verbatim} +status storage=File +Connecting to Storage daemon File at 192.168.68.112:8103 + +rufus-sd Version: 1.39.6 (24 March 2006) i686-pc-linux-gnu redhat (Stentz) +Daemon started 26-Mar-06 11:06, 0 Jobs run since started. + +Running Jobs: +No Jobs running. +==== + +Jobs waiting to reserve a drive: +==== + +Terminated Jobs: + JobId Level Files Bytes Status Finished Name +====================================================================== + 59 Full 234 4,417,599 OK 15-Jan-06 11:54 kernsave +==== + +Device status: +Autochanger "DDS-4-changer" with devices: + "DDS-4" (/dev/nst0) +Device "DDS-4" (/dev/nst0) is mounted with Volume="TestVolume002" +Pool="*unknown*" + Slot 2 is loaded in drive 0. + Total Bytes Read=0 Blocks Read=0 Bytes/block=0 + Positioned at File=0 Block=0 +Device "Dummy" is not open or does not exist. +No DEVICE structure. + +Device "DVD-Writer" (/dev/hdc) is not open. +Device "File" (/tmp) is not open. +==== + +In Use Volume status: +==== +\end{verbatim} +\normalsize + +Ganz oben sind unter "`Running Jobs"' und "`Jobs waiting .."' keine Eintr\"{a}ge, +was bedeutet, dass momentan kein Job l\"{a}uft und damit auch keine Ger\"{a}te +benutzt werden. Jetzt wird der Autochanger mit dem {\bf unmount}-Kommando +freigegeben und ein Job gestartet der das Ger\"{a}t vom Typ "`File (/tmp)"' +benutzen soll. Daraufhin gibt das Kommando {\bf status storage=xxx} diese +Meldungen aus: + +\footnotesize +\begin{verbatim} +status storage=File +... +Device status: +Autochanger "DDS-4-changer" with devices: + "DDS-4" (/dev/nst0) +Device "DDS-4" (/dev/nst0) is not open. + Device is BLOCKED. User unmounted. + Drive 0 is not loaded. +Device "Dummy" is not open or does not exist. +No DEVICE structure. + +Device "DVD-Writer" (/dev/hdc) is not open. +Device "File" (/tmp) is not open. + Device is BLOCKED waiting for media. +==== +... +\end{verbatim} +\normalsize + +Der Autochanger ist, durch das {\bf unmount}-Kommando, im Status "`BLOCKED. User unmounted"'. +Das Device File, mit dem der Job gestartet wurde, ist im Status "`BLOCKED waiting for media"', +Bacula wartet jetzt darauf, dass Sie ein Volume labeln und mounten. + +\item [time] + \index[general]{time} + Gibt die aktuelle Uhrzeit aus. + +\item [trace] + \index[general]{trace} + Schaltet das Mitschneiden der Dienst-Ausgaben in eine Datei ein oder aus. + Siehe setdebug Kommando. + +\item [umount] + \index[general]{umount} + identisch mit unmount (in Anlehnung an das Unix-Kommando umount). + +\item [unmount] + \index[general]{unmount} + Das unmount-Kommando veranlasst den Storage-Dienst dazu, dass angegebene Ger\"{a}t + freizugeben. Der Aufruf dieses Kommandos ist identisch mit dem mount-Kommando: +\footnotesize +\begin{verbatim} +unmount storage= [ drive= ] + +unmount [ jobid= | job= ] +\end{verbatim} +\normalsize + + Nachdem ein Ger\"{a}t mit dem unmount-Kommando freigegeben wurde, kann + Bacula es so lange nicht verwenden, bis es wieder mit dem mount-Kommando + ge\"{o}ffnet wird. Falls Bacula das Ger\"{a}t zwischenzeitlich f\"{u}r einen + Job ben\"{o}tigt, wird Bacula in regelm\"{a}{\ss}igen Abst\"{a}nden den Benutzer + informieren, dass Ger\"{a}t zu mounten. + + Wenn das Ger\"{a}t ein Autochanger ist, wird das angebene Laufwerk + zudem entladen. Wenn keine Laufwerk angegeben ist, wird Laufwerk 1 verwendet. + +\label{UpdateCommand} +\item [update] + \index[general]{update} + Das update-Kommando aktualisiert die Katalog-Datenbank entsprechend der angegebenen + Option. M\"{o}glich sind Pool- oder Volume-Eintr\"{a}ge oder auch die Volumes + in den Slots eines Autochangers mit Barcode-Unterst\"{u}tzung. Im Falle der Pool-Eintr\"{a}ge + werden die aktuellen Information aus den Konfigurations-Dateien des Director-Dienstes gelesen. + Die folgenden Schl\"{u}sselw\"{o}rter k\"{o}nnen angegeben werden: +\footnotesize +\begin{verbatim} + media, volume, pool, slots, stats +\end{verbatim} +\normalsize + +Falls Sie Volumes aktualisieren, werden Sie nach den zu \"{a}ndernden Parametern gefragt. +Folgende Volume-Parameter k\"{o}nnen angepasst werden: +\footnotesize +\begin{verbatim} + + Volume Status + Volume Retention Period + Volume Use Duration + Maximum Volume Jobs + Maximum Volume Files + Maximum Volume Bytes + Recycle Flag + Recycle Pool + Slot + InChanger Flag + Pool + Volume Files + Volume from Pool + All Volumes from Pool + All Volumes from all Pools + +\end{verbatim} +\normalsize + + Bei Auswahl von {\bf Pool} wird Bacula das gew\"{a}hlte Volume in den angegebenen + Pool verschieben. + + Bei Auswahl von {\bf Volume from Pool}, {\bf All Volumes from Pool} und {\bf All Volumes + from all Pools} werden alle Volumes im entsprechenden Pool so angepasst, wie es aktuell + in der Konfiguration des Director-Dienstes steht. Das betrifft folgende Eintr\"{a}ge: + Recycle, RecyclePool, VolRetention, VolUseDuration, MaxVolJobs, MaxVolFiles, + und MaxVolBytes. (RecyclePool ist erst ab Version \gt 2.1.4 verf\"{u}gbar.) + + Durch das Kommando {\bf update slots} holt sich Bacula eine aktuelle Liste der + Volume-Barcodes in den Slots des Autochangers. F\"{u}r jeden gefundenen Barcode + wird automatisch der Slot des Volumes in der Katalog-Datenbank angepasst. + Das ist n\"{u}tzlich, falls Sie Volumes in den Magazinen verschoben oder gewechselt haben. + Beim aktualisieren der Slots wird auch das InChanger-Flag der Volumes im Katalog angepasst, + dadurch weiss Bacula welche Volumes im Autochanger verf\"{u}gbar sind. + + Falls Ihr Autochanger keine Barcodes unterst\"{u}tzt, k\"{o}nnen Sie die + Volumes im Autochanger mit dem Kommando {\bf update slots scan} aktualisieren. + Das Schl\"{u}sselwort {\bf scan} teilt Bacula (nur Version \gt 1.33) mit, + dass es alle Volumes nacheinandern mounten soll, um das Tape-Label einzulesen. + + Das update-Kommando kann wie folgt aufgerufen werden: + +\footnotesize +\begin{verbatim} + update volume=xxx pool=yyy slots volstatus=xxx VolRetention=ddd + VolUse=ddd MaxVolJobs=nnn MaxVolBytes=nnn Recycle=yes|no + slot=nnn enabled=n recyclepool=zzz + +\end{verbatim} +\normalsize + +\item [use] + \index[general]{use} + Das use-Kommando wird verwendet um dem Director-Dienst mitzuteilen, welche Katalog- + Datenbank verwendet werden soll. Da es normalerweise nur eine Datenbank gibt, + wird diese immer automatisch ausgew\"{a}hlt. Fall Sie jedoch mehrere Katalog-Eintr\"{a}ge + in der Konfiguration des Director-Dienstes angegeben haben, k\"{o}nnen Sie mittels + des use-Kommandos von einem Katalog zum anderen wechseln. + +\footnotesize +\begin{verbatim} +use +\end{verbatim} +\normalsize + +\item [var] + \label{var} + \index[general]{var name} + Das var-Kommando akzeptiert eine Zeichenkette (auch in Anf\"{u}hrungstrichen) + und f\"{u}hrt Variablen-Ersetzungen durch, wie sie auch mit der {\bf LabelFormat} + Zeichenkette geschehen. Der einzige Unterschied ist, dass beim Ausf\"{u}hren des + var-Kommandos kein Job l\"{a}uft und daher andere Werte verwendet werden anstelle von + den Job-spezifischen. Allerdings werden Sie trotzdem einen Eindruck davon erhalten, was + f\"{u}r eine Ausgabe zu erwarten ist. + +\item [version] + \index[general]{version} + Das version-Kommando gibt die Version des Director-Dienstes aus. + +\item [wait] + \index[general]{wait} + Das wait-Kommando wartet solange bis keine Jobs mehr laufen. Es kann + in Batch-Programmen verwendet werden, die z.B. \"{u}ber den cron-Dienst + gestartet werden und eine bestimmte Aktion erst ausf\"{u}hren sollen, + wenn der Director im Leerlauf ist. + Das wait-Kommando kennt die folgenden Optionen: +\footnotesize +\begin{verbatim} + wait [jobid=nn] [jobuid=unique id] [job=job name] +\end{verbatim} +\normalsize + Wenn eine der Optionen angegeben ist, wartet das wait-Kommando darauf, + dass sich der spezifizierte Job beendet. +\end{description} + +\label{dotcommands} +\section{Spezielle Punkt-Kommandos} +\index[general]{Kommandos!Spezielle Punkt-} +\index[general]{Spezielle Punkt-Kommandos} + +Es gibt eine Reihen von Kommandos die mit einem Punkt (.) beginnen. +Diese Kommandos sind prinzipiell f\"{u}r die Verwendung in Batch-Programmen +oder Benutzerschnittstellen gedacht. Sie werden normalerweise nicht durch einen +Benutzer in der Console ausgef\"{u}hrt. Hier ist eine \"{U}bersicht: + +\footnotesize +\begin{verbatim} +.backups job=xxx zeigt die Backups des angegebenen Jobs an +.clients listet alle Client-Namen auf +.defaults client=xxx fileset=yyy zeigt die Defaults des angegebenen Clients an +.die verursacht einen Segment-Fault des Directors (zur Fehlersuche) +.dir im Datei-Auswahl-Modus des restore-Kommandos werden die Ausgaben + durch ein Komma getrennt, statt durch Leerzeichen wie beim dir +.exit quit +.filesets zeigt alle FileSet-Namen an +.help zeigt die Hilfe unformatiert an +.jobs zeigt alle Job-Namen an +.levels zeigt alle Backup-Level an +.messages siehe messages +.msgs zeigt die message-Konfigurations-Namen an +.pools zeigt alle Pool-Namen an +.quit quit +.status holt Status-Ausgaben +.storage zeigt die Namen der Storage-Einträge an +.types zeigt die Job-Typen an +\end{verbatim} +\normalsize + +\label{atcommands} + +\section{Spezielle @-Kommandos} +\index[general]{Kommandos!Spezielle @-} +\index[general]{Spezielle @-Kommandos} + +Normalerweise werden alle eingegebenen Kommandos direkt zur Ausf\"{u}hrung an den +Director-Dienst, welcher eventuell auf einem anderen Computer l\"{a}uft, geschickt. +Allerdings gibt es eine kleine Anzahl {\bf @}-Kommandos, die mit einem @ beginnen, +und die nicht durch den Director, sondern durch die Console selbst, ausgef\"{u}hrt werden. +Diese Kommandos sind nur in der Terminal(tty)-Version der Console implementiert, aber nicht in der +GNOME-Version. Diese Kommandos sind: + +\begin{description} + +\item [@input \lt{}filename\gt{}] + \index[general]{@input \lt{}filename\gt{}} + Liest und f\"{u}hrt die Kommandos aus der angegebenen Datei aus. + +\item [@output \lt{}filename\gt{} w/a] + \index[general]{@output \lt{}filename\gt{} w/a} + Schreibt die Ausgaben der Console in die angegebene Datei. + Entweder wird die Datei \"{u}berschrieben (Option w) oder es wird an + eine bestehende Datei angeh\"{a}ngt (Option a). Um die Ausgaben wieder an das Terminal + umzuleiten k\"{o}nnen Sie einfach {\bf @output} ohne einen Datei-Namen angeben. + Passen Sie aber auf, dass Sie nicht versehentlich eine bereits bestehende Datei + \"{u}berschreiben. Hier ein Beispiel um alle Ausgaben zu unterdr\"{u}cken: + +\footnotesize +\begin{verbatim} + @output /dev/null + weitere Kommandos ... + @output +\end{verbatim} +\normalsize + +\item [@tee \lt{}filename\gt{} w/a] + \index[general]{@tee \lt{}filename\gt{} w/a} + Sendet die Ausgaben an das Terminal und an die angegebene Datei. + Zum Beenden f\"{u}hren Sie {\bf @tee} oder {\bf @output} ohne Datei-Namen aus. + +\item [@sleep \lt{}seconds\gt{}] + \index[general]{@sleep \lt{}seconds\gt{}} + Schl\"{a}ft die angegebene Zeit in Sekunden. + +\item [@time] + \index[general]{@time} + zeigt die aktuelle Zeit und das Datum an. + +\item [@version] + \index[general]{@version} + zeigt die Console-Version an + +\item [@quit] + \index[general]{@quit} + quit + +\item [@exit] + \index[general]{@exit} + quit + +\item [@\# anything] + \index[general]{anything} + ein Kommantar +\end{description} + +\label{scripting} +\section{Steuern der Console durch ein Shell-Script} +\index[general]{Script!Steuern der Console durch ein Shell-} +\index[general]{Steuern der Console durch ein Shell-Script} + +Sie k\"{o}nnen viele Console-Aufgaben durch Shell-Scripte vereinfachen. +Wenn Sie zum Beispiel folgende Kommandos in ein Script schreiben: + +\footnotesize +\begin{verbatim} + ./bconsole -c ./bconsole.conf <tex.out 2>&1 ./translate_images.pl --to_meaningful_names ${DOC}.html - (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} .; done) @rm -f *.eps *.gif *.jpg *.old web: @@ -73,13 +72,12 @@ web: latex2html -split 4 -local_icons -t "Developer's Guide" -long_titles 4 \ -contents_in_nav -toc_stars -white -notransparent ${DOC} >tex.out 2>&1 ./translate_images.pl --to_meaningful_names ${DOC}/Developer*Guide.html - @cp -f ${DOC}/Developers_Guide.html ${DOC}/index.html + @cp -f ${DOC}/Developer_s_Guide.html ${DOC}/index.html @rm -f *.eps *.gif *.jpg ${DOC}/*.eps *.old @rm -f ${DOC}/idle.png @rm -f ${DOC}/win32-*.png ${DOC}/wx-console*.png ${DOC}/xp-*.png @rm -f ${DOC}/*.pl ${DOC}/*.log ${DOC}/*.aux ${DOC}/*.idx @rm -f ${DOC}/*.out WARNINGS - (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} .; done) texcheck: ./check_tex.pl ${DOC}.tex diff --git a/docs/manuals/de/old/developers/catalog.tex b/docs/manuals/de/old/developers/catalog.tex new file mode 100644 index 00000000..f67866b5 --- /dev/null +++ b/docs/manuals/de/old/developers/catalog.tex @@ -0,0 +1,939 @@ +%% +%% + +\chapter{Catalog Services} +\label{_ChapterStart30} +\index[general]{Services!Catalog } +\index[general]{Catalog Services } + +\section{General} +\index[general]{General } +\addcontentsline{toc}{subsection}{General} + +This chapter is intended to be a technical discussion of the Catalog services +and as such is not targeted at end users but rather at developers and system +administrators that want or need to know more of the working details of {\bf +Bacula}. + +The {\bf Bacula Catalog} services consist of the programs that provide the SQL +database engine for storage and retrieval of all information concerning files +that were backed up and their locations on the storage media. + +We have investigated the possibility of using the following SQL engines for +Bacula: Beagle, mSQL, GNU SQL, PostgreSQL, SQLite, Oracle, and MySQL. Each +presents certain problems with either licensing or maturity. At present, we +have chosen for development purposes to use MySQL, PostgreSQL and SQLite. +MySQL was chosen because it is fast, proven to be reliable, widely used, and +actively being developed. MySQL is released under the GNU GPL license. +PostgreSQL was chosen because it is a full-featured, very mature database, and +because Dan Langille did the Bacula driver for it. PostgreSQL is distributed +under the BSD license. SQLite was chosen because it is small, efficient, and +can be directly embedded in {\bf Bacula} thus requiring much less effort from +the system administrator or person building {\bf Bacula}. In our testing +SQLite has performed very well, and for the functions that we use, it has +never encountered any errors except that it does not appear to handle +databases larger than 2GBytes. That said, we would not recommend it for +serious production use. + +The Bacula SQL code has been written in a manner that will allow it to be +easily modified to support any of the current SQL database systems on the +market (for example: mSQL, iODBC, unixODBC, Solid, OpenLink ODBC, EasySoft +ODBC, InterBase, Oracle8, Oracle7, and DB2). + +If you do not specify either {\bf \verb{--{with-mysql} or {\bf \verb{--{with-postgresql} or +{\bf \verb{--{with-sqlite} on the ./configure line, Bacula will use its minimalist +internal database. This database is kept for build reasons but is no longer +supported. Bacula {\bf requires} one of the three databases (MySQL, +PostgreSQL, or SQLite) to run. + +\subsection{Filenames and Maximum Filename Length} +\index[general]{Filenames and Maximum Filename Length } +\index[general]{Length!Filenames and Maximum Filename } +\addcontentsline{toc}{subsubsection}{Filenames and Maximum Filename Length} + +In general, either MySQL, PostgreSQL or SQLite permit storing arbitrary long +path names and file names in the catalog database. In practice, there still +may be one or two places in the Catalog interface code that restrict the +maximum path length to 512 characters and the maximum file name length to 512 +characters. These restrictions are believed to have been removed. Please note, +these restrictions apply only to the Catalog database and thus to your ability +to list online the files saved during any job. All information received and +stored by the Storage daemon (normally on tape) allows and handles arbitrarily +long path and filenames. + +\subsection{Installing and Configuring MySQL} +\index[general]{MySQL!Installing and Configuring } +\index[general]{Installing and Configuring MySQL } +\addcontentsline{toc}{subsubsection}{Installing and Configuring MySQL} + +For the details of installing and configuring MySQL, please see the +\ilink{Installing and Configuring MySQL}{_ChapterStart} chapter of +this manual. + +\subsection{Installing and Configuring PostgreSQL} +\index[general]{PostgreSQL!Installing and Configuring } +\index[general]{Installing and Configuring PostgreSQL } +\addcontentsline{toc}{subsubsection}{Installing and Configuring PostgreSQL} + +For the details of installing and configuring PostgreSQL, please see the +\ilink{Installing and Configuring PostgreSQL}{_ChapterStart10} +chapter of this manual. + +\subsection{Installing and Configuring SQLite} +\index[general]{Installing and Configuring SQLite } +\index[general]{SQLite!Installing and Configuring } +\addcontentsline{toc}{subsubsection}{Installing and Configuring SQLite} + +For the details of installing and configuring SQLite, please see the +\ilink{Installing and Configuring SQLite}{_ChapterStart33} chapter of +this manual. + +\subsection{Internal Bacula Catalog} +\index[general]{Catalog!Internal Bacula } +\index[general]{Internal Bacula Catalog } +\addcontentsline{toc}{subsubsection}{Internal Bacula Catalog} + +Please see the +\ilink{Internal Bacula Database}{_ChapterStart42} chapter of this +manual for more details. + +\subsection{Database Table Design} +\index[general]{Design!Database Table } +\index[general]{Database Table Design } +\addcontentsline{toc}{subsubsection}{Database Table Design} + +All discussions that follow pertain to the MySQL database. The details for the +PostgreSQL and SQLite databases are essentially identical except for that all +fields in the SQLite database are stored as ASCII text and some of the +database creation statements are a bit different. The details of the internal +Bacula catalog are not discussed here. + +Because the Catalog database may contain very large amounts of data for large +sites, we have made a modest attempt to normalize the data tables to reduce +redundant information. While reducing the size of the database significantly, +it does, unfortunately, add some complications to the structures. + +In simple terms, the Catalog database must contain a record of all Jobs run by +Bacula, and for each Job, it must maintain a list of all files saved, with +their File Attributes (permissions, create date, ...), and the location and +Media on which the file is stored. This is seemingly a simple task, but it +represents a huge amount interlinked data. Note: the list of files and their +attributes is not maintained when using the internal Bacula database. The data +stored in the File records, which allows the user or administrator to obtain a +list of all files backed up during a job, is by far the largest volume of +information put into the Catalog database. + +Although the Catalog database has been designed to handle backup data for +multiple clients, some users may want to maintain multiple databases, one for +each machine to be backed up. This reduces the risk of confusion of accidental +restoring a file to the wrong machine as well as reducing the amount of data +in a single database, thus increasing efficiency and reducing the impact of a +lost or damaged database. + +\section{Sequence of Creation of Records for a Save Job} +\index[general]{Sequence of Creation of Records for a Save Job } +\index[general]{Job!Sequence of Creation of Records for a Save } +\addcontentsline{toc}{subsection}{Sequence of Creation of Records for a Save +Job} + +Start with StartDate, ClientName, Filename, Path, Attributes, MediaName, +MediaCoordinates. (PartNumber, NumParts). In the steps below, ``Create new'' +means to create a new record whether or not it is unique. ``Create unique'' +means each record in the database should be unique. Thus, one must first +search to see if the record exists, and only if not should a new one be +created, otherwise the existing RecordId should be used. + +\begin{enumerate} +\item Create new Job record with StartDate; save JobId +\item Create unique Media record; save MediaId +\item Create unique Client record; save ClientId +\item Create unique Filename record; save FilenameId +\item Create unique Path record; save PathId +\item Create unique Attribute record; save AttributeId + store ClientId, FilenameId, PathId, and Attributes +\item Create new File record + store JobId, AttributeId, MediaCoordinates, etc +\item Repeat steps 4 through 8 for each file +\item Create a JobMedia record; save MediaId +\item Update Job record filling in EndDate and other Job statistics + \end{enumerate} + +\section{Database Tables} +\index[general]{Database Tables } +\index[general]{Tables!Database } +\addcontentsline{toc}{subsection}{Database Tables} + +\addcontentsline{lot}{table}{Filename Table Layout} +\begin{longtable}{|l|l|l|} + \hline +\multicolumn{3}{|l| }{\bf Filename } \\ + \hline +\multicolumn{1}{|c| }{\bf Column Name } & \multicolumn{1}{l| }{\bf Data Type } +& \multicolumn{1}{l| }{\bf Remark } \\ + \hline +{FilenameId } & {integer } & {Primary Key } \\ + \hline +{Name } & {Blob } & {Filename } +\\ \hline + +\end{longtable} + +The {\bf Filename} table shown above contains the name of each file backed up +with the path removed. If different directories or machines contain the same +filename, only one copy will be saved in this table. + +\ + +\addcontentsline{lot}{table}{Path Table Layout} +\begin{longtable}{|l|l|l|} + \hline +\multicolumn{3}{|l| }{\bf Path } \\ + \hline +\multicolumn{1}{|c| }{\bf Column Name } & \multicolumn{1}{c| }{\bf Data Type +} & \multicolumn{1}{c| }{\bf Remark } \\ + \hline +{PathId } & {integer } & {Primary Key } \\ + \hline +{Path } & {Blob } & {Full Path } +\\ \hline + +\end{longtable} + +The {\bf Path} table contains shown above the path or directory names of all +directories on the system or systems. The filename and any MSDOS disk name are +stripped off. As with the filename, only one copy of each directory name is +kept regardless of how many machines or drives have the same directory. These +path names should be stored in Unix path name format. + +Some simple testing on a Linux file system indicates that separating the +filename and the path may be more complication than is warranted by the space +savings. For example, this system has a total of 89,097 files, 60,467 of which +have unique filenames, and there are 4,374 unique paths. + +Finding all those files and doing two stats() per file takes an average wall +clock time of 1 min 35 seconds on a 400MHz machine running RedHat 6.1 Linux. + +Finding all those files and putting them directly into a MySQL database with +the path and filename defined as TEXT, which is variable length up to 65,535 +characters takes 19 mins 31 seconds and creates a 27.6 MByte database. + +Doing the same thing, but inserting them into Blob fields with the filename +indexed on the first 30 characters and the path name indexed on the 255 (max) +characters takes 5 mins 18 seconds and creates a 5.24 MB database. Rerunning +the job (with the database already created) takes about 2 mins 50 seconds. + +Running the same as the last one (Path and Filename Blob), but Filename +indexed on the first 30 characters and the Path on the first 50 characters +(linear search done there after) takes 5 mins on the average and creates a 3.4 +MB database. Rerunning with the data already in the DB takes 3 mins 35 +seconds. + +Finally, saving only the full path name rather than splitting the path and the +file, and indexing it on the first 50 characters takes 6 mins 43 seconds and +creates a 7.35 MB database. + +\ + +\addcontentsline{lot}{table}{File Table Layout} +\begin{longtable}{|l|l|l|} + \hline +\multicolumn{3}{|l| }{\bf File } \\ + \hline +\multicolumn{1}{|c| }{\bf Column Name } & \multicolumn{1}{c| }{\bf Data Type +} & \multicolumn{1}{c| }{\bf Remark } \\ + \hline +{FileId } & {integer } & {Primary Key } \\ + \hline +{FileIndex } & {integer } & {The sequential file number in the Job } \\ + \hline +{JobId } & {integer } & {Link to Job Record } \\ + \hline +{PathId } & {integer } & {Link to Path Record } \\ + \hline +{FilenameId } & {integer } & {Link to Filename Record } \\ + \hline +{MarkId } & {integer } & {Used to mark files during Verify Jobs } \\ + \hline +{LStat } & {tinyblob } & {File attributes in base64 encoding } \\ + \hline +{MD5 } & {tinyblob } & {MD5 signature in base64 encoding } +\\ \hline + +\end{longtable} + +The {\bf File} table shown above contains one entry for each file backed up by +Bacula. Thus a file that is backed up multiple times (as is normal) will have +multiple entries in the File table. This will probably be the table with the +most number of records. Consequently, it is essential to keep the size of this +record to an absolute minimum. At the same time, this table must contain all +the information (or pointers to the information) about the file and where it +is backed up. Since a file may be backed up many times without having changed, +the path and filename are stored in separate tables. + +This table contains by far the largest amount of information in the Catalog +database, both from the stand point of number of records, and the stand point +of total database size. As a consequence, the user must take care to +periodically reduce the number of File records using the {\bf retention} +command in the Console program. + +\ + +\addcontentsline{lot}{table}{Job Table Layout} +\begin{longtable}{|l|l|p{2.5in}|} + \hline +\multicolumn{3}{|l| }{\bf Job } \\ + \hline +\multicolumn{1}{|c| }{\bf Column Name } & \multicolumn{1}{c| }{\bf Data Type +} & \multicolumn{1}{c| }{\bf Remark } \\ + \hline +{JobId } & {integer } & {Primary Key } \\ + \hline +{Job } & {tinyblob } & {Unique Job Name } \\ + \hline +{Name } & {tinyblob } & {Job Name } \\ + \hline +{PurgedFiles } & {tinyint } & {Used by Bacula for purging/retention periods +} \\ + \hline +{Type } & {binary(1) } & {Job Type: Backup, Copy, Clone, Archive, Migration +} \\ + \hline +{Level } & {binary(1) } & {Job Level } \\ + \hline +{ClientId } & {integer } & {Client index } \\ + \hline +{JobStatus } & {binary(1) } & {Job Termination Status } \\ + \hline +{SchedTime } & {datetime } & {Time/date when Job scheduled } \\ + \hline +{StartTime } & {datetime } & {Time/date when Job started } \\ + \hline +{EndTime } & {datetime } & {Time/date when Job ended } \\ + \hline +{JobTDate } & {bigint } & {Start day in Unix format but 64 bits; used for +Retention period. } \\ + \hline +{VolSessionId } & {integer } & {Unique Volume Session ID } \\ + \hline +{VolSessionTime } & {integer } & {Unique Volume Session Time } \\ + \hline +{JobFiles } & {integer } & {Number of files saved in Job } \\ + \hline +{JobBytes } & {bigint } & {Number of bytes saved in Job } \\ + \hline +{JobErrors } & {integer } & {Number of errors during Job } \\ + \hline +{JobMissingFiles } & {integer } & {Number of files not saved (not yet used) } +\\ + \hline +{PoolId } & {integer } & {Link to Pool Record } \\ + \hline +{FileSetId } & {integer } & {Link to FileSet Record } \\ + \hline +{PurgedFiles } & {tiny integer } & {Set when all File records purged } \\ + \hline +{HasBase } & {tiny integer } & {Set when Base Job run } +\\ \hline + +\end{longtable} + +The {\bf Job} table contains one record for each Job run by Bacula. Thus +normally, there will be one per day per machine added to the database. Note, +the JobId is used to index Job records in the database, and it often is shown +to the user in the Console program. However, care must be taken with its use +as it is not unique from database to database. For example, the user may have +a database for Client data saved on machine Rufus and another database for +Client data saved on machine Roxie. In this case, the two database will each +have JobIds that match those in another database. For a unique reference to a +Job, see Job below. + +The Name field of the Job record corresponds to the Name resource record given +in the Director's configuration file. Thus it is a generic name, and it will +be normal to find many Jobs (or even all Jobs) with the same Name. + +The Job field contains a combination of the Name and the schedule time of the +Job by the Director. Thus for a given Director, even with multiple Catalog +databases, the Job will contain a unique name that represents the Job. + +For a given Storage daemon, the VolSessionId and VolSessionTime form a unique +identification of the Job. This will be the case even if multiple Directors +are using the same Storage daemon. + +The Job Type (or simply Type) can have one of the following values: + +\addcontentsline{lot}{table}{Job Types} +\begin{longtable}{|l|l|} + \hline +\multicolumn{1}{|c| }{\bf Value } & \multicolumn{1}{c| }{\bf Meaning } \\ + \hline +{B } & {Backup Job } \\ + \hline +{V } & {Verify Job } \\ + \hline +{R } & {Restore Job } \\ + \hline +{C } & {Console program (not in database) } \\ + \hline +{D } & {Admin Job } \\ + \hline +{A } & {Archive Job (not implemented) } +\\ \hline + +\end{longtable} + +The JobStatus field specifies how the job terminated, and can be one of the +following: + +\addcontentsline{lot}{table}{Job Statuses} +\begin{longtable}{|l|l|} + \hline +\multicolumn{1}{|c| }{\bf Value } & \multicolumn{1}{c| }{\bf Meaning } \\ + \hline +{C } & {Created but not yet running } \\ + \hline +{R } & {Running } \\ + \hline +{B } & {Blocked } \\ + \hline +{T } & {Terminated normally } \\ + \hline +{E } & {Terminated in Error } \\ + \hline +{e } & {Non-fatal error } \\ + \hline +{f } & {Fatal error } \\ + \hline +{D } & {Verify Differences } \\ + \hline +{A } & {Canceled by the user } \\ + \hline +{F } & {Waiting on the File daemon } \\ + \hline +{S } & {Waiting on the Storage daemon } \\ + \hline +{m } & {Waiting for a new Volume to be mounted } \\ + \hline +{M } & {Waiting for a Mount } \\ + \hline +{s } & {Waiting for Storage resource } \\ + \hline +{j } & {Waiting for Job resource } \\ + \hline +{c } & {Waiting for Client resource } \\ + \hline +{d } & {Wating for Maximum jobs } \\ + \hline +{t } & {Waiting for Start Time } \\ + \hline +{p } & {Waiting for higher priority job to finish } +\\ \hline + +\end{longtable} + +\ + +\addcontentsline{lot}{table}{File Sets Table Layout} +\begin{longtable}{|l|l|l|} + \hline +\multicolumn{3}{|l| }{\bf FileSet } \\ + \hline +\multicolumn{1}{|c| }{\bf Column Name } & \multicolumn{1}{c| }{\bf Data Type\ +\ \ } & \multicolumn{1}{c| }{\bf Remark } \\ + \hline +{FileSetId } & {integer } & {Primary Key } \\ + \hline +{FileSet } & {tinyblob } & {FileSet name } \\ + \hline +{MD5 } & {tinyblob } & {MD5 checksum of FileSet } \\ + \hline +{CreateTime } & {datetime } & {Time and date Fileset created } +\\ \hline + +\end{longtable} + +The {\bf FileSet} table contains one entry for each FileSet that is used. The +MD5 signature is kept to ensure that if the user changes anything inside the +FileSet, it will be detected and the new FileSet will be used. This is +particularly important when doing an incremental update. If the user deletes a +file or adds a file, we need to ensure that a Full backup is done prior to the +next incremental. + +\ + +\addcontentsline{lot}{table}{JobMedia Table Layout} +\begin{longtable}{|l|l|p{2.5in}|} + \hline +\multicolumn{3}{|l| }{\bf JobMedia } \\ + \hline +\multicolumn{1}{|c| }{\bf Column Name } & \multicolumn{1}{c| }{\bf Data Type\ +\ \ } & \multicolumn{1}{c| }{\bf Remark } \\ + \hline +{JobMediaId } & {integer } & {Primary Key } \\ + \hline +{JobId } & {integer } & {Link to Job Record } \\ + \hline +{MediaId } & {integer } & {Link to Media Record } \\ + \hline +{FirstIndex } & {integer } & {The index (sequence number) of the first file +written for this Job to the Media } \\ + \hline +{LastIndex } & {integer } & {The index of the last file written for this +Job to the Media } \\ + \hline +{StartFile } & {integer } & {The physical media (tape) file number of the +first block written for this Job } \\ + \hline +{EndFile } & {integer } & {The physical media (tape) file number of the +last block written for this Job } \\ + \hline +{StartBlock } & {integer } & {The number of the first block written for +this Job } \\ + \hline +{EndBlock } & {integer } & {The number of the last block written for this +Job } \\ + \hline +{VolIndex } & {integer } & {The Volume use sequence number within the Job } +\\ \hline + +\end{longtable} + +The {\bf JobMedia} table contains one entry at the following: start of +the job, start of each new tape file, start of each new tape, end of the +job. Since by default, a new tape file is written every 2GB, in general, +you will have more than 2 JobMedia records per Job. The number can be +varied by changing the "Maximum File Size" specified in the Device +resource. This record allows Bacula to efficiently position close to +(within 2GB) any given file in a backup. For restoring a full Job, +these records are not very important, but if you want to retrieve +a single file that was written near the end of a 100GB backup, the +JobMedia records can speed it up by orders of magnitude by permitting +forward spacing files and blocks rather than reading the whole 100GB +backup. + + + +\ + +\addcontentsline{lot}{table}{Media Table Layout} +\begin{longtable}{|l|l|p{2.4in}|} + \hline +\multicolumn{3}{|l| }{\bf Media } \\ + \hline +\multicolumn{1}{|c| }{\bf Column Name } & \multicolumn{1}{c| }{\bf Data Type\ +\ \ } & \multicolumn{1}{c| }{\bf Remark } \\ + \hline +{MediaId } & {integer } & {Primary Key } \\ + \hline +{VolumeName } & {tinyblob } & {Volume name } \\ + \hline +{Slot } & {integer } & {Autochanger Slot number or zero } \\ + \hline +{PoolId } & {integer } & {Link to Pool Record } \\ + \hline +{MediaType } & {tinyblob } & {The MediaType supplied by the user } \\ + \hline +{FirstWritten } & {datetime } & {Time/date when first written } \\ + \hline +{LastWritten } & {datetime } & {Time/date when last written } \\ + \hline +{LabelDate } & {datetime } & {Time/date when tape labeled } \\ + \hline +{VolJobs } & {integer } & {Number of jobs written to this media } \\ + \hline +{VolFiles } & {integer } & {Number of files written to this media } \\ + \hline +{VolBlocks } & {integer } & {Number of blocks written to this media } \\ + \hline +{VolMounts } & {integer } & {Number of time media mounted } \\ + \hline +{VolBytes } & {bigint } & {Number of bytes saved in Job } \\ + \hline +{VolErrors } & {integer } & {Number of errors during Job } \\ + \hline +{VolWrites } & {integer } & {Number of writes to media } \\ + \hline +{MaxVolBytes } & {bigint } & {Maximum bytes to put on this media } \\ + \hline +{VolCapacityBytes } & {bigint } & {Capacity estimate for this volume } \\ + \hline +{VolStatus } & {enum } & {Status of media: Full, Archive, Append, Recycle, +Read-Only, Disabled, Error, Busy } \\ + \hline +{Recycle } & {tinyint } & {Whether or not Bacula can recycle the Volumes: +Yes, No } \\ + \hline +{VolRetention } & {bigint } & {64 bit seconds until expiration } \\ + \hline +{VolUseDuration } & {bigint } & {64 bit seconds volume can be used } \\ + \hline +{MaxVolJobs } & {integer } & {maximum jobs to put on Volume } \\ + \hline +{MaxVolFiles } & {integer } & {maximume EOF marks to put on Volume } +\\ \hline + +\end{longtable} + +The {\bf Volume} table (internally referred to as the Media table) contains +one entry for each volume, that is each tape, cassette (8mm, DLT, DAT, ...), +or file on which information is or was backed up. There is one Volume record +created for each of the NumVols specified in the Pool resource record. + +\ + +\addcontentsline{lot}{table}{Pool Table Layout} +\begin{longtable}{|l|l|p{2.4in}|} + \hline +\multicolumn{3}{|l| }{\bf Pool } \\ + \hline +\multicolumn{1}{|c| }{\bf Column Name } & \multicolumn{1}{c| }{\bf Data Type +} & \multicolumn{1}{c| }{\bf Remark } \\ + \hline +{PoolId } & {integer } & {Primary Key } \\ + \hline +{Name } & {Tinyblob } & {Pool Name } \\ + \hline +{NumVols } & {Integer } & {Number of Volumes in the Pool } \\ + \hline +{MaxVols } & {Integer } & {Maximum Volumes in the Pool } \\ + \hline +{UseOnce } & {tinyint } & {Use volume once } \\ + \hline +{UseCatalog } & {tinyint } & {Set to use catalog } \\ + \hline +{AcceptAnyVolume } & {tinyint } & {Accept any volume from Pool } \\ + \hline +{VolRetention } & {bigint } & {64 bit seconds to retain volume } \\ + \hline +{VolUseDuration } & {bigint } & {64 bit seconds volume can be used } \\ + \hline +{MaxVolJobs } & {integer } & {max jobs on volume } \\ + \hline +{MaxVolFiles } & {integer } & {max EOF marks to put on Volume } \\ + \hline +{MaxVolBytes } & {bigint } & {max bytes to write on Volume } \\ + \hline +{AutoPrune } & {tinyint } & {yes|no for autopruning } \\ + \hline +{Recycle } & {tinyint } & {yes|no for allowing auto recycling of Volume } +\\ + \hline +{PoolType } & {enum } & {Backup, Copy, Cloned, Archive, Migration } \\ + \hline +{LabelFormat } & {Tinyblob } & {Label format } +\\ \hline + +\end{longtable} + +The {\bf Pool} table contains one entry for each media pool controlled by +Bacula in this database. One media record exists for each of the NumVols +contained in the Pool. The PoolType is a Bacula defined keyword. The MediaType +is defined by the administrator, and corresponds to the MediaType specified in +the Director's Storage definition record. The CurrentVol is the sequence +number of the Media record for the current volume. + +\ + +\addcontentsline{lot}{table}{Client Table Layout} +\begin{longtable}{|l|l|l|} + \hline +\multicolumn{3}{|l| }{\bf Client } \\ + \hline +\multicolumn{1}{|c| }{\bf Column Name } & \multicolumn{1}{c| }{\bf Data Type +} & \multicolumn{1}{c| }{\bf Remark } \\ + \hline +{ClientId } & {integer } & {Primary Key } \\ + \hline +{Name } & {TinyBlob } & {File Services Name } \\ + \hline +{UName } & {TinyBlob } & {uname -a from Client (not yet used) } \\ + \hline +{AutoPrune } & {tinyint } & {yes|no for autopruning } \\ + \hline +{FileRetention } & {bigint } & {64 bit seconds to retain Files } \\ + \hline +{JobRetention } & {bigint } & {64 bit seconds to retain Job } +\\ \hline + +\end{longtable} + +The {\bf Client} table contains one entry for each machine backed up by Bacula +in this database. Normally the Name is a fully qualified domain name. + +\ + +\addcontentsline{lot}{table}{Unsaved Files Table Layout} +\begin{longtable}{|l|l|l|} + \hline +\multicolumn{3}{|l| }{\bf UnsavedFiles } \\ + \hline +\multicolumn{1}{|c| }{\bf Column Name } & \multicolumn{1}{c| }{\bf Data Type +} & \multicolumn{1}{c| }{\bf Remark } \\ + \hline +{UnsavedId } & {integer } & {Primary Key } \\ + \hline +{JobId } & {integer } & {JobId corresponding to this record } \\ + \hline +{PathId } & {integer } & {Id of path } \\ + \hline +{FilenameId } & {integer } & {Id of filename } +\\ \hline + +\end{longtable} + +The {\bf UnsavedFiles} table contains one entry for each file that was not +saved. Note! This record is not yet implemented. + +\ + +\addcontentsline{lot}{table}{Counter Table Layout} +\begin{longtable}{|l|l|l|} + \hline +\multicolumn{3}{|l| }{\bf Counter } \\ + \hline +\multicolumn{1}{|c| }{\bf Column Name } & \multicolumn{1}{c| }{\bf Data Type +} & \multicolumn{1}{c| }{\bf Remark } \\ + \hline +{Counter } & {tinyblob } & {Counter name } \\ + \hline +{MinValue } & {integer } & {Start/Min value for counter } \\ + \hline +{MaxValue } & {integer } & {Max value for counter } \\ + \hline +{CurrentValue } & {integer } & {Current counter value } \\ + \hline +{WrapCounter } & {tinyblob } & {Name of another counter } +\\ \hline + +\end{longtable} + +The {\bf Counter} table contains one entry for each permanent counter defined +by the user. + +\ + +\addcontentsline{lot}{table}{Version Table Layout} +\begin{longtable}{|l|l|l|} + \hline +\multicolumn{3}{|l| }{\bf Version } \\ + \hline +\multicolumn{1}{|c| }{\bf Column Name } & \multicolumn{1}{c| }{\bf Data Type +} & \multicolumn{1}{c| }{\bf Remark } \\ + \hline +{VersionId } & {integer } & {Primary Key } +\\ \hline + +\end{longtable} + +The {\bf Version} table defines the Bacula database version number. Bacula +checks this number before reading the database to ensure that it is compatible +with the Bacula binary file. + +\ + +\addcontentsline{lot}{table}{Base Files Table Layout} +\begin{longtable}{|l|l|l|} + \hline +\multicolumn{3}{|l| }{\bf BaseFiles } \\ + \hline +\multicolumn{1}{|c| }{\bf Column Name } & \multicolumn{1}{c| }{\bf Data Type +} & \multicolumn{1}{c| }{\bf Remark } \\ + \hline +{BaseId } & {integer } & {Primary Key } \\ + \hline +{BaseJobId } & {integer } & {JobId of Base Job } \\ + \hline +{JobId } & {integer } & {Reference to Job } \\ + \hline +{FileId } & {integer } & {Reference to File } \\ + \hline +{FileIndex } & {integer } & {File Index number } +\\ \hline + +\end{longtable} + +The {\bf BaseFiles} table contains all the File references for a particular +JobId that point to a Base file -- i.e. they were previously saved and hence +were not saved in the current JobId but in BaseJobId under FileId. FileIndex +is the index of the file, and is used for optimization of Restore jobs to +prevent the need to read the FileId record when creating the in memory tree. +This record is not yet implemented. + +\ + +\subsection{MySQL Table Definition} +\index[general]{MySQL Table Definition } +\index[general]{Definition!MySQL Table } +\addcontentsline{toc}{subsubsection}{MySQL Table Definition} + +The commands used to create the MySQL tables are as follows: + +\footnotesize +\begin{verbatim} +USE bacula; +CREATE TABLE Filename ( + FilenameId INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, + Name BLOB NOT NULL, + PRIMARY KEY(FilenameId), + INDEX (Name(30)) + ); +CREATE TABLE Path ( + PathId INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, + Path BLOB NOT NULL, + PRIMARY KEY(PathId), + INDEX (Path(50)) + ); +CREATE TABLE File ( + FileId INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, + FileIndex INTEGER UNSIGNED NOT NULL DEFAULT 0, + JobId INTEGER UNSIGNED NOT NULL REFERENCES Job, + PathId INTEGER UNSIGNED NOT NULL REFERENCES Path, + FilenameId INTEGER UNSIGNED NOT NULL REFERENCES Filename, + MarkId INTEGER UNSIGNED NOT NULL DEFAULT 0, + LStat TINYBLOB NOT NULL, + MD5 TINYBLOB NOT NULL, + PRIMARY KEY(FileId), + INDEX (JobId), + INDEX (PathId), + INDEX (FilenameId) + ); +CREATE TABLE Job ( + JobId INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, + Job TINYBLOB NOT NULL, + Name TINYBLOB NOT NULL, + Type BINARY(1) NOT NULL, + Level BINARY(1) NOT NULL, + ClientId INTEGER NOT NULL REFERENCES Client, + JobStatus BINARY(1) NOT NULL, + SchedTime DATETIME NOT NULL, + StartTime DATETIME NOT NULL, + EndTime DATETIME NOT NULL, + JobTDate BIGINT UNSIGNED NOT NULL, + VolSessionId INTEGER UNSIGNED NOT NULL DEFAULT 0, + VolSessionTime INTEGER UNSIGNED NOT NULL DEFAULT 0, + JobFiles INTEGER UNSIGNED NOT NULL DEFAULT 0, + JobBytes BIGINT UNSIGNED NOT NULL, + JobErrors INTEGER UNSIGNED NOT NULL DEFAULT 0, + JobMissingFiles INTEGER UNSIGNED NOT NULL DEFAULT 0, + PoolId INTEGER UNSIGNED NOT NULL REFERENCES Pool, + FileSetId INTEGER UNSIGNED NOT NULL REFERENCES FileSet, + PurgedFiles TINYINT NOT NULL DEFAULT 0, + HasBase TINYINT NOT NULL DEFAULT 0, + PRIMARY KEY(JobId), + INDEX (Name(128)) + ); +CREATE TABLE FileSet ( + FileSetId INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, + FileSet TINYBLOB NOT NULL, + MD5 TINYBLOB NOT NULL, + CreateTime DATETIME NOT NULL, + PRIMARY KEY(FileSetId) + ); +CREATE TABLE JobMedia ( + JobMediaId INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, + JobId INTEGER UNSIGNED NOT NULL REFERENCES Job, + MediaId INTEGER UNSIGNED NOT NULL REFERENCES Media, + FirstIndex INTEGER UNSIGNED NOT NULL DEFAULT 0, + LastIndex INTEGER UNSIGNED NOT NULL DEFAULT 0, + StartFile INTEGER UNSIGNED NOT NULL DEFAULT 0, + EndFile INTEGER UNSIGNED NOT NULL DEFAULT 0, + StartBlock INTEGER UNSIGNED NOT NULL DEFAULT 0, + EndBlock INTEGER UNSIGNED NOT NULL DEFAULT 0, + VolIndex INTEGER UNSIGNED NOT NULL DEFAULT 0, + PRIMARY KEY(JobMediaId), + INDEX (JobId, MediaId) + ); +CREATE TABLE Media ( + MediaId INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, + VolumeName TINYBLOB NOT NULL, + Slot INTEGER NOT NULL DEFAULT 0, + PoolId INTEGER UNSIGNED NOT NULL REFERENCES Pool, + MediaType TINYBLOB NOT NULL, + FirstWritten DATETIME NOT NULL, + LastWritten DATETIME NOT NULL, + LabelDate DATETIME NOT NULL, + VolJobs INTEGER UNSIGNED NOT NULL DEFAULT 0, + VolFiles INTEGER UNSIGNED NOT NULL DEFAULT 0, + VolBlocks INTEGER UNSIGNED NOT NULL DEFAULT 0, + VolMounts INTEGER UNSIGNED NOT NULL DEFAULT 0, + VolBytes BIGINT UNSIGNED NOT NULL DEFAULT 0, + VolErrors INTEGER UNSIGNED NOT NULL DEFAULT 0, + VolWrites INTEGER UNSIGNED NOT NULL DEFAULT 0, + VolCapacityBytes BIGINT UNSIGNED NOT NULL, + VolStatus ENUM('Full', 'Archive', 'Append', 'Recycle', 'Purged', + 'Read-Only', 'Disabled', 'Error', 'Busy', 'Used', 'Cleaning') NOT NULL, + Recycle TINYINT NOT NULL DEFAULT 0, + VolRetention BIGINT UNSIGNED NOT NULL DEFAULT 0, + VolUseDuration BIGINT UNSIGNED NOT NULL DEFAULT 0, + MaxVolJobs INTEGER UNSIGNED NOT NULL DEFAULT 0, + MaxVolFiles INTEGER UNSIGNED NOT NULL DEFAULT 0, + MaxVolBytes BIGINT UNSIGNED NOT NULL DEFAULT 0, + InChanger TINYINT NOT NULL DEFAULT 0, + MediaAddressing TINYINT NOT NULL DEFAULT 0, + VolReadTime BIGINT UNSIGNED NOT NULL DEFAULT 0, + VolWriteTime BIGINT UNSIGNED NOT NULL DEFAULT 0, + PRIMARY KEY(MediaId), + INDEX (PoolId) + ); +CREATE TABLE Pool ( + PoolId INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, + Name TINYBLOB NOT NULL, + NumVols INTEGER UNSIGNED NOT NULL DEFAULT 0, + MaxVols INTEGER UNSIGNED NOT NULL DEFAULT 0, + UseOnce TINYINT NOT NULL, + UseCatalog TINYINT NOT NULL, + AcceptAnyVolume TINYINT DEFAULT 0, + VolRetention BIGINT UNSIGNED NOT NULL, + VolUseDuration BIGINT UNSIGNED NOT NULL, + MaxVolJobs INTEGER UNSIGNED NOT NULL DEFAULT 0, + MaxVolFiles INTEGER UNSIGNED NOT NULL DEFAULT 0, + MaxVolBytes BIGINT UNSIGNED NOT NULL, + AutoPrune TINYINT DEFAULT 0, + Recycle TINYINT DEFAULT 0, + PoolType ENUM('Backup', 'Copy', 'Cloned', 'Archive', 'Migration', 'Scratch') NOT NULL, + LabelFormat TINYBLOB, + Enabled TINYINT DEFAULT 1, + ScratchPoolId INTEGER UNSIGNED DEFAULT 0 REFERENCES Pool, + RecyclePoolId INTEGER UNSIGNED DEFAULT 0 REFERENCES Pool, + UNIQUE (Name(128)), + PRIMARY KEY (PoolId) + ); +CREATE TABLE Client ( + ClientId INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, + Name TINYBLOB NOT NULL, + Uname TINYBLOB NOT NULL, /* full uname -a of client */ + AutoPrune TINYINT DEFAULT 0, + FileRetention BIGINT UNSIGNED NOT NULL, + JobRetention BIGINT UNSIGNED NOT NULL, + UNIQUE (Name(128)), + PRIMARY KEY(ClientId) + ); +CREATE TABLE BaseFiles ( + BaseId INTEGER UNSIGNED AUTO_INCREMENT, + BaseJobId INTEGER UNSIGNED NOT NULL REFERENCES Job, + JobId INTEGER UNSIGNED NOT NULL REFERENCES Job, + FileId INTEGER UNSIGNED NOT NULL REFERENCES File, + FileIndex INTEGER UNSIGNED, + PRIMARY KEY(BaseId) + ); +CREATE TABLE UnsavedFiles ( + UnsavedId INTEGER UNSIGNED AUTO_INCREMENT, + JobId INTEGER UNSIGNED NOT NULL REFERENCES Job, + PathId INTEGER UNSIGNED NOT NULL REFERENCES Path, + FilenameId INTEGER UNSIGNED NOT NULL REFERENCES Filename, + PRIMARY KEY (UnsavedId) + ); +CREATE TABLE Version ( + VersionId INTEGER UNSIGNED NOT NULL + ); +-- Initialize Version +INSERT INTO Version (VersionId) VALUES (7); +CREATE TABLE Counters ( + Counter TINYBLOB NOT NULL, + MinValue INTEGER, + MaxValue INTEGER, + CurrentValue INTEGER, + WrapCounter TINYBLOB NOT NULL, + PRIMARY KEY (Counter(128)) + ); +\end{verbatim} +\normalsize diff --git a/docs/manuals/es/concepts/check_tex.pl b/docs/manuals/de/old/developers/check_tex.pl similarity index 100% rename from docs/manuals/es/concepts/check_tex.pl rename to docs/manuals/de/old/developers/check_tex.pl diff --git a/docs/manuals/de/old/developers/daemonprotocol.tex b/docs/manuals/de/old/developers/daemonprotocol.tex new file mode 100644 index 00000000..0354bbd5 --- /dev/null +++ b/docs/manuals/de/old/developers/daemonprotocol.tex @@ -0,0 +1,284 @@ +%% +%% + +\chapter{Daemon Protocol} +\label{_ChapterStart2} +\index{Protocol!Daemon } +\index{Daemon Protocol } + +\section{General} +\index{General } +\addcontentsline{toc}{subsection}{General} + +This document describes the protocols used between the various daemons. As +Bacula has developed, it has become quite out of date. The general idea still +holds true, but the details of the fields for each command, and indeed the +commands themselves have changed considerably. + +It is intended to be a technical discussion of the general daemon protocols +and as such is not targeted at end users but rather at developers and system +administrators that want or need to know more of the working details of {\bf +Bacula}. + +\section{Low Level Network Protocol} +\index{Protocol!Low Level Network } +\index{Low Level Network Protocol } +\addcontentsline{toc}{subsection}{Low Level Network Protocol} + +At the lowest level, the network protocol is handled by {\bf BSOCK} packets +which contain a lot of information about the status of the network connection: +who is at the other end, etc. Each basic {\bf Bacula} network read or write +actually consists of two low level network read/writes. The first write always +sends four bytes of data in machine independent byte order. If data is to +follow, the first four bytes are a positive non-zero integer indicating the +length of the data that follow in the subsequent write. If the four byte +integer is zero or negative, it indicates a special request, a sort of network +signaling capability. In this case, no data packet will follow. The low level +BSOCK routines expect that only a single thread is accessing the socket at a +time. It is advised that multiple threads do not read/write the same socket. +If you must do this, you must provide some sort of locking mechanism. It would +not be appropriate for efficiency reasons to make every call to the BSOCK +routines lock and unlock the packet. + +\section{General Daemon Protocol} +\index{General Daemon Protocol } +\index{Protocol!General Daemon } +\addcontentsline{toc}{subsection}{General Daemon Protocol} + +In general, all the daemons follow the following global rules. There may be +exceptions depending on the specific case. Normally, one daemon will be +sending commands to another daemon (specifically, the Director to the Storage +daemon and the Director to the File daemon). + +\begin{itemize} +\item Commands are always ASCII commands that are upper/lower case dependent + as well as space sensitive. +\item All binary data is converted into ASCII (either with printf statements + or using base64 encoding). +\item All responses to commands sent are always prefixed with a return + numeric code where codes in the 1000's are reserved for the Director, the + 2000's are reserved for the File daemon, and the 3000's are reserved for the +Storage daemon. +\item Any response that is not prefixed with a numeric code is a command (or + subcommand if you like) coming from the other end. For example, while the + Director is corresponding with the Storage daemon, the Storage daemon can +request Catalog services from the Director. This convention permits each side +to send commands to the other daemon while simultaneously responding to +commands. +\item Any response that is of zero length, depending on the context, either + terminates the data stream being sent or terminates command mode prior to + closing the connection. +\item Any response that is of negative length is a special sign that normally + requires a response. For example, during data transfer from the File daemon + to the Storage daemon, normally the File daemon sends continuously without +intervening reads. However, periodically, the File daemon will send a packet +of length -1 indicating that the current data stream is complete and that the +Storage daemon should respond to the packet with an OK, ABORT JOB, PAUSE, +etc. This permits the File daemon to efficiently send data while at the same +time occasionally ``polling'' the Storage daemon for his status or any +special requests. + +Currently, these negative lengths are specific to the daemon, but shortly, +the range 0 to -999 will be standard daemon wide signals, while -1000 to +-1999 will be for Director user, -2000 to -2999 for the File daemon, and +-3000 to -3999 for the Storage daemon. +\end{itemize} + +\section{The Protocol Used Between the Director and the Storage Daemon} +\index{Daemon!Protocol Used Between the Director and the Storage } +\index{Protocol Used Between the Director and the Storage Daemon } +\addcontentsline{toc}{subsection}{Protocol Used Between the Director and the +Storage Daemon} + +Before sending commands to the File daemon, the Director opens a Message +channel with the Storage daemon, identifies itself and presents its password. +If the password check is OK, the Storage daemon accepts the Director. The +Director then passes the Storage daemon, the JobId to be run as well as the +File daemon authorization (append, read all, or read for a specific session). +The Storage daemon will then pass back to the Director a enabling key for this +JobId that must be presented by the File daemon when opening the job. Until +this process is complete, the Storage daemon is not available for use by File +daemons. + +\footnotesize +\begin{verbatim} +SD: listens +DR: makes connection +DR: Hello calling +SD: 3000 OK Hello +DR: JobId=nnn Allow=(append, read) Session=(*, SessionId) + (Session not implemented yet) +SD: 3000 OK Job Authorization= +DR: use device= media_type= + pool_name= pool_type= +SD: 3000 OK use device +\end{verbatim} +\normalsize + +For the Director to be authorized, the \lt{}Director-name\gt{} and the +\lt{}password\gt{} must match the values in one of the Storage daemon's +Director resources (there may be several Directors that can access a single +Storage daemon). + +\section{The Protocol Used Between the Director and the File Daemon} +\index{Daemon!Protocol Used Between the Director and the File } +\index{Protocol Used Between the Director and the File Daemon } +\addcontentsline{toc}{subsection}{Protocol Used Between the Director and the +File Daemon} + +A typical conversation might look like the following: + +\footnotesize +\begin{verbatim} +FD: listens +DR: makes connection +DR: Hello calling +FD: 2000 OK Hello +DR: JobId=nnn Authorization= +FD: 2000 OK Job +DR: storage address = port = + name = mediatype = +FD: 2000 OK storage +DR: include +DR: +DR: + ... +DR: Null packet +FD: 2000 OK include +DR: exclude +DR: +DR: + ... +DR: Null packet +FD: 2000 OK exclude +DR: full +FD: 2000 OK full +DR: save +FD: 2000 OK save +FD: Attribute record for each file as sent to the + Storage daemon (described above). +FD: Null packet +FD: + e.g. + 3000 OK Volumes = + 3001 Volume = + + 3002 Volume data = + + ... additional Volume / Volume data pairs for volumes 2 .. n +FD: Null packet +FD: close socket +\end{verbatim} +\normalsize + +\section{The Save Protocol Between the File Daemon and the Storage Daemon} +\index{Save Protocol Between the File Daemon and the Storage Daemon } +\index{Daemon!Save Protocol Between the File Daemon and the Storage } +\addcontentsline{toc}{subsection}{Save Protocol Between the File Daemon and +the Storage Daemon} + +Once the Director has send a {\bf save} command to the File daemon, the File +daemon will contact the Storage daemon to begin the save. + +In what follows: FD: refers to information set via the network from the File +daemon to the Storage daemon, and SD: refers to information set from the +Storage daemon to the File daemon. + +\subsection{Command and Control Information} +\index{Information!Command and Control } +\index{Command and Control Information } +\addcontentsline{toc}{subsubsection}{Command and Control Information} + +Command and control information is exchanged in human readable ASCII commands. + + +\footnotesize +\begin{verbatim} +FD: listens +SD: makes connection +FD: append open session = [] +SD: 3000 OK ticket = +FD: append data +SD: 3000 OK data address = port = +\end{verbatim} +\normalsize + +\subsection{Data Information} +\index{Information!Data } +\index{Data Information } +\addcontentsline{toc}{subsubsection}{Data Information} + +The Data information consists of the file attributes and data to the Storage +daemon. For the most part, the data information is sent one way: from the File +daemon to the Storage daemon. This allows the File daemon to transfer +information as fast as possible without a lot of handshaking and network +overhead. + +However, from time to time, the File daemon needs to do a sort of checkpoint +of the situation to ensure that everything is going well with the Storage +daemon. To do so, the File daemon sends a packet with a negative length +indicating that he wishes the Storage daemon to respond by sending a packet of +information to the File daemon. The File daemon then waits to receive a packet +from the Storage daemon before continuing. + +All data sent are in binary format except for the header packet, which is in +ASCII. There are two packet types used data transfer mode: a header packet, +the contents of which are known to the Storage daemon, and a data packet, the +contents of which are never examined by the Storage daemon. + +The first data packet to the Storage daemon will be an ASCII header packet +consisting of the following data. + +\lt{}File-Index\gt{} \lt{}Stream-Id\gt{} \lt{}Info\gt{} where {\bf +\lt{}File-Index\gt{}} is a sequential number beginning from one that +increments with each file (or directory) sent. + +where {\bf \lt{}Stream-Id\gt{}} will be 1 for the Attributes record and 2 for +uncompressed File data. 3 is reserved for the MD5 signature for the file. + +where {\bf \lt{}Info\gt{}} transmit information about the Stream to the +Storage Daemon. It is a character string field where each character has a +meaning. The only character currently defined is 0 (zero), which is simply a +place holder (a no op). In the future, there may be codes indicating +compressed data, encrypted data, etc. + +Immediately following the header packet, the Storage daemon will expect any +number of data packets. The series of data packets is terminated by a zero +length packet, which indicates to the Storage daemon that the next packet will +be another header packet. As previously mentioned, a negative length packet is +a request for the Storage daemon to temporarily enter command mode and send a +reply to the File daemon. Thus an actual conversation might contain the +following exchanges: + +\footnotesize +\begin{verbatim} +FD: <1 1 0> (header packet) +FD: +FD: Null packet +FD: <1 2 0> +FD: +FD: Packet length = -1 +SD: 3000 OK +FD: <2 1 0> +FD: +FD: Null packet +FD: <2 2 0> +FD: +FD: Null packet +FD: Null packet +FD: append end session +SD: 3000 OK end +FD: append close session +SD: 3000 OK Volumes = +SD: 3001 Volume = + +SD: 3002 Volume data = + +SD: ... additional Volume / Volume data pairs for + volumes 2 .. n +FD: close socket +\end{verbatim} +\normalsize + +The information returned to the File daemon by the Storage daemon in response +to the {\bf append close session} is transmit in turn to the Director. diff --git a/docs/manuals/es/catalog/catalog.css b/docs/manuals/de/old/developers/developers.css similarity index 100% rename from docs/manuals/es/catalog/catalog.css rename to docs/manuals/de/old/developers/developers.css diff --git a/docs/manuals/es/install/install.kilepr b/docs/manuals/de/old/developers/developers.kilepr similarity index 59% rename from docs/manuals/es/install/install.kilepr rename to docs/manuals/de/old/developers/developers.kilepr index 8d85c0f5..024c51d0 100644 --- a/docs/manuals/es/install/install.kilepr +++ b/docs/manuals/de/old/developers/developers.kilepr @@ -3,9 +3,9 @@ img_extIsRegExp=false img_extensions=.eps .jpg .jpeg .png .pdf .ps .fig .gif kileprversion=2 kileversion=2.0 -lastDocument= +lastDocument=developers.tex masterDocument= -name=Install +name=Developers pkg_extIsRegExp=false pkg_extensions=.cls .sty src_extIsRegExp=false @@ -15,61 +15,97 @@ src_extensions=.tex .ltx .latex .dtx .ins MakeIndex= QuickBuild= -[item:autochangerres.tex] +[item:catalog.tex] archive=true -column=111 +column=120 encoding= highlight= line=0 open=false order=-1 -[item:configure.tex] +[item:daemonprotocol.tex] archive=true column=0 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:developers.kilepr] +archive=true +column=114 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:developers.tex] +archive=true +column=36 encoding=UTF-8 highlight=LaTeX -line=359 +line=48 +open=true +order=0 + +[item:director.tex] +archive=true +column=0 +encoding= +highlight= +line=0 open=false order=-1 -[item:consoleconf.tex] +[item:fdl.tex] archive=true -column=85 +column=7864421 encoding= highlight= line=0 open=false order=-1 -[item:critical.tex] +[item:file.tex] archive=true -column=134217832 +column=0 encoding= highlight= line=0 open=false order=-1 -[item:dirdconf.tex] +[item:generaldevel.tex] archive=true -column=0 +column=120 encoding= highlight= line=0 open=false order=-1 -[item:filedconf.tex] +[item:gui-interface.tex] archive=true -column=143543216 +column=7864421 encoding= highlight= line=0 open=false order=-1 -[item:fileset.tex] +[item:md5.tex] +archive=true +column=147078704 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:mediaformat.tex] archive=true column=0 encoding= @@ -78,7 +114,7 @@ line=0 open=false order=-1 -[item:install.kilepr] +[item:mempool.tex] archive=true column=0 encoding= @@ -87,25 +123,25 @@ line=0 open=false order=-1 -[item:install.tex] +[item:netprotocol.tex] archive=true -column=30 -encoding=UTF-8 -highlight=LaTeX -line=37 -open=true -order=0 +column=0 +encoding= +highlight= +line=0 +open=false +order=-1 -[item:installation.tex] +[item:platformsupport.tex] archive=true -column=2949164 +column=7864421 encoding= highlight= line=0 open=false order=-1 -[item:messagesres.tex] +[item:porting.tex] archive=true column=0 encoding= @@ -114,7 +150,7 @@ line=0 open=false order=-1 -[item:monitorconf.tex] +[item:regression.tex] archive=true column=0 encoding= @@ -123,16 +159,16 @@ line=0 open=false order=-1 -[item:quickstart.tex] +[item:smartall.tex] archive=true -column=23 -encoding=UTF-8 -highlight=LaTeX -line=156 +column=146049728 +encoding= +highlight= +line=0 open=false order=-1 -[item:security.tex] +[item:storage.tex] archive=true column=0 encoding= @@ -141,7 +177,7 @@ line=0 open=false order=-1 -[item:storedconf.tex] +[item:tls-techdoc.tex] archive=true column=0 encoding= @@ -152,7 +188,7 @@ order=-1 [item:version.tex] archive=true -column=161 +column=0 encoding= highlight= line=0 diff --git a/docs/manuals/es/install/install.tex b/docs/manuals/de/old/developers/developers.tex similarity index 69% rename from docs/manuals/es/install/install.tex rename to docs/manuals/de/old/developers/developers.tex index f2c57c9a..3aec7edc 100644 --- a/docs/manuals/es/install/install.tex +++ b/docs/manuals/de/old/developers/developers.tex @@ -1,10 +1,5 @@ %% %% -%% The following characters must be preceded by a backslash -%% to be entered as printable characters: -%% -%% # $ % & ~ _ ^ \ { } -%% \documentclass[10pt,a4paper]{book} @@ -27,10 +22,6 @@ \makeindex -\newindex{dir}{ddx}{dnd}{Director Index} -\newindex{fd}{fdx}{fnd}{File Daemon Index} -\newindex{sd}{sdx}{snd}{Storage Daemon Index} -\newindex{console}{cdx}{cnd}{Console Index} \newindex{general}{idx}{ind}{General Index} \sloppy @@ -43,7 +34,7 @@ \parindent 0pt \title{\includegraphics{\idir bacula-logo.eps} \\ \bigskip - \Huge{Bacula Installation and Configuration Guide} + \Huge{Developers' Guide} \begin{center} \large{It comes in the night and sucks the essence from your computers. } @@ -64,23 +55,33 @@ A copy of the license is included in the section entitled "GNU Free Documentation License". } + \maketitle \clearpage \tableofcontents \clearpage +\listoffigures +\clearpage +\listoftables +\clearpage -\include{quickstart} -\include{installation} -\include{critical} -\include{configure} -\include{dirdconf} -\include{filedconf} -\include{storedconf} -\include{messagesres} -\include{consoleconf} -\include{monitorconf} -\include{security} +\include{generaldevel} +\include{platformsupport} +\include{daemonprotocol} +\include{director} +\include{file} +\include{storage} +\include{catalog} +\include{mediaformat} +\include{porting} +\include{gui-interface} +\include{tls-techdoc} +\include{regression} +\include{md5} +\include{mempool} +\include{netprotocol} +\include{smartall} \include{fdl} @@ -89,10 +90,6 @@ % pull in the index \clearpage -\printindex[general] -\printindex[dir] -\printindex[fd] -\printindex[sd] -\printindex[console] +\printindex \end{document} diff --git a/docs/manuals/de/old/developers/director.tex b/docs/manuals/de/old/developers/director.tex new file mode 100644 index 00000000..d8c4cd0f --- /dev/null +++ b/docs/manuals/de/old/developers/director.tex @@ -0,0 +1,18 @@ +%% +%% + +\chapter{Director Services Daemon} +\label{_ChapterStart6} +\index{Daemon!Director Services } +\index{Director Services Daemon } +\addcontentsline{toc}{section}{Director Services Daemon} + +This chapter is intended to be a technical discussion of the Director services +and as such is not targeted at end users but rather at developers and system +administrators that want or need to know more of the working details of {\bf +Bacula}. + +The {\bf Bacula Director} services consist of the program that supervises all +the backup and restore operations. + +To be written ... diff --git a/docs/manuals/de/old/developers/fdl.tex b/docs/manuals/de/old/developers/fdl.tex new file mode 100644 index 00000000..9304bb60 --- /dev/null +++ b/docs/manuals/de/old/developers/fdl.tex @@ -0,0 +1,511 @@ +%---------The file header--------------------------------------------- + +%% \usepackage[english]{babel} %language selection +%% \usepackage[T1]{fontenc} + +%%\pagenumbering{arabic} + +%% \usepackage{hyperref} +%% \hypersetup{colorlinks, +%% citecolor=black, +%% filecolor=black, +%% linkcolor=black, +%% urlcolor=black, +%% pdftex} + + +%--------------------------------------------------------------------- +\chapter{GNU Free Documentation License} +\index[general]{GNU ree Documentation License} +\index[general]{License!GNU ree Documentation} +\addcontentsline{toc}{section}{GNU ree Documentation License} + +%\label{label_fdl} + + \begin{center} + + Version 1.2, November 2002 + + + Copyright \copyright 2000,2001,2002 Free Software Foundation, Inc. + + \bigskip + + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + \bigskip + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. +\end{center} + + +\begin{center} +{\bf\large Preamble} +\end{center} + +The purpose of this License is to make a manual, textbook, or other +functional and useful document "free" in the sense of freedom: to +assure everyone the effective freedom to copy and redistribute it, +with or without modifying it, either commercially or noncommercially. +Secondarily, this License preserves for the author and publisher a way +to get credit for their work, while not being considered responsible +for modifications made by others. + +This License is a kind of "copyleft", which means that derivative +works of the document must themselves be free in the same sense. It +complements the GNU General Public License, which is a copyleft +license designed for free software. + +We have designed this License in order to use it for manuals for free +software, because free software needs free documentation: a free +program should come with manuals providing the same freedoms that the +software does. But this License is not limited to software manuals; +it can be used for any textual work, regardless of subject matter or +whether it is published as a printed book. We recommend this License +principally for works whose purpose is instruction or reference. + + +\begin{center} +{\Large\bf 1. APPLICABILITY AND DEFINITIONS} +\addcontentsline{toc}{section}{1. APPLICABILITY AND DEFINITIONS} +\end{center} + +This License applies to any manual or other work, in any medium, that +contains a notice placed by the copyright holder saying it can be +distributed under the terms of this License. Such a notice grants a +world-wide, royalty-free license, unlimited in duration, to use that +work under the conditions stated herein. The \textbf{"Document"}, below, +refers to any such manual or work. Any member of the public is a +licensee, and is addressed as \textbf{"you"}. You accept the license if you +copy, modify or distribute the work in a way requiring permission +under copyright law. + +A \textbf{"Modified Version"} of the Document means any work containing the +Document or a portion of it, either copied verbatim, or with +modifications and/or translated into another language. + +A \textbf{"Secondary Section"} is a named appendix or a front-matter section of +the Document that deals exclusively with the relationship of the +publishers or authors of the Document to the Document's overall subject +(or to related matters) and contains nothing that could fall directly +within that overall subject. (Thus, if the Document is in part a +textbook of mathematics, a Secondary Section may not explain any +mathematics.) The relationship could be a matter of historical +connection with the subject or with related matters, or of legal, +commercial, philosophical, ethical or political position regarding +them. + +The \textbf{"Invariant Sections"} are certain Secondary Sections whose titles +are designated, as being those of Invariant Sections, in the notice +that says that the Document is released under this License. If a +section does not fit the above definition of Secondary then it is not +allowed to be designated as Invariant. The Document may contain zero +Invariant Sections. If the Document does not identify any Invariant +Sections then there are none. + +The \textbf{"Cover Texts"} are certain short passages of text that are listed, +as Front-Cover Texts or Back-Cover Texts, in the notice that says that +the Document is released under this License. A Front-Cover Text may +be at most 5 words, and a Back-Cover Text may be at most 25 words. + +A \textbf{"Transparent"} copy of the Document means a machine-readable copy, +represented in a format whose specification is available to the +general public, that is suitable for revising the document +straightforwardly with generic text editors or (for images composed of +pixels) generic paint programs or (for drawings) some widely available +drawing editor, and that is suitable for input to text formatters or +for automatic translation to a variety of formats suitable for input +to text formatters. A copy made in an otherwise Transparent file +format whose markup, or absence of markup, has been arranged to thwart +or discourage subsequent modification by readers is not Transparent. +An image format is not Transparent if used for any substantial amount +of text. A copy that is not "Transparent" is called \textbf{"Opaque"}. + +Examples of suitable formats for Transparent copies include plain +ASCII without markup, Texinfo input format, LaTeX input format, SGML +or XML using a publicly available DTD, and standard-conforming simple +HTML, PostScript or PDF designed for human modification. Examples of +transparent image formats include PNG, XCF and JPG. Opaque formats +include proprietary formats that can be read and edited only by +proprietary word processors, SGML or XML for which the DTD and/or +processing tools are not generally available, and the +machine-generated HTML, PostScript or PDF produced by some word +processors for output purposes only. + +The \textbf{"Title Page"} means, for a printed book, the title page itself, +plus such following pages as are needed to hold, legibly, the material +this License requires to appear in the title page. For works in +formats which do not have any title page as such, "Title Page" means +the text near the most prominent appearance of the work's title, +preceding the beginning of the body of the text. + +A section \textbf{"Entitled XYZ"} means a named subunit of the Document whose +title either is precisely XYZ or contains XYZ in parentheses following +text that translates XYZ in another language. (Here XYZ stands for a +specific section name mentioned below, such as \textbf{"Acknowledgements"}, +\textbf{"Dedications"}, \textbf{"Endorsements"}, or \textbf{"History"}.) +To \textbf{"Preserve the Title"} +of such a section when you modify the Document means that it remains a +section "Entitled XYZ" according to this definition. + +The Document may include Warranty Disclaimers next to the notice which +states that this License applies to the Document. These Warranty +Disclaimers are considered to be included by reference in this +License, but only as regards disclaiming warranties: any other +implication that these Warranty Disclaimers may have is void and has +no effect on the meaning of this License. + + +\begin{center} +{\Large\bf 2. VERBATIM COPYING} +\addcontentsline{toc}{section}{2. VERBATIM COPYING} +\end{center} + +You may copy and distribute the Document in any medium, either +commercially or noncommercially, provided that this License, the +copyright notices, and the license notice saying this License applies +to the Document are reproduced in all copies, and that you add no other +conditions whatsoever to those of this License. You may not use +technical measures to obstruct or control the reading or further +copying of the copies you make or distribute. However, you may accept +compensation in exchange for copies. If you distribute a large enough +number of copies you must also follow the conditions in section 3. + +You may also lend copies, under the same conditions stated above, and +you may publicly display copies. + + +\begin{center} +{\Large\bf 3. COPYING IN QUANTITY} +\addcontentsline{toc}{section}{3. COPYING IN QUANTITY} +\end{center} + + +If you publish printed copies (or copies in media that commonly have +printed covers) of the Document, numbering more than 100, and the +Document's license notice requires Cover Texts, you must enclose the +copies in covers that carry, clearly and legibly, all these Cover +Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on +the back cover. Both covers must also clearly and legibly identify +you as the publisher of these copies. The front cover must present +the full title with all words of the title equally prominent and +visible. You may add other material on the covers in addition. +Copying with changes limited to the covers, as long as they preserve +the title of the Document and satisfy these conditions, can be treated +as verbatim copying in other respects. + +If the required texts for either cover are too voluminous to fit +legibly, you should put the first ones listed (as many as fit +reasonably) on the actual cover, and continue the rest onto adjacent +pages. + +If you publish or distribute Opaque copies of the Document numbering +more than 100, you must either include a machine-readable Transparent +copy along with each Opaque copy, or state in or with each Opaque copy +a computer-network location from which the general network-using +public has access to download using public-standard network protocols +a complete Transparent copy of the Document, free of added material. +If you use the latter option, you must take reasonably prudent steps, +when you begin distribution of Opaque copies in quantity, to ensure +that this Transparent copy will remain thus accessible at the stated +location until at least one year after the last time you distribute an +Opaque copy (directly or through your agents or retailers) of that +edition to the public. + +It is requested, but not required, that you contact the authors of the +Document well before redistributing any large number of copies, to give +them a chance to provide you with an updated version of the Document. + + +\begin{center} +{\Large\bf 4. MODIFICATIONS} +\addcontentsline{toc}{section}{4. MODIFICATIONS} +\end{center} + +You may copy and distribute a Modified Version of the Document under +the conditions of sections 2 and 3 above, provided that you release +the Modified Version under precisely this License, with the Modified +Version filling the role of the Document, thus licensing distribution +and modification of the Modified Version to whoever possesses a copy +of it. In addition, you must do these things in the Modified Version: + +\begin{itemize} +\item[A.] + Use in the Title Page (and on the covers, if any) a title distinct + from that of the Document, and from those of previous versions + (which should, if there were any, be listed in the History section + of the Document). You may use the same title as a previous version + if the original publisher of that version gives permission. + +\item[B.] + List on the Title Page, as authors, one or more persons or entities + responsible for authorship of the modifications in the Modified + Version, together with at least five of the principal authors of the + Document (all of its principal authors, if it has fewer than five), + unless they release you from this requirement. + +\item[C.] + State on the Title page the name of the publisher of the + Modified Version, as the publisher. + +\item[D.] + Preserve all the copyright notices of the Document. + +\item[E.] + Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. + +\item[F.] + Include, immediately after the copyright notices, a license notice + giving the public permission to use the Modified Version under the + terms of this License, in the form shown in the Addendum below. + +\item[G.] + Preserve in that license notice the full lists of Invariant Sections + and required Cover Texts given in the Document's license notice. + +\item[H.] + Include an unaltered copy of this License. + +\item[I.] + Preserve the section Entitled "History", Preserve its Title, and add + to it an item stating at least the title, year, new authors, and + publisher of the Modified Version as given on the Title Page. If + there is no section Entitled "History" in the Document, create one + stating the title, year, authors, and publisher of the Document as + given on its Title Page, then add an item describing the Modified + Version as stated in the previous sentence. + +\item[J.] + Preserve the network location, if any, given in the Document for + public access to a Transparent copy of the Document, and likewise + the network locations given in the Document for previous versions + it was based on. These may be placed in the "History" section. + You may omit a network location for a work that was published at + least four years before the Document itself, or if the original + publisher of the version it refers to gives permission. + +\item[K.] + For any section Entitled "Acknowledgements" or "Dedications", + Preserve the Title of the section, and preserve in the section all + the substance and tone of each of the contributor acknowledgements + and/or dedications given therein. + +\item[L.] + Preserve all the Invariant Sections of the Document, + unaltered in their text and in their titles. Section numbers + or the equivalent are not considered part of the section titles. + +\item[M.] + Delete any section Entitled "Endorsements". Such a section + may not be included in the Modified Version. + +\item[N.] + Do not retitle any existing section to be Entitled "Endorsements" + or to conflict in title with any Invariant Section. + +\item[O.] + Preserve any Warranty Disclaimers. +\end{itemize} + +If the Modified Version includes new front-matter sections or +appendices that qualify as Secondary Sections and contain no material +copied from the Document, you may at your option designate some or all +of these sections as invariant. To do this, add their titles to the +list of Invariant Sections in the Modified Version's license notice. +These titles must be distinct from any other section titles. + +You may add a section Entitled "Endorsements", provided it contains +nothing but endorsements of your Modified Version by various +parties--for example, statements of peer review or that the text has +been approved by an organization as the authoritative definition of a +standard. + +You may add a passage of up to five words as a Front-Cover Text, and a +passage of up to 25 words as a Back-Cover Text, to the end of the list +of Cover Texts in the Modified Version. Only one passage of +Front-Cover Text and one of Back-Cover Text may be added by (or +through arrangements made by) any one entity. If the Document already +includes a cover text for the same cover, previously added by you or +by arrangement made by the same entity you are acting on behalf of, +you may not add another; but you may replace the old one, on explicit +permission from the previous publisher that added the old one. + +The author(s) and publisher(s) of the Document do not by this License +give permission to use their names for publicity for or to assert or +imply endorsement of any Modified Version. + + +\begin{center} +{\Large\bf 5. COMBINING DOCUMENTS} +\addcontentsline{toc}{section}{5. COMBINING DOCUMENTS} +\end{center} + + +You may combine the Document with other documents released under this +License, under the terms defined in section 4 above for modified +versions, provided that you include in the combination all of the +Invariant Sections of all of the original documents, unmodified, and +list them all as Invariant Sections of your combined work in its +license notice, and that you preserve all their Warranty Disclaimers. + +The combined work need only contain one copy of this License, and +multiple identical Invariant Sections may be replaced with a single +copy. If there are multiple Invariant Sections with the same name but +different contents, make the title of each such section unique by +adding at the end of it, in parentheses, the name of the original +author or publisher of that section if known, or else a unique number. +Make the same adjustment to the section titles in the list of +Invariant Sections in the license notice of the combined work. + +In the combination, you must combine any sections Entitled "History" +in the various original documents, forming one section Entitled +"History"; likewise combine any sections Entitled "Acknowledgements", +and any sections Entitled "Dedications". You must delete all sections +Entitled "Endorsements". + +\begin{center} +{\Large\bf 6. COLLECTIONS OF DOCUMENTS} +\addcontentsline{toc}{section}{6. COLLECTIONS OF DOCUMENTS} +\end{center} + +You may make a collection consisting of the Document and other documents +released under this License, and replace the individual copies of this +License in the various documents with a single copy that is included in +the collection, provided that you follow the rules of this License for +verbatim copying of each of the documents in all other respects. + +You may extract a single document from such a collection, and distribute +it individually under this License, provided you insert a copy of this +License into the extracted document, and follow this License in all +other respects regarding verbatim copying of that document. + + +\begin{center} +{\Large\bf 7. AGGREGATION WITH INDEPENDENT WORKS} +\addcontentsline{toc}{section}{7. AGGREGATION WITH INDEPENDENT WORKS} +\end{center} + + +A compilation of the Document or its derivatives with other separate +and independent documents or works, in or on a volume of a storage or +distribution medium, is called an "aggregate" if the copyright +resulting from the compilation is not used to limit the legal rights +of the compilation's users beyond what the individual works permit. +When the Document is included in an aggregate, this License does not +apply to the other works in the aggregate which are not themselves +derivative works of the Document. + +If the Cover Text requirement of section 3 is applicable to these +copies of the Document, then if the Document is less than one half of +the entire aggregate, the Document's Cover Texts may be placed on +covers that bracket the Document within the aggregate, or the +electronic equivalent of covers if the Document is in electronic form. +Otherwise they must appear on printed covers that bracket the whole +aggregate. + + +\begin{center} +{\Large\bf 8. TRANSLATION} +\addcontentsline{toc}{section}{8. TRANSLATION} +\end{center} + + +Translation is considered a kind of modification, so you may +distribute translations of the Document under the terms of section 4. +Replacing Invariant Sections with translations requires special +permission from their copyright holders, but you may include +translations of some or all Invariant Sections in addition to the +original versions of these Invariant Sections. You may include a +translation of this License, and all the license notices in the +Document, and any Warranty Disclaimers, provided that you also include +the original English version of this License and the original versions +of those notices and disclaimers. In case of a disagreement between +the translation and the original version of this License or a notice +or disclaimer, the original version will prevail. + +If a section in the Document is Entitled "Acknowledgements", +"Dedications", or "History", the requirement (section 4) to Preserve +its Title (section 1) will typically require changing the actual +title. + + +\begin{center} +{\Large\bf 9. TERMINATION} +\addcontentsline{toc}{section}{9. TERMINATION} +\end{center} + + +You may not copy, modify, sublicense, or distribute the Document except +as expressly provided for under this License. Any other attempt to +copy, modify, sublicense or distribute the Document is void, and will +automatically terminate your rights under this License. However, +parties who have received copies, or rights, from you under this +License will not have their licenses terminated so long as such +parties remain in full compliance. + + +\begin{center} +{\Large\bf 10. FUTURE REVISIONS OF THIS LICENSE} +\addcontentsline{toc}{section}{10. FUTURE REVISIONS OF THIS LICENSE} +\end{center} + + +The Free Software Foundation may publish new, revised versions +of the GNU Free Documentation License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. See +http://www.gnu.org/copyleft/. + +Each version of the License is given a distinguishing version number. +If the Document specifies that a particular numbered version of this +License "or any later version" applies to it, you have the option of +following the terms and conditions either of that specified version or +of any later version that has been published (not as a draft) by the +Free Software Foundation. If the Document does not specify a version +number of this License, you may choose any version ever published (not +as a draft) by the Free Software Foundation. + + +\begin{center} +{\Large\bf ADDENDUM: How to use this License for your documents} +\addcontentsline{toc}{section}{ADDENDUM: How to use this License for your documents} +\end{center} + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and +license notices just after the title page: + +\bigskip +\begin{quote} + Copyright \copyright YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. + A copy of the license is included in the section entitled "GNU + Free Documentation License". +\end{quote} +\bigskip + +If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, +replace the "with...Texts." line with this: + +\bigskip +\begin{quote} + with the Invariant Sections being LIST THEIR TITLES, with the + Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. +\end{quote} +\bigskip + +If you have Invariant Sections without Cover Texts, or some other +combination of the three, merge those two alternatives to suit the +situation. + +If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of +free software license, such as the GNU General Public License, +to permit their use in free software. + +%--------------------------------------------------------------------- diff --git a/docs/manuals/de/old/developers/file.tex b/docs/manuals/de/old/developers/file.tex new file mode 100644 index 00000000..ee89577b --- /dev/null +++ b/docs/manuals/de/old/developers/file.tex @@ -0,0 +1,68 @@ +%% +%% + +\chapter{File Services Daemon} +\label{_ChapterStart11} +\index{File Services Daemon } +\index{Daemon!File Services } +\addcontentsline{toc}{section}{File Services Daemon} + +Please note, this section is somewhat out of date as the code has evolved +significantly. The basic idea has not changed though. + +This chapter is intended to be a technical discussion of the File daemon +services and as such is not targeted at end users but rather at developers and +system administrators that want or need to know more of the working details of +{\bf Bacula}. + +The {\bf Bacula File Services} consist of the programs that run on the system +to be backed up and provide the interface between the Host File system and +Bacula -- in particular, the Director and the Storage services. + +When time comes for a backup, the Director gets in touch with the File daemon +on the client machine and hands it a set of ``marching orders'' which, if +written in English, might be something like the following: + +OK, {\bf File daemon}, it's time for your daily incremental backup. I want you +to get in touch with the Storage daemon on host archive.mysite.com and perform +the following save operations with the designated options. You'll note that +I've attached include and exclude lists and patterns you should apply when +backing up the file system. As this is an incremental backup, you should save +only files modified since the time you started your last backup which, as you +may recall, was 2000-11-19-06:43:38. Please let me know when you're done and +how it went. Thank you. + +So, having been handed everything it needs to decide what to dump and where to +store it, the File daemon doesn't need to have any further contact with the +Director until the backup is complete providing there are no errors. If there +are errors, the error messages will be delivered immediately to the Director. +While the backup is proceeding, the File daemon will send the file coordinates +and data for each file being backed up to the Storage daemon, which will in +turn pass the file coordinates to the Director to put in the catalog. + +During a {\bf Verify} of the catalog, the situation is different, since the +File daemon will have an exchange with the Director for each file, and will +not contact the Storage daemon. + +A {\bf Restore} operation will be very similar to the {\bf Backup} except that +during the {\bf Restore} the Storage daemon will not send storage coordinates +to the Director since the Director presumably already has them. On the other +hand, any error messages from either the Storage daemon or File daemon will +normally be sent directly to the Directory (this, of course, depends on how +the Message resource is defined). + +\section{Commands Received from the Director for a Backup} +\index{Backup!Commands Received from the Director for a } +\index{Commands Received from the Director for a Backup } +\addcontentsline{toc}{subsection}{Commands Received from the Director for a +Backup} + +To be written ... + +\section{Commands Received from the Director for a Restore} +\index{Commands Received from the Director for a Restore } +\index{Restore!Commands Received from the Director for a } +\addcontentsline{toc}{subsection}{Commands Received from the Director for a +Restore} + +To be written ... diff --git a/docs/manuals/es/concepts/fix_tex.pl b/docs/manuals/de/old/developers/fix_tex.pl similarity index 100% rename from docs/manuals/es/concepts/fix_tex.pl rename to docs/manuals/de/old/developers/fix_tex.pl diff --git a/docs/manuals/de/old/developers/generaldevel.tex b/docs/manuals/de/old/developers/generaldevel.tex new file mode 100644 index 00000000..f29b0200 --- /dev/null +++ b/docs/manuals/de/old/developers/generaldevel.tex @@ -0,0 +1,1363 @@ +%% +%% + +\chapter{Bacula Developer Notes} +\label{_ChapterStart10} +\index{Bacula Developer Notes} +\index{Notes!Bacula Developer} +\addcontentsline{toc}{section}{Bacula Developer Notes} + +This document is intended mostly for developers and describes how you can +contribute to the Bacula project and the the general framework of making +Bacula source changes. + +\subsection{Contributions} +\index{Contributions} +\addcontentsline{toc}{subsubsection}{Contributions} + +Contributions to the Bacula project come in many forms: ideas, +participation in helping people on the bacula-users email list, packaging +Bacula binaries for the community, helping improve the documentation, and +submitting code. + +Contributions in the form of submissions for inclusion in the project are +broken into two groups. The first are contributions that are aids and not +essential to Bacula. In general, these will be scripts or will go into the +{\bf bacula/examples} directory. For these kinds of non-essential +contributions there is no obligation to do a copyright assignment as +described below. However, a copyright assignment would still be +appreciated. + +The second class of contributions are those which will be integrated with +Bacula and become an essential part (code, scripts, documentation, ...) +Within this class of contributions, there are two hurdles to surmount. One +is getting your patch accepted, and two is dealing with copyright issues. +The following text describes some of the requirements for such code. + +\subsection{Patches} +\index{Patches} +\addcontentsline{toc}{subsubsection}{Patches} + +Subject to the copyright assignment described below, your patches should be +sent in {\bf git format-patch} format relative to the current contents of the +master branch of the Source Forge Git repository. Please attach the +output file or files generated by the {\bf git format-patch} to the email +rather than include them directory to avoid wrapping of the lines +in the patch. Please be sure to use the Bacula +indenting standard (see below) for source code. If you have checked out +the source with Git, you can get a diff using. + +\begin{verbatim} +git pull +git format-patch -M +\end{verbatim} + +If you plan on doing significant development work over a period of time, +after having your first patch reviewed and approved, you will be eligible +for having developer Git write access so that you can commit your changes +directly to the Git repository. To do so, you will need a userid on Source +Forge. + +\subsection{Copyrights} +\index{Copyrights} +\addcontentsline{toc}{subsubsection}{Copyrights} + +To avoid future problems concerning changing licensing or +copyrights, all code contributions more than a hand full of lines +must be in the Public Domain or have the copyright transferred to +the Free Software Foundation Europe e.V. with a Fiduciary License +Agreement (FLA) as the case for all the current code. + +Prior to November 2004, all the code was copyrighted by Kern Sibbald and +John Walker. After November 2004, the code was copyrighted by Kern +Sibbald, then on the 15th of November 2006, Kern transferred the copyright +to the Free Software Foundation Europe e.V. In signing the FLA and +transferring the copyright, you retain the right to use the code you have +submitted as you want, and you ensure that Bacula will always remain Free +and Open Source. + +Your name should be clearly indicated as the author of the code, and you +must be extremely careful not to violate any copyrights or patents or use +other people's code without acknowledging it. The purpose of this +requirement is to avoid future copyright, patent, or intellectual property +problems. Please read the LICENSE agreement in the main Bacula source code +directory. When you sign the Fiduciary License Agreement (FLA) and send it +in, you are agreeing to the terms of that LICENSE file. + +If you don't understand what we mean by future problems, please +examine the difficulties Mozilla was having finding +previous contributors at \elink{ +http://www.mozilla.org/MPL/missing.html} +{http://www.mozilla.org/MPL/missing.html}. The other important issue is to +avoid copyright, patent, or intellectual property violations as was +(May 2003) claimed by SCO against IBM. + +Although the copyright will be held by the Free Software +Foundation Europe e.V., each developer is expected to indicate +that he wrote and/or modified a particular module (or file) and +any other sources. The copyright assignment may seem a bit +unusual, but in reality, it is not. Most large projects require +this. + +If you have any doubts about this, please don't hesitate to ask. The +objective is to assure the long term survival of the Bacula project. + +Items not needing a copyright assignment are: most small changes, +enhancements, or bug fixes of 5-10 lines of code, which amount to +less than 20% of any particular file. + +\subsection{Copyright Assignment -- Fiduciary License Agreement} +\index{Copyright Assignment} +\index{Assignment!Copyright} +\addcontentsline{toc}{subsubsection}{Copyright Assignment -- Fiduciary License Agreement} + +Since this is not a commercial enterprise, and we prefer to believe in +everyone's good faith, previously developers could assign the copyright by +explicitly acknowledging that they do so in their first submission. This +was sufficient if the developer is independent, or an employee of a +not-for-profit organization or a university. However, in an effort to +ensure that the Bacula code is really clean, beginning in August 2006, all +previous and future developers with SVN write access will be asked to submit a +copyright assignment (or Fiduciary License Agreement -- FLA), +which means you agree to the LICENSE in the main source +directory. It also means that you receive back the right to use +the code that you have submitted. + +Any developer who wants to contribute and is employed by a company should +either list the employer as the owner of the code, or get explicit +permission from him to sign the copyright assignment. This is because in +many countries, all work that an employee does whether on company time or +in the employee's free time is considered to be Intellectual Property of +the company. Obtaining official approval or an FLA from the company will +avoid misunderstandings between the employee, the company, and the Bacula +project. A good number of companies have already followed this procedure. + +The Fiduciary License Agreement is posted on the Bacula web site at: +\elink{http://www.bacula.org/en/FLA-bacula.en.pdf}{http://www.bacula.org/en/FLA-bacula.en.pdf} + +The instructions for filling out this agreement are also at: +\elink{http://www.bacula.org/?page=fsfe}{http://www.bacula.org/?page=fsfe} + +It should be filled out, then sent to: + +\begin{verbatim} + Kern Sibbald + Cotes-de-Montmoiret 9 + 1012 Lausanne + Switzerland +\end{verbatim} + +Please note that the above address is different from the officially +registered office mentioned in the document. When you send in such a +complete document, please notify me: kern at sibbald dot com, and +please add your email address to the FLA so that I can contact you +to confirm reception of the signed FLA. + + +\section{The Development Cycle} +\index{Developement Cycle} +\index{Cycle!Developement} +\addcontentsline{toc}{subsubsection}{Development Cycle} + +As discussed on the email lists, the number of contributions are +increasing significantly. We expect this positive trend +will continue. As a consequence, we have modified how we do +development, and instead of making a list of all the features that we will +implement in the next version, each developer signs up for one (maybe +two) projects at a time, and when they are complete, and the code +is stable, we will release a new version. The release cycle will probably +be roughly six months. + +The difference is that with a shorter release cycle and fewer released +feature, we will have more time to review the new code that is being +contributed, and will be able to devote more time to a smaller number of +projects (some prior versions had too many new features for us to handle +correctly). + +Future release schedules will be much the same, and the +number of new features will also be much the same providing that the +contributions continue to come -- and they show no signs of let up :-) + +\index{Feature Requests} +{\bf Feature Requests:} \\ +In addition, we have "formalizee" the feature requests a bit. + +Instead of me maintaining an informal list of everything I run into +(kernstodo), we now maintain a "formal" list of projects. This +means that all new feature requests, including those recently discussed on +the email lists, must be formally submitted and approved. + +Formal submission of feature requests will take two forms: \\ +1. non-mandatory, but highly recommended is to discuss proposed new features +on the mailing list.\\ +2. Formal submission of an Feature Request in a special format. We'll +give an example of this below, but you can also find it on the web site +under "Support -\gt{} Feature Requests". Since it takes a bit of time to +properly fill out a Feature Request form, you probably should check on the +email list first. + +Once the Feature Request is received by the keeper of the projects list, it +will be sent to the Bacula project manager (Kern), and he will either +accept it (90% of the time), send it back asking for clarification (10% of +the time), send it to the email list asking for opinions, or reject it +(very few cases). + +If it is accepted, it will go in the "projects" file (a simple ASCII file) +maintained in the main Bacula source directory. + +{\bf Implementation of Feature Requests:}\\ +Any qualified developer can sign up for a project. The project must have +an entry in the projects file, and the developer's name will appear in the +Status field. + +{\bf How Feature Requests are accepted:}\\ +Acceptance of Feature Requests depends on several things: \\ +1. feedback from users. If it is negative, the Feature Request will probably not be +accepted. \\ +2. the difficulty of the project. A project that is so +difficult that we cannot imagine finding someone to implement probably won't +be accepted. Obviously if you know how to implement it, don't hesitate +to put it in your Feature Request \\ + 3. whether or not the Feature Request fits within the current strategy of +Bacula (for example an Feature Request that requests changing the tape to +tar format probably would not be accepted, ...). + +{\bf How Feature Requests are prioritized:}\\ +Once an Feature Request is accepted, it needs to be implemented. If you +can find a developer for it, or one signs up for implementing it, then the +Feature Request becomes top priority (at least for that developer). + +Between releases of Bacula, we will generally solicit Feature Request input +for the next version, and by way of this email, we suggest that you send +discuss and send in your Feature Requests for the next release. Please +verify that the Feature Request is not in the current list (attached to this email). + +Once users have had several weeks to submit Feature Requests, the keeper of +the projects list will organize them, and request users to vote on them. +This will allow fixing prioritizing the Feature Requests. Having a +priority is one thing, but getting it implement is another thing -- we are +hoping that the Bacula community will take more responsibility for assuring +the implementation of accepted Feature Requests. + +Feature Request format: +\begin{verbatim} +============= Empty Feature Request form =========== +Item n: One line summary ... + Date: Date submitted + Origin: Name and email of originator. + Status: + + What: More detailed explanation ... + + Why: Why it is important ... + + Notes: Additional notes or features (omit if not used) +============== End Feature Request form ============== +\end{verbatim} + +\begin{verbatim} +============= Example Completed Feature Request form =========== +Item 1: Implement a Migration job type that will move the job + data from one device to another. + Origin: Sponsored by Riege Sofware International GmbH. Contact: + Daniel Holtkamp + Date: 28 October 2005 + Status: Partially coded in 1.37 -- much more to do. Assigned to + Kern. + + What: The ability to copy, move, or archive data that is on a + device to another device is very important. + + Why: An ISP might want to backup to disk, but after 30 days + migrate the data to tape backup and delete it from + disk. Bacula should be able to handle this + automatically. It needs to know what was put where, + and when, and what to migrate -- it is a bit like + retention periods. Doing so would allow space to be + freed up for current backups while maintaining older + data on tape drives. + + Notes: Migration could be triggered by: + Number of Jobs + Number of Volumes + Age of Jobs + Highwater size (keep total size) + Lowwater mark +================================================= +\end{verbatim} + + +\section{Bacula Code Submissions and Projects} +\index{Submissions and Projects} +\addcontentsline{toc}{subsection}{Code Submissions and Projects} + +Getting code implemented in Bacula works roughly as follows: + +\begin{itemize} + +\item Kern is the project manager, but prefers not to be a "gate keeper". + This means that the developers are expected to be self-motivated, + and once they have experience submit directly to the Git + repositories. However, + it is a good idea to have your patches reviewed prior to submitting, + and it is a bad idea to submit monster patches because no one will + be able to properly review them. See below for more details on this. + +\item There are growing numbers of contributions (very good). + +\item Some contributions come in the form of relatively small patches, + which Kern reviews, integrates, documents, tests, and maintains. + +\item All Bacula developers take full + responsibility for writing the code, posting as patches so that we can + review it as time permits, integrating it at an appropriate time, + responding to our requests for tweaking it (name changes, ...), + document it in the code, document it in the manual (even though + their mother tongue is not English), test it, develop and commit + regression scripts, and answer in a timely fashion all bug reports -- + even occasionally accepting additional bugs :-) + + This is a sustainable way of going forward with Bacula, and the + direction that the project will be taking more and more. For + example, in the past, we have had some very dedicated programmers + who did major projects. However, some of these + programmers due to outside obligations (job responsibilities change of + job, school duties, ...) could not continue to maintain the code. In + those cases, the code suffers from lack of maintenance, sometimes we + patch it, sometimes not. In the end, if the code is not maintained, the + code gets dropped from the project (there are two such contributions + that are heading in that direction). When ever possible, we would like + to avoid this, and ensure a continuation of the code and a sharing of + the development, debugging, documentation, and maintenance + responsibilities. +\end{itemize} + +\section{Patches for Released Versions} +\index{Patches for Released Versions} +\addcontentsline{toc}{subsection}{Patches for Released Versions} +If you fix a bug in a released version, you should, unless it is +an absolutely trivial bug, create and release a patch file for the +bug. The procedure is as follows: + +Fix the bug in the released branch and in the develpment master branch. + +Make a patch file for the branch and add the branch patch to +the patches directory in both the branch and the trunk. +The name should be 2.2.4-xxx.patch where xxx is unique, in this case it can +be "restore", e.g. 2.2.4-restore.patch. Add to the top of the +file a brief description and instructions for applying it -- see for example +2.2.4-poll-mount.patch. The best way to create the patch file is as +follows: + +\begin{verbatim} + (edit) 2.2.4-restore.patch + (input description) + (end edit) + + git format-patch -M + mv 0001-xxx 2.2.4-restore.patch +\end{verbatim} + +check to make sure no extra junk got put into the patch file (i.e. +it should have the patch for that bug only). + +If there is not a bug report on the problem, create one, then add the +patch to the bug report. + +Then upload it to the 2.2.x release of bacula-patches. + +So, end the end, the patch file is: +\begin{itemize} +\item Attached to the bug report + +\item In Branch-2.2/bacula/patches/... + +\item In the trunk + +\item Loaded on Source Forge bacula-patches 2.2.x release. When + you add it, click on the check box to send an Email so that all the + users that are monitoring SF patches get notified. +\end{itemize} + + +\section{Bacula Git repositories} +\index{Git} +\addcontentsline{toc}{subsection}{Git repositories} +As of September 2009, the Bacula source code has been split into +three Git repositories. One is a repository that holds the +main Bacula source code with directories {\bf bacula}, {\bf gui}, +and {\bf regress}. The second repository contains +the directories {\bf docs} directory, and the third repository +contains the {\bf rescue} directory. All three repositories are +hosted on Source Forge. + +Previously everything was in a single SVN repository. +We have split the SVN repository into three because Git +offers significant advantages for ease of managing and integrating +developer's changes. However, one of the disadvantages of Git is that you +must work with the full repository, while SVN allows you to checkout +individual directories. If we put everything into a single Git +repository it would be far bigger than most developers would want +to checkout, so we have separted the docs and rescue into their own +repositories, and moved only the parts that are most actively +worked on by the developers (bacula, gui, and regress) to a the +Git Bacula repository. + +Bacula developers must now have a certain knowledege +of Git. + +\section{Git Usage} +\index{Git Usage} +\addcontentsline{toc}{subsection}{Git Usage} + +Please note that if you are familiar with SVN, Git is similar, +(and better), but there can be a few surprising differences that +can lead to damaging the history of the repository (repo) if +you attempt to force pushing data into the Git repo. + +The Bacula Git repo contains the subdirectories {\bf bacula}, {\bf gui}, +and {\bf regress}. With Git it is not possible to pull only a +single directory, because of the hash code nature of Git, you +must take all or nothing. + +For developers, the most important thing to remember about Git and +the Source Forge repository is not to "force" a {\bf push} to the +repository, and not to use the {\bf rebase} command on the {\bf +master} branch of the repository. Doing so, will possibly rewrite +the Git repository history and cause a lot of problems for the +project. + +You may and should use {\bf rebase} on your own branches that you +want to synchronize with the {\bf master} branch, but please +do not use {\bf rebase} on the {\bf master} branch. The proper +way of merging changes will be discussed below. + +You can get a full copy of the Source Forge Bacula Git repository with the +following command: + +\begin{verbatim} +git clone git://bacula.git.sourceforge.net/gitroot/bacula/bacula trunk +\end{verbatim} + +This will put a read-only copy into the directory {\bf trunk} +in your current directory, and {\bf trunk} will contain +the subdirectories: {\bf bacula}, {\bf gui}, and {\bf regress}. + +If you have write permission, you can get a copy of the Git +repo with: + +\begin{verbatim} +git clone ssh://@bacula.git.sourceforge.net/gitroot/bacula/bacula trunk +\end{verbatim} + +where you replace \verb++ with your Source Forge login +userid, and you must have previously uploaded your public ssh key +to Source Forge. + +The above command needs to be done only once. Thereafter, you can: + +\begin{verbatim} +cd trunk +git pull +\end{verbatim} + +As of August 2009, the size of the repository ({\bf trunk} in the above +example) will be approximately 55 Megabytes. However, if you build +from source in this directory and do a lot of updates and regression +testing, the directory could become several hundred megabytes. + +\subsection{Learning Git} +\index{Learning Git} +If you want to learn more about Git, we recommend that you visit:\\ +\elink{http://book.git-scm.com/}{http://book.git-scm.com/}. + +Some of the differences between Git and SVN are: +\begin{itemize} +\item Your main Git directory is a full Git repository to which you can + and must commit. +\item The Git database is kept in the directory {\bf .git} at the + top level of the directory. +\item all the important Git configuration information is kept in the + file {\bf .git/config} in ASCII format that is easy to manually edit. +\item When you do a {\bf commit} the changes are put in {\bf .git} + rather than in the external repository. +\item You can upload your changes to the external repository using + the command {\bf git push}. +\item You can download all the current changes in the external repository + and merge them into your {\bf master} branch using the command + {\bf gGit pull}. +\item The command {\bf git add} is used to add a new file to the + repository AND to tell Git that you want a file that has changed + to be in the next commit. This has lots of advantages, because + a {\bf git commit} only commits those files that have been + explicitly added. +\item You can add and commit all files modifed in one command + using {\bf git commit -a}. +\item This extra use of {\bf add} allows you to make a number + of changes then add only a few of the files and commit them, + then add more files and commit them until you have committed + everything. This has the advantage of allowing you to more + easily group small changes and commit them. +\item If you {\bf git pull} from the main repository and make + some changes, and before you do a {\bf git push}, someone + else pushes changes to the Git repository, you will probably + get an error message such as: + +\begin{verbatim} + git push + To git@github.com:bacula/bacula.git + ! [rejected] master -> master (non-fast forward) + error: failed to push some refs to 'git@github.com:bacula/bacula.git' +\end{verbatim} + + which is Git's way of telling you that the main repository has changed + and that if you push your changes, they will not be integrated properly. + As we have noted, you should never ask Git to force the push. + See below for an explanation of why. +\item To integrate (merge) your changes properly, you should always do + a {\bf git pull} just prior to doing a {\bf git push}. +\item If Git is unable to merge your changes or finds a conflict it + will tell you and you must do conflict resolution, which is much + easier in Git than in SVN. +\item Resolving conflicts is described below in the {\bf github} section. +\end{itemize} + +If you want to understand why it is not a good idea to force a +push to the repository, look at the following picture: + +\includegraphics[width=0.85\textwidth]{\idir git-edit-commit.eps} + +The above graphic has three lines of circles. Each circle represents +a commit, and time runs from the left to the right. The top line +shows the repository just before you are going to do a push. Note the +point at which you pulled is the circle on the left, your changes are +represented by the circle labeled {\bf Your mods}. It is shown below +to indicate that the changes are only in your local repository. Finally, +there are pushes A and B that came after the time at which you pulled. + +If you were to force your changes into the repository, Git would place them +immediately after the point at which you pulled them, so they would +go before the pushes A and B. However, doing so would rewrite the history +of the repository and make it very difficult for other users to synchronize +since they would have to somehow wedge their changes at some point before the +current HEAD of the repository. This situation is shown by the second line of +pushes. + +What you really want to do is to put your changes after Push B (the current HEAD). +This is shown in the third line of pushes. The best way to accomplish this is to +work in a branch, pull the repository so you have your master equal to HEAD (in first +line), then to rebase your branch on the current master and then commit it. The +exact commands to accomplish this are shown in the next couple of sections. + +\subsection{Publishing your changes} +\index{Publishing} +Since Git is more complex than SVN, it takes a bit of time to learn how +to use it properly, and if you are not careful, you can potentially create +a new history in the repository. In addition, since Git is a distributed +version control system, we prefer to receive a full branch submission rather +than simply a patch. To accomplish this, you must create your changes in +a branch, then {\bf push} them to some public repository -- it can be your +own repository that you publish or another. To simplify this phase for you, we +have created a publich Bacula Git repository on {\bf github} where you can +push your branch containing changes you would like integrated into the Bacula +source code. + +Once you have pushed your branch to {\bf github} or told us where we can pull +from your public repository, one of the senior Bacula devlopers will fetch your +changes, examine them, possibly make comments for changes they would like to +see, and as the final step, the senior developer will commit it to the +Bacula Source Forge Git repository. + +\subsection{github} +\index{github} +If you are going to submit code, you create a login on +the Github website:\\ +\elink{http://github.com/}{http://github.com/}\\ +before you clone the repository. +You must also upload your public ssh key. Please see the instructions for +doing so at the above link. Then you notify one of the senior Bacula developers, +who will authorize your Github user name as a committer to the Bacula repository. Finally, +you clone the Bacula repository with: + +\begin{verbatim} + git clone git@github.com:bacula/bacula.git +\end{verbatim} + +where you replace \verb++ with the name +of a directory that you want Git to create to hold your local Bacula Git +repository. + +Normally, you will work by creating a branch of the master branch of your +repository, make your modifications, then make sure it is up to date, and finally +push it to Github. Assuming you call the Bacula repository {\bf bacula}, you might +use the following commands: + +\begin{verbatim} +cd bacula +git checkout master +git pull +git branch /newbranch +git checkout /newbranch +(edit, ...) +git add +git commit -m "" +... +\end{verbatim} + +Note, we request you to create the branch name ({\bf \verb++/newbranch} with your Github +login name. This guarantees that the branch name will be unique and +easily identified as well. + +When you have completed working on your branch, you will do: + +\begin{verbatim} +cd bacula +git checkout /newbranch +git pull +git rebase master +\end{verbatim} + +If you have completed your edits before anyone has modified the repository, +the {\bf git rebase master} will report that there was nothing to do. Otherwise, +it will merge the changes that were made in the repository before your changes. +If there are any conflicts, Git will tell you. Typically resolving conflicts with +Git is relatively easy. You simply make a diff: + +\begin{verbatim} +git diff +\end{verbatim} + +Then edit each file that was listed in the {\bf git diff} to remove the +conflict, which will be indicated by lines of: + +\begin{verbatim} +<<<<<<< HEAD +text +>>>>>>>> +other text +===== +\end{verbatim} + +where {\bf text} is what is in the Bacula repository, and {\bf other text} +is what you have changed. + +Once you have eliminated the conflict, the {\bf git diff} will show nothing, +and you must do a: + +\begin{verbatim} +git add +\end{verbatim} + +Once you have fixed all the files with conflicts in the above manner, you enter: + +\begin{verbatim} +git rebase --continue +\end{verbatim} + +and your rebase will be complete. + +If for some reason, before doing the --continue, you want to abort the rebase and return to what you had, you enter: + +\begin{verbatim} +git rebase --abort +\end{verbatim} + +Finally to upload your branch, you do: + +\begin{verbatim} +git push origin /newbranch +\end{verbatim} + +If you wish to delete it later, you can use: + +\begin{verbatim} +git push origin :/newbranch +\end{verbatim} + + +\section{Developing Bacula} +\index{Developing Bacula} +\index{Bacula!Developing} +\addcontentsline{toc}{subsubsection}{Developing Bacula} + +Typically the simplest way to develop Bacula is to open one xterm window +pointing to the source directory you wish to update; a second xterm window at +the top source directory level, and a third xterm window at the bacula +directory \lt{}top\gt{}/src/bacula. After making source changes in one of the +directories, in the top source directory xterm, build the source, and start +the daemons by entering: + +make and + +./startit then in the enter: + +./console or + +./gnome-console to start the Console program. Enter any commands for testing. +For example: run kernsverify full. + +Note, the instructions here to use {\bf ./startit} are different from using a +production system where the administrator starts Bacula by entering {\bf +./bacula start}. This difference allows a development version of {\bf Bacula} +to be run on a computer at the same time that a production system is running. +The {\bf ./startit} strip starts {\bf Bacula} using a different set of +configuration files, and thus permits avoiding conflicts with any production +system. + +To make additional source changes, exit from the Console program, and in the +top source directory, stop the daemons by entering: + +./stopit then repeat the process. + +\subsection{Debugging} +\index{Debugging} +\addcontentsline{toc}{subsubsection}{Debugging} + +Probably the first thing to do is to turn on debug output. + +A good place to start is with a debug level of 20 as in {\bf ./startit -d20}. +The startit command starts all the daemons with the same debug level. +Alternatively, you can start the appropriate daemon with the debug level you +want. If you really need more info, a debug level of 60 is not bad, and for +just about everything a level of 200. + +\subsection{Using a Debugger} +\index{Using a Debugger} +\index{Debugger!Using a} +\addcontentsline{toc}{subsubsection}{Using a Debugger} + +If you have a serious problem such as a segmentation fault, it can usually be +found quickly using a good multiple thread debugger such as {\bf gdb}. For +example, suppose you get a segmentation violation in {\bf bacula-dir}. You +might use the following to find the problem: + +\lt{}start the Storage and File daemons\gt{} +cd dird +gdb ./bacula-dir +run -f -s -c ./dird.conf +\lt{}it dies with a segmentation fault\gt{} +where +The {\bf -f} option is specified on the {\bf run} command to inhibit {\bf +dird} from going into the background. You may also want to add the {\bf -s} +option to the run command to disable signals which can potentially interfere +with the debugging. + +As an alternative to using the debugger, each {\bf Bacula} daemon has a built +in back trace feature when a serious error is encountered. It calls the +debugger on itself, produces a back trace, and emails the report to the +developer. For more details on this, please see the chapter in the main Bacula +manual entitled ``What To Do When Bacula Crashes (Kaboom)''. + +\subsection{Memory Leaks} +\index{Leaks!Memory} +\index{Memory Leaks} +\addcontentsline{toc}{subsubsection}{Memory Leaks} + +Because Bacula runs routinely and unattended on client and server machines, it +may run for a long time. As a consequence, from the very beginning, Bacula +uses SmartAlloc to ensure that there are no memory leaks. To make detection of +memory leaks effective, all Bacula code that dynamically allocates memory MUST +have a way to release it. In general when the memory is no longer needed, it +should be immediately released, but in some cases, the memory will be held +during the entire time that Bacula is executing. In that case, there MUST be a +routine that can be called at termination time that releases the memory. In +this way, we will be able to detect memory leaks. Be sure to immediately +correct any and all memory leaks that are printed at the termination of the +daemons. + +\subsection{Special Files} +\index{Files!Special} +\index{Special Files} +\addcontentsline{toc}{subsubsection}{Special Files} + +Kern uses files named 1, 2, ... 9 with any extension as scratch files. Thus +any files with these names are subject to being rudely deleted at any time. + +\subsection{When Implementing Incomplete Code} +\index{Code!When Implementing Incomplete} +\index{When Implementing Incomplete Code} +\addcontentsline{toc}{subsubsection}{When Implementing Incomplete Code} + +Please identify all incomplete code with a comment that contains + +\begin{verbatim} +***FIXME*** +\end{verbatim} + +where there are three asterisks (*) before and after the word +FIXME (in capitals) and no intervening spaces. This is important as it allows +new programmers to easily recognize where things are partially implemented. + +\subsection{Bacula Source File Structure} +\index{Structure!Bacula Source File} +\index{Bacula Source File Structure} +\addcontentsline{toc}{subsubsection}{Bacula Source File Structure} + +The distribution generally comes as a tar file of the form {\bf +bacula.x.y.z.tar.gz} where x, y, and z are the version, release, and update +numbers respectively. + +Once you detar this file, you will have a directory structure as follows: + +\footnotesize +\begin{verbatim} +| +Tar file: +|- depkgs + |- mtx (autochanger control program + tape drive info) + |- sqlite (SQLite database program) + +Tar file: +|- depkgs-win32 + |- pthreads (Native win32 pthreads library -- dll) + |- zlib (Native win32 zlib library) + |- wx (wxWidgets source code) + +Project bacula: +|- bacula (main source directory containing configuration + | and installation files) + |- autoconf (automatic configuration files, not normally used + | by users) + |- intl (programs used to translate) + |- platforms (OS specific installation files) + |- redhat (Red Hat installation) + |- solaris (Sun installation) + |- freebsd (FreeBSD installation) + |- irix (Irix installation -- not tested) + |- unknown (Default if system not identified) + |- po (translations of source strings) + |- src (source directory; contains global header files) + |- cats (SQL catalog database interface directory) + |- console (bacula user agent directory) + |- dird (Director daemon) + |- filed (Unix File daemon) + |- win32 (Win32 files to make bacula-fd be a service) + |- findlib (Unix file find library for File daemon) + |- gnome-console (GNOME version of console program) + |- lib (General Bacula library) + |- stored (Storage daemon) + |- tconsole (Tcl/tk console program -- not yet working) + |- testprogs (test programs -- normally only in Kern's tree) + |- tools (Various tool programs) + |- win32 (Native Win32 File daemon) + |- baculafd (Visual Studio project file) + |- compat (compatibility interface library) + |- filed (links to src/filed) + |- findlib (links to src/findlib) + |- lib (links to src/lib) + |- console (beginning of native console program) + |- wx-console (wxWidget console Win32 specific parts) + |- wx-console (wxWidgets console main source program) + +Project regress: +|- regress (Regression scripts) + |- bin (temporary directory to hold Bacula installed binaries) + |- build (temporary directory to hold Bacula source) + |- scripts (scripts and .conf files) + |- tests (test scripts) + |- tmp (temporary directory for temp files) + |- working (temporary working directory for Bacula daemons) + +Project docs: +|- docs (documentation directory) + |- developers (Developer's guide) + |- home-page (Bacula's home page source) + |- manual (html document directory) + |- manual-fr (French translation) + |- manual-de (German translation) + |- techlogs (Technical development notes); + +Project rescue: +|- rescue (Bacula rescue CDROM) + |- linux (Linux rescue CDROM) + |- cdrom (Linux rescue CDROM code) + ... + |- solaris (Solaris rescue -- incomplete) + |- freebsd (FreeBSD rescue -- incomplete) + +Project gui: +|- gui (Bacula GUI projects) + |- bacula-web (Bacula web php management code) + |- bimagemgr (Web application for burning CDROMs) + + +\end{verbatim} +\normalsize + +\subsection{Header Files} +\index{Header Files} +\index{Files!Header} +\addcontentsline{toc}{subsubsection}{Header Files} + +Please carefully follow the scheme defined below as it permits in general only +two header file includes per C file, and thus vastly simplifies programming. +With a large complex project like Bacula, it isn't always easy to ensure that +the right headers are invoked in the right order (there are a few kludges to +make this happen -- i.e. in a few include files because of the chicken and egg +problem, certain references to typedefs had to be replaced with {\bf void} ). + +Every file should include {\bf bacula.h}. It pulls in just about everything, +with very few exceptions. If you have system dependent ifdefing, please do it +in {\bf baconfig.h}. The version number and date are kept in {\bf version.h}. + +Each of the subdirectories (console, cats, dird, filed, findlib, lib, stored, +...) contains a single directory dependent include file generally the name of +the directory, which should be included just after the include of {\bf +bacula.h}. This file (for example, for the dird directory, it is {\bf dird.h}) +contains either definitions of things generally needed in this directory, or +it includes the appropriate header files. It always includes {\bf protos.h}. +See below. + +Each subdirectory contains a header file named {\bf protos.h}, which contains +the prototypes for subroutines exported by files in that directory. {\bf +protos.h} is always included by the main directory dependent include file. + +\subsection{Programming Standards} +\index{Standards!Programming} +\index{Programming Standards} +\addcontentsline{toc}{subsubsection}{Programming Standards} + +For the most part, all code should be written in C unless there is a burning +reason to use C++, and then only the simplest C++ constructs will be used. +Note, Bacula is slowly evolving to use more and more C++. + +Code should have some documentation -- not a lot, but enough so that I can +understand it. Look at the current code, and you will see that I document more +than most, but am definitely not a fanatic. + +We prefer simple linear code where possible. Gotos are strongly discouraged +except for handling an error to either bail out or to retry some code, and +such use of gotos can vastly simplify the program. + +Remember this is a C program that is migrating to a {\bf tiny} subset of C++, +so be conservative in your use of C++ features. + +\subsection{Do Not Use} +\index{Use!Do Not} +\index{Do Not Use} +\addcontentsline{toc}{subsubsection}{Do Not Use} + +\begin{itemize} + \item STL -- it is totally incomprehensible. +\end{itemize} + +\subsection{Avoid if Possible} +\index{Possible!Avoid if} +\index{Avoid if Possible} +\addcontentsline{toc}{subsubsection}{Avoid if Possible} + +\begin{itemize} +\item Using {\bf void *} because this generally means that one must + using casting, and in C++ casting is rather ugly. It is OK to use + void * to pass structure address where the structure is not known + to the routines accepting the packet (typically callback routines). + However, declaring "void *buf" is a bad idea. Please use the + correct types whenever possible. + +\item Using undefined storage specifications such as (short, int, long, + long long, size\_t ...). The problem with all these is that the number of bytes + they allocate depends on the compiler and the system. Instead use + Bacula's types (int8\_t, uint8\_t, int32\_t, uint32\_t, int64\_t, and + uint64\_t). This guarantees that the variables are given exactly the + size you want. Please try at all possible to avoid using size\_t ssize\_t + and the such. They are very system dependent. However, some system + routines may need them, so their use is often unavoidable. + +\item Returning a malloc'ed buffer from a subroutine -- someone will forget + to release it. + +\item Heap allocation (malloc) unless needed -- it is expensive. Use + POOL\_MEM instead. + +\item Templates -- they can create portability problems. + +\item Fancy or tricky C or C++ code, unless you give a good explanation of + why you used it. + +\item Too much inheritance -- it can complicate the code, and make reading it + difficult (unless you are in love with colons) + +\end{itemize} + +\subsection{Do Use Whenever Possible} +\index{Possible!Do Use Whenever} +\index{Do Use Whenever Possible} +\addcontentsline{toc}{subsubsection}{Do Use Whenever Possible} + +\begin{itemize} +\item Locking and unlocking within a single subroutine. + +\item A single point of exit from all subroutines. A goto is + perfectly OK to use to get out early, but only to a label + named bail\_out, and possibly an ok\_out. See current code + examples. + +\item Malloc and free within a single subroutine. + +\item Comments and global explanations on what your code or algorithm does. + +\end{itemize} + +\subsection{Indenting Standards} +\index{Standards!Indenting} +\index{Indenting Standards} +\addcontentsline{toc}{subsubsection}{Indenting Standards} + +We find it very hard to read code indented 8 columns at a time. +Even 4 at a time uses a lot of space, so we have adopted indenting +3 spaces at every level. Note, indention is the visual appearance of the +source on the page, while tabbing is replacing a series of up to 8 spaces from +a tab character. + +The closest set of parameters for the Linux {\bf indent} program that will +produce reasonably indented code are: + +\footnotesize +\begin{verbatim} +-nbad -bap -bbo -nbc -br -brs -c36 -cd36 -ncdb -ce -ci3 -cli0 +-cp36 -d0 -di1 -ndj -nfc1 -nfca -hnl -i3 -ip0 -l85 -lp -npcs +-nprs -npsl -saf -sai -saw -nsob -nss -nbc -ncs -nbfda +\end{verbatim} +\normalsize + +You can put the above in your .indent.pro file, and then just invoke indent on +your file. However, be warned. This does not produce perfect indenting, and it +will mess up C++ class statements pretty badly. + +Braces are required in all if statements (missing in some very old code). To +avoid generating too many lines, the first brace appears on the first line +(e.g. of an if), and the closing brace is on a line by itself. E.g. + +\footnotesize +\begin{verbatim} + if (abc) { + some_code; + } +\end{verbatim} +\normalsize + +Just follow the convention in the code. For example we I prefer non-indented cases. + +\footnotesize +\begin{verbatim} + switch (code) { + case 'A': + do something + break; + case 'B': + again(); + break; + default: + break; + } +\end{verbatim} +\normalsize + +Avoid using // style comments except for temporary code or turning off debug +code. Standard C comments are preferred (this also keeps the code closer to +C). + +Attempt to keep all lines less than 85 characters long so that the whole line +of code is readable at one time. This is not a rigid requirement. + +Always put a brief description at the top of any new file created describing +what it does and including your name and the date it was first written. Please +don't forget any Copyrights and acknowledgments if it isn't 100\% your code. +Also, include the Bacula copyright notice that is in {\bf src/c}. + +In general you should have two includes at the top of the an include for the +particular directory the code is in, for includes are needed, but this should +be rare. + +In general (except for self-contained packages), prototypes should all be put +in {\bf protos.h} in each directory. + +Always put space around assignment and comparison operators. + +\footnotesize +\begin{verbatim} + a = 1; + if (b >= 2) { + cleanup(); + } +\end{verbatim} +\normalsize + +but your can compress things in a {\bf for} statement: + +\footnotesize +\begin{verbatim} + for (i=0; i < del.num_ids; i++) { + ... +\end{verbatim} +\normalsize + +Don't overuse the inline if (?:). A full {\bf if} is preferred, except in a +print statement, e.g.: + +\footnotesize +\begin{verbatim} + if (ua->verbose \&& del.num_del != 0) { + bsendmsg(ua, _("Pruned %d %s on Volume %s from catalog.\n"), del.num_del, + del.num_del == 1 ? "Job" : "Jobs", mr->VolumeName); + } +\end{verbatim} +\normalsize + +Leave a certain amount of debug code (Dmsg) in code you submit, so that future +problems can be identified. This is particularly true for complicated code +likely to break. However, try to keep the debug code to a minimum to avoid +bloating the program and above all to keep the code readable. + +Please keep the same style in all new code you develop. If you include code +previously written, you have the option of leaving it with the old indenting +or re-indenting it. If the old code is indented with 8 spaces, then please +re-indent it to Bacula standards. + +If you are using {\bf vim}, simply set your tabstop to 8 and your shiftwidth +to 3. + +\subsection{Tabbing} +\index{Tabbing} +\addcontentsline{toc}{subsubsection}{Tabbing} + +Tabbing (inserting the tab character in place of spaces) is as normal on all +Unix systems -- a tab is converted space up to the next column multiple of 8. +My editor converts strings of spaces to tabs automatically -- this results in +significant compression of the files. Thus, you can remove tabs by replacing +them with spaces if you wish. Please don't confuse tabbing (use of tab +characters) with indenting (visual alignment of the code). + +\subsection{Don'ts} +\index{Don'ts} +\addcontentsline{toc}{subsubsection}{Don'ts} + +Please don't use: + +\footnotesize +\begin{verbatim} +strcpy() +strcat() +strncpy() +strncat(); +sprintf() +snprintf() +\end{verbatim} +\normalsize + +They are system dependent and un-safe. These should be replaced by the Bacula +safe equivalents: + +\footnotesize +\begin{verbatim} +char *bstrncpy(char *dest, char *source, int dest_size); +char *bstrncat(char *dest, char *source, int dest_size); +int bsnprintf(char *buf, int32_t buf_len, const char *fmt, ...); +int bvsnprintf(char *str, int32_t size, const char *format, va_list ap); +\end{verbatim} +\normalsize + +See src/lib/bsys.c for more details on these routines. + +Don't use the {\bf \%lld} or the {\bf \%q} printf format editing types to edit +64 bit integers -- they are not portable. Instead, use {\bf \%s} with {\bf +edit\_uint64()}. For example: + +\footnotesize +\begin{verbatim} + char buf[100]; + uint64_t num = something; + char ed1[50]; + bsnprintf(buf, sizeof(buf), "Num=%s\n", edit_uint64(num, ed1)); +\end{verbatim} +\normalsize + +Note: {\bf \%lld} is now permitted in Bacula code -- we have our +own printf routines which handle it correctly. The edit\_uint64() subroutine +can still be used if you wish, but over time, most of that old style will +be removed. + +The edit buffer {\bf ed1} must be at least 27 bytes long to avoid overflow. +See src/lib/edit.c for more details. If you look at the code, don't start +screaming that I use {\bf lld}. I actually use subtle trick taught to me by +John Walker. The {\bf lld} that appears in the editing routine is actually +{\bf \#define} to a what is needed on your OS (usually ``lld'' or ``q'') and +is defined in autoconf/configure.in for each OS. C string concatenation causes +the appropriate string to be concatenated to the ``\%''. + +Also please don't use the STL or Templates or any complicated C++ code. + +\subsection{Message Classes} +\index{Classes!Message} +\index{Message Classes} +\addcontentsline{toc}{subsubsection}{Message Classes} + +Currently, there are five classes of messages: Debug, Error, Job, Memory, +and Queued. + +\subsection{Debug Messages} +\index{Messages!Debug} +\index{Debug Messages} +\addcontentsline{toc}{subsubsection}{Debug Messages} + +Debug messages are designed to be turned on at a specified debug level and are +always sent to STDOUT. There are designed to only be used in the development +debug process. They are coded as: + +DmsgN(level, message, arg1, ...) where the N is a number indicating how many +arguments are to be substituted into the message (i.e. it is a count of the +number arguments you have in your message -- generally the number of percent +signs (\%)). {\bf level} is the debug level at which you wish the message to +be printed. message is the debug message to be printed, and arg1, ... are the +arguments to be substituted. Since not all compilers support \#defines with +varargs, you must explicitly specify how many arguments you have. + +When the debug message is printed, it will automatically be prefixed by the +name of the daemon which is running, the filename where the Dmsg is, and the +line number within the file. + +Some actual examples are: + +Dmsg2(20, ``MD5len=\%d MD5=\%s\textbackslash{}n'', strlen(buf), buf); + +Dmsg1(9, ``Created client \%s record\textbackslash{}n'', client->hdr.name); + +\subsection{Error Messages} +\index{Messages!Error} +\index{Error Messages} +\addcontentsline{toc}{subsubsection}{Error Messages} + +Error messages are messages that are related to the daemon as a whole rather +than a particular job. For example, an out of memory condition my generate an +error message. They should be very rarely needed. In general, you should be +using Job and Job Queued messages (Jmsg and Qmsg). They are coded as: + +EmsgN(error-code, level, message, arg1, ...) As with debug messages, you must +explicitly code the of arguments to be substituted in the message. error-code +indicates the severity or class of error, and it may be one of the following: + +\addcontentsline{lot}{table}{Message Error Code Classes} +\begin{longtable}{lp{3in}} +{{\bf M\_ABORT} } & {Causes the daemon to immediately abort. This should be +used only in extreme cases. It attempts to produce a traceback. } \\ +{{\bf M\_ERROR\_TERM} } & {Causes the daemon to immediately terminate. This +should be used only in extreme cases. It does not produce a traceback. } \\ +{{\bf M\_FATAL} } & {Causes the daemon to terminate the current job, but the +daemon keeps running } \\ +{{\bf M\_ERROR} } & {Reports the error. The daemon and the job continue +running } \\ +{{\bf M\_WARNING} } & {Reports an warning message. The daemon and the job +continue running } \\ +{{\bf M\_INFO} } & {Reports an informational message.} + +\end{longtable} + +There are other error message classes, but they are in a state of being +redesigned or deprecated, so please do not use them. Some actual examples are: + + +Emsg1(M\_ABORT, 0, ``Cannot create message thread: \%s\textbackslash{}n'', +strerror(status)); + +Emsg3(M\_WARNING, 0, ``Connect to File daemon \%s at \%s:\%d failed. Retrying +...\textbackslash{}n'', client-\gt{}hdr.name, client-\gt{}address, +client-\gt{}port); + +Emsg3(M\_FATAL, 0, ``bdird\lt{}filed: bad response from Filed to \%s command: +\%d \%s\textbackslash{}n'', cmd, n, strerror(errno)); + +\subsection{Job Messages} +\index{Job Messages} +\index{Messages!Job} +\addcontentsline{toc}{subsubsection}{Job Messages} + +Job messages are messages that pertain to a particular job such as a file that +could not be saved, or the number of files and bytes that were saved. They +Are coded as: +\begin{verbatim} +Jmsg(jcr, M\_FATAL, 0, "Text of message"); +\end{verbatim} +A Jmsg with M\_FATAL will fail the job. The Jmsg() takes varargs so can +have any number of arguments for substituted in a printf like format. +Output from the Jmsg() will go to the Job report. +
+If the Jmsg is followed with a number such as Jmsg1(...), the number +indicates the number of arguments to be substituted (varargs is not +standard for \#defines), and what is more important is that the file and +line number will be prefixed to the message. This permits a sort of debug +from user's output. + +\subsection{Queued Job Messages} +\index{Queued Job Messages} +\index{Messages!Job} +\addcontentsline{toc}{subsubsection}{Queued Job Messages} +Queued Job messages are similar to Jmsg()s except that the message is +Queued rather than immediately dispatched. This is necessary within the +network subroutines and in the message editing routines. This is to prevent +recursive loops, and to ensure that messages can be delivered even in the +event of a network error. + + +\subsection{Memory Messages} +\index{Messages!Memory} +\index{Memory Messages} +\addcontentsline{toc}{subsubsection}{Memory Messages} + +Memory messages are messages that are edited into a memory buffer. Generally +they are used in low level routines such as the low level device file dev.c in +the Storage daemon or in the low level Catalog routines. These routines do not +generally have access to the Job Control Record and so they return error +essages reformatted in a memory buffer. Mmsg() is the way to do this. + +\subsection{Bugs Database} +\index{Database!Bugs} +\index{Bugs Database} +\addcontentsline{toc}{subsubsection}{Bugs Database} +We have a bugs database which is at: +\elink{http://bugs.bacula.org}{http://bugs.bacula.org}, and as +a developer you will need to respond to bugs, perhaps bugs in general +if you have time, otherwise just bugs that correspond to code that +you wrote. + +If you need to answer bugs, please be sure to ask the Project Manager +(currently Kern) to give you Developer access to the bugs database. This +allows you to modify statuses and close bugs. + +The first thing is if you want to take over a bug, rather than just make a +note, you should assign the bug to yourself. This helps other developers +know that you are the principal person to deal with the bug. You can do so +by going into the bug and clicking on the {\bf Update Issue} button. Then +you simply go to the {\bf Assigned To} box and select your name from the +drop down box. To actually update it you must click on the {\bf Update +Information} button a bit further down on the screen, but if you have other +things to do such as add a Note, you might wait before clicking on the {\bf +Update Information} button. + +Generally, we set the {\bf Status} field to either acknowledged, confirmed, +or feedback when we first start working on the bug. Feedback is set when +we expect that the user should give us more information. + +Normally, once you are reasonably sure that the bug is fixed, and a patch +is made and attached to the bug report, and/or in the SVN, you can close +the bug. If you want the user to test the patch, then leave the bug open, +otherwise close it and set {\bf Resolution} to {\bf Fixed}. We generally +close bug reports rather quickly, even without confirmation, especially if +we have run tests and can see that for us the problem is fixed. However, +in doing so, it avoids misunderstandings if you leave a note while you are +closing the bug that says something to the following effect: +We are closing this bug because ... If for some reason, it does not fix +your problem, please feel free to reopen it, or to open a new bug report +describing the problem". + +We do not recommend that you attempt to edit any of the bug notes that have +been submitted, nor to delete them or make them private. In fact, if +someone accidentally makes a bug note private, you should ask the reason +and if at all possible (with his agreement) make the bug note public. + +If the user has not properly filled in most of the important fields +(platorm, OS, Product Version, ...) please do not hesitate to politely ask +him. Also, if the bug report is a request for a new feature, please +politely send the user to the Feature Request menu item on www.bacula.org. +The same applies to a support request (we answer only bugs), you might give +the user a tip, but please politely refer him to the manual and the +Getting Support page of www.bacula.org. diff --git a/docs/manuals/es/concepts/index.perl b/docs/manuals/de/old/developers/index.perl similarity index 100% rename from docs/manuals/es/concepts/index.perl rename to docs/manuals/de/old/developers/index.perl diff --git a/docs/manuals/es/concepts/latex2html-init.pl b/docs/manuals/de/old/developers/latex2html-init.pl similarity index 100% rename from docs/manuals/es/concepts/latex2html-init.pl rename to docs/manuals/de/old/developers/latex2html-init.pl diff --git a/docs/manuals/de/old/developers/md5.tex b/docs/manuals/de/old/developers/md5.tex new file mode 100644 index 00000000..aed995b4 --- /dev/null +++ b/docs/manuals/de/old/developers/md5.tex @@ -0,0 +1,184 @@ +%% +%% + +\chapter{Bacula MD5 Algorithm} +\label{MD5Chapter} +\addcontentsline{toc}{section}{} + +\section{Command Line Message Digest Utility } +\index{Utility!Command Line Message Digest } +\index{Command Line Message Digest Utility } +\addcontentsline{toc}{subsection}{Command Line Message Digest Utility} + + +This page describes {\bf md5}, a command line utility usable on either Unix or +MS-DOS/Windows, which generates and verifies message digests (digital +signatures) using the MD5 algorithm. This program can be useful when +developing shell scripts or Perl programs for software installation, file +comparison, and detection of file corruption and tampering. + +\subsection{Name} +\index{Name} +\addcontentsline{toc}{subsubsection}{Name} + +{\bf md5} - generate / check MD5 message digest + +\subsection{Synopsis} +\index{Synopsis } +\addcontentsline{toc}{subsubsection}{Synopsis} + +{\bf md5} [ {\bf -c}{\it signature} ] [ {\bf -u} ] [ {\bf -d}{\it input\_text} +| {\it infile} ] [ {\it outfile} ] + +\subsection{Description} +\index{Description } +\addcontentsline{toc}{subsubsection}{Description} + +A {\it message digest} is a compact digital signature for an arbitrarily long +stream of binary data. An ideal message digest algorithm would never generate +the same signature for two different sets of input, but achieving such +theoretical perfection would require a message digest as long as the input +file. Practical message digest algorithms compromise in favour of a digital +signature of modest size created with an algorithm designed to make +preparation of input text with a given signature computationally infeasible. +Message digest algorithms have much in common with techniques used in +encryption, but to a different end; verification that data have not been +altered since the signature was published. + +Many older programs requiring digital signatures employed 16 or 32 bit {\it +cyclical redundancy codes} (CRC) originally developed to verify correct +transmission in data communication protocols, but these short codes, while +adequate to detect the kind of transmission errors for which they were +intended, are insufficiently secure for applications such as electronic +commerce and verification of security related software distributions. + +The most commonly used present-day message digest algorithm is the 128 bit MD5 +algorithm, developed by Ron Rivest of the +\elink{MIT}{http://web.mit.edu/} +\elink{Laboratory for Computer Science}{http://www.lcs.mit.edu/} and +\elink{RSA Data Security, Inc.}{http://www.rsa.com/} The algorithm, with a +reference implementation, was published as Internet +\elink{RFC 1321}{http://www.fourmilab.ch/md5/rfc1321.html} in April 1992, and +was placed into the public domain at that time. Message digest algorithms such +as MD5 are not deemed ``encryption technology'' and are not subject to the +export controls some governments impose on other data security products. +(Obviously, the responsibility for obeying the laws in the jurisdiction in +which you reside is entirely your own, but many common Web and Mail utilities +use MD5, and I am unaware of any restrictions on their distribution and use.) + +The MD5 algorithm has been implemented in numerous computer languages +including C, +\elink{Perl}{http://www.perl.org/}, and +\elink{Java}{http://www.javasoft.com/}; if you're writing a program in such a +language, track down a suitable subroutine and incorporate it into your +program. The program described on this page is a {\it command line} +implementation of MD5, intended for use in shell scripts and Perl programs (it +is much faster than computing an MD5 signature directly in Perl). This {\bf +md5} program was originally developed as part of a suite of tools intended to +monitor large collections of files (for example, the contents of a Web site) +to detect corruption of files and inadvertent (or perhaps malicious) changes. +That task is now best accomplished with more comprehensive packages such as +\elink{Tripwire}{ftp://coast.cs.purdue.edu/pub/COAST/Tripwire/}, but the +command line {\bf md5} component continues to prove useful for verifying +correct delivery and installation of software packages, comparing the contents +of two different systems, and checking for changes in specific files. + +\subsection{Options} +\index{Options } +\addcontentsline{toc}{subsubsection}{Options} + +\begin{description} + +\item [{\bf -c}{\it signature} ] + \index{-csignature } + Computes the signature of the specified {\it infile} or the string supplied +by the {\bf -d} option and compares it against the specified {\it signature}. +If the two signatures match, the exit status will be zero, otherwise the exit +status will be 1. No signature is written to {\it outfile} or standard +output; only the exit status is set. The signature to be checked must be +specified as 32 hexadecimal digits. + +\item [{\bf -d}{\it input\_text} ] + \index{-dinput\_text } + A signature is computed for the given {\it input\_text} (which must be quoted +if it contains white space characters) instead of input from {\it infile} or +standard input. If input is specified with the {\bf -d} option, no {\it +infile} should be specified. + +\item [{\bf -u} ] + Print how-to-call information. + \end{description} + +\subsection{Files} +\index{Files } +\addcontentsline{toc}{subsubsection}{Files} + +If no {\it infile} or {\bf -d} option is specified or {\it infile} is a single +``-'', {\bf md5} reads from standard input; if no {\it outfile} is given, or +{\it outfile} is a single ``-'', output is sent to standard output. Input and +output are processed strictly serially; consequently {\bf md5} may be used in +pipelines. + +\subsection{Bugs} +\index{Bugs } +\addcontentsline{toc}{subsubsection}{Bugs} + +The mechanism used to set standard input to binary mode may be specific to +Microsoft C; if you rebuild the DOS/Windows version of the program from source +using another compiler, be sure to verify binary files work properly when read +via redirection or a pipe. + +This program has not been tested on a machine on which {\tt int} and/or {\tt +long} are longer than 32 bits. + +\section{ +\elink{Download md5.zip}{http://www.fourmilab.ch/md5/md5.zip} (Zipped +archive)} +\index{Archive!Download md5.zip Zipped } +\index{Download md5.zip (Zipped archive) } +\addcontentsline{toc}{subsection}{Download md5.zip (Zipped archive)} + +The program is provided as +\elink{md5.zip}{http://www.fourmilab.ch/md5/md5.zip}, a +\elink{Zipped}{http://www.pkware.com/} archive containing an ready-to-run +Win32 command-line executable program, {\tt md5.exe} (compiled using Microsoft +Visual C++ 5.0), and in source code form along with a {\tt Makefile} to build +the program under Unix. + +\subsection{See Also} +\index{ALSO!SEE } +\index{See Also } +\addcontentsline{toc}{subsubsection}{SEE ALSO} + +{\bf sum}(1) + +\subsection{Exit Status} +\index{Status!Exit } +\index{Exit Status } +\addcontentsline{toc}{subsubsection}{Exit Status} + +{\bf md5} returns status 0 if processing was completed without errors, 1 if +the {\bf -c} option was specified and the given signature does not match that +of the input, and 2 if processing could not be performed at all due, for +example, to a nonexistent input file. + +\subsection{Copying} +\index{Copying } +\addcontentsline{toc}{subsubsection}{Copying} + +\begin{quote} +This software is in the public domain. Permission to use, copy, modify, and +distribute this software and its documentation for any purpose and without +fee is hereby granted, without any conditions or restrictions. This software +is provided ``as is'' without express or implied warranty. +\end{quote} + +\subsection{Acknowledgements} +\index{Acknowledgements } +\addcontentsline{toc}{subsubsection}{Acknowledgements} + +The MD5 algorithm was developed by Ron Rivest. The public domain C language +implementation used in this program was written by Colin Plumb in 1993. +{\it +\elink{by John Walker}{http://www.fourmilab.ch/} +January 6th, MIM } diff --git a/docs/manuals/de/old/developers/mediaformat.tex b/docs/manuals/de/old/developers/mediaformat.tex new file mode 100644 index 00000000..cc824f78 --- /dev/null +++ b/docs/manuals/de/old/developers/mediaformat.tex @@ -0,0 +1,1115 @@ +%% +%% + +\chapter{Storage Media Output Format} +\label{_ChapterStart9} +\index{Format!Storage Media Output} +\index{Storage Media Output Format} +\addcontentsline{toc}{section}{Storage Media Output Format} + +\section{General} +\index{General} +\addcontentsline{toc}{subsection}{General} + +This document describes the media format written by the Storage daemon. The +Storage daemon reads and writes in units of blocks. Blocks contain records. +Each block has a block header followed by records, and each record has a +record header followed by record data. + +This chapter is intended to be a technical discussion of the Media Format and +as such is not targeted at end users but rather at developers and system +administrators that want or need to know more of the working details of {\bf +Bacula}. + +\section{Definitions} +\index{Definitions} +\addcontentsline{toc}{subsection}{Definitions} + +\begin{description} + +\item [Block] + \index{Block} + A block represents the primitive unit of information that the Storage daemon +reads and writes to a physical device. Normally, for a tape device, it will +be the same as a tape block. The Storage daemon always reads and writes +blocks. A block consists of block header information followed by records. +Clients of the Storage daemon (the File daemon) normally never see blocks. +However, some of the Storage tools (bls, bscan, bextract, ...) may be use +block header information. In older Bacula tape versions, a block could +contain records (see record definition below) from multiple jobs. However, +all blocks currently written by Bacula are block level BB02, and a given +block contains records for only a single job. Different jobs simply have +their own private blocks that are intermingled with the other blocks from +other jobs on the Volume (previously the records were intermingled within +the blocks). Having only records from a single job in any give block +permitted moving the VolumeSessionId and VolumeSessionTime (see below) from +each record heading to the Block header. This has two advantages: 1. a block +can be quickly rejected based on the contents of the header without reading +all the records. 2. because there is on the average more than one record per +block, less data is written to the Volume for each job. + +\item [Record] + \index{Record} + A record consists of a Record Header, which is managed by the Storage daemon +and Record Data, which is the data received from the Client. A record is the +primitive unit of information sent to and from the Storage daemon by the +Client (File daemon) programs. The details are described below. + +\item [JobId] + \index{JobId} + A number assigned by the Director daemon for a particular job. This number +will be unique for that particular Director (Catalog). The daemons use this +number to keep track of individual jobs. Within the Storage daemon, the JobId +may not be unique if several Directors are accessing the Storage daemon +simultaneously. + +\item [Session] + \index{Session} + A Session is a concept used in the Storage daemon corresponds one to one to a +Job with the exception that each session is uniquely identified within the +Storage daemon by a unique SessionId/SessionTime pair (see below). + +\item [VolSessionId] + \index{VolSessionId} + A unique number assigned by the Storage daemon to a particular session (Job) +it is having with a File daemon. This number by itself is not unique to the +given Volume, but with the VolSessionTime, it is unique. + +\item [VolSessionTime] + \index{VolSessionTime} + A unique number assigned by the Storage daemon to a particular Storage daemon +execution. It is actually the Unix time\_t value of when the Storage daemon +began execution cast to a 32 bit unsigned integer. The combination of the +{\bf VolSessionId} and the {\bf VolSessionTime} for a given Storage daemon is +guaranteed to be unique for each Job (or session). + +\item [FileIndex] + \index{FileIndex} + A sequential number beginning at one assigned by the File daemon to the files +within a job that are sent to the Storage daemon for backup. The Storage +daemon ensures that this number is greater than zero and sequential. Note, +the Storage daemon uses negative FileIndexes to flag Session Start and End +Labels as well as End of Volume Labels. Thus, the combination of +VolSessionId, VolSessionTime, and FileIndex uniquely identifies the records +for a single file written to a Volume. + +\item [Stream] + \index{Stream} + While writing the information for any particular file to the Volume, there +can be any number of distinct pieces of information about that file, e.g. the +attributes, the file data, ... The Stream indicates what piece of data it +is, and it is an arbitrary number assigned by the File daemon to the parts +(Unix attributes, Win32 attributes, data, compressed data,\ ...) of a file +that are sent to the Storage daemon. The Storage daemon has no knowledge of +the details of a Stream; it simply represents a numbered stream of bytes. The +data for a given stream may be passed to the Storage daemon in single record, +or in multiple records. + +\item [Block Header] + \index{Block Header} + A block header consists of a block identification (``BB02''), a block length +in bytes (typically 64,512) a checksum, and sequential block number. Each +block starts with a Block Header and is followed by Records. Current block +headers also contain the VolSessionId and VolSessionTime for the records +written to that block. + +\item [Record Header] + \index{Record Header} + A record header contains the Volume Session Id, the Volume Session Time, the +FileIndex, the Stream, and the size of the data record which follows. The +Record Header is always immediately followed by a Data Record if the size +given in the Header is greater than zero. Note, for Block headers of level +BB02 (version 1.27 and later), the Record header as written to tape does not +contain the Volume Session Id and the Volume Session Time as these two +fields are stored in the BB02 Block header. The in-memory record header does +have those fields for convenience. + +\item [Data Record] + \index{Data Record} + A data record consists of a binary stream of bytes and is always preceded by +a Record Header. The details of the meaning of the binary stream of bytes are +unknown to the Storage daemon, but the Client programs (File daemon) defines +and thus knows the details of each record type. + +\item [Volume Label] + \index{Volume Label} + A label placed by the Storage daemon at the beginning of each storage volume. +It contains general information about the volume. It is written in Record +format. The Storage daemon manages Volume Labels, and if the client wants, he +may also read them. + +\item [Begin Session Label] + \index{Begin Session Label} + The Begin Session Label is a special record placed by the Storage daemon on +the storage medium as the first record of an append session job with a File +daemon. This record is useful for finding the beginning of a particular +session (Job), since no records with the same VolSessionId and VolSessionTime +will precede this record. This record is not normally visible outside of the +Storage daemon. The Begin Session Label is similar to the Volume Label except +that it contains additional information pertaining to the Session. + +\item [End Session Label] + \index{End Session Label} + The End Session Label is a special record placed by the Storage daemon on the +storage medium as the last record of an append session job with a File +daemon. The End Session Record is distinguished by a FileIndex with a value +of minus two (-2). This record is useful for detecting the end of a +particular session since no records with the same VolSessionId and +VolSessionTime will follow this record. This record is not normally visible +outside of the Storage daemon. The End Session Label is similar to the Volume +Label except that it contains additional information pertaining to the +Session. +\end{description} + +\section{Storage Daemon File Output Format} +\index{Format!Storage Daemon File Output} +\index{Storage Daemon File Output Format} +\addcontentsline{toc}{subsection}{Storage Daemon File Output Format} + +The file storage and tape storage formats are identical except that tape +records are by default blocked into blocks of 64,512 bytes, except for the +last block, which is the actual number of bytes written rounded up to a +multiple of 1024 whereas the last record of file storage is not rounded up. +The default block size of 64,512 bytes may be overridden by the user (some +older tape drives only support block sizes of 32K). Each Session written to +tape is terminated with an End of File mark (this will be removed later). +Sessions written to file are simply appended to the end of the file. + +\section{Overall Format} +\index{Format!Overall} +\index{Overall Format} +\addcontentsline{toc}{subsection}{Overall Format} + +A Bacula output file consists of Blocks of data. Each block contains a block +header followed by records. Each record consists of a record header followed +by the record data. The first record on a tape will always be the Volume Label +Record. + +No Record Header will be split across Bacula blocks. However, Record Data may +be split across any number of Bacula blocks. Obviously this will not be the +case for the Volume Label which will always be smaller than the Bacula Block +size. + +To simplify reading tapes, the Start of Session (SOS) and End of Session (EOS) +records are never split across blocks. If this is about to happen, Bacula will +write a short block before writing the session record (actually, the SOS +record should always be the first record in a block, excepting perhaps the +Volume label). + +Due to hardware limitations, the last block written to the tape may not be +fully written. If your drive permits backspace record, Bacula will backup over +the last record written on the tape, re-read it and verify that it was +correctly written. + +When a new tape is mounted Bacula will write the full contents of the +partially written block to the new tape ensuring that there is no loss of +data. When reading a tape, Bacula will discard any block that is not totally +written, thus ensuring that there is no duplication of data. In addition, +since Bacula blocks are sequentially numbered within a Job, it is easy to +ensure that no block is missing or duplicated. + +\section{Serialization} +\index{Serialization} +\addcontentsline{toc}{subsection}{Serialization} + +All Block Headers, Record Headers, and Label Records are written using +Bacula's serialization routines. These routines guarantee that the data is +written to the output volume in a machine independent format. + +\section{Block Header} +\index{Header!Block} +\index{Block Header} +\addcontentsline{toc}{subsection}{Block Header} + +The format of the Block Header (version 1.27 and later) is: + +\footnotesize +\begin{verbatim} + uint32_t CheckSum; /* Block check sum */ + uint32_t BlockSize; /* Block byte size including the header */ + uint32_t BlockNumber; /* Block number */ + char ID[4] = "BB02"; /* Identification and block level */ + uint32_t VolSessionId; /* Session Id for Job */ + uint32_t VolSessionTime; /* Session Time for Job */ +\end{verbatim} +\normalsize + +The Block header is a fixed length and fixed format and is followed by Record +Headers and Record Data. The CheckSum field is a 32 bit checksum of the block +data and the block header but not including the CheckSum field. The Block +Header is always immediately followed by a Record Header. If the tape is +damaged, a Bacula utility will be able to recover as much information as +possible from the tape by recovering blocks which are valid. The Block header +is written using the Bacula serialization routines and thus is guaranteed to +be in machine independent format. See below for version 2 of the block header. + + +\section{Record Header} +\index{Header!Record} +\index{Record Header} +\addcontentsline{toc}{subsection}{Record Header} + +Each binary data record is preceded by a Record Header. The Record Header is +fixed length and fixed format, whereas the binary data record is of variable +length. The Record Header is written using the Bacula serialization routines +and thus is guaranteed to be in machine independent format. + +The format of the Record Header (version 1.27 or later) is: + +\footnotesize +\begin{verbatim} + int32_t FileIndex; /* File index supplied by File daemon */ + int32_t Stream; /* Stream number supplied by File daemon */ + uint32_t DataSize; /* size of following data record in bytes */ +\end{verbatim} +\normalsize + +This record is followed by the binary Stream data of DataSize bytes, followed +by another Record Header record and the binary stream data. For the definitive +definition of this record, see record.h in the src/stored directory. + +Additional notes on the above: + +\begin{description} + +\item [The {\bf VolSessionId} ] + \index{VolSessionId} + is a unique sequential number that is assigned by the Storage Daemon to a +particular Job. This number is sequential since the start of execution of the +daemon. + +\item [The {\bf VolSessionTime} ] + \index{VolSessionTime} + is the time/date that the current execution of the Storage Daemon started. It +assures that the combination of VolSessionId and VolSessionTime is unique for +every jobs written to the tape, even if there was a machine crash between two +writes. + +\item [The {\bf FileIndex} ] + \index{FileIndex} + is a sequential file number within a job. The Storage daemon requires this +index to be greater than zero and sequential. Note, however, that the File +daemon may send multiple Streams for the same FileIndex. In addition, the +Storage daemon uses negative FileIndices to hold the Begin Session Label, the +End Session Label, and the End of Volume Label. + +\item [The {\bf Stream} ] + \index{Stream} + is defined by the File daemon and is used to identify separate parts of the +data saved for each file (Unix attributes, Win32 attributes, file data, +compressed file data, sparse file data, ...). The Storage Daemon has no idea +of what a Stream is or what it contains except that the Stream is required to +be a positive integer. Negative Stream numbers are used internally by the +Storage daemon to indicate that the record is a continuation of the previous +record (the previous record would not entirely fit in the block). + +For Start Session and End Session Labels (where the FileIndex is negative), +the Storage daemon uses the Stream field to contain the JobId. The current +stream definitions are: + +\footnotesize +\begin{verbatim} +#define STREAM_UNIX_ATTRIBUTES 1 /* Generic Unix attributes */ +#define STREAM_FILE_DATA 2 /* Standard uncompressed data */ +#define STREAM_MD5_SIGNATURE 3 /* MD5 signature for the file */ +#define STREAM_GZIP_DATA 4 /* GZip compressed file data */ +/* Extended Unix attributes with Win32 Extended data. Deprecated. */ +#define STREAM_UNIX_ATTRIBUTES_EX 5 /* Extended Unix attr for Win32 EX */ +#define STREAM_SPARSE_DATA 6 /* Sparse data stream */ +#define STREAM_SPARSE_GZIP_DATA 7 +#define STREAM_PROGRAM_NAMES 8 /* program names for program data */ +#define STREAM_PROGRAM_DATA 9 /* Data needing program */ +#define STREAM_SHA1_SIGNATURE 10 /* SHA1 signature for the file */ +#define STREAM_WIN32_DATA 11 /* Win32 BackupRead data */ +#define STREAM_WIN32_GZIP_DATA 12 /* Gzipped Win32 BackupRead data */ +#define STREAM_MACOS_FORK_DATA 13 /* Mac resource fork */ +#define STREAM_HFSPLUS_ATTRIBUTES 14 /* Mac OS extra attributes */ +#define STREAM_UNIX_ATTRIBUTES_ACCESS_ACL 15 /* Standard ACL attributes on UNIX */ +#define STREAM_UNIX_ATTRIBUTES_DEFAULT_ACL 16 /* Default ACL attributes on UNIX */ +\end{verbatim} +\normalsize + +\item [The {\bf DataSize} ] + \index{DataSize} + is the size in bytes of the binary data record that follows the Session +Record header. The Storage Daemon has no idea of the actual contents of the +binary data record. For standard Unix files, the data record typically +contains the file attributes or the file data. For a sparse file the first +64 bits of the file data contains the storage address for the data block. +\end{description} + +The Record Header is never split across two blocks. If there is not enough +room in a block for the full Record Header, the block is padded to the end +with zeros and the Record Header begins in the next block. The data record, on +the other hand, may be split across multiple blocks and even multiple physical +volumes. When a data record is split, the second (and possibly subsequent) +piece of the data is preceded by a new Record Header. Thus each piece of data +is always immediately preceded by a Record Header. When reading a record, if +Bacula finds only part of the data in the first record, it will automatically +read the next record and concatenate the data record to form a full data +record. + +\section{Version BB02 Block Header} +\index{Version BB02 Block Header} +\index{Header!Version BB02 Block} +\addcontentsline{toc}{subsection}{Version BB02 Block Header} + +Each session or Job has its own private block. As a consequence, the SessionId +and SessionTime are written once in each Block Header and not in the Record +Header. So, the second and current version of the Block Header BB02 is: + +\footnotesize +\begin{verbatim} + uint32_t CheckSum; /* Block check sum */ + uint32_t BlockSize; /* Block byte size including the header */ + uint32_t BlockNumber; /* Block number */ + char ID[4] = "BB02"; /* Identification and block level */ + uint32_t VolSessionId; /* Applies to all records */ + uint32_t VolSessionTime; /* contained in this block */ +\end{verbatim} +\normalsize + +As with the previous version, the BB02 Block header is a fixed length and +fixed format and is followed by Record Headers and Record Data. The CheckSum +field is a 32 bit CRC checksum of the block data and the block header but not +including the CheckSum field. The Block Header is always immediately followed +by a Record Header. If the tape is damaged, a Bacula utility will be able to +recover as much information as possible from the tape by recovering blocks +which are valid. The Block header is written using the Bacula serialization +routines and thus is guaranteed to be in machine independent format. + +\section{Version 2 Record Header} +\index{Version 2 Record Header} +\index{Header!Version 2 Record} +\addcontentsline{toc}{subsection}{Version 2 Record Header} + +Version 2 Record Header is written to the medium when using Version BB02 Block +Headers. The memory representation of the record is identical to the old BB01 +Record Header, but on the storage medium, the first two fields, namely +VolSessionId and VolSessionTime are not written. The Block Header is filled +with these values when the First user record is written (i.e. non label +record) so that when the block is written, it will have the current and unique +VolSessionId and VolSessionTime. On reading each record from the Block, the +VolSessionId and VolSessionTime is filled in the Record Header from the Block +Header. + +\section{Volume Label Format} +\index{Volume Label Format} +\index{Format!Volume Label} +\addcontentsline{toc}{subsection}{Volume Label Format} + +Tape volume labels are created by the Storage daemon in response to a {\bf +label} command given to the Console program, or alternatively by the {\bf +btape} program. created. Each volume is labeled with the following information +using the Bacula serialization routines, which guarantee machine byte order +independence. + +For Bacula versions 1.27 and later, the Volume Label Format is: + +\footnotesize +\begin{verbatim} + char Id[32]; /* Bacula 1.0 Immortal\n */ + uint32_t VerNum; /* Label version number */ + /* VerNum 11 and greater Bacula 1.27 and later */ + btime_t label_btime; /* Time/date tape labeled */ + btime_t write_btime; /* Time/date tape first written */ + /* The following are 0 in VerNum 11 and greater */ + float64_t write_date; /* Date this label written */ + float64_t write_time; /* Time this label written */ + char VolName[128]; /* Volume name */ + char PrevVolName[128]; /* Previous Volume Name */ + char PoolName[128]; /* Pool name */ + char PoolType[128]; /* Pool type */ + char MediaType[128]; /* Type of this media */ + char HostName[128]; /* Host name of writing computer */ + char LabelProg[32]; /* Label program name */ + char ProgVersion[32]; /* Program version */ + char ProgDate[32]; /* Program build date/time */ +\end{verbatim} +\normalsize + +Note, the LabelType (Volume Label, Volume PreLabel, Session Start Label, ...) +is stored in the record FileIndex field of the Record Header and does not +appear in the data part of the record. + +\section{Session Label} +\index{Label!Session} +\index{Session Label} +\addcontentsline{toc}{subsection}{Session Label} + +The Session Label is written at the beginning and end of each session as well +as the last record on the physical medium. It has the following binary format: + + +\footnotesize +\begin{verbatim} + char Id[32]; /* Bacula Immortal ... */ + uint32_t VerNum; /* Label version number */ + uint32_t JobId; /* Job id */ + uint32_t VolumeIndex; /* sequence no of vol */ + /* Prior to VerNum 11 */ + float64_t write_date; /* Date this label written */ + /* VerNum 11 and greater */ + btime_t write_btime; /* time/date record written */ + /* The following is zero VerNum 11 and greater */ + float64_t write_time; /* Time this label written */ + char PoolName[128]; /* Pool name */ + char PoolType[128]; /* Pool type */ + char JobName[128]; /* base Job name */ + char ClientName[128]; + /* Added in VerNum 10 */ + char Job[128]; /* Unique Job name */ + char FileSetName[128]; /* FileSet name */ + uint32_t JobType; + uint32_t JobLevel; +\end{verbatim} +\normalsize + +In addition, the EOS label contains: + +\footnotesize +\begin{verbatim} + /* The remainder are part of EOS label only */ + uint32_t JobFiles; + uint64_t JobBytes; + uint32_t start_block; + uint32_t end_block; + uint32_t start_file; + uint32_t end_file; + uint32_t JobErrors; +\end{verbatim} +\normalsize + +In addition, for VerNum greater than 10, the EOS label contains (in addition +to the above): + +\footnotesize +\begin{verbatim} + uint32_t JobStatus /* Job termination code */ +\end{verbatim} +\normalsize + +: Note, the LabelType (Volume Label, Volume PreLabel, Session Start Label, +...) is stored in the record FileIndex field and does not appear in the data +part of the record. Also, the Stream field of the Record Header contains the +JobId. This permits quick filtering without actually reading all the session +data in many cases. + +\section{Overall Storage Format} +\index{Format!Overall Storage} +\index{Overall Storage Format} +\addcontentsline{toc}{subsection}{Overall Storage Format} + +\footnotesize +\begin{verbatim} + Current Bacula Tape Format + 6 June 2001 + Version BB02 added 28 September 2002 + Version BB01 is the old deprecated format. + A Bacula tape is composed of tape Blocks. Each block + has a Block header followed by the block data. Block + Data consists of Records. Records consist of Record + Headers followed by Record Data. + :=======================================================: + | | + | Block Header (24 bytes) | + | | + |-------------------------------------------------------| + | | + | Record Header (12 bytes) | + | | + |-------------------------------------------------------| + | | + | Record Data | + | | + |-------------------------------------------------------| + | | + | Record Header (12 bytes) | + | | + |-------------------------------------------------------| + | | + | ... | + Block Header: the first item in each block. The format is + shown below. + Partial Data block: occurs if the data from a previous + block spills over to this block (the normal case except + for the first block on a tape). However, this partial + data block is always preceded by a record header. + Record Header: identifies the Volume Session, the Stream + and the following Record Data size. See below for format. + Record data: arbitrary binary data. + Block Header Format BB02 + :=======================================================: + | CheckSum (uint32_t) | + |-------------------------------------------------------| + | BlockSize (uint32_t) | + |-------------------------------------------------------| + | BlockNumber (uint32_t) | + |-------------------------------------------------------| + | "BB02" (char [4]) | + |-------------------------------------------------------| + | VolSessionId (uint32_t) | + |-------------------------------------------------------| + | VolSessionTime (uint32_t) | + :=======================================================: + BBO2: Serves to identify the block as a + Bacula block and also servers as a block format identifier + should we ever need to change the format. + BlockSize: is the size in bytes of the block. When reading + back a block, if the BlockSize does not agree with the + actual size read, Bacula discards the block. + CheckSum: a checksum for the Block. + BlockNumber: is the sequential block number on the tape. + VolSessionId: a unique sequential number that is assigned + by the Storage Daemon to a particular Job. + This number is sequential since the start + of execution of the daemon. + VolSessionTime: the time/date that the current execution + of the Storage Daemon started. It assures + that the combination of VolSessionId and + VolSessionTime is unique for all jobs + written to the tape, even if there was a + machine crash between two writes. + Record Header Format BB02 + :=======================================================: + | FileIndex (int32_t) | + |-------------------------------------------------------| + | Stream (int32_t) | + |-------------------------------------------------------| + | DataSize (uint32_t) | + :=======================================================: + FileIndex: a sequential file number within a job. The + Storage daemon enforces this index to be + greater than zero and sequential. Note, + however, that the File daemon may send + multiple Streams for the same FileIndex. + The Storage Daemon uses negative FileIndices + to identify Session Start and End labels + as well as the End of Volume labels. + Stream: defined by the File daemon and is intended to be + used to identify separate parts of the data + saved for each file (attributes, file data, + ...). The Storage Daemon has no idea of + what a Stream is or what it contains. + DataSize: the size in bytes of the binary data record + that follows the Session Record header. + The Storage Daemon has no idea of the + actual contents of the binary data record. + For standard Unix files, the data record + typically contains the file attributes or + the file data. For a sparse file + the first 64 bits of the data contains + the storage address for the data block. + Volume Label + :=======================================================: + | Id (32 bytes) | + |-------------------------------------------------------| + | VerNum (uint32_t) | + |-------------------------------------------------------| + | label_date (float64_t) | + | label_btime (btime_t VerNum 11 | + |-------------------------------------------------------| + | label_time (float64_t) | + | write_btime (btime_t VerNum 11 | + |-------------------------------------------------------| + | write_date (float64_t) | + | 0 (float64_t) VerNum 11 | + |-------------------------------------------------------| + | write_time (float64_t) | + | 0 (float64_t) VerNum 11 | + |-------------------------------------------------------| + | VolName (128 bytes) | + |-------------------------------------------------------| + | PrevVolName (128 bytes) | + |-------------------------------------------------------| + | PoolName (128 bytes) | + |-------------------------------------------------------| + | PoolType (128 bytes) | + |-------------------------------------------------------| + | MediaType (128 bytes) | + |-------------------------------------------------------| + | HostName (128 bytes) | + |-------------------------------------------------------| + | LabelProg (32 bytes) | + |-------------------------------------------------------| + | ProgVersion (32 bytes) | + |-------------------------------------------------------| + | ProgDate (32 bytes) | + |-------------------------------------------------------| + :=======================================================: + + Id: 32 byte Bacula identifier "Bacula 1.0 immortal\n" + (old version also recognized:) + Id: 32 byte Bacula identifier "Bacula 0.9 mortal\n" + LabelType (Saved in the FileIndex of the Header record). + PRE_LABEL -1 Volume label on unwritten tape + VOL_LABEL -2 Volume label after tape written + EOM_LABEL -3 Label at EOM (not currently implemented) + SOS_LABEL -4 Start of Session label (format given below) + EOS_LABEL -5 End of Session label (format given below) + VerNum: 11 + label_date: Julian day tape labeled + label_time: Julian time tape labeled + write_date: Julian date tape first used (data written) + write_time: Julian time tape first used (data written) + VolName: "Physical" Volume name + PrevVolName: The VolName of the previous tape (if this tape is + a continuation of the previous one). + PoolName: Pool Name + PoolType: Pool Type + MediaType: Media Type + HostName: Name of host that is first writing the tape + LabelProg: Name of the program that labeled the tape + ProgVersion: Version of the label program + ProgDate: Date Label program built + Session Label + :=======================================================: + | Id (32 bytes) | + |-------------------------------------------------------| + | VerNum (uint32_t) | + |-------------------------------------------------------| + | JobId (uint32_t) | + |-------------------------------------------------------| + | write_btime (btime_t) VerNum 11 | + |-------------------------------------------------------| + | 0 (float64_t) VerNum 11 | + |-------------------------------------------------------| + | PoolName (128 bytes) | + |-------------------------------------------------------| + | PoolType (128 bytes) | + |-------------------------------------------------------| + | JobName (128 bytes) | + |-------------------------------------------------------| + | ClientName (128 bytes) | + |-------------------------------------------------------| + | Job (128 bytes) | + |-------------------------------------------------------| + | FileSetName (128 bytes) | + |-------------------------------------------------------| + | JobType (uint32_t) | + |-------------------------------------------------------| + | JobLevel (uint32_t) | + |-------------------------------------------------------| + | FileSetMD5 (50 bytes) VerNum 11 | + |-------------------------------------------------------| + Additional fields in End Of Session Label + |-------------------------------------------------------| + | JobFiles (uint32_t) | + |-------------------------------------------------------| + | JobBytes (uint32_t) | + |-------------------------------------------------------| + | start_block (uint32_t) | + |-------------------------------------------------------| + | end_block (uint32_t) | + |-------------------------------------------------------| + | start_file (uint32_t) | + |-------------------------------------------------------| + | end_file (uint32_t) | + |-------------------------------------------------------| + | JobErrors (uint32_t) | + |-------------------------------------------------------| + | JobStatus (uint32_t) VerNum 11 | + :=======================================================: + * => fields deprecated + Id: 32 byte Bacula Identifier "Bacula 1.0 immortal\n" + LabelType (in FileIndex field of Header): + EOM_LABEL -3 Label at EOM + SOS_LABEL -4 Start of Session label + EOS_LABEL -5 End of Session label + VerNum: 11 + JobId: JobId + write_btime: Bacula time/date this tape record written + write_date: Julian date tape this record written - deprecated + write_time: Julian time tape this record written - deprecated. + PoolName: Pool Name + PoolType: Pool Type + MediaType: Media Type + ClientName: Name of File daemon or Client writing this session + Not used for EOM_LABEL. +\end{verbatim} +\normalsize + +\section{Unix File Attributes} +\index{Unix File Attributes} +\index{Attributes!Unix File} +\addcontentsline{toc}{subsection}{Unix File Attributes} + +The Unix File Attributes packet consists of the following: + +\lt{}File-Index\gt{} \lt{}Type\gt{} +\lt{}Filename\gt{}@\lt{}File-Attributes\gt{}@\lt{}Link\gt{} +@\lt{}Extended-Attributes@\gt{} where + +\begin{description} + +\item [@] + represents a byte containing a binary zero. + +\item [FileIndex] + \index{FileIndex} + is the sequential file index starting from one assigned by the File daemon. + +\item [Type] + \index{Type} + is one of the following: + +\footnotesize +\begin{verbatim} +#define FT_LNKSAVED 1 /* hard link to file already saved */ +#define FT_REGE 2 /* Regular file but empty */ +#define FT_REG 3 /* Regular file */ +#define FT_LNK 4 /* Soft Link */ +#define FT_DIR 5 /* Directory */ +#define FT_SPEC 6 /* Special file -- chr, blk, fifo, sock */ +#define FT_NOACCESS 7 /* Not able to access */ +#define FT_NOFOLLOW 8 /* Could not follow link */ +#define FT_NOSTAT 9 /* Could not stat file */ +#define FT_NOCHG 10 /* Incremental option, file not changed */ +#define FT_DIRNOCHG 11 /* Incremental option, directory not changed */ +#define FT_ISARCH 12 /* Trying to save archive file */ +#define FT_NORECURSE 13 /* No recursion into directory */ +#define FT_NOFSCHG 14 /* Different file system, prohibited */ +#define FT_NOOPEN 15 /* Could not open directory */ +#define FT_RAW 16 /* Raw block device */ +#define FT_FIFO 17 /* Raw fifo device */ +\end{verbatim} +\normalsize + +\item [Filename] + \index{Filename} + is the fully qualified filename. + +\item [File-Attributes] + \index{File-Attributes} + consists of the 13 fields of the stat() buffer in ASCII base64 format +separated by spaces. These fields and their meanings are shown below. This +stat() packet is in Unix format, and MUST be provided (constructed) for ALL +systems. + +\item [Link] + \index{Link} + when the FT code is FT\_LNK or FT\_LNKSAVED, the item in question is a Unix +link, and this field contains the fully qualified link name. When the FT code +is not FT\_LNK or FT\_LNKSAVED, this field is null. + +\item [Extended-Attributes] + \index{Extended-Attributes} + The exact format of this field is operating system dependent. It contains +additional or extended attributes of a system dependent nature. Currently, +this field is used only on WIN32 systems where it contains a ASCII base64 +representation of the WIN32\_FILE\_ATTRIBUTE\_DATA structure as defined by +Windows. The fields in the base64 representation of this structure are like +the File-Attributes separated by spaces. +\end{description} + +The File-attributes consist of the following: + +\addcontentsline{lot}{table}{File Attributes} +\begin{longtable}{|p{0.6in}|p{0.7in}|p{1in}|p{1in}|p{1.4in}|} + \hline +\multicolumn{1}{|c|}{\bf Field No. } & \multicolumn{1}{c|}{\bf Stat Name } +& \multicolumn{1}{c|}{\bf Unix } & \multicolumn{1}{c|}{\bf Win98/NT } & +\multicolumn{1}{c|}{\bf MacOS } \\ + \hline +\multicolumn{1}{|c|}{1 } & {st\_dev } & {Device number of filesystem } & +{Drive number } & {vRefNum } \\ + \hline +\multicolumn{1}{|c|}{2 } & {st\_ino } & {Inode number } & {Always 0 } & +{fileID/dirID } \\ + \hline +\multicolumn{1}{|c|}{3 } & {st\_mode } & {File mode } & {File mode } & +{777 dirs/apps; 666 docs; 444 locked docs } \\ + \hline +\multicolumn{1}{|c|}{4 } & {st\_nlink } & {Number of links to the file } & +{Number of link (only on NTFS) } & {Always 1 } \\ + \hline +\multicolumn{1}{|c|}{5 } & {st\_uid } & {Owner ID } & {Always 0 } & +{Always 0 } \\ + \hline +\multicolumn{1}{|c|}{6 } & {st\_gid } & {Group ID } & {Always 0 } & +{Always 0 } \\ + \hline +\multicolumn{1}{|c|}{7 } & {st\_rdev } & {Device ID for special files } & +{Drive No. } & {Always 0 } \\ + \hline +\multicolumn{1}{|c|}{8 } & {st\_size } & {File size in bytes } & {File +size in bytes } & {Data fork file size in bytes } \\ + \hline +\multicolumn{1}{|c|}{9 } & {st\_blksize } & {Preferred block size } & +{Always 0 } & {Preferred block size } \\ + \hline +\multicolumn{1}{|c|}{10 } & {st\_blocks } & {Number of blocks allocated } +& {Always 0 } & {Number of blocks allocated } \\ + \hline +\multicolumn{1}{|c|}{11 } & {st\_atime } & {Last access time since epoch } +& {Last access time since epoch } & {Last access time -66 years } \\ + \hline +\multicolumn{1}{|c|}{12 } & {st\_mtime } & {Last modify time since epoch } +& {Last modify time since epoch } & {Last access time -66 years } \\ + \hline +\multicolumn{1}{|c|}{13 } & {st\_ctime } & {Inode change time since epoch +} & {File create time since epoch } & {File create time -66 years} +\\ \hline + +\end{longtable} + +\section{Old Depreciated Tape Format} +\index{Old Depreciated Tape Format} +\index{Format!Old Depreciated Tape} +\addcontentsline{toc}{subsection}{Old Depreciated Tape Format} + +The format of the Block Header (version 1.26 and earlier) is: + +\footnotesize +\begin{verbatim} + uint32_t CheckSum; /* Block check sum */ + uint32_t BlockSize; /* Block byte size including the header */ + uint32_t BlockNumber; /* Block number */ + char ID[4] = "BB01"; /* Identification and block level */ +\end{verbatim} +\normalsize + +The format of the Record Header (version 1.26 or earlier) is: + +\footnotesize +\begin{verbatim} + uint32_t VolSessionId; /* Unique ID for this session */ + uint32_t VolSessionTime; /* Start time/date of session */ + int32_t FileIndex; /* File index supplied by File daemon */ + int32_t Stream; /* Stream number supplied by File daemon */ + uint32_t DataSize; /* size of following data record in bytes */ +\end{verbatim} +\normalsize + +\footnotesize +\begin{verbatim} + Current Bacula Tape Format + 6 June 2001 + Version BB01 is the old deprecated format. + A Bacula tape is composed of tape Blocks. Each block + has a Block header followed by the block data. Block + Data consists of Records. Records consist of Record + Headers followed by Record Data. + :=======================================================: + | | + | Block Header | + | (16 bytes version BB01) | + |-------------------------------------------------------| + | | + | Record Header | + | (20 bytes version BB01) | + |-------------------------------------------------------| + | | + | Record Data | + | | + |-------------------------------------------------------| + | | + | Record Header | + | (20 bytes version BB01) | + |-------------------------------------------------------| + | | + | ... | + Block Header: the first item in each block. The format is + shown below. + Partial Data block: occurs if the data from a previous + block spills over to this block (the normal case except + for the first block on a tape). However, this partial + data block is always preceded by a record header. + Record Header: identifies the Volume Session, the Stream + and the following Record Data size. See below for format. + Record data: arbitrary binary data. + Block Header Format BB01 (deprecated) + :=======================================================: + | CheckSum (uint32_t) | + |-------------------------------------------------------| + | BlockSize (uint32_t) | + |-------------------------------------------------------| + | BlockNumber (uint32_t) | + |-------------------------------------------------------| + | "BB01" (char [4]) | + :=======================================================: + BBO1: Serves to identify the block as a + Bacula block and also servers as a block format identifier + should we ever need to change the format. + BlockSize: is the size in bytes of the block. When reading + back a block, if the BlockSize does not agree with the + actual size read, Bacula discards the block. + CheckSum: a checksum for the Block. + BlockNumber: is the sequential block number on the tape. + VolSessionId: a unique sequential number that is assigned + by the Storage Daemon to a particular Job. + This number is sequential since the start + of execution of the daemon. + VolSessionTime: the time/date that the current execution + of the Storage Daemon started. It assures + that the combination of VolSessionId and + VolSessionTime is unique for all jobs + written to the tape, even if there was a + machine crash between two writes. + Record Header Format BB01 (deprecated) + :=======================================================: + | VolSessionId (uint32_t) | + |-------------------------------------------------------| + | VolSessionTime (uint32_t) | + |-------------------------------------------------------| + | FileIndex (int32_t) | + |-------------------------------------------------------| + | Stream (int32_t) | + |-------------------------------------------------------| + | DataSize (uint32_t) | + :=======================================================: + VolSessionId: a unique sequential number that is assigned + by the Storage Daemon to a particular Job. + This number is sequential since the start + of execution of the daemon. + VolSessionTime: the time/date that the current execution + of the Storage Daemon started. It assures + that the combination of VolSessionId and + VolSessionTime is unique for all jobs + written to the tape, even if there was a + machine crash between two writes. + FileIndex: a sequential file number within a job. The + Storage daemon enforces this index to be + greater than zero and sequential. Note, + however, that the File daemon may send + multiple Streams for the same FileIndex. + The Storage Daemon uses negative FileIndices + to identify Session Start and End labels + as well as the End of Volume labels. + Stream: defined by the File daemon and is intended to be + used to identify separate parts of the data + saved for each file (attributes, file data, + ...). The Storage Daemon has no idea of + what a Stream is or what it contains. + DataSize: the size in bytes of the binary data record + that follows the Session Record header. + The Storage Daemon has no idea of the + actual contents of the binary data record. + For standard Unix files, the data record + typically contains the file attributes or + the file data. For a sparse file + the first 64 bits of the data contains + the storage address for the data block. + Volume Label + :=======================================================: + | Id (32 bytes) | + |-------------------------------------------------------| + | VerNum (uint32_t) | + |-------------------------------------------------------| + | label_date (float64_t) | + |-------------------------------------------------------| + | label_time (float64_t) | + |-------------------------------------------------------| + | write_date (float64_t) | + |-------------------------------------------------------| + | write_time (float64_t) | + |-------------------------------------------------------| + | VolName (128 bytes) | + |-------------------------------------------------------| + | PrevVolName (128 bytes) | + |-------------------------------------------------------| + | PoolName (128 bytes) | + |-------------------------------------------------------| + | PoolType (128 bytes) | + |-------------------------------------------------------| + | MediaType (128 bytes) | + |-------------------------------------------------------| + | HostName (128 bytes) | + |-------------------------------------------------------| + | LabelProg (32 bytes) | + |-------------------------------------------------------| + | ProgVersion (32 bytes) | + |-------------------------------------------------------| + | ProgDate (32 bytes) | + |-------------------------------------------------------| + :=======================================================: + + Id: 32 byte Bacula identifier "Bacula 1.0 immortal\n" + (old version also recognized:) + Id: 32 byte Bacula identifier "Bacula 0.9 mortal\n" + LabelType (Saved in the FileIndex of the Header record). + PRE_LABEL -1 Volume label on unwritten tape + VOL_LABEL -2 Volume label after tape written + EOM_LABEL -3 Label at EOM (not currently implemented) + SOS_LABEL -4 Start of Session label (format given below) + EOS_LABEL -5 End of Session label (format given below) + label_date: Julian day tape labeled + label_time: Julian time tape labeled + write_date: Julian date tape first used (data written) + write_time: Julian time tape first used (data written) + VolName: "Physical" Volume name + PrevVolName: The VolName of the previous tape (if this tape is + a continuation of the previous one). + PoolName: Pool Name + PoolType: Pool Type + MediaType: Media Type + HostName: Name of host that is first writing the tape + LabelProg: Name of the program that labeled the tape + ProgVersion: Version of the label program + ProgDate: Date Label program built + Session Label + :=======================================================: + | Id (32 bytes) | + |-------------------------------------------------------| + | VerNum (uint32_t) | + |-------------------------------------------------------| + | JobId (uint32_t) | + |-------------------------------------------------------| + | *write_date (float64_t) VerNum 10 | + |-------------------------------------------------------| + | *write_time (float64_t) VerNum 10 | + |-------------------------------------------------------| + | PoolName (128 bytes) | + |-------------------------------------------------------| + | PoolType (128 bytes) | + |-------------------------------------------------------| + | JobName (128 bytes) | + |-------------------------------------------------------| + | ClientName (128 bytes) | + |-------------------------------------------------------| + | Job (128 bytes) | + |-------------------------------------------------------| + | FileSetName (128 bytes) | + |-------------------------------------------------------| + | JobType (uint32_t) | + |-------------------------------------------------------| + | JobLevel (uint32_t) | + |-------------------------------------------------------| + | FileSetMD5 (50 bytes) VerNum 11 | + |-------------------------------------------------------| + Additional fields in End Of Session Label + |-------------------------------------------------------| + | JobFiles (uint32_t) | + |-------------------------------------------------------| + | JobBytes (uint32_t) | + |-------------------------------------------------------| + | start_block (uint32_t) | + |-------------------------------------------------------| + | end_block (uint32_t) | + |-------------------------------------------------------| + | start_file (uint32_t) | + |-------------------------------------------------------| + | end_file (uint32_t) | + |-------------------------------------------------------| + | JobErrors (uint32_t) | + |-------------------------------------------------------| + | JobStatus (uint32_t) VerNum 11 | + :=======================================================: + * => fields deprecated + Id: 32 byte Bacula Identifier "Bacula 1.0 immortal\n" + LabelType (in FileIndex field of Header): + EOM_LABEL -3 Label at EOM + SOS_LABEL -4 Start of Session label + EOS_LABEL -5 End of Session label + VerNum: 11 + JobId: JobId + write_btime: Bacula time/date this tape record written + write_date: Julian date tape this record written - deprecated + write_time: Julian time tape this record written - deprecated. + PoolName: Pool Name + PoolType: Pool Type + MediaType: Media Type + ClientName: Name of File daemon or Client writing this session + Not used for EOM_LABEL. +\end{verbatim} +\normalsize diff --git a/docs/manuals/de/old/developers/mempool.tex b/docs/manuals/de/old/developers/mempool.tex new file mode 100644 index 00000000..a8130200 --- /dev/null +++ b/docs/manuals/de/old/developers/mempool.tex @@ -0,0 +1,234 @@ +%% +%% + +\chapter{Bacula Memory Management} +\label{_ChapterStart7} +\index{Management!Bacula Memory} +\index{Bacula Memory Management} +\addcontentsline{toc}{section}{Bacula Memory Management} + +\section{General} +\index{General} +\addcontentsline{toc}{subsection}{General} + +This document describes the memory management routines that are used in Bacula +and is meant to be a technical discussion for developers rather than part of +the user manual. + +Since Bacula may be called upon to handle filenames of varying and more or +less arbitrary length, special attention needs to be used in the code to +ensure that memory buffers are sufficiently large. There are four +possibilities for memory usage within {\bf Bacula}. Each will be described in +turn. They are: + +\begin{itemize} +\item Statically allocated memory. +\item Dynamically allocated memory using malloc() and free(). +\item Non-pooled memory. +\item Pooled memory. + \end{itemize} + +\subsection{Statically Allocated Memory} +\index{Statically Allocated Memory} +\index{Memory!Statically Allocated} +\addcontentsline{toc}{subsubsection}{Statically Allocated Memory} + +Statically allocated memory is of the form: + +\footnotesize +\begin{verbatim} +char buffer[MAXSTRING]; +\end{verbatim} +\normalsize + +The use of this kind of memory is discouraged except when you are 100\% sure +that the strings to be used will be of a fixed length. One example of where +this is appropriate is for {\bf Bacula} resource names, which are currently +limited to 127 characters (MAX\_NAME\_LENGTH). Although this maximum size may +change, particularly to accommodate Unicode, it will remain a relatively small +value. + +\subsection{Dynamically Allocated Memory} +\index{Dynamically Allocated Memory} +\index{Memory!Dynamically Allocated} +\addcontentsline{toc}{subsubsection}{Dynamically Allocated Memory} + +Dynamically allocated memory is obtained using the standard malloc() routines. +As in: + +\footnotesize +\begin{verbatim} +char *buf; +buf = malloc(256); +\end{verbatim} +\normalsize + +This kind of memory can be released with: + +\footnotesize +\begin{verbatim} +free(buf); +\end{verbatim} +\normalsize + +It is recommended to use this kind of memory only when you are sure that you +know the memory size needed and the memory will be used for short periods of +time -- that is it would not be appropriate to use statically allocated +memory. An example might be to obtain a large memory buffer for reading and +writing files. When {\bf SmartAlloc} is enabled, the memory obtained by +malloc() will automatically be checked for buffer overwrite (overflow) during +the free() call, and all malloc'ed memory that is not released prior to +termination of the program will be reported as Orphaned memory. + +\subsection{Pooled and Non-pooled Memory} +\index{Memory!Pooled and Non-pooled} +\index{Pooled and Non-pooled Memory} +\addcontentsline{toc}{subsubsection}{Pooled and Non-pooled Memory} + +In order to facility the handling of arbitrary length filenames and to +efficiently handle a high volume of dynamic memory usage, we have implemented +routines between the C code and the malloc routines. The first is called +``Pooled'' memory, and is memory, which once allocated and then released, is +not returned to the system memory pool, but rather retained in a Bacula memory +pool. The next request to acquire pooled memory will return any free memory +block. In addition, each memory block has its current size associated with the +block allowing for easy checking if the buffer is of sufficient size. This +kind of memory would normally be used in high volume situations (lots of +malloc()s and free()s) where the buffer length may have to frequently change +to adapt to varying filename lengths. + +The non-pooled memory is handled by routines similar to those used for pooled +memory, allowing for easy size checking. However, non-pooled memory is +returned to the system rather than being saved in the Bacula pool. This kind +of memory would normally be used in low volume situations (few malloc()s and +free()s), but where the size of the buffer might have to be adjusted +frequently. + +\paragraph*{Types of Memory Pool:} + +Currently there are three memory pool types: + +\begin{itemize} +\item PM\_NOPOOL -- non-pooled memory. +\item PM\_FNAME -- a filename pool. +\item PM\_MESSAGE -- a message buffer pool. +\item PM\_EMSG -- error message buffer pool. + \end{itemize} + +\paragraph*{Getting Memory:} + +To get memory, one uses: + +\footnotesize +\begin{verbatim} +void *get_pool_memory(pool); +\end{verbatim} +\normalsize + +where {\bf pool} is one of the above mentioned pool names. The size of the +memory returned will be determined by the system to be most appropriate for +the application. + +If you wish non-pooled memory, you may alternatively call: + +\footnotesize +\begin{verbatim} +void *get_memory(size_t size); +\end{verbatim} +\normalsize + +The buffer length will be set to the size specified, and it will be assigned +to the PM\_NOPOOL pool (no pooling). + +\paragraph*{Releasing Memory:} + +To free memory acquired by either of the above two calls, use: + +\footnotesize +\begin{verbatim} +void free_pool_memory(void *buffer); +\end{verbatim} +\normalsize + +where buffer is the memory buffer returned when the memory was acquired. If +the memory was originally allocated as type PM\_NOPOOL, it will be released to +the system, otherwise, it will be placed on the appropriate Bacula memory pool +free chain to be used in a subsequent call for memory from that pool. + +\paragraph*{Determining the Memory Size:} + +To determine the memory buffer size, use: + +\footnotesize +\begin{verbatim} +size_t sizeof_pool_memory(void *buffer); +\end{verbatim} +\normalsize + +\paragraph*{Resizing Pool Memory:} + +To resize pool memory, use: + +\footnotesize +\begin{verbatim} +void *realloc_pool_memory(void *buffer); +\end{verbatim} +\normalsize + +The buffer will be reallocated, and the contents of the original buffer will +be preserved, but the address of the buffer may change. + +\paragraph*{Automatic Size Adjustment:} + +To have the system check and if necessary adjust the size of your pooled +memory buffer, use: + +\footnotesize +\begin{verbatim} +void *check_pool_memory_size(void *buffer, size_t new-size); +\end{verbatim} +\normalsize + +where {\bf new-size} is the buffer length needed. Note, if the buffer is +already equal to or larger than {\bf new-size} no buffer size change will +occur. However, if a buffer size change is needed, the original contents of +the buffer will be preserved, but the buffer address may change. Many of the +low level Bacula subroutines expect to be passed a pool memory buffer and use +this call to ensure the buffer they use is sufficiently large. + +\paragraph*{Releasing All Pooled Memory:} + +In order to avoid orphaned buffer error messages when terminating the program, +use: + +\footnotesize +\begin{verbatim} +void close_memory_pool(); +\end{verbatim} +\normalsize + +to free all unused memory retained in the Bacula memory pool. Note, any memory +not returned to the pool via free\_pool\_memory() will not be released by this +call. + +\paragraph*{Pooled Memory Statistics:} + +For debugging purposes and performance tuning, the following call will print +the current memory pool statistics: + +\footnotesize +\begin{verbatim} +void print_memory_pool_stats(); +\end{verbatim} +\normalsize + +an example output is: + +\footnotesize +\begin{verbatim} +Pool Maxsize Maxused Inuse + 0 256 0 0 + 1 256 1 0 + 2 256 1 0 +\end{verbatim} +\normalsize diff --git a/docs/manuals/de/old/developers/netprotocol.tex b/docs/manuals/de/old/developers/netprotocol.tex new file mode 100644 index 00000000..45c2a8ed --- /dev/null +++ b/docs/manuals/de/old/developers/netprotocol.tex @@ -0,0 +1,224 @@ +%% +%% + +\chapter{TCP/IP Network Protocol} +\label{_ChapterStart5} +\index{TCP/IP Network Protocol} +\index{Protocol!TCP/IP Network} +\addcontentsline{toc}{section}{TCP/IP Network Protocol} + +\section{General} +\index{General} +\addcontentsline{toc}{subsection}{General} + +This document describes the TCP/IP protocol used by Bacula to communicate +between the various daemons and services. The definitive definition of the +protocol can be found in src/lib/bsock.h, src/lib/bnet.c and +src/lib/bnet\_server.c. + +Bacula's network protocol is basically a ``packet oriented'' protocol built on +a standard TCP/IP streams. At the lowest level all packet transfers are done +with read() and write() requests on system sockets. Pipes are not used as they +are considered unreliable for large serial data transfers between various +hosts. + +Using the routines described below (bnet\_open, bnet\_write, bnet\_recv, and +bnet\_close) guarantees that the number of bytes you write into the socket +will be received as a single record on the other end regardless of how many +low level write() and read() calls are needed. All data transferred are +considered to be binary data. + +\section{bnet and Threads} +\index{Threads!bnet and} +\index{Bnet and Threads} +\addcontentsline{toc}{subsection}{bnet and Threads} + +These bnet routines work fine in a threaded environment. However, they assume +that there is only one reader or writer on the socket at any time. It is +highly recommended that only a single thread access any BSOCK packet. The +exception to this rule is when the socket is first opened and it is waiting +for a job to start. The wait in the Storage daemon is done in one thread and +then passed to another thread for subsequent handling. + +If you envision having two threads using the same BSOCK, think twice, then you +must implement some locking mechanism. However, it probably would not be +appropriate to put locks inside the bnet subroutines for efficiency reasons. + +\section{bnet\_open} +\index{Bnet\_open} +\addcontentsline{toc}{subsection}{bnet\_open} + +To establish a connection to a server, use the subroutine: + +BSOCK *bnet\_open(void *jcr, char *host, char *service, int port, int *fatal) +bnet\_open(), if successful, returns the Bacula sock descriptor pointer to be +used in subsequent bnet\_send() and bnet\_read() requests. If not successful, +bnet\_open() returns a NULL. If fatal is set on return, it means that a fatal +error occurred and that you should not repeatedly call bnet\_open(). Any error +message will generally be sent to the JCR. + +\section{bnet\_send} +\index{Bnet\_send} +\addcontentsline{toc}{subsection}{bnet\_send} + +To send a packet, one uses the subroutine: + +int bnet\_send(BSOCK *sock) This routine is equivalent to a write() except +that it handles the low level details. The data to be sent is expected to be +in sock-\gt{}msg and be sock-\gt{}msglen bytes. To send a packet, bnet\_send() +first writes four bytes in network byte order than indicate the size of the +following data packet. It returns: + +\footnotesize +\begin{verbatim} + Returns 0 on failure + Returns 1 on success +\end{verbatim} +\normalsize + +In the case of a failure, an error message will be sent to the JCR contained +within the bsock packet. + +\section{bnet\_fsend} +\index{Bnet\_fsend} +\addcontentsline{toc}{subsection}{bnet\_fsend} + +This form uses: + +int bnet\_fsend(BSOCK *sock, char *format, ...) and it allows you to send a +formatted messages somewhat like fprintf(). The return status is the same as +bnet\_send. + +\section{Additional Error information} +\index{Information!Additional Error} +\index{Additional Error information} +\addcontentsline{toc}{subsection}{Additional Error information} + +Fro additional error information, you can call {\bf is\_bnet\_error(BSOCK +*bsock)} which will return 0 if there is no error or non-zero if there is an +error on the last transmission. The {\bf is\_bnet\_stop(BSOCK *bsock)} +function will return 0 if there no errors and you can continue sending. It +will return non-zero if there are errors or the line is closed (no more +transmissions should be sent). + +\section{bnet\_recv} +\index{Bnet\_recv} +\addcontentsline{toc}{subsection}{bnet\_recv} + +To read a packet, one uses the subroutine: + +int bnet\_recv(BSOCK *sock) This routine is similar to a read() except that it +handles the low level details. bnet\_read() first reads packet length that +follows as four bytes in network byte order. The data is read into +sock-\gt{}msg and is sock-\gt{}msglen bytes. If the sock-\gt{}msg is not large +enough, bnet\_recv() realloc() the buffer. It will return an error (-2) if +maxbytes is less than the record size sent. It returns: + +\footnotesize +\begin{verbatim} + * Returns number of bytes read + * Returns 0 on end of file + * Returns -1 on hard end of file (i.e. network connection close) + * Returns -2 on error +\end{verbatim} +\normalsize + +It should be noted that bnet\_recv() is a blocking read. + +\section{bnet\_sig} +\index{Bnet\_sig} +\addcontentsline{toc}{subsection}{bnet\_sig} + +To send a ``signal'' from one daemon to another, one uses the subroutine: + +int bnet\_sig(BSOCK *sock, SIGNAL) where SIGNAL is one of the following: + +\begin{enumerate} +\item BNET\_EOF - deprecated use BNET\_EOD +\item BNET\_EOD - End of data stream, new data may follow +\item BNET\_EOD\_POLL - End of data and poll all in one +\item BNET\_STATUS - Request full status +\item BNET\_TERMINATE - Conversation terminated, doing close() +\item BNET\_POLL - Poll request, I'm hanging on a read +\item BNET\_HEARTBEAT - Heartbeat Response requested +\item BNET\_HB\_RESPONSE - Only response permitted to HB +\item BNET\_PROMPT - Prompt for UA + \end{enumerate} + +\section{bnet\_strerror} +\index{Bnet\_strerror} +\addcontentsline{toc}{subsection}{bnet\_strerror} + +Returns a formated string corresponding to the last error that occurred. + +\section{bnet\_close} +\index{Bnet\_close} +\addcontentsline{toc}{subsection}{bnet\_close} + +The connection with the server remains open until closed by the subroutine: + +void bnet\_close(BSOCK *sock) + +\section{Becoming a Server} +\index{Server!Becoming a} +\index{Becoming a Server} +\addcontentsline{toc}{subsection}{Becoming a Server} + +The bnet\_open() and bnet\_close() routines described above are used on the +client side to establish a connection and terminate a connection with the +server. To become a server (i.e. wait for a connection from a client), use the +routine {\bf bnet\_thread\_server}. The calling sequence is a bit complicated, +please refer to the code in bnet\_server.c and the code at the beginning of +each daemon as examples of how to call it. + +\section{Higher Level Conventions} +\index{Conventions!Higher Level} +\index{Higher Level Conventions} +\addcontentsline{toc}{subsection}{Higher Level Conventions} + +Within Bacula, we have established the convention that any time a single +record is passed, it is sent with bnet\_send() and read with bnet\_recv(). +Thus the normal exchange between the server (S) and the client (C) are: + +\footnotesize +\begin{verbatim} +S: wait for connection C: attempt connection +S: accept connection C: bnet_send() send request +S: bnet_recv() wait for request +S: act on request +S: bnet_send() send ack C: bnet_recv() wait for ack +\end{verbatim} +\normalsize + +Thus a single command is sent, acted upon by the server, and then +acknowledged. + +In certain cases, such as the transfer of the data for a file, all the +information or data cannot be sent in a single packet. In this case, the +convention is that the client will send a command to the server, who knows +that more than one packet will be returned. In this case, the server will +enter a loop: + +\footnotesize +\begin{verbatim} +while ((n=bnet_recv(bsock)) > 0) { + act on request +} +if (n < 0) + error +\end{verbatim} +\normalsize + +The client will perform the following: + +\footnotesize +\begin{verbatim} +bnet_send(bsock); +bnet_send(bsock); +... +bnet_sig(bsock, BNET_EOD); +\end{verbatim} +\normalsize + +Thus the client will send multiple packets and signal to the server when all +the packets have been sent by sending a zero length record. diff --git a/docs/manuals/de/old/developers/platformsupport.tex b/docs/manuals/de/old/developers/platformsupport.tex new file mode 100644 index 00000000..a04e56f7 --- /dev/null +++ b/docs/manuals/de/old/developers/platformsupport.tex @@ -0,0 +1,107 @@ +%% +%% + +\chapter{Platform Support} +\label{_PlatformChapter} +\index{Support!Platform} +\index{Platform Support} +\addcontentsline{toc}{section}{Platform Support} + +\section{General} +\index{General } +\addcontentsline{toc}{subsection}{General} + +This chapter describes the requirements for having a +supported platform (Operating System). In general, Bacula is +quite portable. It supports 32 and 64 bit architectures as well +as bigendian and littleendian machines. For full +support, the platform (Operating System) must implement POSIX Unix +system calls. However, for File daemon support only, a small +compatibility library can be written to support almost any +architecture. + +Currently Linux, FreeBSD, and Solaris are fully supported +platforms, which means that the code has been tested on those +machines and passes a full set of regression tests. + +In addition, the Windows File daemon is supported on most versions +of Windows, and finally, there are a number of other platforms +where the File daemon (client) is known to run: NetBSD, OpenBSD, +Mac OSX, SGI, ... + +\section{Requirements to become a Supported Platform} +\index{Requirements!Platform} +\index{Platform Requirements} +\addcontentsline{toc}{subsection}{Platform Requirements} + +As mentioned above, in order to become a fully supported platform, it +must support POSIX Unix system calls. In addition, the following +requirements must be met: + +\begin{itemize} +\item The principal developer (currently Kern) must have + non-root ssh access to a test machine running the platform. +\item The ideal requirements and minimum requirements + for this machine are given below. +\item There must be a defined platform champion who is normally + a system administrator for the machine that is available. This + person need not be a developer/programmer but must be familiar + with system administration of the platform. +\item There must be at least one person designated who will + run regression tests prior to each release. Releases occur + approximately once every 6 months, but can be more frequent. + It takes at most a day's effort to setup the regression scripts + in the beginning, and after that, they can either be run daily + or on demand before a release. Running the regression scripts + involves only one or two command line commands and is fully + automated. +\item Ideally there are one or more persons who will package + each Bacula release. +\item Ideally there are one or more developers who can respond to + and fix platform specific bugs. +\end{itemize} + +Ideal requirements for a test machine: +\begin{itemize} +\item The principal developer will have non-root ssh access to + the test machine at all times. +\item The pricipal developer will have a root password. +\item The test machine will provide approximately 200 MB of + disk space for continual use. +\item The test machine will have approximately 500 MB of free + disk space for temporary use. +\item The test machine will run the most common version of the OS. +\item The test machine will have an autochanger of DDS-4 technology + or later having two or more tapes. +\item The test machine will have MySQL and/or PostgreSQL database + access for account "bacula" available. +\item The test machine will have sftp access. +\item The test machine will provide an smtp server. +\end{itemize} + +Minimum requirements for a test machine: +\begin{itemize} +\item The principal developer will have non-root ssh access to + the test machine when requested approximately once a month. +\item The pricipal developer not have root access. +\item The test machine will provide approximately 80 MB of + disk space for continual use. +\item The test machine will have approximately 300 MB of free + disk space for temporary use. +\item The test machine will run the the OS. +\item The test machine will have a tape drive of DDS-4 technology + or later that can be scheduled for access. +\item The test machine will not have MySQL and/or PostgreSQL database + access. +\item The test machine will have no sftp access. +\item The test machine will provide no email access. +\end{itemize} + +Bare bones test machine requirements: +\begin{itemize} +\item The test machine is available only to a designated + test person (your own machine). +\item The designated test person runs the regession + tests on demand. +\item The test machine has a tape drive available. +\end{itemize} diff --git a/docs/manuals/de/old/developers/porting.tex b/docs/manuals/de/old/developers/porting.tex new file mode 100644 index 00000000..278f0e5d --- /dev/null +++ b/docs/manuals/de/old/developers/porting.tex @@ -0,0 +1,173 @@ +%% +%% + +\chapter{Bacula Porting Notes} +\label{_ChapterStart1} +\index{Notes!Bacula Porting} +\index{Bacula Porting Notes} +\addcontentsline{toc}{section}{Bacula Porting Notes} + +This document is intended mostly for developers who wish to port Bacula to a +system that is not {\bf officially} supported. + +It is hoped that Bacula clients will eventually run on every imaginable system +that needs backing up (perhaps even a Palm). It is also hoped that the Bacula +Directory and Storage daemons will run on every system capable of supporting +them. + +\section{Porting Requirements} +\index{Requirements!Porting} +\index{Porting Requirements} +\addcontentsline{toc}{section}{Porting Requirements} + +In General, the following holds true: + +\begin{itemize} +\item {\bf Bacula} has been compiled and run on Linux RedHat, FreeBSD, and + Solaris systems. +\item In addition, clients exist on Win32, and Irix +\item It requires GNU C++ to compile. You can try with other compilers, but + you are on your own. The Irix client is built with the Irix complier, but, in + general, you will need GNU. +\item Your compiler must provide support for 64 bit signed and unsigned + integers. +\item You will need a recent copy of the {\bf autoconf} tools loaded on your + system (version 2.13 or later). The {\bf autoconf} tools are used to build + the configuration program, but are not part of the Bacula source +distribution. +\item There are certain third party packages that Bacula needs. Except for + MySQL, they can all be found in the {\bf depkgs} and {\bf depkgs1} releases. +\item To build the Win32 binaries, we use Microsoft VC++ standard + 2003. Please see the instructions in + bacula-source/src/win32/README.win32 for more details. If you + want to use VC++ Express, please see README.vc8. Our build is + done under the most recent version of Cygwin, but Cygwin is + not used in the Bacula binaries that are produced. + Unfortunately, we do not have the resources to help you build + your own version of the Win32 FD, so you are pretty much on + your own. You can ask the bacula-devel list for help, but + please don't expect much. +\item {\bf Bacula} requires a good implementation of pthreads to work. +\item The source code has been written with portability in mind and is mostly + POSIX compatible. Thus porting to any POSIX compatible operating system + should be relatively easy. +\end{itemize} + +\section{Steps to Take for Porting} +\index{Porting!Steps to Take for} +\index{Steps to Take for Porting} +\addcontentsline{toc}{section}{Steps to Take for Porting} + +\begin{itemize} +\item The first step is to ensure that you have version 2.13 or later of the + {\bf autoconf} tools loaded. You can skip this step, but making changes to + the configuration program will be difficult or impossible. +\item The run a {\bf ./configure} command in the main source directory and + examine the output. It should look something like the following: + +\footnotesize +\begin{verbatim} +Configuration on Mon Oct 28 11:42:27 CET 2002: + Host: i686-pc-linux-gnu -- redhat 7.3 + Bacula version: 1.27 (26 October 2002) + Source code location: . + Install binaries: /sbin + Install config files: /etc/bacula + C Compiler: gcc + C++ Compiler: c++ + Compiler flags: -g -O2 + Linker flags: + Libraries: -lpthread + Statically Linked Tools: no + Database found: no + Database type: Internal + Database lib: + Job Output Email: root@localhost + Traceback Email: root@localhost + SMTP Host Address: localhost + Director Port 9101 + File daemon Port 9102 + Storage daemon Port 9103 + Working directory /etc/bacula/working + SQL binaries Directory + Large file support: yes + readline support: yes + cweb support: yes /home/kern/bacula/depkgs/cweb + TCP Wrappers support: no + ZLIB support: yes + enable-smartalloc: yes + enable-gnome: no + gmp support: yes +\end{verbatim} +\normalsize + +The details depend on your system. The first thing to check is that it +properly identified your host on the {\bf Host:} line. The first part (added +in version 1.27) is the GNU four part identification of your system. The part +after the -- is your system and the system version. Generally, if your system +is not yet supported, you must correct these. +\item If the {\bf ./configure} does not function properly, you must determine + the cause and fix it. Generally, it will be because some required system + routine is not available on your machine. +\item To correct problems with detection of your system type or with routines + and libraries, you must edit the file {\bf + \lt{}bacula-src\gt{}/autoconf/configure.in}. This is the ``source'' from +which {\bf configure} is built. In general, most of the changes for your +system will be made in {\bf autoconf/aclocal.m4} in the routine {\bf +BA\_CHECK\_OPSYS} or in the routine {\bf BA\_CHECK\_OPSYS\_DISTNAME}. I have +already added the necessary code for most systems, but if yours shows up as +{\bf unknown} you will need to make changes. Then as mentioned above, you +will need to set a number of system dependent items in {\bf configure.in} in +the {\bf case} statement at approximately line 1050 (depending on the Bacula +release). +\item The items to in the case statement that corresponds to your system are + the following: + +\begin{itemize} +\item DISTVER -- set to the version of your operating system. Typically some + form of {\bf uname} obtains it. +\item TAPEDRIVE -- the default tape drive. Not too important as the user can + set it as an option. +\item PSCMD -- set to the {\bf ps} command that will provide the PID in the + first field and the program name in the second field. If this is not set + properly, the {\bf bacula stop} script will most likely not be able to stop +Bacula in all cases. +\item hostname -- command to return the base host name (non-qualified) of + your system. This is generally the machine name. Not too important as the + user can correct this in his configuration file. +\item CFLAGS -- set any special compiler flags needed. Many systems need a + special flag to make pthreads work. See cygwin for an example. +\item LDFLAGS -- set any special loader flags. See cygwin for an example. +\item PTHREAD\_LIB -- set for any special pthreads flags needed during + linking. See freebsd as an example. +\item lld -- set so that a ``long long int'' will be properly edited in a + printf() call. +\item llu -- set so that a ``long long unsigned'' will be properly edited in + a printf() call. +\item PFILES -- set to add any files that you may define is your platform + subdirectory. These files are used for installation of automatic system + startup of Bacula daemons. +\end{itemize} + +\item To rebuild a new version of {\bf configure} from a changed {\bf + autoconf/configure.in} you enter {\bf make configure} in the top level Bacula + source directory. You must have done a ./configure prior to trying to rebuild + the configure script or it will get into an infinite loop. +\item If the {\bf make configure} gets into an infinite loop, ctl-c it, then + do {\bf ./configure} (no options are necessary) and retry the {\bf make + configure}, which should now work. +\item To rebuild {\bf configure} you will need to have {\bf autoconf} version + 2.57-3 or higher loaded. Older versions of autoconf will complain about + unknown or bad options, and won't work. +\item After you have a working {\bf configure} script, you may need to make a + few system dependent changes to the way Bacula works. Generally, these are + done in {\bf src/baconfig.h}. You can find a few examples of system dependent +changes toward the end of this file. For example, on Irix systems, there is +no definition for {\bf socklen\_t}, so it is made in this file. If your +system has structure alignment requirements, check the definition of BALIGN +in this file. Currently, all Bacula allocated memory is aligned on a {\bf +double} boundary. +\item If you are having problems with Bacula's type definitions, you might + look at {\bf src/bc\_types.h} where all the types such as {\bf uint32\_t}, + {\bf uint64\_t}, etc. that Bacula uses are defined. +\end{itemize} diff --git a/docs/manuals/es/catalog/setup.sm b/docs/manuals/de/old/developers/setup.sm similarity index 100% rename from docs/manuals/es/catalog/setup.sm rename to docs/manuals/de/old/developers/setup.sm diff --git a/docs/manuals/de/old/developers/smartall.tex b/docs/manuals/de/old/developers/smartall.tex new file mode 100644 index 00000000..9bb13845 --- /dev/null +++ b/docs/manuals/de/old/developers/smartall.tex @@ -0,0 +1,432 @@ +%% +%% + +\addcontentsline{lof}{figure}{Smart Memory Allocation with Orphaned Buffer +Detection} +\includegraphics{\idir smartall.eps} + +\chapter{Smart Memory Allocation} +\label{_ChapterStart4} +\index{Detection!Smart Memory Allocation With Orphaned Buffer } +\index{Smart Memory Allocation With Orphaned Buffer Detection } +\addcontentsline{toc}{section}{Smart Memory Allocation With Orphaned Buffer +Detection} + +Few things are as embarrassing as a program that leaks, yet few errors are so +easy to commit or as difficult to track down in a large, complicated program +as failure to release allocated memory. SMARTALLOC replaces the standard C +library memory allocation functions with versions which keep track of buffer +allocations and releases and report all orphaned buffers at the end of program +execution. By including this package in your program during development and +testing, you can identify code that loses buffers right when it's added and +most easily fixed, rather than as part of a crisis debugging push when the +problem is identified much later in the testing cycle (or even worse, when the +code is in the hands of a customer). When program testing is complete, simply +recompiling with different flags removes SMARTALLOC from your program, +permitting it to run without speed or storage penalties. + +In addition to detecting orphaned buffers, SMARTALLOC also helps to find other +common problems in management of dynamic storage including storing before the +start or beyond the end of an allocated buffer, referencing data through a +pointer to a previously released buffer, attempting to release a buffer twice +or releasing storage not obtained from the allocator, and assuming the initial +contents of storage allocated by functions that do not guarantee a known +value. SMARTALLOC's checking does not usually add a large amount of overhead +to a program (except for programs which use {\tt realloc()} extensively; see +below). SMARTALLOC focuses on proper storage management rather than internal +consistency of the heap as checked by the malloc\_debug facility available on +some systems. SMARTALLOC does not conflict with malloc\_debug and both may be +used together, if you wish. SMARTALLOC makes no assumptions regarding the +internal structure of the heap and thus should be compatible with any C +language implementation of the standard memory allocation functions. + +\subsection{ Installing SMARTALLOC} +\index{SMARTALLOC!Installing } +\index{Installing SMARTALLOC } +\addcontentsline{toc}{subsection}{Installing SMARTALLOC} + +SMARTALLOC is provided as a Zipped archive, +\elink{smartall.zip}{http://www.fourmilab.ch/smartall/smartall.zip}; see the +download instructions below. + +To install SMARTALLOC in your program, simply add the statement: + +to every C program file which calls any of the memory allocation functions +({\tt malloc}, {\tt calloc}, {\tt free}, etc.). SMARTALLOC must be used for +all memory allocation with a program, so include file for your entire program, +if you have such a thing. Next, define the symbol SMARTALLOC in the +compilation before the inclusion of smartall.h. I usually do this by having my +Makefile add the ``{\tt -DSMARTALLOC}'' option to the C compiler for +non-production builds. You can define the symbol manually, if you prefer, by +adding the statement: + +{\tt \#define SMARTALLOC} + +At the point where your program is all done and ready to relinquish control to +the operating system, add the call: + +{\tt \ \ \ \ \ \ \ \ sm\_dump(}{\it datadump}{\tt );} + +where {\it datadump} specifies whether the contents of orphaned buffers are to +be dumped in addition printing to their size and place of allocation. The data +are dumped only if {\it datadump} is nonzero, so most programs will normally +use ``{\tt sm\_dump(0);}''. If a mysterious orphaned buffer appears that can't +be identified from the information this prints about it, replace the statement +with ``{\tt sm\_dump(1)};''. Usually the dump of the buffer's data will +furnish the additional clues you need to excavate and extirpate the elusive +error that left the buffer allocated. + +Finally, add the files ``smartall.h'' and ``smartall.c'' from this release to +your source directory, make dependencies, and linker input. You needn't make +inclusion of smartall.c in your link optional; if compiled with SMARTALLOC not +defined it generates no code, so you may always include it knowing it will +waste no storage in production builds. Now when you run your program, if it +leaves any buffers around when it's done, each will be reported by {\tt +sm\_dump()} on stderr as follows: + +\footnotesize +\begin{verbatim} +Orphaned buffer: 120 bytes allocated at line 50 of gutshot.c +\end{verbatim} +\normalsize + +\subsection{ Squelching a SMARTALLOC} +\index{SMARTALLOC!Squelching a } +\index{Squelching a SMARTALLOC } +\addcontentsline{toc}{subsection}{Squelching a SMARTALLOC} + +Usually, when you first install SMARTALLOC in an existing program you'll find +it nattering about lots of orphaned buffers. Some of these turn out to be +legitimate errors, but some are storage allocated during program +initialisation that, while dynamically allocated, is logically static storage +not intended to be released. Of course, you can get rid of the complaints +about these buffers by adding code to release them, but by doing so you're +adding unnecessary complexity and code size to your program just to silence +the nattering of a SMARTALLOC, so an escape hatch is provided to eliminate the +need to release these buffers. + +Normally all storage allocated with the functions {\tt malloc()}, {\tt +calloc()}, and {\tt realloc()} is monitored by SMARTALLOC. If you make the +function call: + +\footnotesize +\begin{verbatim} + sm_static(1); +\end{verbatim} +\normalsize + +you declare that subsequent storage allocated by {\tt malloc()}, {\tt +calloc()}, and {\tt realloc()} should not be considered orphaned if found to +be allocated when {\tt sm\_dump()} is called. I use a call on ``{\tt +sm\_static(1);}'' before I allocate things like program configuration tables +so I don't have to add code to release them at end of program time. After +allocating unmonitored data this way, be sure to add a call to: + +\footnotesize +\begin{verbatim} + sm_static(0); +\end{verbatim} +\normalsize + +to resume normal monitoring of buffer allocations. Buffers allocated while +{\tt sm\_static(1}) is in effect are not checked for having been orphaned but +all the other safeguards provided by SMARTALLOC remain in effect. You may +release such buffers, if you like; but you don't have to. + +\subsection{ Living with Libraries} +\index{Libraries!Living with } +\index{Living with Libraries } +\addcontentsline{toc}{subsection}{Living with Libraries} + +Some library functions for which source code is unavailable may gratuitously +allocate and return buffers that contain their results, or require you to pass +them buffers which they subsequently release. If you have source code for the +library, by far the best approach is to simply install SMARTALLOC in it, +particularly since this kind of ill-structured dynamic storage management is +the source of so many storage leaks. Without source code, however, there's no +option but to provide a way to bypass SMARTALLOC for the buffers the library +allocates and/or releases with the standard system functions. + +For each function {\it xxx} redefined by SMARTALLOC, a corresponding routine +named ``{\tt actually}{\it xxx}'' is furnished which provides direct access to +the underlying system function, as follows: + +\begin{quote} + +\begin{longtable}{ll} +\multicolumn{1}{l }{\bf Standard function } & \multicolumn{1}{l }{\bf Direct +access function } \\ +{{\tt malloc(}{\it size}{\tt )} } & {{\tt actuallymalloc(}{\it size}{\tt )} +} \\ +{{\tt calloc(}{\it nelem}{\tt ,} {\it elsize}{\tt )} } & {{\tt +actuallycalloc(}{\it nelem}, {\it elsize}{\tt )} } \\ +{{\tt realloc(}{\it ptr}{\tt ,} {\it size}{\tt )} } & {{\tt +actuallyrealloc(}{\it ptr}, {\it size}{\tt )} } \\ +{{\tt free(}{\it ptr}{\tt )} } & {{\tt actuallyfree(}{\it ptr}{\tt )} } + +\end{longtable} + +\end{quote} + +For example, suppose there exists a system library function named ``{\tt +getimage()}'' which reads a raster image file and returns the address of a +buffer containing it. Since the library routine allocates the image directly +with {\tt malloc()}, you can't use SMARTALLOC's {\tt free()}, as that call +expects information placed in the buffer by SMARTALLOC's special version of +{\tt malloc()}, and hence would report an error. To release the buffer you +should call {\tt actuallyfree()}, as in this code fragment: + +\footnotesize +\begin{verbatim} + struct image *ibuf = getimage("ratpack.img"); + display_on_screen(ibuf); + actuallyfree(ibuf); +\end{verbatim} +\normalsize + +Conversely, suppose we are to call a library function, ``{\tt putimage()}'', +which writes an image buffer into a file and then releases the buffer with +{\tt free()}. Since the system {\tt free()} is being called, we can't pass a +buffer allocated by SMARTALLOC's allocation routines, as it contains special +information that the system {\tt free()} doesn't expect to be there. The +following code uses {\tt actuallymalloc()} to obtain the buffer passed to such +a routine. + +\footnotesize +\begin{verbatim} + struct image *obuf = + (struct image *) actuallymalloc(sizeof(struct image)); + dump_screen_to_image(obuf); + putimage("scrdump.img", obuf); /* putimage() releases obuf */ +\end{verbatim} +\normalsize + +It's unlikely you'll need any of the ``actually'' calls except under very odd +circumstances (in four products and three years, I've only needed them once), +but they're there for the rare occasions that demand them. Don't use them to +subvert the error checking of SMARTALLOC; if you want to disable orphaned +buffer detection, use the {\tt sm\_static(1)} mechanism described above. That +way you don't forfeit all the other advantages of SMARTALLOC as you do when +using {\tt actuallymalloc()} and {\tt actuallyfree()}. + +\subsection{ SMARTALLOC Details} +\index{SMARTALLOC Details } +\index{Details!SMARTALLOC } +\addcontentsline{toc}{subsection}{SMARTALLOC Details} + +When you include ``smartall.h'' and define SMARTALLOC, the following standard +system library functions are redefined with the \#define mechanism to call +corresponding functions within smartall.c instead. (For details of the +redefinitions, please refer to smartall.h.) + +\footnotesize +\begin{verbatim} + void *malloc(size_t size) + void *calloc(size_t nelem, size_t elsize) + void *realloc(void *ptr, size_t size) + void free(void *ptr) + void cfree(void *ptr) +\end{verbatim} +\normalsize + +{\tt cfree()} is a historical artifact identical to {\tt free()}. + +In addition to allocating storage in the same way as the standard library +functions, the SMARTALLOC versions expand the buffers they allocate to include +information that identifies where each buffer was allocated and to chain all +allocated buffers together. When a buffer is released, it is removed from the +allocated buffer chain. A call on {\tt sm\_dump()} is able, by scanning the +chain of allocated buffers, to find all orphaned buffers. Buffers allocated +while {\tt sm\_static(1)} is in effect are specially flagged so that, despite +appearing on the allocated buffer chain, {\tt sm\_dump()} will not deem them +orphans. + +When a buffer is allocated by {\tt malloc()} or expanded with {\tt realloc()}, +all bytes of newly allocated storage are set to the hexadecimal value 0x55 +(alternating one and zero bits). Note that for {\tt realloc()} this applies +only to the bytes added at the end of buffer; the original contents of the +buffer are not modified. Initializing allocated storage to a distinctive +nonzero pattern is intended to catch code that erroneously assumes newly +allocated buffers are cleared to zero; in fact their contents are random. The +{\tt calloc()} function, defined as returning a buffer cleared to zero, +continues to zero its buffers under SMARTALLOC. + +Buffers obtained with the SMARTALLOC functions contain a special sentinel byte +at the end of the user data area. This byte is set to a special key value +based upon the buffer's memory address. When the buffer is released, the key +is tested and if it has been overwritten an assertion in the {\tt free} +function will fail. This catches incorrect program code that stores beyond the +storage allocated for the buffer. At {\tt free()} time the queue links are +also validated and an assertion failure will occur if the program has +destroyed them by storing before the start of the allocated storage. + +In addition, when a buffer is released with {\tt free()}, its contents are +immediately destroyed by overwriting them with the hexadecimal pattern 0xAA +(alternating bits, the one's complement of the initial value pattern). This +will usually trip up code that keeps a pointer to a buffer that's been freed +and later attempts to reference data within the released buffer. Incredibly, +this is {\it legal} in the standard Unix memory allocation package, which +permits programs to free() buffers, then raise them from the grave with {\tt +realloc()}. Such program ``logic'' should be fixed, not accommodated, and +SMARTALLOC brooks no such Lazarus buffer`` nonsense. + +Some C libraries allow a zero size argument in calls to {\tt malloc()}. Since +this is far more likely to indicate a program error than a defensible +programming stratagem, SMARTALLOC disallows it with an assertion. + +When the standard library {\tt realloc()} function is called to expand a +buffer, it attempts to expand the buffer in place if possible, moving it only +if necessary. Because SMARTALLOC must place its own private storage in the +buffer and also to aid in error detection, its version of {\tt realloc()} +always moves and copies the buffer except in the trivial case where the size +of the buffer is not being changed. By forcing the buffer to move on every +call and destroying the contents of the old buffer when it is released, +SMARTALLOC traps programs which keep pointers into a buffer across a call on +{\tt realloc()} which may move it. This strategy may prove very costly to +programs which make extensive use of {\tt realloc()}. If this proves to be a +problem, such programs may wish to use {\tt actuallymalloc()}, {\tt +actuallyrealloc()}, and {\tt actuallyfree()} for such frequently-adjusted +buffers, trading error detection for performance. Although not specified in +the System V Interface Definition, many C library implementations of {\tt +realloc()} permit an old buffer argument of NULL, causing {\tt realloc()} to +allocate a new buffer. The SMARTALLOC version permits this. + +\subsection{ When SMARTALLOC is Disabled} +\index{When SMARTALLOC is Disabled } +\index{Disabled!When SMARTALLOC is } +\addcontentsline{toc}{subsection}{When SMARTALLOC is Disabled} + +When SMARTALLOC is disabled by compiling a program with the symbol SMARTALLOC +not defined, calls on the functions otherwise redefined by SMARTALLOC go +directly to the system functions. In addition, compile-time definitions +translate calls on the ''{\tt actually}...{\tt ()}`` functions into the +corresponding library calls; ''{\tt actuallymalloc(100)}``, for example, +compiles into ''{\tt malloc(100)}``. The two special SMARTALLOC functions, +{\tt sm\_dump()} and {\tt sm\_static()}, are defined to generate no code +(hence the null statement). Finally, if SMARTALLOC is not defined, compilation +of the file smartall.c generates no code or data at all, effectively removing +it from the program even if named in the link instructions. + +Thus, except for unusual circumstances, a program that works with SMARTALLOC +defined for testing should require no changes when built without it for +production release. + +\subsection{ The {\tt alloc()} Function} +\index{Function!alloc } +\index{Alloc() Function } +\addcontentsline{toc}{subsection}{alloc() Function} + +Many programs I've worked on use very few direct calls to {\tt malloc()}, +using the identically declared {\tt alloc()} function instead. Alloc detects +out-of-memory conditions and aborts, removing the need for error checking on +every call of {\tt malloc()} (and the temptation to skip checking for +out-of-memory). + +As a convenience, SMARTALLOC supplies a compatible version of {\tt alloc()} in +the file alloc.c, with its definition in the file alloc.h. This version of +{\tt alloc()} is sensitive to the definition of SMARTALLOC and cooperates with +SMARTALLOC's orphaned buffer detection. In addition, when SMARTALLOC is +defined and {\tt alloc()} detects an out of memory condition, it takes +advantage of the SMARTALLOC diagnostic information to identify the file and +line number of the call on {\tt alloc()} that failed. + +\subsection{ Overlays and Underhandedness} +\index{Underhandedness!Overlays and } +\index{Overlays and Underhandedness } +\addcontentsline{toc}{subsection}{Overlays and Underhandedness} + +String constants in the C language are considered to be static arrays of +characters accessed through a pointer constant. The arrays are potentially +writable even though their pointer is a constant. SMARTALLOC uses the +compile-time definition {\tt ./smartall.wml} to obtain the name of the file in +which a call on buffer allocation was performed. Rather than reserve space in +a buffer to save this information, SMARTALLOC simply stores the pointer to the +compiled-in text of the file name. This works fine as long as the program does +not overlay its data among modules. If data are overlayed, the area of memory +which contained the file name at the time it was saved in the buffer may +contain something else entirely when {\tt sm\_dump()} gets around to using the +pointer to edit the file name which allocated the buffer. + +If you want to use SMARTALLOC in a program with overlayed data, you'll have to +modify smartall.c to either copy the file name to a fixed-length field added +to the {\tt abufhead} structure, or else allocate storage with {\tt malloc()}, +copy the file name there, and set the {\tt abfname} pointer to that buffer, +then remember to release the buffer in {\tt sm\_free}. Either of these +approaches are wasteful of storage and time, and should be considered only if +there is no alternative. Since most initial debugging is done in non-overlayed +environments, the restrictions on SMARTALLOC with data overlaying may never +prove a problem. Note that conventional overlaying of code, by far the most +common form of overlaying, poses no problems for SMARTALLOC; you need only be +concerned if you're using exotic tools for data overlaying on MS-DOS or other +address-space-challenged systems. + +Since a C language ''constant`` string can actually be written into, most C +compilers generate a unique copy of each string used in a module, even if the +same constant string appears many times. In modules that contain many calls on +allocation functions, this results in substantial wasted storage for the +strings that identify the file name. If your compiler permits optimization of +multiple occurrences of constant strings, enabling this mode will eliminate +the overhead for these strings. Of course, it's up to you to make sure +choosing this compiler mode won't wreak havoc on some other part of your +program. + +\subsection{ Test and Demonstration Program} +\index{Test and Demonstration Program } +\index{Program!Test and Demonstration } +\addcontentsline{toc}{subsection}{Test and Demonstration Program} + +A test and demonstration program, smtest.c, is supplied with SMARTALLOC. You +can build this program with the Makefile included. Please refer to the +comments in smtest.c and the Makefile for information on this program. If +you're attempting to use SMARTALLOC on a new machine or with a new compiler or +operating system, it's a wise first step to check it out with smtest first. + +\subsection{ Invitation to the Hack} +\index{Hack!Invitation to the } +\index{Invitation to the Hack } +\addcontentsline{toc}{subsection}{Invitation to the Hack} + +SMARTALLOC is not intended to be a panacea for storage management problems, +nor is it universally applicable or effective; it's another weapon in the +arsenal of the defensive professional programmer attempting to create reliable +products. It represents the current state of evolution of expedient debug code +which has been used in several commercial software products which have, +collectively, sold more than third of a million copies in the retail market, +and can be expected to continue to develop through time as it is applied to +ever more demanding projects. + +The version of SMARTALLOC here has been tested on a Sun SPARCStation, Silicon +Graphics Indigo2, and on MS-DOS using both Borland and Microsoft C. Moving +from compiler to compiler requires the usual small changes to resolve disputes +about prototyping of functions, whether the type returned by buffer allocation +is {\tt char\ *} or {\tt void\ *}, and so forth, but following those changes +it works in a variety of environments. I hope you'll find SMARTALLOC as useful +for your projects as I've found it in mine. + +\section{ +\elink{}{http://www.fourmilab.ch/smartall/smartall.zip} +\elink{Download smartall.zip}{http://www.fourmilab.ch/smartall/smartall.zip} +(Zipped archive)} +\index{Archive! Download smartall.zip Zipped } +\index{ Download smartall.zip (Zipped archive) } +\addcontentsline{toc}{section}{ Download smartall.zip (Zipped archive)} + +SMARTALLOC is provided as +\elink{smartall.zip}{http://www.fourmilab.ch/smartall/smartall.zip}, a +\elink{Zipped}{http://www.pkware.com/} archive containing source code, +documentation, and a {\tt Makefile} to build the software under Unix. + +\subsection{ Copying} +\index{Copying } +\addcontentsline{toc}{subsection}{Copying} + +\begin{quote} +SMARTALLOC is in the public domain. Permission to use, copy, modify, and +distribute this software and its documentation for any purpose and without fee +is hereby granted, without any conditions or restrictions. This software is +provided ''as is`` without express or implied warranty. +\end{quote} + +{\it +\elink{by John Walker}{http://www.fourmilab.ch} +October 30th, 1998 } diff --git a/docs/manuals/de/old/developers/storage.tex b/docs/manuals/de/old/developers/storage.tex new file mode 100644 index 00000000..e46f228c --- /dev/null +++ b/docs/manuals/de/old/developers/storage.tex @@ -0,0 +1,258 @@ +%% +%% + +\chapter{Storage Daemon Design} +\label{_ChapterStart3} +\index{Storage Daemon Design } +\index{Design!Storage Daemon } +\addcontentsline{toc}{section}{Storage Daemon Design} + +This chapter is intended to be a technical discussion of the Storage daemon +services and as such is not targeted at end users but rather at developers and +system administrators that want or need to know more of the working details of +{\bf Bacula}. + +This document is somewhat out of date. + +\section{SD Design Introduction} +\index{Introduction!SD Design } +\index{SD Design Introduction } +\addcontentsline{toc}{section}{SD Design Introduction} + +The Bacula Storage daemon provides storage resources to a Bacula installation. +An individual Storage daemon is associated with a physical permanent storage +device (for example, a tape drive, CD writer, tape changer or jukebox, etc.), +and may employ auxiliary storage resources (such as space on a hard disk file +system) to increase performance and/or optimize use of the permanent storage +medium. + +Any number of storage daemons may be run on a given machine; each associated +with an individual storage device connected to it, and BACULA operations may +employ storage daemons on any number of hosts connected by a network, local or +remote. The ability to employ remote storage daemons (with appropriate +security measures) permits automatic off-site backup, possibly to publicly +available backup repositories. + +\section{SD Development Outline} +\index{Outline!SD Development } +\index{SD Development Outline } +\addcontentsline{toc}{section}{SD Development Outline} + +In order to provide a high performance backup and restore solution that scales +to very large capacity devices and networks, the storage daemon must be able +to extract as much performance from the storage device and network with which +it interacts. In order to accomplish this, storage daemons will eventually +have to sacrifice simplicity and painless portability in favor of techniques +which improve performance. My goal in designing the storage daemon protocol +and developing the initial prototype storage daemon is to provide for these +additions in the future, while implementing an initial storage daemon which is +very simple and portable to almost any POSIX-like environment. This original +storage daemon (and its evolved descendants) can serve as a portable solution +for non-demanding backup requirements (such as single servers of modest size, +individual machines, or small local networks), while serving as the starting +point for development of higher performance configurable derivatives which use +techniques such as POSIX threads, shared memory, asynchronous I/O, buffering +to high-speed intermediate media, and support for tape changers and jukeboxes. + + +\section{SD Connections and Sessions} +\index{Sessions!SD Connections and } +\index{SD Connections and Sessions } +\addcontentsline{toc}{section}{SD Connections and Sessions} + +A client connects to a storage server by initiating a conventional TCP +connection. The storage server accepts the connection unless its maximum +number of connections has been reached or the specified host is not granted +access to the storage server. Once a connection has been opened, the client +may make any number of Query requests, and/or initiate (if permitted), one or +more Append sessions (which transmit data to be stored by the storage daemon) +and/or Read sessions (which retrieve data from the storage daemon). + +Most requests and replies sent across the connection are simple ASCII strings, +with status replies prefixed by a four digit status code for easier parsing. +Binary data appear in blocks stored and retrieved from the storage. Any +request may result in a single-line status reply of ``{\tt 3201\ Notification\ +pending}'', which indicates the client must send a ``Query notification'' +request to retrieve one or more notifications posted to it. Once the +notifications have been returned, the client may then resubmit the request +which resulted in the 3201 status. + +The following descriptions omit common error codes, yet to be defined, which +can occur from most or many requests due to events like media errors, +restarting of the storage daemon, etc. These details will be filled in, along +with a comprehensive list of status codes along with which requests can +produce them in an update to this document. + +\subsection{SD Append Requests} +\index{Requests!SD Append } +\index{SD Append Requests } +\addcontentsline{toc}{subsection}{SD Append Requests} + +\begin{description} + +\item [{append open session = \lt{}JobId\gt{} [ \lt{}Password\gt{} ] }] + \index{SPAN class } + A data append session is opened with the Job ID given by {\it JobId} with +client password (if required) given by {\it Password}. If the session is +successfully opened, a status of {\tt 3000\ OK} is returned with a ``{\tt +ticket\ =\ }{\it number}'' reply used to identify subsequent messages in the +session. If too many sessions are open, or a conflicting session (for +example, a read in progress when simultaneous read and append sessions are +not permitted), a status of ``{\tt 3502\ Volume\ busy}'' is returned. If no +volume is mounted, or the volume mounted cannot be appended to, a status of +``{\tt 3503\ Volume\ not\ mounted}'' is returned. + +\item [append data = \lt{}ticket-number\gt{} ] + \index{SPAN class } + If the append data is accepted, a status of {\tt 3000\ OK data address = +\lt{}IPaddress\gt{} port = \lt{}port\gt{}} is returned, where the {\tt +IPaddress} and {\tt port} specify the IP address and port number of the data +channel. Error status codes are {\tt 3504\ Invalid\ ticket\ number} and {\tt +3505\ Session\ aborted}, the latter of which indicates the entire append +session has failed due to a daemon or media error. + +Once the File daemon has established the connection to the data channel +opened by the Storage daemon, it will transfer a header packet followed by +any number of data packets. The header packet is of the form: + +{\tt \lt{}file-index\gt{} \lt{}stream-id\gt{} \lt{}info\gt{}} + +The details are specified in the +\ilink{Daemon Protocol}{_ChapterStart2} section of this +document. + +\item [*append abort session = \lt{}ticket-number\gt{} ] + \index{SPAN class } + The open append session with ticket {\it ticket-number} is aborted; any blocks +not yet written to permanent media are discarded. Subsequent attempts to +append data to the session will receive an error status of {\tt 3505\ +Session\ aborted}. + +\item [append end session = \lt{}ticket-number\gt{} ] + \index{SPAN class } + The open append session with ticket {\it ticket-number} is marked complete; no +further blocks may be appended. The storage daemon will give priority to +saving any buffered blocks from this session to permanent media as soon as +possible. + +\item [append close session = \lt{}ticket-number\gt{} ] + \index{SPAN class } + The append session with ticket {\it ticket} is closed. This message does not +receive an {\tt 3000\ OK} reply until all of the content of the session are +stored on permanent media, at which time said reply is given, followed by a +list of volumes, from first to last, which contain blocks from the session, +along with the first and last file and block on each containing session data +and the volume session key identifying data from that session in lines with +the following format: + +{\tt {\tt Volume = }\lt{}Volume-id\gt{} \lt{}start-file\gt{} +\lt{}start-block\gt{} \lt{}end-file\gt{} \lt{}end-block\gt{} +\lt{}volume-session-id\gt{}}where {\it Volume-id} is the volume label, {\it +start-file} and {\it start-block} are the file and block containing the first +data from that session on the volume, {\it end-file} and {\it end-block} are +the file and block with the last data from the session on the volume and {\it +volume-session-id} is the volume session ID for blocks from the session +stored on that volume. +\end{description} + +\subsection{SD Read Requests} +\index{SD Read Requests } +\index{Requests!SD Read } +\addcontentsline{toc}{subsection}{SD Read Requests} + +\begin{description} + +\item [Read open session = \lt{}JobId\gt{} \lt{}Volume-id\gt{} + \lt{}start-file\gt{} \lt{}start-block\gt{} \lt{}end-file\gt{} + \lt{}end-block\gt{} \lt{}volume-session-id\gt{} \lt{}password\gt{} ] +\index{SPAN class } +where {\it Volume-id} is the volume label, {\it start-file} and {\it +start-block} are the file and block containing the first data from that +session on the volume, {\it end-file} and {\it end-block} are the file and +block with the last data from the session on the volume and {\it +volume-session-id} is the volume session ID for blocks from the session +stored on that volume. + +If the session is successfully opened, a status of + +{\tt {\tt 3100\ OK Ticket\ =\ }{\it number}``} + +is returned with a reply used to identify subsequent messages in the session. +If too many sessions are open, or a conflicting session (for example, an +append in progress when simultaneous read and append sessions are not +permitted), a status of ''{\tt 3502\ Volume\ busy}`` is returned. If no +volume is mounted, or the volume mounted cannot be appended to, a status of +''{\tt 3503\ Volume\ not\ mounted}`` is returned. If no block with the given +volume session ID and the correct client ID number appears in the given first +file and block for the volume, a status of ''{\tt 3505\ Session\ not\ +found}`` is returned. + +\item [Read data = \lt{}Ticket\gt{} \gt{} \lt{}Block\gt{} ] + \index{SPAN class } + The specified Block of data from open read session with the specified Ticket +number is returned, with a status of {\tt 3000\ OK} followed by a ''{\tt +Length\ =\ }{\it size}`` line giving the length in bytes of the block data +which immediately follows. Blocks must be retrieved in ascending order, but +blocks may be skipped. If a block number greater than the largest stored on +the volume is requested, a status of ''{\tt 3201\ End\ of\ volume}`` is +returned. If a block number greater than the largest in the file is +requested, a status of ''{\tt 3401\ End\ of\ file}`` is returned. + +\item [Read close session = \lt{}Ticket\gt{} ] + \index{SPAN class } + The read session with Ticket number is closed. A read session may be closed +at any time; you needn't read all its blocks before closing it. +\end{description} + +{\it by +\elink{John Walker}{http://www.fourmilab.ch/} +January 30th, MM } + +\section{SD Data Structures} +\index{SD Data Structures} +\addcontentsline{toc}{section}{SD Data Structures} + +In the Storage daemon, there is a Device resource (i.e. from conf file) +that describes each physical device. When the physical device is used it +is controled by the DEVICE structure (defined in dev.h), and typically +refered to as dev in the C++ code. Anyone writing or reading a physical +device must ultimately get a lock on the DEVICE structure -- this controls +the device. However, multiple Jobs (defined by a JCR structure src/jcr.h) +can be writing a physical DEVICE at the same time (of course they are +sequenced by locking the DEVICE structure). There are a lot of job +dependent "device" variables that may be different for each Job such as +spooling (one job may spool and another may not, and when a job is +spooling, it must have an i/o packet open, each job has its own record and +block structures, ...), so there is a device control record or DCR that is +the primary way of interfacing to the physical device. The DCR contains +all the job specific data as well as a pointer to the Device resource +(DEVRES structure) and the physical DEVICE structure. + +Now if a job is writing to two devices (it could be writing two separate +streams to the same device), it must have two DCRs. Today, the code only +permits one. This won't be hard to change, but it is new code. + +Today three jobs (threads), two physical devices each job + writes to only one device: + +\begin{verbatim} + Job1 -> DCR1 -> DEVICE1 + Job2 -> DCR2 -> DEVICE1 + Job3 -> DCR3 -> DEVICE2 +\end{verbatim} + +To be implemented three jobs, three physical devices, but + job1 is writing simultaneously to three devices: + +\begin{verbatim} + Job1 -> DCR1 -> DEVICE1 + -> DCR4 -> DEVICE2 + -> DCR5 -> DEVICE3 + Job2 -> DCR2 -> DEVICE1 + Job3 -> DCR3 -> DEVICE2 + + Job = job control record + DCR = Job contorl data for a specific device + DEVICE = Device only control data +\end{verbatim} + diff --git a/docs/manuals/de/old/developers/tls-techdoc.tex b/docs/manuals/de/old/developers/tls-techdoc.tex new file mode 100644 index 00000000..565869f1 --- /dev/null +++ b/docs/manuals/de/old/developers/tls-techdoc.tex @@ -0,0 +1,391 @@ +%% +%% + +%\author{Landon Fuller} +%\title{Bacula TLS Additions} + +\chapter{TLS} +\label{_Chapter_TLS} +\index{TLS} + +Written by Landon Fuller + +\section{Introduction to TLS} +\index{TLS Introduction} +\index{Introduction!TLS} +\addcontentsline{toc}{section}{TLS Introduction} + +This patch includes all the back-end code necessary to add complete TLS +data encryption support to Bacula. In addition, support for TLS in +Console/Director communications has been added as a proof of concept. +Adding support for the remaining daemons will be straight-forward. +Supported features of this patchset include: + +\begin{itemize} +\item Client/Server TLS Requirement Negotiation +\item TLSv1 Connections with Server and Client Certificate +Validation +\item Forward Secrecy Support via Diffie-Hellman Ephemeral Keying +\end{itemize} + +This document will refer to both ``server'' and ``client'' contexts. These +terms refer to the accepting and initiating peer, respectively. + +Diffie-Hellman anonymous ciphers are not supported by this patchset. The +use of DH anonymous ciphers increases the code complexity and places +explicit trust upon the two-way Cram-MD5 implementation. Cram-MD5 is +subject to known plaintext attacks, and is should be considered +considerably less secure than PKI certificate-based authentication. + +Appropriate autoconf macros have been added to detect and use OpenSSL. Two +additional preprocessor defines have been added: \emph{HAVE\_TLS} and +\emph{HAVE\_OPENSSL}. All changes not specific to OpenSSL rely on +\emph{HAVE\_TLS}. OpenSSL-specific code is constrained to +\emph{src/lib/tls.c} to facilitate the support of alternative TLS +implementations. + +\section{New Configuration Directives} +\index{TLS Configuration Directives} +\index{Directives!TLS Configuration} +\addcontentsline{toc}{section}{New Configuration Directives} + +Additional configuration directives have been added to both the Console and +Director resources. These new directives are defined as follows: + +\begin{itemize} +\item \underline{TLS Enable} \emph{(yes/no)} +Enable TLS support. + +\item \underline{TLS Require} \emph{(yes/no)} +Require TLS connections. + +\item \underline{TLS Certificate} \emph{(path)} +Path to PEM encoded TLS certificate. Used as either a client or server +certificate. + +\item \underline{TLS Key} \emph{(path)} +Path to PEM encoded TLS private key. Must correspond with the TLS +certificate. + +\item \underline{TLS Verify Peer} \emph{(yes/no)} +Verify peer certificate. Instructs server to request and verify the +client's x509 certificate. Any client certificate signed by a known-CA +will be accepted unless the TLS Allowed CN configuration directive is used. +Not valid in a client context. + +\item \underline{TLS Allowed CN} \emph{(string list)} +Common name attribute of allowed peer certificates. If directive is +specified, all client certificates will be verified against this list. +This directive may be specified more than once. Not valid in a client +context. + +\item \underline{TLS CA Certificate File} \emph{(path)} +Path to PEM encoded TLS CA certificate(s). Multiple certificates are +permitted in the file. One of \emph{TLS CA Certificate File} or \emph{TLS +CA Certificate Dir} are required in a server context if \underline{TLS +Verify Peer} is also specified, and are always required in a client +context. + +\item \underline{TLS CA Certificate Dir} \emph{(path)} +Path to TLS CA certificate directory. In the current implementation, +certificates must be stored PEM encoded with OpenSSL-compatible hashes. +One of \emph{TLS CA Certificate File} or \emph{TLS CA Certificate Dir} are +required in a server context if \emph{TLS Verify Peer} is also specified, +and are always required in a client context. + +\item \underline{TLS DH File} \emph{(path)} +Path to PEM encoded Diffie-Hellman parameter file. If this directive is +specified, DH ephemeral keying will be enabled, allowing for forward +secrecy of communications. This directive is only valid within a server +context. To generate the parameter file, you may use openssl: +\footnotesize +\begin{verbatim} +openssl dhparam -out dh1024.pem -5 1024 +\end{verbatim} +\normalsize +\end{itemize} + +\section{TLS API Implementation} +\index{TLS API Implimentation} +\index{API Implimentation!TLS} +\addcontentsline{toc}{section}{TLS API Implementation} + +To facilitate the use of additional TLS libraries, all OpenSSL-specific +code has been implemented within \emph{src/lib/tls.c}. In turn, a generic +TLS API is exported. + +\subsection{Library Initialization and Cleanup} +\index{Library Initialization and Cleanup} +\index{Initialization and Cleanup!Library} +\addcontentsline{toc}{subsection}{Library Initialization and Cleanup} + +\footnotesize +\begin{verbatim} +int init_tls (void); +\end{verbatim} +\normalsize + +Performs TLS library initialization, including seeding of the PRNG. PRNG +seeding has not yet been implemented for win32. + +\footnotesize +\begin{verbatim} +int cleanup_tls (void); +\end{verbatim} +\normalsize + +Performs TLS library cleanup. + +\subsection{Manipulating TLS Contexts} +\index{TLS Context Manipulation} +\index{Contexts!Manipulating TLS} +\addcontentsline{toc}{subsection}{Manipulating TLS Contexts} + +\footnotesize +\begin{verbatim} +TLS_CONTEXT *new_tls_context (const char *ca_certfile, + const char *ca_certdir, const char *certfile, + const char *keyfile, const char *dhfile, bool verify_peer); +\end{verbatim} +\normalsize + +Allocates and initalizes a new opaque \emph{TLS\_CONTEXT} structure. The +\emph{TLS\_CONTEXT} structure maintains default TLS settings from which +\emph{TLS\_CONNECTION} structures are instantiated. In the future the +\emph{TLS\_CONTEXT} structure may be used to maintain the TLS session +cache. \emph{ca\_certfile} and \emph{ca\_certdir} arguments are used to +initialize the CA verification stores. The \emph{certfile} and +\emph{keyfile} arguments are used to initialize the local certificate and +private key. If \emph{dhfile} is non-NULL, it is used to initialize +Diffie-Hellman ephemeral keying. If \emph{verify\_peer} is \emph{true} , +client certificate validation is enabled. + +\footnotesize +\begin{verbatim} +void free_tls_context (TLS_CONTEXT *ctx); +\end{verbatim} +\normalsize + +Deallocated a previously allocated \emph{TLS\_CONTEXT} structure. + +\subsection{Performing Post-Connection Verification} +\index{TLS Post-Connection Verification} +\index{Verification!TLS Post-Connection} +\addcontentsline{toc}{subsection}{Performing Post-Connection Verification} + +\footnotesize +\begin{verbatim} +bool tls_postconnect_verify_host (TLS_CONNECTION *tls, const char *host); +\end{verbatim} +\normalsize + +Performs post-connection verification of the peer-supplied x509 +certificate. Checks whether the \emph{subjectAltName} and +\emph{commonName} attributes match the supplied \emph{host} string. +Returns \emph{true} if there is a match, \emph{false} otherwise. + +\footnotesize +\begin{verbatim} +bool tls_postconnect_verify_cn (TLS_CONNECTION *tls, alist *verify_list); +\end{verbatim} +\normalsize + +Performs post-connection verification of the peer-supplied x509 +certificate. Checks whether the \emph{commonName} attribute matches any +strings supplied via the \emph{verify\_list} parameter. Returns +\emph{true} if there is a match, \emph{false} otherwise. + +\subsection{Manipulating TLS Connections} +\index{TLS Connection Manipulation} +\index{Connections!Manipulating TLS} +\addcontentsline{toc}{subsection}{Manipulating TLS Connections} + +\footnotesize +\begin{verbatim} +TLS_CONNECTION *new_tls_connection (TLS_CONTEXT *ctx, int fd); +\end{verbatim} +\normalsize + +Allocates and initializes a new \emph{TLS\_CONNECTION} structure with +context \emph{ctx} and file descriptor \emph{fd}. + +\footnotesize +\begin{verbatim} +void free_tls_connection (TLS_CONNECTION *tls); +\end{verbatim} +\normalsize + +Deallocates memory associated with the \emph{tls} structure. + +\footnotesize +\begin{verbatim} +bool tls_bsock_connect (BSOCK *bsock); +\end{verbatim} +\normalsize + +Negotiates a a TLS client connection via \emph{bsock}. Returns \emph{true} +if successful, \emph{false} otherwise. Will fail if there is a TLS +protocol error or an invalid certificate is presented + +\footnotesize +\begin{verbatim} +bool tls_bsock_accept (BSOCK *bsock); +\end{verbatim} +\normalsize + +Accepts a TLS client connection via \emph{bsock}. Returns \emph{true} if +successful, \emph{false} otherwise. Will fail if there is a TLS protocol +error or an invalid certificate is presented. + +\footnotesize +\begin{verbatim} +bool tls_bsock_shutdown (BSOCK *bsock); +\end{verbatim} +\normalsize + +Issues a blocking TLS shutdown request to the peer via \emph{bsock}. This function may not wait for the peer's reply. + +\footnotesize +\begin{verbatim} +int tls_bsock_writen (BSOCK *bsock, char *ptr, int32_t nbytes); +\end{verbatim} +\normalsize + +Writes \emph{nbytes} from \emph{ptr} via the \emph{TLS\_CONNECTION} +associated with \emph{bsock}. Due to OpenSSL's handling of \emph{EINTR}, +\emph{bsock} is set non-blocking at the start of the function, and restored +to its original blocking state before the function returns. Less than +\emph{nbytes} may be written if an error occurs. The actual number of +bytes written will be returned. + +\footnotesize +\begin{verbatim} +int tls_bsock_readn (BSOCK *bsock, char *ptr, int32_t nbytes); +\end{verbatim} +\normalsize + +Reads \emph{nbytes} from the \emph{TLS\_CONNECTION} associated with +\emph{bsock} and stores the result in \emph{ptr}. Due to OpenSSL's +handling of \emph{EINTR}, \emph{bsock} is set non-blocking at the start of +the function, and restored to its original blocking state before the +function returns. Less than \emph{nbytes} may be read if an error occurs. +The actual number of bytes read will be returned. + +\section{Bnet API Changes} +\index{Bnet API Changes} +\index{API Changes!Bnet} +\addcontentsline{toc}{section}{Bnet API Changes} + +A minimal number of changes were required in the Bnet socket API. The BSOCK +structure was expanded to include an associated TLS\_CONNECTION structure, +as well as a flag to designate the current blocking state of the socket. +The blocking state flag is required for win32, where it does not appear +possible to discern the current blocking state of a socket. + +\subsection{Negotiating a TLS Connection} +\index{Negotiating a TLS Connection} +\index{TLS Connection!Negotiating} +\addcontentsline{toc}{subsection}{Negotiating a TLS Connection} + +\emph{bnet\_tls\_server()} and \emph{bnet\_tls\_client()} were both +implemented using the new TLS API as follows: + +\footnotesize +\begin{verbatim} +int bnet_tls_client(TLS_CONTEXT *ctx, BSOCK * bsock); +\end{verbatim} +\normalsize + +Negotiates a TLS session via \emph{bsock} using the settings from +\emph{ctx}. Returns 1 if successful, 0 otherwise. + +\footnotesize +\begin{verbatim} +int bnet_tls_server(TLS_CONTEXT *ctx, BSOCK * bsock, alist *verify_list); +\end{verbatim} +\normalsize + +Accepts a TLS client session via \emph{bsock} using the settings from +\emph{ctx}. If \emph{verify\_list} is non-NULL, it is passed to +\emph{tls\_postconnect\_verify\_cn()} for client certificate verification. + +\subsection{Manipulating Socket Blocking State} +\index{Manipulating Socket Blocking State} +\index{Socket Blocking State!Manipulating} +\index{Blocking State!Socket!Manipulating} +\addcontentsline{toc}{subsection}{Manipulating Socket Blocking State} + +Three functions were added for manipulating the blocking state of a socket +on both Win32 and Unix-like systems. The Win32 code was written according +to the MSDN documentation, but has not been tested. + +These functions are prototyped as follows: + +\footnotesize +\begin{verbatim} +int bnet_set_nonblocking (BSOCK *bsock); +\end{verbatim} +\normalsize + +Enables non-blocking I/O on the socket associated with \emph{bsock}. +Returns a copy of the socket flags prior to modification. + +\footnotesize +\begin{verbatim} +int bnet_set_blocking (BSOCK *bsock); +\end{verbatim} +\normalsize + +Enables blocking I/O on the socket associated with \emph{bsock}. Returns a +copy of the socket flags prior to modification. + +\footnotesize +\begin{verbatim} +void bnet_restore_blocking (BSOCK *bsock, int flags); +\end{verbatim} +\normalsize + +Restores blocking or non-blocking IO setting on the socket associated with +\emph{bsock}. The \emph{flags} argument must be the return value of either +\emph{bnet\_set\_blocking()} or \emph{bnet\_restore\_blocking()}. + +\pagebreak + +\section{Authentication Negotiation} +\index{Authentication Negotiation} +\index{Negotiation!TLS Authentication} +\addcontentsline{toc}{section}{Authentication Negotiation} + +Backwards compatibility with the existing SSL negotiation hooks implemented +in src/lib/cram-md5.c have been maintained. The +\emph{cram\_md5\_get\_auth()} function has been modified to accept an +integer pointer argument, tls\_remote\_need. The TLS requirement +advertised by the remote host is returned via this pointer. + +After exchanging cram-md5 authentication and TLS requirements, both the +client and server independently decide whether to continue: + +\footnotesize +\begin{verbatim} +if (!cram_md5_get_auth(dir, password, &tls_remote_need) || + !cram_md5_auth(dir, password, tls_local_need)) { +[snip] +/* Verify that the remote host is willing to meet our TLS requirements */ +if (tls_remote_need < tls_local_need && tls_local_need != BNET_TLS_OK && + tls_remote_need != BNET_TLS_OK) { + sendit(_("Authorization problem:" + " Remote server did not advertise required TLS support.\n")); + auth_success = false; + goto auth_done; +} + +/* Verify that we are willing to meet the remote host's requirements */ +if (tls_remote_need > tls_local_need && tls_local_need != BNET_TLS_OK && + tls_remote_need != BNET_TLS_OK) { + sendit(_("Authorization problem:" + " Remote server requires TLS.\n")); + auth_success = false; + goto auth_done; +} +\end{verbatim} +\normalsize diff --git a/docs/manuals/es/concepts/translate_images.pl b/docs/manuals/de/old/developers/translate_images.pl similarity index 100% rename from docs/manuals/es/concepts/translate_images.pl rename to docs/manuals/de/old/developers/translate_images.pl diff --git a/docs/manuals/de/install/Makefile.in b/docs/manuals/de/old/install/Makefile.in similarity index 100% rename from docs/manuals/de/install/Makefile.in rename to docs/manuals/de/old/install/Makefile.in diff --git a/docs/manuals/de/install/Makefile.save b/docs/manuals/de/old/install/Makefile.save similarity index 100% rename from docs/manuals/de/install/Makefile.save rename to docs/manuals/de/old/install/Makefile.save diff --git a/docs/manuals/es/concepts/autochangerres.tex b/docs/manuals/de/old/install/autochangerres.tex similarity index 100% rename from docs/manuals/es/concepts/autochangerres.tex rename to docs/manuals/de/old/install/autochangerres.tex diff --git a/docs/manuals/es/install/check_tex.pl b/docs/manuals/de/old/install/check_tex.pl similarity index 100% rename from docs/manuals/es/install/check_tex.pl rename to docs/manuals/de/old/install/check_tex.pl diff --git a/docs/manuals/de/install/configure.tex b/docs/manuals/de/old/install/configure.tex similarity index 100% rename from docs/manuals/de/install/configure.tex rename to docs/manuals/de/old/install/configure.tex diff --git a/docs/manuals/de/install/consoleconf.tex b/docs/manuals/de/old/install/consoleconf.tex similarity index 100% rename from docs/manuals/de/install/consoleconf.tex rename to docs/manuals/de/old/install/consoleconf.tex diff --git a/docs/manuals/de/install/critical.tex b/docs/manuals/de/old/install/critical.tex similarity index 100% rename from docs/manuals/de/install/critical.tex rename to docs/manuals/de/old/install/critical.tex diff --git a/docs/manuals/de/install/dirdconf.tex b/docs/manuals/de/old/install/dirdconf.tex similarity index 100% rename from docs/manuals/de/install/dirdconf.tex rename to docs/manuals/de/old/install/dirdconf.tex diff --git a/docs/manuals/es/install/do_echo b/docs/manuals/de/old/install/do_echo similarity index 100% rename from docs/manuals/es/install/do_echo rename to docs/manuals/de/old/install/do_echo diff --git a/docs/manuals/de/install/filedconf.tex b/docs/manuals/de/old/install/filedconf.tex similarity index 100% rename from docs/manuals/de/install/filedconf.tex rename to docs/manuals/de/old/install/filedconf.tex diff --git a/docs/manuals/de/install/fileset.tex b/docs/manuals/de/old/install/fileset.tex similarity index 100% rename from docs/manuals/de/install/fileset.tex rename to docs/manuals/de/old/install/fileset.tex diff --git a/docs/manuals/es/install/fix_tex.pl b/docs/manuals/de/old/install/fix_tex.pl similarity index 100% rename from docs/manuals/es/install/fix_tex.pl rename to docs/manuals/de/old/install/fix_tex.pl diff --git a/docs/manuals/es/install/index.perl b/docs/manuals/de/old/install/index.perl similarity index 100% rename from docs/manuals/es/install/index.perl rename to docs/manuals/de/old/install/index.perl diff --git a/docs/manuals/es/install/install.css b/docs/manuals/de/old/install/install.css similarity index 100% rename from docs/manuals/es/install/install.css rename to docs/manuals/de/old/install/install.css diff --git a/docs/manuals/de/install/install.kilepr b/docs/manuals/de/old/install/install.kilepr similarity index 100% rename from docs/manuals/de/install/install.kilepr rename to docs/manuals/de/old/install/install.kilepr diff --git a/docs/manuals/de/install/install.tex b/docs/manuals/de/old/install/install.tex similarity index 100% rename from docs/manuals/de/install/install.tex rename to docs/manuals/de/old/install/install.tex diff --git a/docs/manuals/de/install/installation.tex b/docs/manuals/de/old/install/installation.tex similarity index 100% rename from docs/manuals/de/install/installation.tex rename to docs/manuals/de/old/install/installation.tex diff --git a/docs/manuals/es/install/latex2html-init.pl b/docs/manuals/de/old/install/latex2html-init.pl similarity index 100% rename from docs/manuals/es/install/latex2html-init.pl rename to docs/manuals/de/old/install/latex2html-init.pl diff --git a/docs/manuals/de/install/messagesres.tex b/docs/manuals/de/old/install/messagesres.tex similarity index 100% rename from docs/manuals/de/install/messagesres.tex rename to docs/manuals/de/old/install/messagesres.tex diff --git a/docs/manuals/es/install/monitorconf.tex b/docs/manuals/de/old/install/monitorconf.tex similarity index 100% rename from docs/manuals/es/install/monitorconf.tex rename to docs/manuals/de/old/install/monitorconf.tex diff --git a/docs/manuals/de/install/quickstart.tex b/docs/manuals/de/old/install/quickstart.tex similarity index 100% rename from docs/manuals/de/install/quickstart.tex rename to docs/manuals/de/old/install/quickstart.tex diff --git a/docs/manuals/es/install/security.tex b/docs/manuals/de/old/install/security.tex similarity index 100% rename from docs/manuals/es/install/security.tex rename to docs/manuals/de/old/install/security.tex diff --git a/docs/manuals/es/concepts/setup.sm b/docs/manuals/de/old/install/setup.sm similarity index 100% rename from docs/manuals/es/concepts/setup.sm rename to docs/manuals/de/old/install/setup.sm diff --git a/docs/manuals/de/install/storedconf.tex b/docs/manuals/de/old/install/storedconf.tex similarity index 100% rename from docs/manuals/de/install/storedconf.tex rename to docs/manuals/de/old/install/storedconf.tex diff --git a/docs/manuals/es/install/translate_images.pl b/docs/manuals/de/old/install/translate_images.pl similarity index 100% rename from docs/manuals/es/install/translate_images.pl rename to docs/manuals/de/old/install/translate_images.pl diff --git a/docs/manuals/fr/catalog/Makefile.in b/docs/manuals/de/old/misc/Makefile.in similarity index 89% rename from docs/manuals/fr/catalog/Makefile.in rename to docs/manuals/de/old/misc/Makefile.in index 7f8c78fa..8301f292 100644 --- a/docs/manuals/fr/catalog/Makefile.in +++ b/docs/manuals/de/old/misc/Makefile.in @@ -36,7 +36,7 @@ IMAGES=../../../images -DOC=catalog +DOC=misc first_rule: all @@ -75,9 +75,10 @@ html: @(if [ -f imagename_translations ] ; then \ ./translate_images.pl --from_meaningful_names ${DOC}.html; \ fi) - latex2html -white -no_subdir -split 0 -toc_stars -white -notransparent \ + latex2html -white -no_subdir -split 0 -toc_stars -white \ -init_file latex2html-init.pl ${DOC} >tex.out 2>&1 ./translate_images.pl --to_meaningful_names ${DOC}.html + (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} . 2>/dev/null; done) @echo "Done making html" web: @@ -90,9 +91,10 @@ web: @rm -f ${DOC}/xp-*.png @rm -f ${DOC}/next.eps ${DOC}/next.png ${DOC}/prev.eps ${DOC}/prev.png ${DOC}/up.eps ${DOC}/up.png @rm -rf ${DOC}/*.html - latex2html -split 3 -local_icons -t "Bacula Catalog Database Guide" -long_titles 4 \ - -toc_stars -contents_in_nav -init_file latex2html-init.pl -white -notransparent ${DOC} >tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}/Bacula_Catalo*.html + latex2html -split 3 -local_icons -t "Miscellaneous Guide" -long_titles 4 \ + -toc_stars -contents_in_nav -init_file latex2html-init.pl -white ${DOC} >tex.out 2>&1 + ./translate_images.pl --to_meaningful_names ${DOC}/Miscel_Guide.html + (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} . 2>/dev/null; done) @echo "Done making web" show: xdvi ${DOC} diff --git a/docs/manuals/de/old/misc/coverpage.tex b/docs/manuals/de/old/misc/coverpage.tex new file mode 100644 index 00000000..513bbf65 --- /dev/null +++ b/docs/manuals/de/old/misc/coverpage.tex @@ -0,0 +1,28 @@ +\newfont{\bighead}{cmr17 at 36pt} +\parskip 10pt +\parindent 0pt + +\title{\includegraphics{\idir bacula-logo.eps} \\ \bigskip + \Huge{Bacula}$^{\normalsize \textregistered}$ \Huge{Miscellaneous Guide} + \begin{center} + \large{It comes in the night and sucks + the essence from your computers. } + \end{center} +} + + +\author{Kern Sibbald} +\date{\vspace{1.0in}\today \\ + This manual documents Bacula version \fullversion \\ + \vspace{0.2in} + Copyright {\copyright} 1999-2009, Free Software Foundation Europe + e.V. \\ + Bacula {\textregistered} is a registered trademark of Kern Sibbald.\\ + \vspace{0.2in} + Permission is granted to copy, distribute and/or modify this document under the terms of the + GNU Free Documentation License, Version 1.2 published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. + A copy of the license is included in the section entitled "GNU Free Documentation License". +} + +\maketitle diff --git a/docs/manuals/fr/catalog/do_echo b/docs/manuals/de/old/misc/do_echo similarity index 100% rename from docs/manuals/fr/catalog/do_echo rename to docs/manuals/de/old/misc/do_echo diff --git a/docs/manuals/fr/concepts/dvd.tex b/docs/manuals/de/old/misc/dvd.tex similarity index 97% rename from docs/manuals/fr/concepts/dvd.tex rename to docs/manuals/de/old/misc/dvd.tex index 1860cc36..88811365 100644 --- a/docs/manuals/fr/concepts/dvd.tex +++ b/docs/manuals/de/old/misc/dvd.tex @@ -54,7 +54,7 @@ Device resource. \begin{description} \item [Requires Mount = {\it Yes|No}] - \index[sd]{Requires Mount } + \index[general]{Requires Mount } You must set this directive to {\bf yes} for DVD-writers, and to {\bf no} for all other devices (tapes/files). This directive indicates if the device requires to be mounted using the {\bf Mount Command}. @@ -63,11 +63,11 @@ Device resource. {\bf Write Part Command}. \item [Mount Point = {\it directory}] - \index[sd]{Mount Point} + \index[general]{Mount Point} Directory where the device can be mounted. \item [Mount Command = {\it name-string}] - \index[sd]{Mount Command} + \index[general]{Mount Command} Command that must be executed to mount the device. Although the device is written directly, the mount command is necessary in order to determine the free space left on the DVD. Before the command is @@ -93,7 +93,7 @@ able to use a mount command such as: \item [Unmount Command = {\it name-string}] - \index[sd]{Unmount Command} + \index[general]{Unmount Command} Command that must be executed to unmount the device. Before the command is executed, \%a is replaced with the Archive Device, and \%m with the Mount Point. @@ -107,7 +107,7 @@ able to use a mount command such as: \normalsize \item [Write Part Command = {\it name-string}] - \index[sd]{Write Part Command } + \index[general]{Write Part Command } Command that must be executed to write a part to the device. Before the command is executed, \%a is replaced with the Archive Device, \%m with the Mount Point, \%e is replaced with 1 if we are writing the first part, @@ -130,7 +130,7 @@ able to use a mount command such as: \item [Free Space Command = {\it name-string}] - \index[sd]{Free Space Command } + \index[general]{Free Space Command } Command that must be executed to check how much free space is left on the device. Before the command is executed,\%a is replaced with the Archive Device. @@ -207,7 +207,7 @@ The following directives are added to the Director's Job resource. \label{WritePartAfterJob} \begin{description} \item [Write Part After Job = \lt{}yes|no\gt{}] - \index[dir]{Write Part After Job } + \index[general]{Write Part After Job } If this directive is set to {\bf yes} (default {\bf no}), the Volume written to a temporary spool file for the current Job will be written to the DVD as a new part file diff --git a/docs/manuals/es/concepts/fdl.tex b/docs/manuals/de/old/misc/fdl.tex similarity index 100% rename from docs/manuals/es/concepts/fdl.tex rename to docs/manuals/de/old/misc/fdl.tex diff --git a/docs/manuals/fr/concepts/gpl.tex b/docs/manuals/de/old/misc/gpl.tex similarity index 100% rename from docs/manuals/fr/concepts/gpl.tex rename to docs/manuals/de/old/misc/gpl.tex diff --git a/docs/manuals/fr/catalog/latex2html-init.pl b/docs/manuals/de/old/misc/latex2html-init.pl similarity index 100% rename from docs/manuals/fr/catalog/latex2html-init.pl rename to docs/manuals/de/old/misc/latex2html-init.pl diff --git a/docs/manuals/fr/concepts/lesser.tex b/docs/manuals/de/old/misc/lesser.tex similarity index 100% rename from docs/manuals/fr/concepts/lesser.tex rename to docs/manuals/de/old/misc/lesser.tex diff --git a/docs/manuals/fr/concepts/license.tex b/docs/manuals/de/old/misc/license.tex similarity index 84% rename from docs/manuals/fr/concepts/license.tex rename to docs/manuals/de/old/misc/license.tex index a773246e..d4b4ff44 100644 --- a/docs/manuals/fr/concepts/license.tex +++ b/docs/manuals/de/old/misc/license.tex @@ -24,20 +24,17 @@ if you would send any corrections or changes to the Bacula project. The most recent version of the manual can always be found online at \elink{http://www.bacula.org}{\url{http://www.bacula.org}}. -% TODO: Point to appendix that has it - - \section{GPL} \index[general]{GPL } The vast bulk of the source code is released under the \ilink{GNU General Public License version 2.}{GplChapter}. -Most of this code is copyrighted: Copyright \copyright 2000-2007 +Most of this code is copyrighted: Copyright \copyright 2000-2009 Free Software Foundation Europe e.V. -Portions may be copyrighted by other people (ATT, the Free Software -Foundation, ...). These files are released under the GPL license. +Portions may be copyrighted by other people. These files are released +under different licenses which are compatible with the Bacula GPLv2 license. \section{LGPL} \index[general]{LGPL } @@ -63,7 +60,10 @@ trademark of Kern Sibbald. We have trademarked the Bacula name to ensure that any program using the name Bacula will be exactly compatible with the program that we have released. The use of the name Bacula is restricted to software systems -that agree exactly with the program presented here. +that agree exactly with the program presented here. If you have made +modifications to the Bacula source code that alter in any significant +way the way the program functions, you may not distribute it using the +Bacula name. \section{Fiduciary License Agreement} \index[general]{Fiduciary License Agreement } @@ -74,20 +74,18 @@ ensures that the Free Software Foundation Europe (and thus the Bacula project) has the rights to the code. This Fiduciary License Agreement is found on the Bacula web site at: -\elink{http://www.bacula.org/fr/FLA-bacula.en.pdf}{\url{http://www.bacula.org/fr/FLA-bacula.en.pdf}} +\elink{http://www.bacula.org/en/FLA-bacula.en.pdf}{\url{http://www.bacula.org/en/FLA-bacula.en.pdf}} -and should be filled out then sent to: +and if you are submitting code, you should fill it out then sent to: \begin{quote} - Free Software Foundation Europe \\ - Freedom Task Force \\ - Sumatrastrasse 25 \\ - 8006 Z\"{u}rich \\ + Kern Sibbald \\ + Cotes-de-Montmoiret 9 \\ + 1012 Lausanne \\ Switzerland \\ \end{quote} -Please note that the above address is different from the officially -registered office mentioned in the document. When you send in such a +When you send in such a complete document, please notify me: kern at sibbald dot com. diff --git a/docs/manuals/de/old/misc/misc.kilepr b/docs/manuals/de/old/misc/misc.kilepr new file mode 100644 index 00000000..11c12315 --- /dev/null +++ b/docs/manuals/de/old/misc/misc.kilepr @@ -0,0 +1,124 @@ +[General] +img_extIsRegExp=false +img_extensions=.eps .jpg .jpeg .png .pdf .ps .fig .gif +kileprversion=2 +kileversion=2.0 +lastDocument=stunnel.tex +masterDocument=misc.tex +name=Misc +pkg_extIsRegExp=false +pkg_extensions=.cls .sty +src_extIsRegExp=false +src_extensions=.tex .ltx .latex .dtx .ins + +[Tools] +MakeIndex= +QuickBuild= + +[item:coverpage.tex] +archive=true +column=33 +encoding=UTF-8 +highlight=LaTeX +line=0 +open=false +order=-1 + +[item:dvd.tex] +archive=true +column=0 +encoding=UTF-8 +highlight=LaTeX +line=56 +open=false +order=-1 + +[item:fdl.tex] +archive=true +column=0 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:gpl.tex] +archive=true +column=0 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:lesser.tex] +archive=true +column=0 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:license.tex] +archive=true +column=0 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:misc.tex] +archive=true +column=59 +encoding=UTF-8 +highlight=LaTeX +line=45 +open=true +order=0 + +[item:projects.tex] +archive=true +column=0 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:python.tex] +archive=true +column=0 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:stunnel.tex] +archive=true +column=0 +encoding=UTF-8 +highlight=LaTeX +line=0 +open=true +order=1 + +[item:vars.tex] +archive=true +column=0 +encoding=UTF-8 +highlight=LaTeX +line=48 +open=false +order=-1 + +[item:version.tex] +archive=true +column=0 +encoding= +highlight= +line=0 +open=false +order=-1 diff --git a/docs/manuals/de/old/misc/misc.tex b/docs/manuals/de/old/misc/misc.tex new file mode 100644 index 00000000..86fe4a0c --- /dev/null +++ b/docs/manuals/de/old/misc/misc.tex @@ -0,0 +1,63 @@ +%% +%% +%% The following characters must be preceded by a backslash +%% to be entered as printable characters: +%% +%% # $ % & ~ _ ^ \ { } +%% + +\documentclass[10pt,a4paper]{book} + +\topmargin -0.5in +\oddsidemargin 0.0in +\evensidemargin 0.0in +\textheight 10in +\textwidth 6.5in + + +\usepackage{html} +\usepackage{float} +\usepackage{graphicx} +\usepackage{bacula} +\usepackage{longtable} +\usepackage{makeidx} +\usepackage{index} +\usepackage{setspace} +\usepackage{hyperref} +% \usepackage[linkcolor=black,colorlinks=true]{hyperref} +\usepackage{url} + +\makeindex +\newindex{general}{idx}{ind}{General Index} + +\sloppy + +\begin{document} +\sloppy + +\include{coverpage} + +\clearpage +\pagenumbering{roman} +\tableofcontents +\clearpage + +\pagestyle{myheadings} +\markboth{Bacula Version \version}{Bacula Version \version} +\pagenumbering{arabic} +\include{python} +\include{vars} +\include{stunnel} +\include{dvd} +\include{projects} +\include{license} +\include{fdl} +\include{gpl} +\include{lesser} + + +% pull in the index +\clearpage +\printindex[general] + +\end{document} diff --git a/docs/manuals/es/concepts/projects.tex b/docs/manuals/de/old/misc/projects.tex similarity index 100% rename from docs/manuals/es/concepts/projects.tex rename to docs/manuals/de/old/misc/projects.tex diff --git a/docs/manuals/es/concepts/python.tex b/docs/manuals/de/old/misc/python.tex similarity index 99% rename from docs/manuals/es/concepts/python.tex rename to docs/manuals/de/old/misc/python.tex index 40e1b2e0..5d3c9530 100644 --- a/docs/manuals/es/concepts/python.tex +++ b/docs/manuals/de/old/misc/python.tex @@ -124,7 +124,7 @@ events. \begin{description} \item [JobStart] - \index[dir]{JobStart} + \index[general]{JobStart} This Python method, if defined, will be called each time a Job is started. The method is passed the class instantiation object as the first argument, and the Bacula Job object as the second argument. The Bacula Job object diff --git a/docs/manuals/es/concepts/stunnel.tex b/docs/manuals/de/old/misc/stunnel.tex similarity index 100% rename from docs/manuals/es/concepts/stunnel.tex rename to docs/manuals/de/old/misc/stunnel.tex diff --git a/docs/manuals/fr/catalog/translate_images.pl b/docs/manuals/de/old/misc/translate_images.pl similarity index 100% rename from docs/manuals/fr/catalog/translate_images.pl rename to docs/manuals/de/old/misc/translate_images.pl diff --git a/docs/manuals/fr/concepts/vars.tex b/docs/manuals/de/old/misc/vars.tex similarity index 98% rename from docs/manuals/fr/concepts/vars.tex rename to docs/manuals/de/old/misc/vars.tex index f28f714b..b03c3acc 100644 --- a/docs/manuals/fr/concepts/vars.tex +++ b/docs/manuals/de/old/misc/vars.tex @@ -46,7 +46,7 @@ variations within the classes. The classes are: \begin{description} \item [Counters] - \index[dir]{Counters } + \index[general]{Counters } Counters are defined by the {\bf Counter} resources in the Director's conf file. The counter can either be a temporary counter that lasts for the duration of Bacula's execution, or it can be a variable that is stored in @@ -55,7 +55,7 @@ Counter variables may be incremented by postfixing a plus sign ({\bf +} after the variable name). \item [Internal Variables] - \index[dir]{Internal Variables } + \index[general]{Internal Variables } Internal variables are read-only, and may be related to the current job (i.e. Job name), or maybe special variables such as the date and time. The following variables are available: @@ -69,7 +69,7 @@ following variables are available: \item [Second] -- the current second 0-59 \item [WeekDay] -- the current day of the week 0-6 with 0 being Sunday \item [Job] -- the job name -\item [Dir] -- the Director's name +\item [general] -- the Director's name \item [Level] -- the Job Level \item [Type] -- the Job type \item [JobId] -- the JobId @@ -83,7 +83,7 @@ following variables are available: \end{itemize} \item [Environment Variables] - \index[dir]{Environment Variables } + \index[general]{Environment Variables } Environment variables are read-only, and must be defined in the environment prior to executing Bacula. Environment variables may be either scalar or an array, where the elements of the array are referenced by subscripting the diff --git a/docs/manuals/es/problems/Makefile b/docs/manuals/de/old/problems/Makefile.in similarity index 96% rename from docs/manuals/es/problems/Makefile rename to docs/manuals/de/old/problems/Makefile.in index c2b3f06b..55cb58c6 100644 --- a/docs/manuals/es/problems/Makefile +++ b/docs/manuals/de/old/problems/Makefile.in @@ -78,7 +78,6 @@ html: latex2html -white -no_subdir -split 0 -toc_stars -white -notransparent \ -init_file latex2html-init.pl ${DOC} >tex.out 2>&1 ./translate_images.pl --to_meaningful_names ${DOC}.html - (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} .; done) @echo "Done making html" web: @@ -94,7 +93,6 @@ web: latex2html -split 3 -local_icons -t "Bacula Problem Resolution Guide" -long_titles 4 \ -toc_stars -contents_in_nav -init_file latex2html-init.pl -white -notransparent ${DOC} >tex.out 2>&1 ./translate_images.pl --to_meaningful_names ${DOC}/Bacula_Proble*.html - (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} .; done) @echo "Done making web" show: xdvi ${DOC} diff --git a/docs/manuals/fr/catalog/check_tex.pl b/docs/manuals/de/old/problems/check_tex.pl similarity index 100% rename from docs/manuals/fr/catalog/check_tex.pl rename to docs/manuals/de/old/problems/check_tex.pl diff --git a/docs/manuals/fr/concepts/do_echo b/docs/manuals/de/old/problems/do_echo similarity index 100% rename from docs/manuals/fr/concepts/do_echo rename to docs/manuals/de/old/problems/do_echo diff --git a/docs/manuals/de/old/problems/faq.tex b/docs/manuals/de/old/problems/faq.tex new file mode 100644 index 00000000..3280d140 --- /dev/null +++ b/docs/manuals/de/old/problems/faq.tex @@ -0,0 +1,876 @@ +%% +%% +% TODO: maybe merge all this FAQ in with the appropriate section? +% TODO: and use detailed indexing to help reader + +\chapter{Bacula Frequently Asked Questions} +\label{FaqChapter} +\index[general]{Questions!Bacula Frequently Asked } +\index[general]{Bacula Frequently Asked Questions } + +These are questions that have been submitted over time by the +Bacula users. The following +FAQ is very useful, but it is not always up to date +with newer information, so after reading it, if you don't find what you +want, you might try the Bacula wiki maintained by Frank Sweetser, which +contains more than just a FAQ: +\elink{http://wiki.bacula.org}{\url{http://wiki.bacula.org}} +or go directly to the FAQ at: +\elink{http://wiki.bacula.org/doku.php?id=faq} +{\url{http://wiki.bacula.org/doku.php?id=faq}}. + +Please also see +\ilink{the bugs section}{BugsChapter} of this document for a list +of known bugs and solutions. + +\begin{description} +\label{what} +\section{What is Bacula?} +\item [What is {\bf Bacula}? ] + \index[general]{What is Bacula? } + {\bf Bacula} is a network backup and restore program. + +\section{Does Bacula support Windows?} +\item [Does Bacula support Windows?] +\index[general]{Does Bacula support Windows? } + Yes, Bacula compiles and runs on Windows machines (Win98, WinMe, WinXP, + WinNT, Win2003, and Win2000). We provide a binary version of the Client + (bacula-fd), but have not tested the Director nor the Storage daemon. + Note, Win95 is no longer supported because it doesn't have the + GetFileAttributesExA API call. + + +\label{lang} +\section{What language is Bacula written in?} +\item [What language is Bacula written in?] +\index[general]{What language is Bacula written in? } + It is written in C++, but it is mostly C code using only a limited set of + the C++ extensions over C. Thus Bacula is completely compiled using the + C++ compiler. There are several modules, including the Win32 interface, that + are written using the object oriented C++ features. Over time, we are slowly + adding a larger subset of C++. + +\label{run} +\section{On what machines does Bacula run?} +\item [On what machines does Bacula run? ] + \index[general]{On what machines does Bacula run? } + {\bf Bacula} builds and executes on Red Hat Linux (versions RH7.1-RHEL + 4.0, Fedora, SuSE, Gentoo, Debian, Mandriva, ...), FreeBSD, Solaris, + Alpha, SGI (client), NetBSD, OpenBSD, Mac OS X (client), and Win32. + + Bacula has been my only backup tool for over seven years backing up 8 + machines nightly (6 Linux boxes running SuSE, previously + Red Hat and Fedora, a WinXP machine, and a WinNT machine). + + +\label{stable} +\section{Is Bacula Stable?} +\item [Is Bacula Stable? ] +\index[general]{Is Bacula Stable? } + Yes, it is remarkably stable, but remember, there are still a lot of + unimplemented or partially implemented features. With a program of this + size (150,000+ lines of C++ code not including the SQL programs) there + are bound to be bugs. The current test environment (a twisted pair + local network and a HP DLT backup tape) is not exactly ideal, so + additional testing on other sites is necessary. The File daemon has + never crashed -- running months at a time with no intervention. The + Storage daemon is remarkably stable with most of the problems arising + during labeling or switching tapes. Storage daemon crashes are rare + but running multiple drives and simultaneous jobs sometimes (rarely) + problems. + The Director, given the multitude of functions it fulfills is also + relatively stable. In a production environment, it rarely if ever + crashes. Of the three daemons, the Director is the most prone to having + problems. Still, it frequently runs several months with no problems. + + There are a number of reasons for this stability. + + \begin{enumerate} + \item The program is constantly checking the chain of allocated + memory buffers to ensure that no overruns have occurred. \\ + \item All memory leaks (orphaned buffers) are reported each time the + program terminates.\\ + \item Any signal (segmentation fault, ...) generates a + traceback that is emailed to the developer. This permits quick + resolution of bugs even if they only show up rarely in a production + system.\\ + \item There is a reasonably comprehensive set of regression tests + that avoids re-creating the most common errors in new versions of + Bacula. + \end{enumerate} + +\label{AuthorizationErrors} +\section{I'm Getting Authorization Errors. What is Going On? } +\item [I'm Getting Authorization Errors. What is Going On? ] +\index[general]{Authorization Errors} +\index[general]{Concurrent Jobs} + For security reasons, Bacula requires that both the File daemon and the + Storage daemon know the name of the Director as well as its password. As a + consequence, if you change the Director's name or password, you must make + the corresponding change in the Storage daemon's and in the File daemon's + configuration files. + + During the authorization process, the Storage daemon and File daemon + also require that the Director authenticates itself, so both ends + require the other to have the correct name and password. + + If you have edited the conf files and modified any name or any password, + and you are getting authentication errors, then your best bet is to go + back to the original conf files generated by the Bacula installation + process. Make only the absolutely necessary modifications to these + files -- e.g. add the correct email address. Then follow the + instructions in the \ilink{ Running Bacula}{TutorialChapter} chapter of + this manual. You will run a backup to disk and a restore. Only when + that works, should you begin customization of the conf files. + + Another reason that you can get authentication errors is if you are + running Multiple Concurrent Jobs in the Director, but you have not set + them in the File daemon or the Storage daemon. Once you reach their + limit, they will reject the connection producing authentication (or + connection) errors. + + If you are having problems connecting to a Windows machine that + previously worked, you might try restarting the Bacula service since + Windows frequently encounters networking connection problems. + + Some users report that authentication fails if there is not a proper + reverse DNS lookup entry for the machine. This seems to be a + requirement of gethostbyname(), which is what Bacula uses to translate + names into IP addresses. If you cannot add a reverse DNS entry, or you + don't know how to do so, you can avoid the problem by specifying an IP + address rather than a machine name in the appropriate Bacula conf file. + + Here is a picture that indicates what names/passwords in which + files/Resources must match up: + + \includegraphics{\idir Conf-Diagram.eps} + + In the left column, you will find the Director, Storage, and Client + resources, with their names and passwords -- these are all in {\bf + bacula-dir.conf}. The right column is where the corresponding values + should be found in the Console, Storage daemon (SD), and File daemon (FD) + configuration files. + + Another thing to check is to ensure that the Bacula component you are + trying to access has {\bf Maximum Concurrent Jobs} set large enough to + handle each of the Jobs and the Console that want to connect + simultaneously. Once the maximum connections has been reached, each + Bacula component will reject all new connections. + + Finally, make sure you have no {\bf hosts.allow} or {\bf hosts.deny} + file that is not permitting access to the site trying to connect. + +\label{AccessProblems} +\section{Bacula Runs Fine but Cannot Access a Client on a Different Machine. + Why? } +\item [Bacula Runs Fine but Cannot Access a Client on a Different Machine. + Why? ] +\index[general]{Cannot Access a Client} + There are several reasons why Bacula could not contact a client on a + different machine. They are: + +\begin{itemize} +\item It is a Windows Client, and the client died because of an improper + configuration file. Check that the Bacula icon is in the system tray and the + the menu items work. If the client has died, the icon will disappear only + when you move the mouse over the icon. +\item The Client address or port is incorrect or not resolved by DNS. See if + you can ping the client machine using the same address as in the Client + record. +\item You have a firewall, and it is blocking traffic on port 9102 between + the Director's machine and the Client's machine (or on port 9103 between the + Client and the Storage daemon machines). +\item Your password or names are not correct in both the Director and the + Client machine. Try configuring everything identical to how you run the + client on the same machine as the Director, but just change the Address. If + that works, make the other changes one step at a time until it works. +\item You may also be having problems between your File daemon and your + Storage daemon. The name you use in the Storage resource of your + Director's conf file must be known (resolvable) by the File daemon, + because it is passed symbolically to the File daemon, which then + resolves it to get an IP address used to contact the Storage daemon. +\item You may have a {\bf hosts.allow} or {\bf hosts.deny} file that is + not permitting access. +\end{itemize} + +\label{startover} +\section{My Catalog is Full of Test Runs, How Can I Start Over?} +\item [My Catalog is Full of Test Runs, How Can I Start Over? ] + \index[general]{My Catalog is Full of Test Runs, How Can I Start Over? } + If you are using MySQL do the following: + +\footnotesize +\begin{verbatim} + cd /src/cats + ./drop_mysql_tables + ./make_mysql_tables + +\end{verbatim} +\normalsize + +If you are using SQLite, do the following: + +\footnotesize +\begin{verbatim} + Delete bacula.db from your working directory. + cd /src/cats + ./drop_sqlite_tables + ./make_sqlite_tables + +\end{verbatim} +\normalsize + +Then write an EOF on each tape you used with {\bf Bacula} using: + +\footnotesize +\begin{verbatim} +mt -f /dev/st0 rewind +mt -f /dev/st0 weof +\end{verbatim} +\normalsize + +where you need to adjust the device name for your system. + +\label{restorehang} +\section{I Run a Restore Job and Bacula Hangs. What do I do?} +\item [I Run a Restore Job and Bacula Hangs. What do I do?] +\index[general]{I Run a Restore Job and Bacula Hangs. What do I do? } + On Bacula version 1.25 and prior, it expects you to have the correct + tape mounted prior to a restore. On Bacula version 1.26 and higher, it + will ask you for the tape, and if the wrong one is mounted, it will + inform you. + + If you have previously done an {\bf unmount} command, all Storage daemon + sessions (jobs) will be completely blocked from using the drive + unmounted, so be sure to do a {\bf mount} after your unmount. If in + doubt, do a second {\bf mount}, it won't cause any harm. + +\label{windowstart} +\section{I Cannot Get My Windows Client to Start Automatically? } +\item [I Cannot Get My Windows Client to Start Automatically? ] +\index[general]{Windows Auto Start} + You are probably having one of two problems: either the Client is dying + due to an incorrect configuration file, or you didn't do the + Installation commands necessary to install it as a Windows Service. + + For the first problem, see the next FAQ question. For the second + problem, please review the \ilink{ Windows Installation + instructions}{Win32Chapter} in this manual. + +\label{windowsdie} +\section{My Windows Client Immediately Dies When I Start It} +\item [My Windows Client Immediately Dies When I Start It] +\index[general]{Windows Client Dies} +The most common problem is either that the configuration file is not where +it expects it to be, or that there is an error in the configuration file. +You must have the configuration file in {\bf +c:\textbackslash{}bacula\textbackslash{}bin\textbackslash{}bacula-fd.conf}. + +To {\bf see} what is going on when the File daemon starts on Windows, do the +following: + +\footnotesize +\begin{verbatim} + Start a DOS shell Window. + cd c:\bacula\bin + bacula-fd -d100 -c c:\bacula\bin\bacula-fd.conf + +\end{verbatim} +\normalsize + +This will cause the FD to write a file {\bf bacula.trace} in the current +directory, which you can examine and thereby determine the problem. + +\label{scroll} +\item [When I Start the Console, the Error Messages Fly By. How can I see + them? ] +\index[general]{Error Messages} + Either use a shell window with a scroll bar, or use the gnome-console. + In any case, you probably should be logging all output to a file, and + then you can simply view the file using an editor or the {\bf less} + program. To log all output, I have the following in my Director's + Message resource definition: + +\footnotesize +\begin{verbatim} + append = "/home/kern/bacula/bin/log" = all, !skipped + +\end{verbatim} +\normalsize + +Obviously you will want to change the filename to be appropriate for your +system. + +\label{nobackup} +\section{My backups are not working on my Windows + Client. What should I do?} +\item [I didn't realize that the backups were not working on my Windows + Client. What should I do? ] +\index[general]{Backups Failing} +You should be sending yourself an email message for each job. This will avoid +the possibility of not knowing about a failed backup. To do so put something +like: + +\footnotesize +\begin{verbatim} + Mail = yourname@yourdomain = all, !skipped + +\end{verbatim} +\normalsize + +in your Director's message resource. You should then receive one email for +each Job that ran. When you are comfortable with what is going on (it took +me 9 months), you might change that to: + +\footnotesize +\begin{verbatim} + MailOnError = yourname@yourdomain = all, !skipped + +\end{verbatim} +\normalsize + +then you only get email messages when a Job errors as is the case for your +Windows machine. + +You should also be logging the Director's messages, please see the previous +FAQ for how to do so. + +\label{sched} +\section{All my Jobs are scheduled for the same time. Will this cause + problems?} +\item [All my Jobs are scheduled for the same time. Will this cause + problems? ] +\index[general]{Schedule problems} + No, not at all. Bacula will schedule all the Jobs at the same time, but + will run them one after another unless you have increased the number of + simultaneous jobs in the configuration files for the Director, the File + daemon, and the Storage daemon. The appropriate configuration record is + {\bf Maximum Concurrent Jobs = nn}. At the current time, we recommend + that you leave this set to {\bf 1} for the Director. + +\label{disk} +\section{Can Bacula Backup My System To Files instead of Tape?} +\item [Can Bacula Backup My System To Files instead of Tape? ] +\index[general]{Backup to Disk} + Yes, in principle, Bacula can backup to any storage medium as long as + you have correctly defined that medium in the Storage daemon's Device + resource. For an example of how to backup to files, please see the + \ilink{Pruning Example}{PruningExample} in the Recycling chapter of this + manual. Also, there is a whole chapter devoted to \ilink{Basic Volume + Management}{DiskChapter}. This chapter was originally written to + explain how to write to disk, but was expanded to include volume + management. It is, however, still quite a good chapter to read. + +\label{testbackup} +\section{Can I use a dummy device to test the backup?} + Yes, to have a {\sl Virtual} device which just consumes data, you can use a + FIFO device (see \ilink{Stored configuration}{SetupFifo}). + It's useful to test a backup. +\footnotesize +\begin{verbatim} +Device { + Name = NULL + Media Type = NULL + Device Type = Fifo + Archive Device = /dev/null + LabelMedia = yes + Random Access = no + AutomaticMount = no + RemovableMedia = no + MaximumOpenWait = 60 + AlwaysOpen = no +} +\end{verbatim} +\normalsize + +\label{bigfiles} +\section{Can Bacula Backup and Restore Files Bigger than 2 Gigabytes?} +\item [Can Bacula Backup and Restore Files Bigger than 2 Gigabytes?] +\index[general]{Large file support} +If your operating system permits it, and you are running Bacula version +1.26 or later, the answer is yes. To the best of our knowledge all client +system supported by Bacula can handle files bigger 2 Gigabytes. + +\label{cancel} +\section{I want to stop a job.} +%% Is there a better way than "./bacula stop" to stop it?} +\item [I Started A Job then Decided I Really Did Not Want to Run It. Is + there a better way than {\bf ./bacula stop} to stop it?] +\index[general]{Cancelling jobs} + Yes, you normally should use the Console command {\bf cancel} to cancel + a Job that is either scheduled or running. If the Job is scheduled, it + will be marked for cancellation and will be canceled when it is + scheduled to start. If it is running, it will normally terminate after + a few minutes. If the Job is waiting on a tape mount, you may need to + do a {\bf mount} command before it will be canceled. + +\label{trademark} +\section{Why have You Trademarked the Name Bacula?} +\item [Why have You Trademarked the Name + Bacula\raisebox{.6ex}{{\footnotesize \textsuperscript{\textregistered}}}?] +\index[general]{Bacula Trademark} +We have trademarked the name Bacula to ensure that all media written by any +program named Bacula will always be compatible. Anyone may use the name +Bacula, even in a derivative product as long as it remains totally compatible +in all respects with the program defined here. + +\label{docversion} +\section{Why is the Online Document for Version 1.39 but the Released Version is 1.38?} +\item [Why is the Online Document for Version 1.39 of Bacula when the + Current Version is 1.38?] +\index[general]{Multiple manuals} +As Bacula is being developed, the document is also being enhanced, more +often than not it has clarifications of existing features that can be very +useful to our users, so we publish the very latest document. Fortunately +it is rare that there are confusions with new features. + +If you want to read a document that pertains only to a specific version, +please use the one distributed in the source code. The web site also has +online versions of both the released manual and the current development +manual. + +\label{sure} +\section{Does Bacula really save and restore all files?} +\item [How Can I Be Sure that Bacula Really Saves and Restores All Files? ] +\index[general]{Checking Restores} + It is really quite simple, but took me a while to figure + out how to "prove" it. First make a Bacula Rescue disk, see the + \ilink{Disaster Recovery Using Bacula}{RescueChapter} chapter + of this manual. + Second, you run a full backup of all your files on all partitions. + Third, you run an Verify InitCatalog Job on the same FileSet, which + effectively makes a record of all the files on your system. Fourth, you + run a Verify Catalog job and assure yourself that nothing has changed + (well, between an InitCatalog and Catalog one doesn't expect anything). + Then do the unthinkable, write zeros on your MBR (master boot record) + wiping out your hard disk. Now, restore your whole system using your + Bacula Rescue disk and the Full backup you made, and finally re-run the + Verify Catalog job. You will see that with the exception of the + directory modification and access dates and the files changed during the + boot, your system is identical to what it was before you wiped your hard + disk. + Alternatively you could do the wiping and restoring to another computer + of the same type. + +\label{upgrade} +\section{I want an Incremental but Bacula runs it as a Full backup. Why?} +\item [I did a Full backup last week, but now in running an Incremental, + Bacula says it did not find a FULL backup, so it did a FULL backup. Why?] +\index[general]{FULL backup not found} + Before doing an Incremental or a Differential + backup, Bacula checks to see if there was a prior Full backup of the + same Job that terminated successfully. If so, it uses the date that + full backup started as the time for comparing if files have changed. If + Bacula does not find a successful full backup, it proceeds to do one. + Perhaps you canceled the full backup, or it terminated in error. In + such cases, the full backup will not be successful. You can check by + entering {\bf list jobs} and look to see if there is a prior Job with + the same Name that has Level F and JobStatus T (normal termination). + + Another reason why Bacula may not find a suitable Full backup is that + every time you change the FileSet, Bacula will require a new Full + backup. This is necessary to ensure that all files are properly backed + up in the case where you have added more files to the FileSet. + Beginning with version 1.31, the FileSets are also dated when they are + created, and this date is displayed with the name when you are listing + or selecting a FileSet. For more on backup levels see below. + + See also {\bf Ignore FileSet Changes} in the + \ilink{FileSet Resource definition}{FileSetResource} in the Director + chapter of this document. + +\label{filenamelengths} +\section{Do you really handle unlimited path lengths?} +\item [How Can You Claim to Handle Unlimited Path and Filename Lengths + when All Other Programs Have Fixed Limits?] +\index[general]{Path and Filename Lengths} + Most of those other programs have been around for a long time, in fact + since the beginning of Unix, which means that they were designed for + rather small fixed length path and filename lengths. Over the years, + these restrictions have been relaxed allowing longer names. Bacula on + the other hand was designed in 2000, and so from the start, Path and + Filenames have been kept in buffers that start at 256 bytes in length, + but can grow as needed to handle any length. Most of the work is + carried out by lower level routines making the coding rather easy. + + Note that due to limitations Win32 path and filenames cannot exceed + 260 characters. By using Win32 Unicode functions, we will remove this + restriction in later versions of Bacula. + +\label{unique} +\section{What Is the Really Unique Feature of Bacula?} +\item [What Is the Really Unique Feature of Bacula?] +\index[general]{Unique Feature of Bacula} + Well, it is hard to come up with unique features when backup programs + for Unix machines have been around since the 1960s. That said, I + believe that Bacula is the first and only program to use a standard SQL + interface to catalog its database. Although this adds a bit of + complexity and possibly overhead, it provides an amazingly rich set of + features that are easy to program and enhance. The current code has + barely scratched the surface in this regard (version 1.38). + + The second feature, which gives a lot of power and flexibility to Bacula + is the Bootstrap record definition. + + The third unique feature, which is currently (1.30) unimplemented, and + thus can be called vaporware :-), is Base level saves. When + implemented, this will enormously reduce tape usage. + +\label{sequence} +\section{How can I force one job to run after another?} +\item [If I Run Multiple Simultaneous Jobs, How Can I Force One + Particular Job to Run After Another Job? ] +\index[general]{Multiple Simultaneous Jobs} +Yes, you can set Priorities on your jobs so that they run in the order you +specify. Please see: +\ilink{the Priority record}{Priority} in the Job resource. + +\label{nomail} +\section{I Am Not Getting Email Notification, What Can I Do? } +\item [I Am Not Getting Email Notification, What Can I Do? ] +\index[general]{No Email Notification} + The most common problem is that you have not specified a fully qualified + email address and your bsmtp server is rejecting the mail. The next + most common problem is that your bsmtp server doesn't like the syntax on + the From part of the message. For more details on this and other + problems, please see the \ilink{ Getting Email Notification to + Work}{email} section of the Tips chapter of this manual. The section + \ilink{ Getting Notified of Job Completion}{notification} of the Tips + chapter may also be useful. For more information on the {\bf bsmtp} + mail program, please see \ilink{bsmtp in the Volume Utility Tools + chapter}{bsmtp} of this manual. + +\label{periods} +\section{My retention periods don't work} +\item [I Change Recycling, Retention Periods, or File Sizes in my Pool + Resource and they Still Don't Work.] +\index[general]{Recycling} +\index[general]{Retention Periods} +\index[general]{Pool changes} + The different variables associated with a Pool are defined in the Pool + Resource, but are actually read by Bacula from the Catalog database. On + Bacula versions prior to 1.30, after changing your Pool Resource, you must + manually update the corresponding values in the Catalog by using the {\bf + update pool} command in the Console program. In Bacula version 1.30, Bacula + does this for you automatically every time it starts. + + When Bacula creates a Media record (Volume), it uses many default values from + the Pool record. If you subsequently change the Pool record, the new values + will be used as a default for the next Volume that is created, but if you + want the new values to apply to existing Volumes, you must manually update + the Volume Catalog entry using the {\bf update volume} command in the Console + program. + +\label{CompressionNotWorking} +\section{Why aren't my files compressed?} +\item [I Have Configured Compression On, But None of My Files Are + Compressed. Why?] +\index[general]{Compression} + There are two kinds of compression. One is tape compression. This is done by + the tape drive hardware, and you either enable or disable it with system + tools such as {\bf mt}. This compression works independently of Bacula, + and when it is enabled, you should not use the Bacula software + compression. + + Bacula also has software compression code in the File daemons, which you + normally need to enable only when backing up to file Volumes. There are + two conditions necessary to enable the Bacula software compression. + +\begin{enumerate} +\item You must have the zip development libraries loaded on your system + when building Bacula and Bacula must find this library, normally {\bf + /usr/lib/libz.a}. On Red Hat systems, this library is provided by the + {\bf zlib-devel} rpm. + + If the library is found by Bacula during the {\bf ./configure} it will + be mentioned in the {\bf config.out} line by: + +\footnotesize +\begin{verbatim} + ZLIB support: yes + +\end{verbatim} +\normalsize + +\item You must add the {\bf compression=gzip} option on your Include + statement in the Director's configuration file. +\end{enumerate} + +\label{NewTape} +\item [Bacula is Asking for a New Tape After 2 GB of Data but My Tape + holds 33 GB. Why?] +\index[general]{Tape capacity} +There are several reasons why Bacula will request a new tape. + +\begin{itemize} +\item There is an I/O error on the tape. Bacula prints an error message and + requests a new tape. Bacula does not attempt to continue writing after an + I/O error. +\item Bacula encounters and end of medium on the tape. This is not always + distinguishable from an I/O error. +\item You have specifically set some size limitation on the tape. For example + the {\bf Maximum Volume Bytes} or {\bf Maximum Volume Files} in the + Director's Pool resource, or {\bf Maximum Volume Size} in the Storage + daemon's Device resource. +\end{itemize} + +\label{LevelChanging} +\section{Incremental backups are not working} +\item [Bacula is Not Doing the Right Thing When I Request an Incremental + Backup. Why?] +\index[general]{Incremental backups} + As explained in one of the previous questions, Bacula will automatically + upgrade an Incremental or Differential job to a Full backup if it cannot + find a prior Full backup or a suitable Full backup. For the gory + details on how/when Bacula decides to upgrade levels please see the + \ilink{Level record}{Level} in the Director's configuration chapter of + this manual. + + If after reading the above mentioned section, you believe that Bacula is not + correctly handling the level (Differential/Incremental), please send us the + following information for analysis: + +\begin{itemize} +\item Your Director's configuration file. +\item The output from {\bf list jobs} covering the period where you are + having the problem. +\item The Job report output from the prior Full save (not critical). +\item An {\bf llist jobid=nnn} where nnn is the JobId of the prior Full save. + +\item The Job report output from the save that is doing the wrong thing (not + critical). +\item An {\bf llist jobid=nnn} where nnn is the JobId of the job that was not + correct. +\item An explanation of what job went wrong and why you think it did. + \end{itemize} + +The above information can allow us to analyze what happened, without it, +there is not much we can do. + +\label{WaitForever} +\section{I am waiting forever for a backup of an offsite machine} +\item [I am Backing Up an Offsite Machine with an Unreliable Connection. + The Director Waits Forever for the Client to Contact the SD. What Can I + Do?] +\index[general]{Backing Up Offsite Machines} + Bacula was written on the assumption that it will have a good TCP/IP + connection between all the daemons. As a consequence, the current + Bacula doesn't deal with faulty connections very well. This situation + is slowly being corrected over time. + + There are several things you can do to improve the situation. + +\begin{itemize} +\item Upgrade to version 1.32 and use the new SDConnectTimeout record. For + example, set: + +\footnotesize +\begin{verbatim} + SD Connect Timeout = 5 min + +\end{verbatim} +\normalsize + +in the FileDaemon resource. +\item Run these kinds of jobs after all other jobs. + \end{itemize} + +\label{sshHanging} +\section{SSH hangs forever after starting Bacula} +\item [When I ssh into a machine and start Bacula then attempt to exit, + ssh hangs forever.] +\index[general]{ssh hangs} + This happens because Bacula leaves stdin, stdout, and stderr open for + debug purposes. To avoid it, the simplest thing to do is to redirect + the output of those files to {\bf /dev/null} or another file in your + startup script (the Red Hat autostart scripts do this automatically). + For example, you start the Director with: + +\footnotesize +\begin{verbatim} + bacula-dir -c bacula-dir.conf ... >/dev/null 0>\&1 2>\&1 + +\end{verbatim} +\normalsize + +and likewise for the other daemons. + +\label{RetentionPeriods} +\section{I'm confused by retention periods} +\item [I'm confused by the different Retention periods: File Retention, + Job Retention, Volume Retention. Why are there so many?] +\index[general]{Retention Periods} + Yes, this certainly can be confusing. The basic reason for so many is + to allow flexibility. The File records take quite a lot of space in the + catalog, so they are typically records you want to remove rather + quickly. The Job records, take very little space, and they can be + useful even without the File records to see what Jobs actually ran and + when. One must understand that if the File records are removed from the + catalog, you cannot use the {\bf restore} command to restore an + individual file since Bacula no longer knows where it is. However, as + long as the Volume Retention period has not expired, the data will still + be on the tape, and can be recovered from the tape. + + For example, I keep a 30 day retention period for my Files to keep my + catalog from getting too big, but I keep my tapes for a minimum of one + year, just in case. + +\label{MaxVolumeSize} +\section{MaxVolumeSize is ignored} +\item [Why Does Bacula Ignore the MaxVolumeSize Set in my Pool?] +\index[general]{MaxVolumeSize} + The MaxVolumeSize that Bacula uses comes from the Media record, so most + likely you changed your Pool, which is used as the default for creating + Media records, {\bf after} you created your Volume. Check what is in + the Media record by doing: + +\footnotesize +\begin{verbatim} +llist Volume=xxx +\end{verbatim} +\normalsize + +If it doesn't have the right value, you can use: + +\footnotesize +\begin{verbatim} +update Volume=xxx +\end{verbatim} +\normalsize + +to change it. + +\label{ConnectionRefused} +\section{I get a Connection refused when connecting to my Client} +\item [In connecting to my Client, I get "ERR:Connection Refused. Packet + Size too big from File daemon:192.168.1.4:9102" Why?] +\index[general]{ERR:Connection Refused} + This is typically a communications error resulting from one of the + following: + + +\begin{itemize} +\item Old versions of Bacula, usually a Win32 client, where two threads were + using the same I/O packet. Fixed in more recent versions. Please upgrade. +\item Some other program such as an HP Printer using the same port (9102 in + this case). +\end{itemize} + +If it is neither of the above, please submit a bug report at +\elink{bugs.bacula.org}{http://bugs.bacula.org}. + +Another solution might be to run the daemon with the debug option by: + +\footnotesize +\begin{verbatim} + Start a DOS shell Window. + cd c:\bacula\bin + bacula-fd -d100 -c c:\bacula\bin\bacula-fd.conf + +\end{verbatim} +\normalsize + +This will cause the FD to write a file {\bf bacula.trace} in the current +directory, which you can examine to determine the problem. + +\section{Long running jobs die with Pipe Error} +\item [During long running jobs my File daemon dies with Pipe Error, or + some other communications error. Why?] +\index[general]{Communications Errors} +\index[general]{Pipe Errors} +\index[general]{slow} +\index[general]{Backups!slow} + There are a number of reasons why a connection might break. + Most often, it is a router between your two computers that times out + inactive lines (not respecting the keepalive feature that Bacula uses). + In that case, you can use the {\bf Heartbeat Interval} directive in + both the Storage daemon and the File daemon. + + In at least one case, the problem has been a bad driver for a Win32 + NVidia NForce 3 ethernet card with driver (4.4.2 17/05/2004). + In this case, a good driver is (4.8.2.0 06/04/2005). Moral of + the story, make sure you have the latest ethernet drivers + loaded, or use the following workaround as suggested by Thomas + Simmons for Win32 machines: + + Browse to: + Start \gt{} Control Panel \gt{} Network Connections + + Right click the connection for the nvidia adapter and select properties. + Under the General tab, click "Configure...". Under the Advanced tab set + "Checksum Offload" to disabled and click OK to save the change. + + Lack of communications, or communications that get interrupted can + also be caused by Linux firewalls where you have a rule that throttles + connections or traffic. For example, if you have: + +\footnotesize +\begin{verbatim} +iptables -t filter -A INPUT -m limit --limit 3/second --limit-burst 3 -j DROP +\end{verbatim} +\normalsize + + you will want to add the following rules {\bf before} the above rule: +\footnotesize +\begin{verbatim} +iptables -t filter -A INPUT --dport 9101 -j ACCEPT +iptables -t filter -A INPUT --dport 9102 -j ACCEPT +iptables -t filter -A INPUT --dport 9103 -j ACCEPT +\end{verbatim} +\normalsize + This will ensure that any Bacula traffic will not get terminated because + of high usage rates. + +\section{How do I tell the Job which Volume to use?} +\item[I can't figure out how to tell the job which volume to use] + \index[general]{What tape to mount} + This is an interesting statement. I now see that a number of people new to + Bacula have the same problem as you, probably from using programs like tar. + + In fact, you do not tell Bacula what tapes to use. It is the inverse. Bacula + tells you want tapes it wants. You put tapes at its disposition and it + chooses. + + Now, if you *really* want to be tricky and try to tell Bacula what to do, it + will be reasonable if for example you mount a valid tape that it can use on a + drive, it will most likely go ahead and use it. It also has a documented + algorithm for choosing tapes -- but you are asking for problems ... + + So, the trick is to invert your concept of things and put Bacula in charge of + handling the tapes. Once you do that, you will be fine. If you want to + anticipate what it is going to do, you can generally figure it out correctly + and get what you want. + + If you start with the idea that you are going to force or tell Bacula to use + particular tapes or you insist on trying to run in that kind of mode, you will + probably not be too happy. + + I don't want to worry about what tape has what data. That is what Bacula is + designed for. + + If you have an application where you *really* need to remove a tape each day + and insert a new one, it can be done the directives exist to accomplish that. + In such a case, one little "trick" to knowing what tape Bacula will want at + 2am while you are asleep is to run a tiny job at 4pm while you are still at + work that backs up say one directory, or even one file. You will quickly find + out what tape it wants, and you can mount it before you go home ... + +\label{Password generation} +\section{Password generation} +\item [How do I generate a password?] +\index[general]{MaxVolumeSize} + + Each daemon needs a password. This password occurs in the configuration + file for that daemon and in the bacula-dir.conf file. These passwords are + plain text. There is no special generation procedure. Most people just + use random text. + + Passwords are never sent over the wire in plain text. They are always + encrypted. + + Security surrounding these passwords is best left security to your + operating system. Passwords are not encrypted within Bacula + configuration files. + +\end{description} + diff --git a/docs/manuals/fr/catalog/fdl.tex b/docs/manuals/de/old/problems/fdl.tex similarity index 100% rename from docs/manuals/fr/catalog/fdl.tex rename to docs/manuals/de/old/problems/fdl.tex diff --git a/docs/manuals/de/old/problems/firewalls.tex b/docs/manuals/de/old/problems/firewalls.tex new file mode 100644 index 00000000..1e93c04e --- /dev/null +++ b/docs/manuals/de/old/problems/firewalls.tex @@ -0,0 +1,373 @@ +%% +%% + +\chapter{Dealing with Firewalls} +\label{FirewallsChapter} +\index[general]{Dealing with Firewalls } +\index[general]{Firewalls!Dealing with } + +If you have a firewall or a DMZ installed on your computer, you may experience +difficulties contacting one or more of the Clients to back them up. This is +especially true if you are trying to backup a Client across the Internet. + +\section{Technical Details} +\index[general]{Technical Details } +\index[general]{Details!Technical } + +If you are attempting to do this, the sequence of network events in Bacula to +do a backup are the following: + +\footnotesize +\begin{verbatim} +Console -> DIR:9101 +DIR -> SD:9103 +DIR -> FD:9102 +FD -> SD:9103 +\end{verbatim} +\normalsize + +Where hopefully it is obvious that DIR represents the Director, FD the File +daemon or client, and SD the Storage daemon. The numbers that follow those +names are the standard ports used by Bacula, and the -\gt{} represents the +left side making a connection to the right side (i.e. the right side is the +"server" or is listening on the specified port), and the left side is the +"client" that initiates the conversation. + +Note, port 9103 serves both the Director and the File daemon, each having its +own independent connection. + +If you are running {\bf iptables}, you might add something like: + +\footnotesize +\begin{verbatim} +-A FW-1-INPUT -m state --state NEW -m tcp -p tcp --dport 9101:9103 -j ACCEPT +\end{verbatim} +\normalsize + +on your server, and + +\footnotesize +\begin{verbatim} +-A FW-1-INPUT -m state --state NEW -m tcp -p tcp --dport 9102 -j ACCEPT +\end{verbatim} +\normalsize + +on your client. In both cases, I assume that the machine is allowed to +initiate connections on any port. If not, you will need to allow outgoing +connections on ports 9102 and 9103 on your server and 9103 on your client. +Thanks to Raymond Norton for this tip. + +\section{A Concrete Example} +\index[general]{Example!Concrete } +\index[general]{Concrete Example } + +The following discussion was originally written by +Jesse Guardiani because he has 'internal' and 'external' requiring the +Director and the Client to use different IP addresses. His original +solution was to define two different Storage resources in the Director's +conf file each pointing to the same Storage daemon but with different +IP addresses. In Bacula 1.38.x this no longer works, because Bacula makes +a one-to-one association between a Storage daemon resource and a Device (such +as an Autochanger). As a consequence, I have modified his original +text to a method that I believe will work, but is as of yet untested +(KES - July 2006). + +My bacula server is on the 192.168.1.0/24 network at IP address 192.168.1.52. +For the sake of discussion we will refer to this network as the 'internal' +network because it connects to the internet through a NAT'd firewall. We will +call the network on the public (internet) side of the NAT'd firewall the +'external' network. Also, for the sake of discussion we will call my bacula +server: + +\footnotesize +\begin{verbatim} + server.int.mydomain.tld +\end{verbatim} +\normalsize + +when a fully qualified domain name is required, or simply: + +\footnotesize +\begin{verbatim} + server +\end{verbatim} +\normalsize + +if a hostname is adequate. We will call the various bacula daemons running on +the server.int.mydomain.tld machine: + +\footnotesize +\begin{verbatim} + server-fd + server-sd + server-dir +\end{verbatim} +\normalsize + +In addition, I have two clients that I want to back up with Bacula. The first +client is on the internal network. Its fully qualified domain name is: + +\footnotesize +\begin{verbatim} + private1.int.mydomain.tld +\end{verbatim} +\normalsize + +And its hostname is: + +\footnotesize +\begin{verbatim} + private1 +\end{verbatim} +\normalsize + +This machine is a client and therefore runs just one bacula daemon: + +\footnotesize +\begin{verbatim} + private1-fd +\end{verbatim} +\normalsize + +The second client is on the external network. Its fully qualified domain name +is: + +\footnotesize +\begin{verbatim} + public1.mydomain.tld +\end{verbatim} +\normalsize + +And its hostname is: + +\footnotesize +\begin{verbatim} + public1 +\end{verbatim} +\normalsize + +This machine also runs just one bacula daemon: + +\footnotesize +\begin{verbatim} + public1-fd +\end{verbatim} +\normalsize + +Finally, I have a NAT firewall/gateway with two network interfaces. The first +interface is on the internal network and serves as a gateway to the internet +for all the machines attached to the internal network (For example, +server.int.mydomain.tld and private1.int.mydomain.tld). The second interface +is on the external (internet) network. The external interface has been +assigned the name: + +\footnotesize +\begin{verbatim} + firewall.mydomain.tld +\end{verbatim} +\normalsize + +Remember: + +\footnotesize +\begin{verbatim} + *.int.mydomain.tld = internal network + *.mydomain.tld = external network +\end{verbatim} +\normalsize + +\subsection{The Bacula Configuration Files for the Above} +\index[general]{Above!Bacula Configuration Files for the } +\index[general]{Bacula Configuration Files for the Above } + +server-sd manages a 4 tape AIT autoloader. All of my backups are written to +server-sd. I have just *one* Device resource in my server-sd.conf file: + +\footnotesize +\begin{verbatim} +Autochanger { + Name = "autochanger1";\ + Device = Drive0 + Changer Device = /dev/ch0; + Changer Command = "/usr/local/sbin/chio-bacula %c %o %S %a"; +} +Device { + Name = Drive0 + DriveIndex = 0 + Media Type = AIT-1; + Archive Device = /dev/nrsa1; + Label Media = yes; + AutoChanger = yes; + AutomaticMount = yes; # when device opened, read it + AlwaysOpen = yes; + Hardware End of Medium = No + Fast Forward Space File = No + BSF at EOM = yes +} +\end{verbatim} +\normalsize + +(note, please see +\ilink{the Tape Testing}{FreeBSDTapes} chapter of this manual +for important FreeBSD information.) However, unlike previously, there +is only one Storage definition in my server-dir.conf file: + +\footnotesize +\begin{verbatim} +Storage { + Name = "autochanger1" # Storage device for backing up + Address = Storage-server + SDPort = 9103 + Password = "mysecretpassword" + Device = "autochanger1" + Media Type = AIT-1 + Autochanger = yes +} +\end{verbatim} +\normalsize + +Note that the Storage resource uses neither of the two addresses to +the Storage daemon -- neither server.int.mydomain.tld nor +firewall.mydomain.tld, but instead uses the address Storage-server. + +What is key is that in the internal net, Storage-server is resolved +to server.int.mydomain.tld, either with an entry in /etc/hosts, or by +creating and appropriate DNS entry, and on the external net (the Client +machine), Storage-server is resolved to firewall.mydomain.tld. + + +In addition to the above, I have two Client resources defined in +server-dir.conf: + +\footnotesize +\begin{verbatim} +Client { + Name = private1-fd + Address = private1.int.mydomain.tld + FDPort = 9102 + Catalog = MyCatalog + Password = "mysecretpassword" # password for FileDaemon +} +Client { + Name = public1-fd + Address = public1.mydomain.tld + FDPort = 9102 + Catalog = MyCatalog + Password = "mysecretpassword" # password for FileDaemon +} +\end{verbatim} +\normalsize + +And finally, to tie it all together, I have two Job resources defined in +server-dir.conf: + +\footnotesize +\begin{verbatim} +Job { + Name = "Private1-Backup" + Type = Backup + Client = private1-fd + FileSet = "Private1" + Schedule = "WeeklyCycle" + Storage = "autochanger1-int" + Messages = Standard + Pool = "Weekly" + Write Bootstrap = "/var/db/bacula/Private1-Backup.bsr" + Priority = 12 +} +Job { + Name = "Public1-Backup" + Type = Backup + Client = public1-fd + FileSet = "Public1" + Schedule = "WeeklyCycle" + Storage = "autochanger1-ext" + Messages = Standard + Pool = "Weekly" + Write Bootstrap = "/var/db/bacula/Public1-Backup.bsr" + Priority = 13 +} +\end{verbatim} +\normalsize + +It is important to notice that because the 'Private1-Backup' Job is intended +to back up a machine on the internal network so it resolves Storage-server +to contact the Storage daemon via the internal net. +On the other hand, the 'Public1-Backup' Job is intended to +back up a machine on the external network, so it resolves Storage-server +to contact the Storage daemon via the external net. + +I have left the Pool, Catalog, Messages, FileSet, Schedule, and Director +resources out of the above server-dir.conf examples because they are not +pertinent to the discussion. + +\subsection{How Does It Work?} +\index[general]{How Does It Work? } +\index[general]{Work!How Does It } + +If I want to run a backup of private1.int.mydomain.tld and store that backup +using server-sd then my understanding of the order of events is this: + +\begin{enumerate} +\item I execute my Bacula 'console' command on server.int.mydomain.tld. +\item console connects to server-dir. +\item I tell console to 'run' backup Job 'Private1-Backup'. +\item console relays this command to server-dir. +\item server-dir connects to private1-fd at private1.int.mydomain.tld:9102 +\item server-dir tells private1-fd to start sending the files defined in the + 'Private1-Backup' Job's FileSet resource to the Storage resource + 'autochanger1', which we have defined in server-dir.conf as having the +address:port of Storage-server, which is mapped by DNS to server.int.mydomain.tld. +\item private1-fd connects to server.int.mydomain.tld:9103 and begins sending + files. + \end{enumerate} + +Alternatively, if I want to run a backup of public1.mydomain.tld and store +that backup using server-sd then my understanding of the order of events is +this: + +\begin{enumerate} +\item I execute my Bacula 'console' command on server.int.mydomain.tld. +\item console connects to server-dir. +\item I tell console to 'run' backup Job 'Public1-Backup'. +\item console relays this command to server-dir. +\item server-dir connects, through the NAT'd firewall, to public1-fd at + public1.mydomain.tld:9102 +\item server-dir tells public1-fd to start sending the files defined in the + 'Public1-Backup' Job's FileSet resource to the Storage resource + 'autochanger1', which we have defined in server-dir.conf as having the + same address:port as above of Storage-server, but which on this machine + is resolved to firewall.mydomain.tld:9103. +\item public1-fd connects to firewall.mydomain.tld:9103 and begins sending + files. + \end{enumerate} + +\subsection{Important Note} +\index[general]{Important Note } +\index[general]{Note!Important } + +In order for the above 'Public1-Backup' Job to succeed, +firewall.mydomain.tld:9103 MUST be forwarded using the firewall's +configuration software to server.int.mydomain.tld:9103. Some firewalls call +this 'Server Publication'. Others may call it 'Port Forwarding'. + +\subsection{Firewall Problems} +\index[general]{Firewall Problems} +\index[general]{Problems!Firewalls} +Either a firewall or a router may decide to timeout and terminate +open connections if they are not active for a short time. By Internet +standards the period should be two hours, and should be indefinitely +extended if KEEPALIVE is set as is the case by Bacula. If your firewall +or router does not respect these rules, you may find Bacula connections +terminated. In that case, the first thing to try is turning on the +{\bf Heart Beat Interval} both in the File daemon and the Storage daemon +and set an interval of say five minutes. + +Also, if you have denial of service rate limiting in your firewall, this +too can cause Bacula disconnects since Bacula can at times use very high +access rates. To avoid this, you should implement default accept +rules for the Bacula ports involved before the rate limiting rules. + +Finally, if you have a Windows machine, it will most likely by default +disallow connections to the Bacula Windows File daemon. See the +Windows chapter of this manual for additional details. diff --git a/docs/manuals/fr/catalog/fix_tex.pl b/docs/manuals/de/old/problems/fix_tex.pl similarity index 100% rename from docs/manuals/fr/catalog/fix_tex.pl rename to docs/manuals/de/old/problems/fix_tex.pl diff --git a/docs/manuals/fr/catalog/index.perl b/docs/manuals/de/old/problems/index.perl similarity index 100% rename from docs/manuals/fr/catalog/index.perl rename to docs/manuals/de/old/problems/index.perl diff --git a/docs/manuals/de/old/problems/kaboom.tex b/docs/manuals/de/old/problems/kaboom.tex new file mode 100644 index 00000000..a4e5bc57 --- /dev/null +++ b/docs/manuals/de/old/problems/kaboom.tex @@ -0,0 +1,233 @@ +%% +%% + +\chapter{What To Do When Bacula Crashes (Kaboom)} +\label{KaboomChapter} +\index[general]{Kaboom!What To Do When Bacula Crashes } +\index[general]{What To Do When Bacula Crashes (Kaboom) } + +If you are running on a Linux system, and you have a set of working +configuration files, it is very unlikely that {\bf Bacula} will crash. As with +all software, however, it is inevitable that someday, it may crash, +particularly if you are running on another operating system or using a new or +unusual feature. + +This chapter explains what you should do if one of the three {\bf Bacula} +daemons (Director, File, Storage) crashes. When we speak of crashing, we +mean that the daemon terminates abnormally because of an error. There are +many cases where Bacula detects errors (such as PIPE errors) and will fail +a job. These are not considered crashes. In addition, under certain +conditions, Bacula will detect a fatal in the configuration, such as +lack of permission to read/write the working directory. In that case, +Bacula will force itself to crash with a SEGFAULT. However, before +crashing, Bacula will normally display a message indicating why. +For more details, please read on. + + +\section{Traceback} +\index[general]{Traceback} + +Each of the three Bacula daemons has a built-in exception handler which, in +case of an error, will attempt to produce a traceback. If successful the +traceback will be emailed to you. + +For this to work, you need to ensure that a few things are setup correctly on +your system: + +\begin{enumerate} +\item You must have a version of Bacula built with debug information turned + on and not stripped of debugging symbols. + +\item You must have an installed copy of {\bf gdb} (the GNU debugger), and it + must be on {\bf Bacula's} path. On some systems such as Solaris, {\bf + gdb} may be replaced by {\bf dbx}. + +\item The Bacula installed script file {\bf btraceback} must be in the same + directory as the daemon which dies, and it must be marked as executable. + +\item The script file {\bf btraceback.gdb} must have the correct path to it + specified in the {\bf btraceback} file. + +\item You must have a {\bf mail} program which is on {\bf Bacula's} path. + By default, this {\bf mail} program is set to {\bf bsmtp}, so it must + be correctly configured. + +\item If you run either the Director or Storage daemon under a non-root + userid, you will most likely need to modify the {\bf btraceback} file + to do something like {\bf sudo} (raise to root priority) for the + call to {\bf gdb} so that it has the proper permissions to debug + Bacula. +\end{enumerate} + +If all the above conditions are met, the daemon that crashes will produce a +traceback report and email it to you. If the above conditions are not true, +you can either run the debugger by hand as described below, or you may be able +to correct the problems by editing the {\bf btraceback} file. I recommend not +spending too much time on trying to get the traceback to work as it can be +very difficult. + +The changes that might be needed are to add a correct path to the {\bf gdb} +program, correct the path to the {\bf btraceback.gdb} file, change the {\bf +mail} program or its path, or change your email address. The key line in the +{\bf btraceback} file is: + +\footnotesize +\begin{verbatim} +gdb -quiet -batch -x /home/kern/bacula/bin/btraceback.gdb \ + $1 $2 2>\&1 | bsmtp -s "Bacula traceback" your-address@xxx.com +\end{verbatim} +\normalsize + +Since each daemon has the same traceback code, a single btraceback file is +sufficient if you are running more than one daemon on a machine. + +\section{Testing The Traceback} +\index[general]{Traceback!Testing The } +\index[general]{Testing The Traceback } + +To "manually" test the traceback feature, you simply start {\bf Bacula} then +obtain the {\bf PID} of the main daemon thread (there are multiple threads). +The output produced here will look different depending on what OS and what +version of the kernel you are running. +Unfortunately, the output had to be split to fit on this page: + +\footnotesize +\begin{verbatim} +[kern@rufus kern]$ ps fax --columns 132 | grep bacula-dir + 2103 ? S 0:00 /home/kern/bacula/k/src/dird/bacula-dir -c + /home/kern/bacula/k/src/dird/dird.conf + 2104 ? S 0:00 \_ /home/kern/bacula/k/src/dird/bacula-dir -c + /home/kern/bacula/k/src/dird/dird.conf + 2106 ? S 0:00 \_ /home/kern/bacula/k/src/dird/bacula-dir -c + /home/kern/bacula/k/src/dird/dird.conf + 2105 ? S 0:00 \_ /home/kern/bacula/k/src/dird/bacula-dir -c + /home/kern/bacula/k/src/dird/dird.conf +\end{verbatim} +\normalsize + +which in this case is 2103. Then while Bacula is running, you call the program +giving it the path to the Bacula executable and the {\bf PID}. In this case, +it is: + +\footnotesize +\begin{verbatim} +./btraceback /home/kern/bacula/k/src/dird 2103 +\end{verbatim} +\normalsize + +It should produce an email showing you the current state of the daemon (in +this case the Director), and then exit leaving {\bf Bacula} running as if +nothing happened. If this is not the case, you will need to correct the +problem by modifying the {\bf btraceback} script. + +Typical problems might be that {\bf gdb} or {\bf dbx} for Solaris is not on +the default path. Fix this by specifying the full path to it in the {\bf +btraceback} file. Another common problem is that you haven't modified the +script so that the {\bf bsmtp} program has an appropriate smtp server or +the proper syntax for your smtp server. If you use the {\bf mail} program +and it is not on the default path, it will also fail. On some systems, it +is preferable to use {\bf Mail} rather than {\bf mail}. + +\section{Getting A Traceback On Other Systems} +\index[general]{Getting A Traceback On Other Systems} +\index[general]{Systems!Getting A Traceback On Other} + +It should be possible to produce a similar traceback on systems other than +Linux, either using {\bf gdb} or some other debugger. Solaris with {\bf dbx} +loaded works quite fine. On other systems, you will need to modify the {\bf +btraceback} program to invoke the correct debugger, and possibly correct the +{\bf btraceback.gdb} script to have appropriate commands for your debugger. If +anyone succeeds in making this work with another debugger, please send us a +copy of what you modified. Please keep in mind that for any debugger to +work, it will most likely need to run as root, so you may need to modify +the {\bf btraceback} script accordingly. + +\label{ManuallyDebugging} +\section{Manually Running Bacula Under The Debugger} +\index[general]{Manually Running Bacula Under The Debugger} +\index[general]{Debugger!Manually Running Bacula Under The} + +If for some reason you cannot get the automatic traceback, or if you want to +interactively examine the variable contents after a crash, you can run Bacula +under the debugger. Assuming you want to run the Storage daemon under the +debugger (the technique is the same for the other daemons, only the name +changes), you would do the following: + +\begin{enumerate} +\item Start the Director and the File daemon. If the Storage daemon also + starts, you will need to find its PID as shown above (ps fax | grep + bacula-sd) and kill it with a command like the following: + +\footnotesize +\begin{verbatim} + kill -15 PID +\end{verbatim} +\normalsize + +where you replace {\bf PID} by the actual value. + +\item At this point, the Director and the File daemon should be running but + the Storage daemon should not. + +\item cd to the directory containing the Storage daemon + +\item Start the Storage daemon under the debugger: + + \footnotesize +\begin{verbatim} + gdb ./bacula-sd +\end{verbatim} +\normalsize + +\item Run the Storage daemon: + + \footnotesize +\begin{verbatim} + run -s -f -c ./bacula-sd.conf +\end{verbatim} +\normalsize + +You may replace the {\bf ./bacula-sd.conf} with the full path to the Storage +daemon's configuration file. + +\item At this point, Bacula will be fully operational. + +\item In another shell command window, start the Console program and do what + is necessary to cause Bacula to die. + +\item When Bacula crashes, the {\bf gdb} shell window will become active and + {\bf gdb} will show you the error that occurred. + +\item To get a general traceback of all threads, issue the following command: + + +\footnotesize +\begin{verbatim} + thread apply all bt +\end{verbatim} +\normalsize + +After that you can issue any debugging command. +\end{enumerate} + +\section{Getting Debug Output from Bacula} +\index[general]{Getting Debug Output from Bacula } +Each of the daemons normally has debug compiled into the program, but +disabled. There are two ways to enable the debug output. One is to add the +{\bf -d nnn} option on the command line when starting the debugger. The {\bf +nnn} is the debug level, and generally anything between 50 and 200 is +reasonable. The higher the number, the more output is produced. The output is +written to standard output. + +The second way of getting debug output is to dynamically turn it on using the +Console using the {\bf setdebug} command. The full syntax of the command is: + +\footnotesize +\begin{verbatim} + setdebug level=nnn client=client-name storage=storage-name dir +\end{verbatim} +\normalsize + +If none of the options are given, the command will prompt you. You can +selectively turn on/off debugging in any or all the daemons (i.e. it is not +necessary to specify all the components of the above command). diff --git a/docs/manuals/fr/concepts/latex2html-init.pl b/docs/manuals/de/old/problems/latex2html-init.pl similarity index 100% rename from docs/manuals/fr/concepts/latex2html-init.pl rename to docs/manuals/de/old/problems/latex2html-init.pl diff --git a/docs/manuals/de/old/problems/problems.kilepr b/docs/manuals/de/old/problems/problems.kilepr new file mode 100644 index 00000000..b53ebfb3 --- /dev/null +++ b/docs/manuals/de/old/problems/problems.kilepr @@ -0,0 +1,88 @@ +[General] +img_extIsRegExp=false +img_extensions=.eps .jpg .jpeg .png .pdf .ps .fig .gif +kileprversion=2 +kileversion=2.0 +lastDocument=problems.tex +masterDocument= +name=Problems +pkg_extIsRegExp=false +pkg_extensions=.cls .sty +src_extIsRegExp=false +src_extensions=.tex .ltx .latex .dtx .ins + +[Tools] +MakeIndex= +QuickBuild= + +[item:faq.tex] +archive=true +column=0 +encoding=UTF-8 +highlight=LaTeX +line=146 +open=false +order=4 + +[item:fdl.tex] +archive=true +column=1179666 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:firewalls.tex] +archive=true +column=2 +encoding=UTF-8 +highlight=LaTeX +line=0 +open=false +order=3 + +[item:kaboom.tex] +archive=true +column=0 +encoding=UTF-8 +highlight=LaTeX +line=0 +open=false +order=2 + +[item:problems.kilepr] +archive=true +column=0 +encoding=UTF-8 +highlight=None +line=0 +open=false +order=-1 + +[item:problems.tex] +archive=true +column=36 +encoding=UTF-8 +highlight=LaTeX +line=53 +open=true +order=0 + +[item:tapetesting.tex] +archive=true +column=2 +encoding=UTF-8 +highlight=LaTeX +line=0 +open=false +order=1 + +[item:version.tex] +archive=true +column=0 +encoding=UTF-8 +highlight=LaTeX +line=0 +open=false +order=5 diff --git a/docs/manuals/fr/catalog/catalog.tex b/docs/manuals/de/old/problems/problems.tex similarity index 78% rename from docs/manuals/fr/catalog/catalog.tex rename to docs/manuals/de/old/problems/problems.tex index 4a6ad9f5..d2376630 100644 --- a/docs/manuals/fr/catalog/catalog.tex +++ b/docs/manuals/de/old/problems/problems.tex @@ -6,7 +6,14 @@ %% # $ % & ~ _ ^ \ { } %% -\documentclass[11pt,a4paper]{book} +\documentclass[10pt,a4paper]{book} + +\topmargin -0.5in +\oddsidemargin 0.0in +\evensidemargin 0.0in +\textheight 10in +\textwidth 6.5in + \usepackage{html} \usepackage{float} \usepackage{graphicx} @@ -17,7 +24,7 @@ \usepackage{setspace} \usepackage{hyperref} \usepackage{url} - +%\usepackage{german} \makeindex \newindex{general}{idx}{ind}{General Index} @@ -31,8 +38,8 @@ \parskip 10pt \parindent 0pt -\title{\includegraphics{./bacula-logo.eps} \\ \bigskip - \Huge{Bacula Catalog Database Guide} +\title{\includegraphics{\idir bacula-logo.eps} \\ \bigskip + \Huge{Bacula Fehlerdiagnose Handbuch} \begin{center} \large{It comes in the night and sucks the essence from your computers. } @@ -44,7 +51,7 @@ \date{\vspace{1.0in}\today \\ This manual documents Bacula version \input{version} \\ \vspace{0.2in} - Copyright \copyright 1999-2007, Free Software Foundation Europe + Copyright \copyright 1999-2009, Free Software Foundation Europe e.V. \\ \vspace{0.2in} Permission is granted to copy, distribute and/or modify this document under the terms of the @@ -63,11 +70,11 @@ \listoftables \clearpage -\include{catmaintenance} -\include{mysql} -\include{postgresql} -\include{sqlite} -\include{internaldb} +\include{faq} +\include{tips} +\include{tapetesting} +\include{firewalls} +\include{kaboom} \include{fdl} diff --git a/docs/manuals/de/old/problems/rpm-faq.tex b/docs/manuals/de/old/problems/rpm-faq.tex new file mode 100644 index 00000000..127fc39c --- /dev/null +++ b/docs/manuals/de/old/problems/rpm-faq.tex @@ -0,0 +1,395 @@ +%% +%% + +\chapter{Bacula RPM Packaging FAQ} +\label{RpmFaqChapter} +\index[general]{FAQ!Bacula\textsuperscript{\textregistered} - RPM Packaging } +\index[general]{Bacula\textsuperscript{\textregistered} - RPM Packaging FAQ } + +\begin{enumerate} +\item + \ilink{How do I build Bacula for platform xxx?}{faq1} +\item + \ilink{How do I control which database support gets built?}{faq2} + +\item + \ilink{What other defines are used?}{faq3} +\item + \ilink{I'm getting errors about not having permission when I try to build the + packages. Do I need to be root?}{faq4} +\item + \ilink{I'm building my own rpms but on all platforms and compiles I get an + unresolved dependency for something called + /usr/afsws/bin/pagsh.}{faq5} +\item + \ilink{I'm building my own rpms because you don't publish for my platform. + Can I get my packages released to sourceforge for other people to use?}{faq6} +\item + \ilink{Is there an easier way than sorting out all these command line options?}{faq7} +\item + \ilink{I just upgraded from 1.36.x to 1.38.x and now my director daemon won't start. It appears to start but dies silently and I get a "connection refused" error when starting the console. What is wrong?}{faq8} +\item + \ilink{There are a lot of rpm packages. Which packages do I need for what?}{faq9} +\end{enumerate} + +\section{Answers} +\index[general]{Answers } + +\begin{enumerate} +\item + \label{faq1} + {\bf How do I build Bacula for platform xxx?} + The bacula spec file contains defines to build for several platforms: + Red Hat 7.x (rh7), Red Hat 8.0 (rh8), Red Hat 9 (rh9), Fedora Core (fc1, + fc3, fc4, fc5, fc6, fc7), Whitebox Enterprise Linux 3.0 (wb3), Red Hat Enterprise Linux + (rhel3, rhel4, rhel5), Mandrake 10.x (mdk), Mandriva 2006.x (mdv) CentOS (centos3, centos4, centos5) + Scientific Linux (sl3, sl4, sl5) and SuSE (su9, su10, su102, su103). The package build is controlled by a mandatory define set at the beginning of the file. These defines basically just control the dependency information that gets coded into the finished rpm package as well + as any special configure options required. The platform define may be edited + in the spec file directly (by default all defines are set to 0 or "not set"). + For example, to build the Red Hat 7.x package find the line in the spec file + which reads + +\footnotesize +\begin{verbatim} + %define rh7 0 + +\end{verbatim} +\normalsize + +and edit it to read + +\footnotesize +\begin{verbatim} + %define rh7 1 + +\end{verbatim} +\normalsize + +Alternately you may pass the define on the command line when calling rpmbuild: + + +\footnotesize +\begin{verbatim} + rpmbuild -ba --define "build_rh7 1" bacula.spec + rpmbuild --rebuild --define build_rh7 1" bacula-x.x.x-x.src.rpm + +\end{verbatim} +\normalsize + +\item + \label{faq2} + {\bf How do I control which database support gets built?} + Another mandatory build define controls which database support is compiled, + one of build\_sqlite, build\_mysql or build\_postgresql. To get the MySQL + package and support either set the + +\footnotesize +\begin{verbatim} + %define mysql 0 + OR + %define mysql4 0 + OR + %define mysql5 0 + +\end{verbatim} +\normalsize + +to + +\footnotesize +\begin{verbatim} + %define mysql 1 + OR + %define mysql4 1 + OR + %define mysql5 1 + +\end{verbatim} +\normalsize + +in the spec file directly or pass it to rpmbuild on the command line: + +\footnotesize +\begin{verbatim} + rpmbuild -ba --define "build_rh7 1" --define "build_mysql 1" bacula.spec + rpmbuild -ba --define "build_rh7 1" --define "build_mysql4 1" bacula.spec + rpmbuild -ba --define "build_rh7 1" --define "build_mysql5 1" bacula.spec + +\end{verbatim} +\normalsize + +\item + \label{faq3} + {\bf What other defines are used?} + Three other building defines of note are the depkgs\_version, docs\_version and + \_rescuever identifiers. These two defines are set with each release and must + match the version of those sources that are being used to build the packages. + You would not ordinarily need to edit these. See also the Build Options section + below for other build time options that can be passed on the command line. +\item + \label{faq4} + {\bf I'm getting errors about not having permission when I try to build the + packages. Do I need to be root?} + No, you do not need to be root and, in fact, it is better practice to + build rpm packages as a non-root user. Bacula packages are designed to + be built by a regular user but you must make a few changes on your + system to do this. If you are building on your own system then the + simplest method is to add write permissions for all to the build + directory (/usr/src/redhat/, /usr/src/RPM or /usr/src/packages). + To accomplish this, execute the following command as root: + +\footnotesize +\begin{verbatim} + chmod -R 777 /usr/src/redhat + chmod -R 777 /usr/src/RPM + chmod -R 777 /usr/src/packages + +\end{verbatim} +\normalsize + +If you are working on a shared system where you can not use the method +above then you need to recreate the appropriate above directory tree with all +of its subdirectories inside your home directory. Then create a file named + +{\tt .rpmmacros} + +in your home directory (or edit the file if it already exists) +and add the following line: + +\footnotesize +\begin{verbatim} + %_topdir /home/myuser/redhat + %_tmppath /tmp + +\end{verbatim} +\normalsize + +Another handy directive for the .rpmmacros file if you wish to suppress the +creation of debug rpm packages is: + +\footnotesize +\begin{verbatim} + %debug_package %{nil} + +\end{verbatim} + +\normalsize + +\item + \label{faq5} + {\bf I'm building my own rpms but on all platforms and compiles I get an + unresolved dependency for something called /usr/afsws/bin/pagsh.} This + is a shell from the OpenAFS (Andrew File System). If you are seeing + this then you chose to include the docs/examples directory in your + package. One of the example scripts in this directory is a pagsh + script. Rpmbuild, when scanning for dependencies, looks at the shebang + line of all packaged scripts in addition to checking shared libraries. + To avoid this do not package the examples directory. If you are seeing this + problem you are building a very old bacula package as the examples have been + removed from the doc packaging. + +\item + \label{faq6} + {\bf I'm building my own rpms because you don't publish for my platform. + Can I get my packages released to sourceforge for other people to use?} Yes, + contributions from users are accepted and appreciated. Please examine the + directory platforms/contrib-rpm in the source code for further information. + +\item + \label{faq7} + {\bf Is there an easier way than sorting out all these command line options?} Yes, + there is a gui wizard shell script which you can use to rebuild the src rpm package. + Look in the source archive for platforms/contrib-rpm/rpm\_wizard.sh. This script will + allow you to specify build options using GNOME dialog screens. It requires zenity. + +\item + \label{faq8} + {\bf I just upgraded from 1.36.x to 1.38.x and now my director daemon +won't start. It appears to start but dies silently and I get a "connection +refused" error when starting the console. What is wrong?} Beginning with +1.38 the rpm packages are configured to run the director and storage +daemons as a non-root user. The file daemon runs as user root and group +bacula, the storage daemon as user bacula and group disk, and the director +as user bacula and group bacula. If you are upgrading you will need to +change some file permissions for things to work. Execute the following +commands as root: + +\footnotesize +\begin{verbatim} + chown bacula.bacula /var/bacula/* + chown root.bacula /var/bacula/bacula-fd.9102.state + chown bacula.disk /var/bacula/bacula-sd.9103.state + +\end{verbatim} +\normalsize + +Further, if you are using File storage volumes rather than tapes those +files will also need to have ownership set to user bacula and group bacula. + +\item + \label{faq9} + {\bf There are a lot of rpm packages. Which packages do I need for +what?} For a bacula server you need to select the packsge based upon your +preferred catalog database: one of bacula-mysql, bacula-postgresql or +bacula-sqlite. If your system does not provide an mtx package you also +need bacula-mtx to satisfy that dependancy. For a client machine you need +only install bacula-client. Optionally, for either server or client +machines, you may install a graphical console bacula-gconsole and/or +bacula-wxconsole. The Bacula Administration Tool is installed with the +bacula-bat package. One last package, bacula-updatedb is required only when +upgrading a server more than one database revision level. + + + +\item {\bf Support for RHEL3/4/5, CentOS 3/4/5, Scientific Linux 3/4/5 and x86\_64} + The examples below show + explicit build support for RHEL4 and CentOS 4. Build support + for x86\_64 has also been added. +\end{enumerate} + +\footnotesize +\begin{verbatim} +Build with one of these 3 commands: + +rpmbuild --rebuild \ + --define "build_rhel4 1" \ + --define "build_sqlite 1" \ + bacula-1.38.3-1.src.rpm + +rpmbuild --rebuild \ + --define "build_rhel4 1" \ + --define "build_postgresql 1" \ + bacula-1.38.3-1.src.rpm + +rpmbuild --rebuild \ + --define "build_rhel4 1" \ + --define "build_mysql4 1" \ + bacula-1.38.3-1.src.rpm + +For CentOS substitute '--define "build_centos4 1"' in place of rhel4. +For Scientific Linux substitute '--define "build_sl4 1"' in place of rhel4. + +For 64 bit support add '--define "build_x86_64 1"' +\end{verbatim} +\normalsize + +\section{Build Options} +\index[general]{Build Options} +The spec file currently supports building on the following platforms: +\footnotesize +\begin{verbatim} +Red Hat builds +--define "build_rh7 1" +--define "build_rh8 1" +--define "build_rh9 1" + +Fedora Core build +--define "build_fc1 1" +--define "build_fc3 1" +--define "build_fc4 1" +--define "build_fc5 1" +--define "build_fc6 1" +--define "build_fc7 1" + +Whitebox Enterprise build +--define "build_wb3 1" + +Red Hat Enterprise builds +--define "build_rhel3 1" +--define "build_rhel4 1" +--define "build_rhel5 1" + +CentOS build +--define "build_centos3 1" +--define "build_centos4 1" +--define "build_centos5 1" + +Scientific Linux build +--define "build_sl3 1" +--define "build_sl4 1" +--define "build_sl5 1" + +SuSE build +--define "build_su9 1" +--define "build_su10 1" +--define "build_su102 1" +--define "build_su103 1" + +Mandrake 10.x build +--define "build_mdk 1" + +Mandriva build +--define "build_mdv 1" + +MySQL support: +for mysql 3.23.x support define this +--define "build_mysql 1" +if using mysql 4.x define this, +currently: Mandrake 10.x, Mandriva 2006.0, SuSE 9.x & 10.0, FC4 & RHEL4 +--define "build_mysql4 1" +if using mysql 5.x define this, +currently: SuSE 10.1 & FC5 +--define "build_mysql5 1" + +PostgreSQL support: +--define "build_postgresql 1" + +Sqlite support: +--define "build_sqlite 1" + +Build the client rpm only in place of one of the above database full builds: +--define "build_client_only 1" + +X86-64 support: +--define "build_x86_64 1" + +Supress build of bgnome-console: +--define "nobuild_gconsole 1" + +Build the WXWindows console: +requires wxGTK >= 2.6 +--define "build_wxconsole 1" + +Build the Bacula Administration Tool: +requires QT >= 4.2 +--define "build_bat 1" + +Build python scripting support: +--define "build_python 1" + +Modify the Packager tag for third party packages: +--define "contrib_packager Your Name " + +\end{verbatim} +\normalsize + +\section{RPM Install Problems} +\index[general]{RPM Install Problems} +In general the RPMs, once properly built should install correctly. +However, when attempting to run the daemons, a number of problems +can occur: +\begin{itemize} +\item [Wrong /var/bacula Permissions] + By default, the Director and Storage daemon do not run with + root permission. If the /var/bacula is owned by root, then it + is possible that the Director and the Storage daemon will not + be able to access this directory, which is used as the Working + Directory. To fix this, the easiest thing to do is: +\begin{verbatim} + chown bacula:bacula /var/bacula +\end{verbatim} + Note: as of 1.38.8 /var/bacula is installed root:bacula with + permissions 770. +\item [The Storage daemon cannot Access the Tape drive] + This can happen in some older RPM releases where the Storage + daemon ran under userid bacula, group bacula. There are two + ways of fixing this: the best is to modify the /etc/init.d/bacula-sd + file so that it starts the Storage daemon with group "disk". + The second way to fix the problem is to change the permissions + of your tape drive (usually /dev/nst0) so that Bacula can access it. + You will probably need to change the permissions of the SCSI control + device as well, which is usually /dev/sg0. The exact names depend + on your configuration, please see the Tape Testing chapter for + more information on devices. +\end{itemize} + diff --git a/docs/manuals/es/install/setup.sm b/docs/manuals/de/old/problems/setup.sm similarity index 100% rename from docs/manuals/es/install/setup.sm rename to docs/manuals/de/old/problems/setup.sm diff --git a/docs/manuals/de/old/problems/tapetesting.tex b/docs/manuals/de/old/problems/tapetesting.tex new file mode 100644 index 00000000..7281f34e --- /dev/null +++ b/docs/manuals/de/old/problems/tapetesting.tex @@ -0,0 +1,1293 @@ +%% +%% + +\chapter{Testing Your Tape Drive With Bacula} +\label{TapeTestingChapter} +\index[general]{Testing Your Tape Drive With Bacula} + +This chapter is concerned with testing and configuring your tape drive to make +sure that it will work properly with Bacula using the {\bf btape} program. +\label{summary} + +\section{Get Your Tape Drive Working} + +In general, you should follow the following steps to get your tape drive to +work with Bacula. Start with a tape mounted in your drive. If you have an +autochanger, load a tape into the drive. We use {\bf /dev/nst0} as the tape +drive name, you will need to adapt it according to your system. + +Do not proceed to the next item until you have succeeded with the previous +one. + +\begin{enumerate} +\item Make sure that Bacula (the Storage daemon) is not running + or that you have {\bf unmount}ed the drive you will use + for testing. + +\item Use tar to write to, then read from your drive: + + \footnotesize +\begin{verbatim} + mt -f /dev/nst0 rewind + tar cvf /dev/nst0 . + mt -f /dev/nst0 rewind + tar tvf /dev/nst0 + +\end{verbatim} +\normalsize + +\item Make sure you have a valid and correct Device resource corresponding + to your drive. For Linux users, generally, the default one works. For + FreeBSD users, there are two possible Device configurations (see below). + For other drives and/or OSes, you will need to first ensure that your + system tape modes are properly setup (see below), then possibly modify + you Device resource depending on the output from the btape program (next + item). When doing this, you should consult the \ilink{Storage Daemon + Configuration}{StoredConfChapter} of this manual. + +\item If you are using a Fibre Channel to connect your tape drive to + Bacula, please be sure to disable any caching in the NSR (network + storage router, which is a Fibre Channel to SCSI converter). + +\item Run the btape {\bf test} command: + + \footnotesize +\begin{verbatim} + ./btape -c bacula-sd.conf /dev/nst0 + test + +\end{verbatim} +\normalsize + + It isn't necessary to run the autochanger part of the test at this time, + but do not go past this point until the basic test succeeds. If you do + have an autochanger, please be sure to read the \ilink{Autochanger + chapter}{AutochangersChapter} of this manual. + +\item Run the btape {\bf fill} command, preferably with two volumes. This + can take a long time. If you have an autochanger and it is configured, Bacula + will automatically use it. If you do not have it configured, you can manually + issue the appropriate {\bf mtx} command, or press the autochanger buttons to + change the tape when requested to do so. + +\item FreeBSD users, if you have a pre-5.0 system run the {\bf tapetest} + program, and make sure your system is patched if necessary. The tapetest + program can be found in the platform/freebsd directory. The instructions + for its use are at the top of the file. + +\item Run Bacula, and backup a reasonably small directory, say 60 + Megabytes. Do three successive backups of this directory. + +\item Stop Bacula, then restart it. Do another full backup of the same + directory. Then stop and restart Bacula. + +\item Do a restore of the directory backed up, by entering the following + restore command, being careful to restore it to an alternate location: + + +\footnotesize +\begin{verbatim} + restore select all done + yes + +\end{verbatim} +\normalsize + + Do a {\bf diff} on the restored directory to ensure it is identical to the + original directory. If you are going to backup multiple different systems + (Linux, Windows, Mac, Solaris, FreeBSD, ...), be sure you test the restore + on each system type. + +\item If you have an autochanger, you should now go back to the btape program + and run the autochanger test: + +\footnotesize +\begin{verbatim} + ./btape -c bacula-sd.conf /dev/nst0 + auto + +\end{verbatim} +\normalsize + + Adjust your autochanger as necessary to ensure that it works correctly. See + the Autochanger chapter of this manual for a complete discussion of testing + your autochanger. + +\item We strongly recommend that you use a dedicated SCSI + controller for your tape drives. Scanners are known to induce + serious problems with the SCSI bus, causing it to reset. If the + SCSI bus is reset while Bacula has the tape drive open, it will + most likely be fatal to your tape since the drive will rewind. + These kinds of problems show up in the system log. For example, + the following was most likely caused by a scanner: + +\footnotesize +\begin{verbatim} +Feb 14 17:29:55 epohost kernel: (scsi0:A:2:0): No or incomplete CDB sent to device. +Feb 14 17:29:55 epohost kernel: scsi0: Issued Channel A Bus Reset. 1 SCBs aborted +\end{verbatim} +\normalsize + +\end{enumerate} + +If you have reached this point, you stand a good chance of having everything +work. If you get into trouble at any point, {\bf carefully} read the +documentation given below. If you cannot get past some point, ask the {\bf +bacula-users} email list, but specify which of the steps you have successfully +completed. In particular, you may want to look at the +\ilink{ Tips for Resolving Problems}{problems1} section below. + + +\label{NoTapeInDrive} +\subsection{Problems When no Tape in Drive} +\index[general]{Problems When no Tape in Drive} +When Bacula was first written the Linux 2.4 kernel permitted opening the +drive whether or not there was a tape in the drive. Thus the Bacula code is +based on the concept that if the drive cannot be opened, there is a serious +problem, and the job is failed. + +With version 2.6 of the Linux kernel, if there is no tape in the drive, the +OS will wait two minutes (default) and then return a failure, and consequently, +Bacula version 1.36 and below will fail the job. This is important to keep +in mind, because if you use an option such as {\bf Offline on Unmount = +yes}, there will be a point when there is no tape in the drive, and if +another job starts or if Bacula asks the operator to mount a tape, when +Bacula attempts to open the drive (about a 20 minute delay), it will fail +and Bacula will fail the job. + +In version 1.38.x, the Bacula code partially gets around this problem -- at +least in the initial open of the drive. However, functions like Polling +the drive do not work correctly if there is no tape in the drive. +Providing you do not use {\bf Offline on Unmount = yes}, you should not +experience job failures as mentioned above. If you do experience such +failures, you can also increase the {\bf Maximum Open Wait} time interval, +which will give you more time to mount the next tape before the job is +failed. + +\subsection{Specifying the Configuration File} +\index[general]{File!Specifying the Configuration} +\index[general]{Specifying the Configuration File} + +Starting with version 1.27, each of the tape utility programs including the +{\bf btape} program requires a valid Storage daemon configuration file +(actually, the only part of the configuration file that {\bf btape} needs is +the {\bf Device} resource definitions). This permits {\bf btape} to find the +configuration parameters for your archive device (generally a tape drive). +Without those parameters, the testing and utility programs do not know how to +properly read and write your drive. By default, they use {\bf bacula-sd.conf} +in the current directory, but you may specify a different configuration file +using the {\bf -c} option. + +\subsection{Specifying a Device Name For a Tape} +\index[general]{Tape!Specifying a Device Name For a} +\index[general]{Specifying a Device Name For a Tape} + +{\bf btape} {\bf device-name} where the Volume can be found. In the case of a +tape, this is the physical device name such as {\bf /dev/nst0} or {\bf +/dev/rmt/0ubn} depending on your system that you specify on the Archive Device +directive. For the program to work, it must find the identical name in the +Device resource of the configuration file. If the name is not found in the +list of physical names, the utility program will compare the name you entered +to the Device names (rather than the Archive device names). + +When specifying a tape device, it is preferable that the "non-rewind" +variant of the device file name be given. In addition, on systems such as +Sun, which have multiple tape access methods, you must be sure to specify +to use Berkeley I/O conventions with the device. The +{\bf b} in the Solaris (Sun) archive specification {\bf /dev/rmt/0mbn} is +what is needed in this case. Bacula does not support SysV tape drive +behavior. + +See below for specifying Volume names. + +\subsection{Specifying a Device Name For a File} +\index[general]{File!Specifying a Device Name For a} +\index[general]{Specifying a Device Name For a File} + +If you are attempting to read or write an archive file rather than a tape, the +{\bf device-name} should be the full path to the archive location including +the filename. The filename (last part of the specification) will be stripped +and used as the Volume name, and the path (first part before the filename) +must have the same entry in the configuration file. So, the path is equivalent +to the archive device name, and the filename is equivalent to the volume name. + + +\section{btape} +\label{btape1} +\index[general]{Btape} + +This program permits a number of elementary tape operations via a tty command +interface. The {\bf test} command, described below, can be very useful for +testing tape drive compatibility problems. Aside from initial testing of tape +drive compatibility with {\bf Bacula}, {\bf btape} will be mostly used by +developers writing new tape drivers. + +{\bf btape} can be dangerous to use with existing {\bf Bacula} tapes because +it will relabel a tape or write on the tape if so requested regardless of +whether or not the tape contains valuable data, so please be careful and use +it only on blank tapes. + +To work properly, {\bf btape} needs to read the Storage daemon's configuration +file. As a default, it will look for {\bf bacula-sd.conf} in the current +directory. If your configuration file is elsewhere, please use the {\bf -c} +option to specify where. + +The physical device name or the Device resource name must be specified on the +command line, and this same device name must be present in the Storage +daemon's configuration file read by {\bf btape} + +\footnotesize +\begin{verbatim} +Usage: btape [options] device_name + -b specify bootstrap file + -c set configuration file to file + -d set debug level to nn + -p proceed inspite of I/O errors + -s turn off signals + -v be verbose + -? print this message. +\end{verbatim} +\normalsize + +\subsection{Using btape to Verify your Tape Drive} +\index[general]{Using btape to Verify your Tape Drive} +\index[general]{Drive!Using btape to Verify your Tape} + +An important reason for this program is to ensure that a Storage daemon +configuration file is defined so that Bacula will correctly read and write +tapes. + +It is highly recommended that you run the {\bf test} command before running +your first Bacula job to ensure that the parameters you have defined for your +storage device (tape drive) will permit {\bf Bacula} to function properly. You +only need to mount a blank tape, enter the command, and the output should be +reasonably self explanatory. For example: + +\footnotesize +\begin{verbatim} +(ensure that Bacula is not running) +./btape -c /usr/bin/bacula/bacula-sd.conf /dev/nst0 +\end{verbatim} +\normalsize + +The output will be: + +\footnotesize +\begin{verbatim} +Tape block granularity is 1024 bytes. +btape: btape.c:376 Using device: /dev/nst0 +* +\end{verbatim} +\normalsize + +Enter the test command: + +\footnotesize +\begin{verbatim} +test +\end{verbatim} +\normalsize + +The output produced should be something similar to the following: I've cut the +listing short because it is frequently updated to have new tests. + +\footnotesize +\begin{verbatim} +=== Append files test === +This test is essential to Bacula. +I'm going to write one record in file 0, + two records in file 1, + and three records in file 2 +btape: btape.c:387 Rewound /dev/nst0 +btape: btape.c:855 Wrote one record of 64412 bytes. +btape: btape.c:857 Wrote block to device. +btape: btape.c:410 Wrote EOF to /dev/nst0 +btape: btape.c:855 Wrote one record of 64412 bytes. +btape: btape.c:857 Wrote block to device. +btape: btape.c:855 Wrote one record of 64412 bytes. +btape: btape.c:857 Wrote block to device. +btape: btape.c:410 Wrote EOF to /dev/nst0 +btape: btape.c:855 Wrote one record of 64412 bytes. +btape: btape.c:857 Wrote block to device. +btape: btape.c:855 Wrote one record of 64412 bytes. +btape: btape.c:857 Wrote block to device. +btape: btape.c:855 Wrote one record of 64412 bytes. +btape: btape.c:857 Wrote block to device. +btape: btape.c:410 Wrote EOF to /dev/nst0 +btape: btape.c:387 Rewound /dev/nst0 +btape: btape.c:693 Now moving to end of media. +btape: btape.c:427 Moved to end of media +We should be in file 3. I am at file 3. This is correct! +Now the important part, I am going to attempt to append to the tape. +... +=== End Append files test === +\end{verbatim} +\normalsize + +If you do not successfully complete the above test, please resolve the +problem(s) before attempting to use {\bf Bacula}. Depending on your tape +drive, the test may recommend that you add certain records to your +configuration. We strongly recommend that you do so and then re-run the above +test to insure it works the first time. + +Some of the suggestions it provides for resolving the problems may or may not +be useful. If at all possible avoid using fixed blocking. If the test suddenly +starts to print a long series of: + +\footnotesize +\begin{verbatim} +Got EOF on tape. +Got EOF on tape. +... +\end{verbatim} +\normalsize + +then almost certainly, you are running your drive in fixed block mode rather +than variable block mode. See below for more help of resolving fix +versus variable block problems. + +It is also possible that you have your drive +set in SysV tape drive mode. The drive must use BSD tape conventions. +See the section above on setting your {\bf Archive device} correctly. + +For FreeBSD users, please see the notes below for doing further testing of +your tape drive. + +\label{SCSITricks} +\subsection{Linux SCSI Tricks} +\index[general]{Tricks!Linux SCSI} +\index[general]{Linux SCSI Tricks} + +You can find out what SCSI devices you have by doing: + +\footnotesize +\begin{verbatim} +lsscsi +\end{verbatim} +\normalsize + +Typical output is: + +\footnotesize +\begin{verbatim} +[0:0:0:0] disk ATA ST3160812AS 3.AD /dev/sda +[2:0:4:0] tape HP Ultrium 2-SCSI F6CH /dev/st0 +[2:0:5:0] tape HP Ultrium 2-SCSI F6CH /dev/st1 +[2:0:6:0] mediumx OVERLAND LXB 0107 - +[2:0:9:0] tape HP Ultrium 1-SCSI E50H /dev/st2 +[2:0:10:0] mediumx OVERLAND LXB 0107 - +\end{verbatim} +\normalsize + +There are two drives in one autochanger: /dev/st0 and /dev/st1 +and a third tape drive at /dev/st2. For using them with Bacula, one +would normally reference them as /dev/nst0 ... /dev/nst2. Not also, +there are two different autochangers identified as "mediumx OVERLAND LXB". +They can be addressed via their /dev/sgN designation, which can be +obtained by counting from the beginning as 0 to each changer. In the +above case, the two changers are located on /dev/sg3 and /dev/sg5. The one +at /dev/sg3, controls drives /dev/nst0 and /dev/nst1; and the one at +/dev/sg5 controles drive /dev/nst2. + +If you do not have the {\bf lsscsi} command, you can obtain the same +information as follows: + +\footnotesize +\begin{verbatim} +cat /proc/scsi/scsi +\end{verbatim} +\normalsize + +For the above example with the three drives and two autochangers, +I get: + +\footnotesize +\begin{verbatim} +Attached devices: +Host: scsi0 Channel: 00 Id: 00 Lun: 00 + Vendor: ATA Model: ST3160812AS Rev: 3.AD + Type: Direct-Access ANSI SCSI revision: 05 +Host: scsi2 Channel: 00 Id: 04 Lun: 00 + Vendor: HP Model: Ultrium 2-SCSI Rev: F6CH + Type: Sequential-Access ANSI SCSI revision: 03 +Host: scsi2 Channel: 00 Id: 05 Lun: 00 + Vendor: HP Model: Ultrium 2-SCSI Rev: F6CH + Type: Sequential-Access ANSI SCSI revision: 03 +Host: scsi2 Channel: 00 Id: 06 Lun: 00 + Vendor: OVERLAND Model: LXB Rev: 0107 + Type: Medium Changer ANSI SCSI revision: 02 +Host: scsi2 Channel: 00 Id: 09 Lun: 00 + Vendor: HP Model: Ultrium 1-SCSI Rev: E50H + Type: Sequential-Access ANSI SCSI revision: 03 +Host: scsi2 Channel: 00 Id: 10 Lun: 00 + Vendor: OVERLAND Model: LXB Rev: 0107 + Type: Medium Changer ANSI SCSI revision: 02 +\end{verbatim} +\normalsize + + +As an additional example, I get the following (on a different machine from the +above example): + +\footnotesize +\begin{verbatim} +Attached devices: +Host: scsi2 Channel: 00 Id: 01 Lun: 00 + Vendor: HP Model: C5713A Rev: H107 + Type: Sequential-Access ANSI SCSI revision: 02 +Host: scsi2 Channel: 00 Id: 04 Lun: 00 + Vendor: SONY Model: SDT-10000 Rev: 0110 + Type: Sequential-Access ANSI SCSI revision: 02 +\end{verbatim} +\normalsize + +The above represents first an autochanger and second a simple +tape drive. The HP changer (the first entry) uses the same SCSI channel +for data and for control, so in Bacula, you would use: +\footnotesize +\begin{verbatim} +Archive Device = /dev/nst0 +Changer Device = /dev/sg0 +\end{verbatim} +\normalsize + +If you want to remove the SDT-10000 device, you can do so as root with: + +\footnotesize +\begin{verbatim} +echo "scsi remove-single-device 2 0 4 0">/proc/scsi/scsi +\end{verbatim} +\normalsize + +and you can put add it back with: + +\footnotesize +\begin{verbatim} +echo "scsi add-single-device 2 0 4 0">/proc/scsi/scsi +\end{verbatim} +\normalsize + +where the 2 0 4 0 are the Host, Channel, Id, and Lun as seen on the output +from {\bf cat /proc/scsi/scsi}. Note, the Channel must be specified as +numeric. + +Below is a slightly more complicated output, which is a single autochanger +with two drives, and which operates the changer on a different channel +from from the drives: + +\footnotesize +\begin{verbatim} +Attached devices: +Host: scsi0 Channel: 00 Id: 00 Lun: 00 + Vendor: ATA Model: WDC WD1600JD-75H Rev: 08.0 + Type: Direct-Access ANSI SCSI revision: 05 +Host: scsi2 Channel: 00 Id: 04 Lun: 00 + Vendor: HP Model: Ultrium 2-SCSI Rev: F6CH + Type: Sequential-Access ANSI SCSI revision: 03 +Host: scsi2 Channel: 00 Id: 05 Lun: 00 + Vendor: HP Model: Ultrium 2-SCSI Rev: F6CH + Type: Sequential-Access ANSI SCSI revision: 03 +Host: scsi2 Channel: 00 Id: 06 Lun: 00 + Vendor: OVERLAND Model: LXB Rev: 0106 + Type: Medium Changer ANSI SCSI revision: 02 +\end{verbatim} +\normalsize + +The above tape drives are accessed on /dev/nst0 and /dev/nst1, while +the control channel for those two drives is /dev/sg3. + + + +\label{problems1} +\section{Tips for Resolving Problems} +\index[general]{Problems!Tips for Resolving} +\index[general]{Tips for Resolving Problems} + +\label{CannotRestore} +\subsection{Bacula Saves But Cannot Restore Files} +\index[general]{Files!Bacula Saves But Cannot Restore} +\index[general]{Bacula Saves But Cannot Restore Files} + +If you are getting error messages such as: + +\footnotesize +\begin{verbatim} +Volume data error at 0:1! Wanted block-id: "BB02", got "". Buffer discarded +\end{verbatim} +\normalsize + +It is very likely that Bacula has tried to do block positioning and ended up +at an invalid block. This can happen if your tape drive is in fixed block mode +while Bacula's default is variable blocks. Note that in such cases, Bacula is +perfectly able to write to your Volumes (tapes), but cannot position to read +them. + +There are two possible solutions. + +\begin{enumerate} +\item The first and best is to always ensure that your drive is in variable + block mode. Note, it can switch back to fixed block mode on a reboot or if + another program uses the drive. So on such systems you need to modify the + Bacula startup files to explicitly set: + +\footnotesize +\begin{verbatim} +mt -f /dev/nst0 defblksize 0 +\end{verbatim} +\normalsize + +or whatever is appropriate on your system. Note, if you are running a Linux +system, and the above command does not work, it is most likely because you +have not loaded the appropriate {\bf mt} package, which is often called +{\bf mt\_st}, but may differ according to your distribution. + +\item The second possibility, especially, if Bacula wrote while the drive was + in fixed block mode, is to turn off block positioning in Bacula. This is done + by adding: + +\footnotesize +\begin{verbatim} +Block Positioning = no +\end{verbatim} +\normalsize + +to the Device resource. This is not the recommended procedure because it can +enormously slow down recovery of files, but it may help where all else +fails. This directive is available in version 1.35.5 or later (and not yet +tested). +\end{enumerate} + +If you are getting error messages such as: +\footnotesize +\begin{verbatim} +Volume data error at 0:0! +Block checksum mismatch in block=0 len=32625 calc=345678 blk=123456 +\end{verbatim} +\normalsize + +You are getting tape read errors, and this is most likely due to +one of the following things: +\begin{enumerate} +\item An old or bad tape. +\item A dirty drive that needs cleaning (particularly for DDS drives). +\item A loose SCSI cable. +\item Old firmware in your drive. Make sure you have the latest firmware + loaded. +\item Computer memory errors. +\item Over-clocking your CPU. +\item A bad SCSI card. +\end{enumerate} + + +\label{opendevice} +\subsection{Bacula Cannot Open the Device} +\index[general]{Device!Bacula Cannot Open the} +\index[general]{Bacula Cannot Open the Device} + +If you get an error message such as: + +\footnotesize +\begin{verbatim} +dev open failed: dev.c:265 stored: unable to open +device /dev/nst0:> ERR=No such device or address +\end{verbatim} +\normalsize + +the first time you run a job, it is most likely due to the fact that you +specified the incorrect device name on your {\bf Archive Device}. + +If Bacula works fine with your drive, then all off a sudden you get error +messages similar to the one shown above, it is quite possible that your driver +module is being removed because the kernel deems it idle. This is done via +{\bf crontab} with the use of {\bf rmmod -a}. To fix the problem, you can +remove this entry from {\bf crontab}, or you can manually {\bf modprob} your +driver module (or add it to the local startup script). Thanks to Alan Brown +for this tip. +\label{IncorrectFiles} + +\subsection{Incorrect File Number} +\index[general]{Number!Incorrect File} +\index[general]{Incorrect File Number} + +When Bacula moves to the end of the medium, it normally uses the {\bf +ioctl(MTEOM)} function. Then Bacula uses the {\bf ioctl(MTIOCGET)} function to +retrieve the current file position from the {\bf mt\_fileno} field. Some SCSI +tape drivers will use a fast means of seeking to the end of the medium and in +doing so, they will not know the current file position and hence return a {\bf +-1}. As a consequence, if you get {\bf "This is NOT correct!"} in the +positioning tests, this may be the cause. You must correct this condition in +order for Bacula to work. + +There are two possible solutions to the above problem of incorrect file +number: + +\begin{itemize} +\item Figure out how to configure your SCSI driver to keep track of the file + position during the MTEOM request. This is the preferred solution. +\item Modify the {\bf Device} resource of your {\bf bacula-sd.conf} file to + include: + +\footnotesize +\begin{verbatim} +Hardware End of File = no +\end{verbatim} +\normalsize + +This will cause Bacula to use the MTFSF request to seek to the end of the +medium, and Bacula will keep track of the file number itself. +\end{itemize} + +\label{IncorrectBlocks} +\subsection{Incorrect Number of Blocks or Positioning Errors} +\index[general]{Testing!Incorrect Number of Blocks or Positioning Errors} +\index[general]{Incorrect Number of Blocks or Positioning Errors} + +{\bf Bacula's} preferred method of working with tape drives (sequential +devices) is to run in variable block mode, and this is what is set by default. +You should first ensure that your tape drive is set for variable block mode +(see below). + +If your tape drive is in fixed block mode and you have told Bacula to use +different fixed block sizes or variable block sizes (default), you will get +errors when Bacula attempts to forward space to the correct block (the kernel +driver's idea of tape blocks will not correspond to Bacula's). + +All modern tape drives support variable tape blocks, but some older drives (in +particular the QIC drives) as well as the ATAPI ide-scsi driver run only in +fixed block mode. The Travan tape drives also apparently must run in fixed +block mode (to be confirmed). + +Even in variable block mode, with the exception of the first record on the +second or subsequent volume of a multi-volume backup, Bacula will write blocks +of a fixed size. However, in reading a tape, Bacula will assume that for each +read request, exactly one block from the tape will be transferred. This the +most common way that tape drives work and is well supported by {\bf Bacula}. + +Drives that run in fixed block mode can cause serious problems for Bacula if +the drive's block size does not correspond exactly to {\bf Bacula's} block +size. In fixed block size mode, drivers may transmit a partial block or +multiple blocks for a single read request. From {\bf Bacula's} point of view, +this destroys the concept of tape blocks. It is much better to run in variable +block mode, and almost all modern drives (the OnStream is an exception) run in +variable block mode. In order for Bacula to run in fixed block mode, you must +include the following records in the Storage daemon's Device resource +definition: + +\footnotesize +\begin{verbatim} +Minimum Block Size = nnn +Maximum Block Size = nnn +\end{verbatim} +\normalsize + +where {\bf nnn} must be the same for both records and must be identical to the +driver's fixed block size. + +We recommend that you avoid this configuration if at all possible by using +variable block sizes. + +If you must run with fixed size blocks, make sure they are not 512 bytes. This +is too small and the overhead that Bacula has with each record will become +excessive. If at all possible set any fixed block size to something like +64,512 bytes or possibly 32,768 if 64,512 is too large for your drive. See +below for the details on checking and setting the default drive block size. + +To recover files from tapes written in fixed block mode, see below. + +\label{TapeModes} +\subsection{Ensuring that the Tape Modes Are Properly Set -- {\bf Linux +Only}} +\index[general]{Ensuring that the Tape Modes Are Properly Set -- Linux Only} + +If you have a modern SCSI tape drive and you are having problems with the {\bf +test} command as noted above, it may be that some program has set one or more +of your SCSI driver's options to non-default values. For example, if your +driver is set to work in SysV manner, Bacula will not work correctly because +it expects BSD behavior. To reset your tape drive to the default values, you +can try the following, but {\bf ONLY} if you have a SCSI tape drive on a {\bf +Linux} system: + +\footnotesize +\begin{verbatim} +become super user +mt -f /dev/nst0 rewind +mt -f /dev/nst0 stoptions buffer-writes async-writes read-ahead +\end{verbatim} +\normalsize + +The above commands will clear all options and then set those specified. None +of the specified options are required by Bacula, but a number of other options +such as SysV behavior must not be set. Bacula does not support SysV tape +behavior. On systems other than Linux, you will need to consult your {\bf mt} +man pages or documentation to figure out how to do the same thing. This should +not really be necessary though -- for example, on both Linux and Solaris +systems, the default tape driver options are compatible with Bacula. +On Solaris systems, you must take care to specify the correct device +name on the {\bf Archive device} directive. See above for more details. + +You may also want to ensure that no prior program has set the default block +size, as happened to one user, by explicitly turning it off with: + +\footnotesize +\begin{verbatim} +mt -f /dev/nst0 defblksize 0 +\end{verbatim} +\normalsize + +If you are running a Linux +system, and the above command does not work, it is most likely because you +have not loaded the appropriate {\bf mt} package, which is often called +{\bf mt\_st}, but may differ according to your distribution. + +If you would like to know what options you have set before making any of the +changes noted above, you can now view them on Linux systems, thanks to a tip +provided by Willem Riede. Do the following: + +\footnotesize +\begin{verbatim} +become super user +mt -f /dev/nst0 stsetoptions 0 +grep st0 /var/log/messages +\end{verbatim} +\normalsize + +and you will get output that looks something like the following: + +\footnotesize +\begin{verbatim} +kernel: st0: Mode 0 options: buffer writes: 1, async writes: 1, read ahead: 1 +kernel: st0: can bsr: 0, two FMs: 0, fast mteom: 0, auto lock: 0, +kernel: st0: defs for wr: 0, no block limits: 0, partitions: 0, s2 log: 0 +kernel: st0: sysv: 0 nowait: 0 +\end{verbatim} +\normalsize + +Note, I have chopped off the beginning of the line with the date and machine +name for presentation purposes. + +Some people find that the above settings only last until the next reboot, so +please check this otherwise you may have unexpected problems. + +Beginning with Bacula version 1.35.8, if Bacula detects that you are running +in variable block mode, it will attempt to set your drive appropriately. All +OSes permit setting variable block mode, but some OSes do not permit setting +the other modes that Bacula needs to function properly. + +\label{compression} +\subsection{Tape Hardware Compression and Blocking Size} +\index[general]{Tape Hardware Compression and Blocking Size} +\index[general]{Size!Tape Hardware Compression and Blocking Size} + +As far as I can tell, there is no way with the {\bf mt} program to check if +your tape hardware compression is turned on or off. You can, however, turn it +on by using (on Linux): + +\footnotesize +\begin{verbatim} +become super user +mt -f /dev/nst0 defcompression 1 +\end{verbatim} +\normalsize + +and of course, if you use a zero instead of the one at the end, you will turn +it off. + +If you have built the {\bf mtx} program in the {\bf depkgs} package, you can +use tapeinfo to get quite a bit of information about your tape drive even if +it is not an autochanger. This program is called using the SCSI control +device. On Linux for tape drive /dev/nst0, this is usually /dev/sg0, while on +FreeBSD for /dev/nsa0, the control device is often /dev/pass2. For example on +my DDS-4 drive (/dev/nst0), I get the following: + +\footnotesize +\begin{verbatim} +tapeinfo -f /dev/sg0 +Product Type: Tape Drive +Vendor ID: 'HP ' +Product ID: 'C5713A ' +Revision: 'H107' +Attached Changer: No +MinBlock:1 +MaxBlock:16777215 +SCSI ID: 5 +SCSI LUN: 0 +Ready: yes +BufferedMode: yes +Medium Type: Not Loaded +Density Code: 0x26 +BlockSize: 0 +\end{verbatim} +\normalsize + +where the {\bf DataCompEnabled: yes} means that tape hardware compression is +turned on. You can turn it on and off (yes|no) by using the {\bf mt} +commands given above. Also, this output will tell you if the {\bf BlockSize} +is non-zero and hence set for a particular block size. Bacula is not likely to +work in such a situation because it will normally attempt to write blocks of +64,512 bytes, except the last block of the job which will generally be +shorter. The first thing to try is setting the default block size to zero +using the {\bf mt -f /dev/nst0 defblksize 0} command as shown above. +On FreeBSD, this would be something like: {\bf mt -f /dev/nsa0 blocksize 0}. + +On some operating systems with some tape drives, the amount of data that +can be written to the tape and whether or not compression is enabled is +determined by the density usually the {\bf mt -f /dev/nst0 setdensity xxx} command. +Often {\bf mt -f /dev/nst0 status} will print out the current +density code that is used with the drive. Most systems, but unfortunately +not all, set the density to the maximum by default. On some systems, you +can also get a list of all available density codes with: +{\bf mt -f /dev/nst0 densities} or a similar {\bf mt} command. +Note, for DLT and SDLT devices, no-compression versus compression is very +often controlled by the density code. On FreeBSD systems, the compression +mode is set using {\bf mt -f /dev/nsa0 comp xxx} where xxx is the +mode you want. In general, see {\bf man mt} for the options available on +your system. + +Note, some of the above {\bf mt} commands may not be persistent depending +on your system configuration. That is they may be reset if a program +other than Bacula uses the drive or, as is frequently the case, on reboot +of your system. + +If your tape drive requires fixed block sizes (very unusual), you can use the +following records: + +\footnotesize +\begin{verbatim} +Minimum Block Size = nnn +Maximum Block Size = nnn +\end{verbatim} +\normalsize + +in your Storage daemon's Device resource to force Bacula to write fixed size +blocks (where you sent nnn to be the same for both of the above records). This +should be done only if your drive does not support variable block sizes, or +you have some other strong reasons for using fixed block sizes. As mentioned +above, a small fixed block size of 512 or 1024 bytes will be very inefficient. +Try to set any fixed block size to something like 64,512 bytes or larger if +your drive will support it. + +Also, note that the {\bf Medium Type} field of the output of {\bf tapeinfo} +reports {\bf Not Loaded}, which is not correct. As a consequence, you should +ignore that field as well as the {\bf Attached Changer} field. + +To recover files from tapes written in fixed block mode, see below. +\label{FreeBSDTapes} + +\subsection{Tape Modes on FreeBSD} +\index[general]{FreeBSD!Tape Modes on} +\index[general]{Tape Modes on FreeBSD} + +On most FreeBSD systems such as 4.9 and most tape drives, Bacula should run +with: + +\footnotesize +\begin{verbatim} +mt -f /dev/nsa0 seteotmodel 2 +mt -f /dev/nsa0 blocksize 0 +mt -f /dev/nsa0 comp enable +\end{verbatim} +\normalsize + +You might want to put those commands in a startup script to make sure your +tape driver is properly initialized before running Bacula, because +depending on your system configuration, these modes may be reset if a +program other than Bacula uses the drive or when your system is rebooted. + +Then according to what the {\bf btape test} command returns, you will probably +need to set the following (see below for an alternative): + +\footnotesize +\begin{verbatim} + Hardware End of Medium = no + BSF at EOM = yes + Backward Space Record = no + Backward Space File = no + Fast Forward Space File = no + TWO EOF = yes +\end{verbatim} +\normalsize + +Then be sure to run some append tests with Bacula where you start and stop +Bacula between appending to the tape, or use {\bf btape} version 1.35.1 or +greater, which includes simulation of stopping/restarting Bacula. + +Please see the file {\bf platforms/freebsd/pthreads-fix.txt} in the main +Bacula directory concerning {\bf important} information concerning +compatibility of Bacula and your system. A much more optimal Device +configuration is shown below, but does not work with all tape drives. Please +test carefully before putting either into production. + +Note, for FreeBSD 4.10-RELEASE, using a Sony TSL11000 L100 DDS4 with an +autochanger set to variable block size and DCLZ compression, Brian McDonald +reports that to get Bacula to append correctly between Bacula executions, +the correct values to use are: + +\footnotesize +\begin{verbatim} +mt -f /dev/nsa0 seteotmodel 1 +mt -f /dev/nsa0 blocksize 0 +mt -f /dev/nsa0 comp enable +\end{verbatim} +\normalsize + +and + +\footnotesize +\begin{verbatim} + Hardware End of Medium = no + BSF at EOM = no + Backward Space Record = no + Backward Space File = no + Fast Forward Space File = yes + TWO EOF = no +\end{verbatim} +\normalsize + +This has been confirmed by several other people using different hardware. This +configuration is the preferred one because it uses one EOF and no backspacing +at the end of the tape, which works much more efficiently and reliably with +modern tape drives. + +Finally, here is a Device configuration that Danny Butroyd reports to work +correctly with the Overland Powerloader tape library using LT0-2 and +FreeBSD 5.4-Stable: + +\footnotesize +\begin{verbatim} +# Overland Powerloader LT02 - 17 slots single drive +Device { + Name = Powerloader + Media Type = LT0-2 + Archive Device = /dev/nsa0 + AutomaticMount = yes; + AlwaysOpen = yes; + RemovableMedia = yes; + RandomAccess = no; + Changer Command = "/usr/local/sbin/mtx-changer %c %o %S %a %d" + Changer Device = /dev/pass2 + AutoChanger = yes + Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'" + + # FreeBSD Specific Settings + Offline On Unmount = no + Hardware End of Medium = no + BSF at EOM = yes + Backward Space Record = no + Fast Forward Space File = no + TWO EOF = yes +} + +The following Device resource works fine with Dell PowerVault 110T and +120T devices on both FreeBSD 5.3 and on NetBSD 3.0. It also works +with Sony AIT-2 drives on FreeBSD. +\footnotesize +\begin{verbatim} +Device { + ... + # FreeBSD/NetBSD Specific Settings + Hardware End of Medium = no + BSF at EOM = yes + Backward Space Record = no + Fast Forward Space File = yes + TWO EOF = yes +} +\end{verbatim} +\normalsize + +On FreeBSD version 6.0, it is reported that you can even set +Backward Space Record = yes. + + + +\subsection{Finding your Tape Drives and Autochangers on FreeBSD} +\index[general]{FreeBSD!Finding Tape Drives and Autochangers} +\index[general]{Finding Tape Drives and Autochangers on FreeBSD} + +On FreeBSD, you can do a {\bf camcontrol devlist} as root to determine what +drives and autochangers you have. For example, + +\footnotesize +\begin{verbatim} +undef# camcontrol devlist + at scbus0 target 2 lun 0 (pass0,sa0) + at scbus0 target 4 lun 0 (pass1,sa1) + at scbus0 target 4 lun 1 (pass2) +\end{verbatim} +\normalsize + +from the above, you can determine that there is a tape drive on {\bf /dev/sa0} +and another on {\bf /dev/sa1} in addition since there is a second line for the +drive on {\bf /dev/sa1}, you know can assume that it is the control device for +the autochanger (i.e. {\bf /dev/pass2}). It is also the control device name to +use when invoking the tapeinfo program. E.g. + +\footnotesize +\begin{verbatim} +tapeinfo -f /dev/pass2 +\end{verbatim} +\normalsize + +\label{onstream} + +\subsection{Using the OnStream driver on Linux Systems} +\index[general]{Using the OnStream driver on Linux Systems} +\index[general]{Systems!Using the OnStream driver on Linux} + +Bacula version 1.33 (not 1.32x) is now working and ready for testing with the +OnStream kernel osst driver version 0.9.14 or above. Osst is available from: +\elink{http://sourceforge.net/projects/osst/} +{http://sourceforge.net/projects/osst/}. + +To make Bacula work you must first load the new driver then, as root, do: + +\footnotesize +\begin{verbatim} + mt -f /dev/nosst0 defblksize 32768 +\end{verbatim} +\normalsize + +Also you must add the following to your Device resource in your Storage +daemon's conf file: + +\footnotesize +\begin{verbatim} + Minimum Block Size = 32768 + Maximum Block Size = 32768 +\end{verbatim} +\normalsize + +Here is a Device specification provided by Michel Meyers that is known to +work: + +\footnotesize +\begin{verbatim} +Device { + Name = "Onstream DI-30" + Media Type = "ADR-30" + Archive Device = /dev/nosst0 + Minimum Block Size = 32768 + Maximum Block Size = 32768 + Hardware End of Medium = yes + BSF at EOM = no + Backward Space File = yes + Fast Forward Space File = yes + Two EOF = no + AutomaticMount = yes + AlwaysOpen = yes + Removable Media = yes +} +\end{verbatim} +\normalsize + +\section{Hardware Compression on EXB-8900} +\index[general]{Hardware Compression on EXB-8900} +\index[general]{EXB-8900!Hardware Compression} + +To active, check, or disable the hardware compression feature +on an EXB-8900, use the exabyte MammothTool. You can get it here: +\elink{http://www.exabyte.com/support/online/downloads/index.cfm} +{http://www.exabyte.com/support/online/downloads/index.cfm}. +There is a Solaris version of this tool. With option -C 0 or 1 you +can disable or activate compression. Start this tool without any +options for a small reference. + +\label{fill} +\subsection{Using btape to Simulate Filling a Tape} +\index[general]{Using btape to Simulate Filling a Tape} +\index[general]{Tape!Using btape to Simulate Filling} + +Because there are often problems with certain tape drives or systems when end +of tape conditions occur, {\bf btape} has a special command {\bf fill} that +causes it to write random data to a tape until the tape fills. It then writes +at least one more Bacula block to a second tape. Finally, it reads back both +tapes to ensure that the data has been written in a way that Bacula can +recover it. Note, there is also a single tape option as noted below, which you +should use rather than the two tape test. See below for more details. + +This can be an extremely time consuming process (here it is about 6 hours) to +fill a full tape. Note, that btape writes random data to the tape when it is +filling it. This has two consequences: 1. it takes a bit longer to generate +the data, especially on slow CPUs. 2. the total amount of data is +approximately the real physical capacity of your tape, regardless of whether +or not the tape drive compression is on or off. This is because random data +does not compress very much. + +To begin this test, you enter the {\bf fill} command and follow the +instructions. There are two options: the simple single tape option and the +multiple tape option. Please use only the simple single tape option because +the multiple tape option still doesn't work totally correctly. If the single +tape option does not succeed, you should correct the problem before using +Bacula. +\label{RecoveringFiles} + +\section{Recovering Files Written With Fixed Block Sizes} +\index[general]{Recovering Files Written With Fixed Block Sizes} + +If you have been previously running your tape drive in fixed block mode +(default 512) and Bacula with variable blocks (default), then in version +1.32f-x and 1.34 and above, Bacula will fail to recover files because it does +block spacing, and because the block sizes don't agree between your tape drive +and Bacula it will not work. + +The long term solution is to run your drive in variable block mode as +described above. However, if you have written tapes using fixed block sizes, +this can be a bit of a pain. The solution to the problem is: while you are +doing a restore command using a tape written in fixed block size, ensure that +your drive is set to the fixed block size used while the tape was written. +Then when doing the {\bf restore} command in the Console program, do not +answer the prompt {\bf yes/mod/no}. Instead, edit the bootstrap file (the +location is listed in the prompt) using any ASCII editor. Remove all {\bf +VolBlock} lines in the file. When the file is re-written, answer the question, +and Bacula will run without using block positioning, and it should recover +your files. + +\label{BlockModes} +\section{Tape Blocking Modes} +\index[general]{Modes!Tape Blocking} +\index[general]{Tape Blocking Modes} + +SCSI tapes may either be written in {\bf variable} or {\bf fixed} block sizes. +Newer drives support both modes, but some drives such as the QIC devices +always use fixed block sizes. Bacula attempts to fill and write complete +blocks (default 65K), so that in normal mode (variable block size), Bacula +will always write blocks of the same size except the last block of a Job. If +Bacula is configured to write fixed block sizes, it will pad the last block of +the Job to the correct size. Bacula expects variable tape block size drives to +behave as follows: Each write to the drive results in a single record being +written to the tape. Each read returns a single record. If you request less +bytes than are in the record, only those number of bytes will be returned, but +the entire logical record will have been read (the next read will retrieve the +next record). Thus data from a single write is always returned in a single +read, and sequentially written records are returned by sequential reads. + +Bacula expects fixed block size tape drives to behave as follows: If a write +length is greater than the physical block size of the drive, the write will be +written as two blocks each of the fixed physical size. This single write may +become multiple physical records on the tape. (This is not a good situation). +According to the documentation, one may never write an amount of data that is +not the exact multiple of the blocksize (it is not specified if an error +occurs or if the the last record is padded). When reading, it is my +understanding that each read request reads one physical record from the tape. +Due to the complications of fixed block size tape drives, you should avoid +them if possible with Bacula, or you must be ABSOLUTELY certain that you use +fixed block sizes within Bacula that correspond to the physical block size of +the tape drive. This will ensure that Bacula has a one to one correspondence +between what it writes and the physical record on the tape. + +Please note that Bacula will not function correctly if it writes a block and +that block is split into two or more physical records on the tape. Bacula +assumes that each write causes a single record to be written, and that it can +sequentially recover each of the blocks it has written by using the same +number of sequential reads as it had written. + +\section{Details of Tape Modes} +\index[general]{Modes!Details} +\index[general]{Details of Tape Modes} +Rudolf Cejka has provided the following information concerning +certain tape modes and MTEOM. + +\begin{description} +\item[Tape level] + It is always possible to position filemarks or blocks, whereas + positioning to the end-of-data is only optional feature, however it is + implemented very often. SCSI specification also talks about optional + sequential filemarks, setmarks and sequential setmarks, but these are not + implemented so often. Modern tape drives keep track of file positions in + built-in chip (AIT, LTO) or at the beginning of the tape (SDLT), so there + is not any speed difference, if end-of-data or filemarks is used (I have + heard, that LTO-1 from all 3 manufacturers do not use its chip for file + locations, but a tape as in SDLT case, and I'm not sure about LTO-2 and + LTO-3 case). However there is a big difference, that end-of-data ignores + file position, whereas filemarks returns the real number of skipped + files, so OS can track current file number just in filemarks case. + +\item[OS level] + Solaris does use just SCSI SPACE Filemarks, it does not support SCSI + SPACE End-of-data. When MTEOM is called, Solaris does use SCSI SPACE + Filemarks with count = 1048576 for fast mode, and combination of SCSI + SPACE Filemarks with count = 1 with SCSI SPACE Blocks with count = 1 for + slow mode, so EOD mark on the tape on some older tape drives is not + skipped. File number is always tracked for MTEOM. + + Linux does support both SCSI SPACE Filemarks and End-of-data: When MTEOM + is called in MT\_ST\_FAST\_MTEOM mode, SCSI SPACE End-of-data is used. + In the other case, SCSI SPACE Filemarks with count = + 8388607 is used. + There is no real slow mode like in Solaris - I just expect, that for + older tape drives Filemarks may be slower than End-of-data, but not so + much as in Solaris slow mode. File number is tracked for MTEOM just + without MT\_ST\_FAST\_MTEOM - when MT\_ST\_FAST\_MTEOM is used, it is not. + + FreeBSD does support both SCSI SPACE Filemarks and End-of-data, but when + MTEOD (MTEOM) is called, SCSI SPACE End-of-data is always used. FreeBSD + never use SCSI SPACE Filemarks for MTEOD. File number is never tracked + for MTEOD. + +\item[Bacula level] + When {\bf Hardware End of Medium = Yes} is used, MTEOM is called, but it + does not mean, that hardware End-of-data must be used. When Hardware End + of Medium = No, if Fast Forward Space File = Yes, MTFSF with count = + 32767 is used, else Block Read with count = 1 with Forward Space File + with count = 1 is used, which is really very slow. + +\item [Hardware End of Medium = Yes|No] + The name of this option is misleading and is the source of confusion, + because it is not the hardware EOM, what is really switched here. + + If I use Yes, OS must not use SCSI SPACE End-of-data, because Bacula + expects, that there is tracked file number, which is not supported by + SCSI specification. Instead, the OS have to use SCSI SPACE Filemarks. + + If I use No, an action depends on Fast Forward Space File. + + When I set {\bf Hardware End of Medium = no} + and {\bf Fast Forward Space File = no} + file positioning was very slow + on my LTO-3 (about ten to 100 minutes), but + + with {\bf Hardware End of Medium = no} and +{\bf Fast Forward Space File = yes}, the time is ten to +100 times faster (about one to two minutes). + +\end{description} + +\section{Autochanger Errors} +\index[general]{Errors!Autochanger} +\index[general]{Autochanger Errors} + +If you are getting errors such as: + +\footnotesize +\begin{verbatim} +3992 Bad autochanger "load slot 1, drive 1": ERR=Child exited with code 1. +\end{verbatim} +\normalsize + +and you are running your Storage daemon as non-root, then most likely +you are having permissions problems with the control channel. Running +as root, set permissions on /dev/sgX so that the userid and group of +your Storage daemon can access the device. You need to ensure that you +all access to the proper control device, and if you don't have any +SCSI disk drives (including SATA drives), you might want to change +the permissions on /dev/sg*. + +\section{Syslog Errors} +\index[general]{Errors!Syslog} +\index[general]{Syslog Errors} + +If you are getting errors such as: + +\footnotesize +\begin{verbatim} +: kernel: st0: MTSETDRVBUFFER only allowed for root +\end{verbatim} +\normalsize + +you are most likely running your Storage daemon as non-root, and +Bacula is attempting to set the correct OS buffering to correspond +to your Device resource. Most OSes allow only root to issue this +ioctl command. In general, the message can be ignored providing +you are sure that your OS parameters are properly configured as +described earlier in this manual. If you are running your Storage daemon +as root, you should not be getting these system log messages, and if +you are, something is probably wrong. diff --git a/docs/manuals/de/old/problems/tips.tex b/docs/manuals/de/old/problems/tips.tex new file mode 100644 index 00000000..d8a92a7c --- /dev/null +++ b/docs/manuals/de/old/problems/tips.tex @@ -0,0 +1,1045 @@ +%% +%% + +\chapter{Tips and Suggestions} +\label{TipsChapter} +\index[general]{Tips and Suggestions } +\index[general]{Suggestions!Tips and } +\label{examples} +\index[general]{Examples } + +There are a number of example scripts for various things that can be found in +the {\bf example} subdirectory and its subdirectories of the Bacula source +distribution. + +For additional tips, please see the \elink{Bacula +wiki}{\url{http://wiki.bacula.org}}. + +\section{Upgrading Bacula Versions} +\label{upgrading} +\index[general]{Upgrading Bacula Versions } +\index[general]{Versions!Upgrading Bacula } +\index[general]{Upgrading} + +The first thing to do before upgrading from one version to another is to +ensure that you don't overwrite or delete your production (current) version +of Bacula until you have tested that the new version works. + +If you have installed Bacula into a single directory, this is simple: simply +make a copy of your Bacula directory. + +If you have done a more typical Unix installation where the binaries are +placed in one directory and the configuration files are placed in another, +then the simplest way is to configure your new Bacula to go into a single +file. Alternatively, make copies of all your binaries and especially your +conf files. + +Whatever your situation may be (one of the two just described), you should +probably start with the {\bf defaultconf} script that can be found in the {\bf +examples} subdirectory. Copy this script to the main Bacula directory, modify +it as necessary (there should not need to be many modifications), configure +Bacula, build it, install it, then stop your production Bacula, copy all the +{\bf *.conf} files from your production Bacula directory to the test Bacula +directory, start the test version, and run a few test backups. If all seems +good, then you can proceed to install the new Bacula in place of or possibly +over the old Bacula. + +When installing a new Bacula you need not worry about losing the changes you +made to your configuration files as the installation process will not +overwrite them providing that you do not do a {\bf make uninstall}. + +If the new version of Bacula requires an upgrade to the database, +you can upgrade it with the script {\bf update\_bacula\_tables}, which +will be installed in your scripts directory (default {\bf /etc/bacula}), +or alternatively, you can find it in the +{\bf \lt{}bacula-source\gt{}/src/cats} directory. + +\section{Getting Notified of Job Completion} +\label{notification} +\index[general]{Getting Notified of Job Completion } +\index[general]{Completion!Getting Notified of Job } + +One of the first things you should do is to ensure that you are being properly +notified of the status of each Job run by Bacula, or at a minimum of each Job +that terminates with an error. + +Until you are completely comfortable with {\bf Bacula}, we recommend that you +send an email to yourself for each Job that is run. This is most easily +accomplished by adding an email notification address in the {\bf Messages} +resource of your Director's configuration file. An email is automatically +configured in the default configuration files, but you must ensure that the +default {\bf root} address is replaced by your email address. + +For additional examples of how to configure a Bacula, please take a look at the +{\bf .conf} files found in the {\bf examples} sub-directory. We recommend the +following configuration (where you change the paths and email address to +correspond to your setup). Note, the {\bf mailcommand} and {\bf +operatorcommand} should be on a single line. They were split here for +presentation: + +\footnotesize +\begin{verbatim} +Messages { + Name = Standard + mailcommand = "/home/bacula/bin/bsmtp -h localhost + -f \"\(Bacula\) %r\" + -s \"Bacula: %t %e of %c %l\" %r" + operatorcommand = "/home/bacula/bin/bsmtp -h localhost + -f \"\(Bacula\) %r\" + -s \"Bacula: Intervention needed for %j\" %r" + Mail = your-email-address = all, !skipped, !terminate + append = "/home/bacula/bin/log" = all, !skipped, !terminate + operator = your-email-address = mount + console = all, !skipped, !saved +} +\end{verbatim} +\normalsize + +You will need to ensure that the {\bf /home/bacula/bin} path on the {\bf +mailcommand} and the {\bf operatorcommand} lines point to your {\bf Bacula} +binary directory where the {\bf bsmtp} program will be installed. You will +also want to ensure that the {\bf your-email-address} is replaced by your +email address, and finally, you will also need to ensure that the {\bf +/home/bacula/bin/log} points to the file where you want to log all messages. + +With the above Messages resource, you will be notified by email of every Job +that ran, all the output will be appended to the {\bf log} file you specify, +all output will be directed to the console program, and all mount messages +will be emailed to you. Note, some messages will be sent to multiple +destinations. + +The form of the mailcommand is a bit complicated, but it allows you to +distinguish whether the Job terminated in error or terminated normally. Please +see the +\ilink{Mail Command}{mailcommand} section of the Messages +Resource chapter of this manual for the details of the substitution characters +used above. + +Once you are totally comfortable with Bacula as I am, or if you have a large +number of nightly Jobs as I do (eight), you will probably want to change the +{\bf Mail} command to {\bf Mail On Error} which will generate an email message +only if the Job terminates in error. If the Job terminates normally, no email +message will be sent, but the output will still be appended to the log file as +well as sent to the Console program. + +\section{Getting Email Notification to Work} +\label{email} +\index[general]{Work!Getting Email Notification to } +\index[general]{Getting Email Notification to Work } + +The section above describes how to get email notification of job status. +Occasionally, however, users have problems receiving any email at all. In that +case, the things to check are the following: + +\begin{itemize} +\item Ensure that you have a valid email address specified on your {\bf Mail} + record in the Director's Messages resource. The email address should be fully + qualified. Simply using {\bf root} generally will not work, rather you should +use {\bf root@localhost} or better yet your full domain. +\item Ensure that you do not have a {\bf Mail} record in the Storage daemon's + or File daemon's configuration files. The only record you should have is {\bf + director}: + +\footnotesize +\begin{verbatim} + director = director-name = all + +\end{verbatim} +\normalsize + +\item If all else fails, try replacing the {\bf mailcommand} with + + \footnotesize +\begin{verbatim} +mailcommand = "mail -s test your@domain.com" +\end{verbatim} +\normalsize + +\item Once the above is working, assuming you want to use {\bf bsmtp}, submit + the desired bsmtp command by hand and ensure that the email is delivered, + then put that command into {\bf Bacula}. Small differences in things such as +the parenthesis around the word Bacula can make a big difference to some +bsmtp programs. For example, you might start simply by using: + +\footnotesize +\begin{verbatim} +mailcommand = "/home/bacula/bin/bsmtp -f \"root@localhost\" %r" +\end{verbatim} +\normalsize + +\end{itemize} + +\section{Getting Notified that Bacula is Running} +\label{JobNotification} +\index[general]{Running!Getting Notified that Bacula is } +\index[general]{Getting Notified that Bacula is Running } + +If like me, you have setup Bacula so that email is sent only when a Job has +errors, as described in the previous section of this chapter, inevitably, one +day, something will go wrong and {\bf Bacula} can stall. This could be because +Bacula crashes, which is vary rare, or more likely the network has caused {\bf +Bacula} to {\bf hang} for some unknown reason. + +To avoid this, you can use the {\bf RunAfterJob} command in the Job resource +to schedule a Job nightly, or weekly that simply emails you a message saying +that Bacula is still running. For example, I have setup the following Job in +my Director's configuration file: + +\footnotesize +\begin{verbatim} +Schedule { + Name = "Watchdog" + Run = Level=Full sun-sat at 6:05 +} +Job { + Name = "Watchdog" + Type = Admin + Client=Watchdog + FileSet="Verify Set" + Messages = Standard + Storage = DLTDrive + Pool = Default + Schedule = "Watchdog" + RunAfterJob = "/home/kern/bacula/bin/watchdog %c %d" +} +Client { + Name = Watchdog + Address = rufus + FDPort = 9102 + Catalog = Verify + Password = "" + File Retention = 1day + Job Retention = 1 month + AutoPrune = yes +} +\end{verbatim} +\normalsize + +Where I established a schedule to run the Job nightly. The Job itself is type +{\bf Admin} which means that it doesn't actually do anything, and I've defined +a FileSet, Pool, Storage, and Client, all of which are not really used (and +probably don't need to be specified). The key aspect of this Job is the +command: + +\footnotesize +\begin{verbatim} + RunAfterJob = "/home/kern/bacula/bin/watchdog %c %d" +\end{verbatim} +\normalsize + +which runs my "watchdog" script. As an example, I have added the Job codes +\%c and \%d which will cause the Client name and the Director's name to be +passed to the script. For example, if the Client's name is {\bf Watchdog} and +the Director's name is {\bf main-dir} then referencing \$1 in the script would +get {\bf Watchdog} and referencing \$2 would get {\bf main-dir}. In this case, +having the script know the Client and Director's name is not really useful, +but in other situations it may be. + +You can put anything in the watchdog script. In my case, I like to monitor the +size of my catalog to be sure that {\bf Bacula} is really pruning it. The +following is my watchdog script: + +\footnotesize +\begin{verbatim} +#!/bin/sh +cd /home/kern/mysql/var/bacula +du . * | +/home/kern/bacula/bin/bsmtp \ + -f "\(Bacula\) abuse@whitehouse.com" -h mail.yyyy.com \ + -s "Bacula running" abuse@whitehouse.com +\end{verbatim} +\normalsize + +If you just wish to send yourself a message, you can do it with: + +\footnotesize +\begin{verbatim} +#!/bin/sh +cd /home/kern/mysql/var/bacula +/home/kern/bacula/bin/bsmtp \ + -f "\(Bacula\) abuse@whitehouse.com" -h mail.yyyy.com \ + -s "Bacula running" abuse@whitehouse.com </volume-list + exit 0 +\end{verbatim} +\normalsize + +so that the whole case looks like: + +\footnotesize +\begin{verbatim} + list) +# +# commented out lines + cat /volume-list + exit 0 + ;; +\end{verbatim} +\normalsize + +where you replace \lt{}absolute-path\gt{} with the full path to the +volume-list file. Then using the console, you enter the following command: + +\footnotesize +\begin{verbatim} + label barcodes +\end{verbatim} +\normalsize + +and Bacula will proceed to mount the autochanger Volumes in the list and label +them with the Volume names you have supplied. Bacula will think that the list +was provided by the autochanger barcodes, but in reality, it was you who +supplied the \lt{}barcodes\gt{}. + +If it seems to work, when it finishes, enter: + +\footnotesize +\begin{verbatim} + list volumes +\end{verbatim} +\normalsize + +and you should see all the volumes nicely created. + +\section{Backing Up Portables Using DHCP} +\label{DNS} +\index[general]{DHCP!Backing Up Portables Using } +\index[general]{Backing Up Portables Using DHCP } + +You may want to backup laptops or portables that are not always connected to +the network. If you are using DHCP to assign an IP address to those machines +when they connect, you will need to use the Dynamic Update capability of DNS +to assign a name to those machines that can be used in the Address field of +the Client resource in the Director's conf file. + +\section{Going on Vacation} +\label{Vacation} +\index[general]{Vacation!Going on } +\index[general]{Going on Vacation } + +At some point, you may want to be absent for a week or two and you want to +make sure Bacula has enough tape left so that the backups will complete. You +start by doing a {\bf list volumes} in the Console program: + +\footnotesize +\begin{verbatim} +list volumes + +Using default Catalog name=BackupDB DB=bacula +Pool: Default ++---------+---------------+-----------+-----------+----------------+- +| MediaId | VolumeName | MediaType | VolStatus | VolBytes | ++---------+---------------+-----------+-----------+----------------+- +| 23 | DLT-30Nov02 | DLT8000 | Full | 54,739,278,128 | +| 24 | DLT-21Dec02 | DLT8000 | Full | 56,331,524,629 | +| 25 | DLT-11Jan03 | DLT8000 | Full | 67,863,514,895 | +| 26 | DLT-02Feb03 | DLT8000 | Full | 63,439,314,216 | +| 27 | DLT-03Mar03 | DLT8000 | Full | 66,022,754,598 | +| 28 | DLT-04Apr03 | DLT8000 | Full | 60,792,559,924 | +| 29 | DLT-28Apr03 | DLT8000 | Full | 62,072,494,063 | +| 30 | DLT-17May03 | DLT8000 | Full | 65,901,767,839 | +| 31 | DLT-07Jun03 | DLT8000 | Used | 56,558,490,015 | +| 32 | DLT-28Jun03 | DLT8000 | Full | 64,274,871,265 | +| 33 | DLT-19Jul03 | DLT8000 | Full | 64,648,749,480 | +| 34 | DLT-08Aug03 | DLT8000 | Full | 64,293,941,255 | +| 35 | DLT-24Aug03 | DLT8000 | Append | 9,999,216,782 | ++---------+---------------+-----------+-----------+----------------+ +\end{verbatim} +\normalsize + +Note, I have truncated the output for presentation purposes. What is +significant, is that I can see that my current tape has almost 10 Gbytes of +data, and that the average amount of data I get on my tapes is about 60 +Gbytes. So if I go on vacation now, I don't need to worry about tape capacity +(at least not for short absences). + +Equally significant is the fact that I did go on vacation the 28th of June +2003, and when I did the {\bf list volumes} command, my current tape at that +time, DLT-07Jun03 MediaId 31, had 56.5 Gbytes written. I could see that the +tape would fill shortly. Consequently, I manually marked it as {\bf Used} and +replaced it with a fresh tape that I labeled as DLT-28Jun03, thus assuring +myself that the backups would all complete without my intervention. + +\section{Exclude Files on Windows Regardless of Case} +\label{Case} +\index[general]{Exclude Files on Windows Regardless of Case} +% TODO: should this be put in the win32 chapter? +% TODO: should all these tips be placed in other chapters? + +This tip was submitted by Marc Brueckner who wasn't sure of the case of some +of his files on Win32, which is case insensitive. The problem is that Bacula +thinks that {\bf /UNIMPORTANT FILES} is different from {\bf /Unimportant +Files}. Marc was aware that the file exclusion permits wild-cards. So, he +specified: + +\footnotesize +\begin{verbatim} +"/[Uu][Nn][Ii][Mm][Pp][Oo][Rr][Tt][Aa][Nn][Tt] [Ff][Ii][Ll][Ee][Ss]" +\end{verbatim} +\normalsize + +As a consequence, the above exclude works for files of any case. + +Please note that this works only in Bacula Exclude statement and not in +Include. + +\section{Executing Scripts on a Remote Machine} +\label{RemoteExecution} +\index[general]{Machine!Executing Scripts on a Remote } +\index[general]{Executing Scripts on a Remote Machine } + +This tip also comes from Marc Brueckner. (Note, this tip is probably outdated +by the addition of {\bf ClientRunBeforJob} and {\bf ClientRunAfterJob} Job +records, but the technique still could be useful.) First I thought the "Run +Before Job" statement in the Job-resource is for executing a script on the +remote machine (the machine to be backed up). (Note, this is possible as mentioned +above by using {\bf ClientRunBeforJob} and {\bf ClientRunAfterJob}). +It could be useful to execute +scripts on the remote machine e.g. for stopping databases or other services +while doing the backup. (Of course I have to start the services again when the +backup has finished) I found the following solution: Bacula could execute +scripts on the remote machine by using ssh. The authentication is done +automatically using a private key. First you have to generate a keypair. I've +done this by: + +\footnotesize +\begin{verbatim} +ssh-keygen -b 4096 -t dsa -f Bacula_key +\end{verbatim} +\normalsize + +This statement may take a little time to run. It creates a public/private key +pair with no passphrase. You could save the keys in /etc/bacula. Now you have +two new files : Bacula\_key which contains the private key and Bacula\_key.pub +which contains the public key. + +Now you have to append the Bacula\_key.pub file to the file authorized\_keys +in the \textbackslash{}root\textbackslash{}.ssh directory of the remote +machine. Then you have to add (or uncomment) the line + +\footnotesize +\begin{verbatim} +AuthorizedKeysFile %h/.ssh/authorized_keys +\end{verbatim} +\normalsize + +to the sshd\_config file on the remote machine. Where the \%h stands for the +home-directory of the user (root in this case). + +Assuming that your sshd is already running on the remote machine, you can now +enter the following on the machine where Bacula runs: + +\footnotesize +\begin{verbatim} +ssh -i Bacula_key -l root "ls -la" +\end{verbatim} +\normalsize + +This should execute the "ls -la" command on the remote machine. + +Now you could add lines like the following to your Director's conf file: + +\footnotesize +\begin{verbatim} +... +Run Before Job = ssh -i /etc/bacula/Bacula_key 192.168.1.1 \ + "/etc/init.d/database stop" +Run After Job = ssh -i /etc/bacula/Bacula_key 192.168.1.1 \ + "/etc/init.d/database start" +... +\end{verbatim} +\normalsize + +Even though Bacula version 1.32 and later has a ClientRunBeforeJob, the ssh method still +could be useful for updating all the Bacula clients on several remote machines +in a single script. + +\section{Recycling All Your Volumes} +\label{recycle} +\index[general]{Recycling All Your Volumes } +\index[general]{Volumes!Recycling All Your } + +This tip comes from Phil Stracchino. + +If you decide to blow away your catalog and start over, the simplest way to +re-add all your prelabeled tapes with a minimum of fuss (provided you don't +care about the data on the tapes) is to add the tape labels using the console +{\bf add} command, then go into the catalog and manually set the VolStatus of +every tape to {\bf Recycle}. + +The SQL command to do this is very simple, either use your vendor's +command line interface (mysql, postgres, sqlite, ...) or use the sql +command in the Bacula console: + +\footnotesize +\begin{verbatim} +update Media set VolStatus='Recycle'; +\end{verbatim} +\normalsize + +Bacula will then ignore the data already stored on the tapes and just re-use +each tape without further objection. + +\section{Backing up ACLs on ext3 or XFS filesystems} +\label{ACLs} +\index[general]{Filesystems!Backing up ACLs on ext3 or XFS } +\index[general]{Backing up ACLs on ext3 or XFS filesystems } + +This tip comes from Volker Sauer. + +Note, this tip was given prior to implementation of ACLs in Bacula (version +1.34.5). It is left here because dumping/displaying ACLs can still be useful +in testing/verifying that Bacula is backing up and restoring your ACLs +properly. Please see the +\ilink{aclsupport}{ACLSupport} FileSet option in the +configuration chapter of this manual. + +For example, you could dump the ACLs to a file with a script similar to the +following: + +\footnotesize +\begin{verbatim} +#!/bin/sh +BACKUP_DIRS="/foo /bar" +STORE_ACL=/root/acl-backup +umask 077 +for i in $BACKUP_DIRS; do + cd $i /usr/bin/getfacl -R --skip-base .>$STORE_ACL/${i//\//_} +done +\end{verbatim} +\normalsize + +Then use Bacula to backup {\bf /root/acl-backup}. + +The ACLs could be restored using Bacula to the {\bf /root/acl-backup} file, +then restored to your system using: + +\footnotesize +\begin{verbatim} +setfacl --restore/root/acl-backup +\end{verbatim} +\normalsize + +\section{Total Automation of Bacula Tape Handling} +\label{automate} +\index[general]{Handling!Total Automation of Bacula Tape } +\index[general]{Total Automation of Bacula Tape Handling } + +This tip was provided by Alexander Kuehn. + +\elink{Bacula}{\url{http://www.bacula.org/}} is a really nice backup program except +that the manual tape changing requires user interaction with the bacula +console. + +Fortunately I can fix this. +NOTE!!! This suggestion applies for people who do *NOT* have tape autochangers +and must change tapes manually.!!!!! + +Bacula supports a variety of tape changers through the use of mtx-changer +scripts/programs. This highly flexible approach allowed me to create +\elink{this shell script}{\url{http://www.bacula.org/en/rel-manual/mtx-changer.txt}} which does the following: +% TODO: We need to include this in book appendix and point to it. +% TODO: +Whenever a new tape is required it sends a mail to the operator to insert the +new tape. Then it waits until a tape has been inserted, sends a mail again to +say thank you and let's bacula continue its backup. +So you can schedule and run backups without ever having to log on or see the +console. +To make the whole thing work you need to create a Device resource which looks +something like this ("Archive Device", "Maximum Changer Wait", "Media +Type" and "Label media" may have different values): + +\footnotesize +\begin{verbatim} +Device { + Name=DDS3 + Archive Device = # use yours not mine! ;)/dev/nsa0 + Changer Device = # not really required/dev/nsa0 + Changer Command = "# use this (maybe change the path)! + /usr/local/bin/mtx-changer %o %a %S" + Maximum Changer Wait = 3d # 3 days in seconds + AutomaticMount = yes; # mount on start + AlwaysOpen = yes; # keep device locked + Media Type = DDS3 # it's just a name + RemovableMedia = yes; # + Offline On Unmount = Yes; # keep this too + Label media = Yes; # +} +\end{verbatim} +\normalsize + +As the script has to emulate the complete wisdom of a mtx-changer it has an +internal "database" containing where which tape is stored, you can see this on +the following line: + +\footnotesize +\begin{verbatim} +labels="VOL-0001 VOL-0002 VOL-0003 VOL-0004 VOL-0005 VOL-0006 +VOL-0007 VOL-0008 VOL-0009 VOL-0010 VOL-0011 VOL-0012" +\end{verbatim} +\normalsize + +The above should be all on one line, and it effectively tells Bacula that +volume "VOL-0001" is located in slot 1 (which is our lowest slot), that +volume "VOL-0002" is located in slot 2 and so on.. +The script also maintains a logfile (/var/log/mtx.log) where you can monitor +its operation. + +\section{Running Concurrent Jobs} +\label{ConcurrentJobs} +\index[general]{Jobs!Running Concurrent} +\index[general]{Running Concurrent Jobs} +\index[general]{Concurrent Jobs} + +Bacula can run multiple concurrent jobs, but the default configuration files +do not enable it. Using the {\bf Maximum Concurrent Jobs} directive, you +can configure how many and which jobs can be run simultaneously. +The Director's default value for {\bf Maximum Concurrent Jobs} is "1". + +To initially setup concurrent jobs you need to define {\bf Maximum Concurrent Jobs} in +the Director's configuration file (bacula-dir.conf) in the +Director, Job, Client, and Storage resources. + +Additionally the File daemon, and the Storage daemon each have their own +{\bf Maximum Concurrent Jobs} directive that sets the overall maximum +number of concurrent jobs the daemon will run. The default for both the +File daemon and the Storage daemon is "20". + +For example, if you want two different jobs to run simultaneously backing up +the same Client to the same Storage device, they will run concurrently only if +you have set {\bf Maximum Concurrent Jobs} greater than one in the Director +resource, the Client resource, and the Storage resource in bacula-dir.conf. + +We recommend that you read the \ilink{Data +Spooling}{SpoolingChapter} of this manual first, then test your multiple +concurrent backup including restore testing before you put it into +production. + +Below is a super stripped down bacula-dir.conf file showing you the four +places where the the file must be modified to allow the same job {\bf +NightlySave} to run up to four times concurrently. The change to the Job +resource is not necessary if you want different Jobs to run at the same time, +which is the normal case. + +\footnotesize +\begin{verbatim} +# +# Bacula Director Configuration file -- bacula-dir.conf +# +Director { + Name = rufus-dir + Maximum Concurrent Jobs = 4 + ... +} +Job { + Name = "NightlySave" + Maximum Concurrent Jobs = 4 + Client = rufus-fd + Storage = File + ... +} +Client { + Name = rufus-fd + Maximum Concurrent Jobs = 4 + ... +} +Storage { + Name = File + Maximum Concurrent Jobs = 4 + ... +} +\end{verbatim} +\normalsize diff --git a/docs/manuals/fr/concepts/translate_images.pl b/docs/manuals/de/old/problems/translate_images.pl similarity index 100% rename from docs/manuals/fr/concepts/translate_images.pl rename to docs/manuals/de/old/problems/translate_images.pl diff --git a/docs/manuals/es/utility/Makefile b/docs/manuals/de/old/utility/Makefile.in similarity index 95% rename from docs/manuals/es/utility/Makefile rename to docs/manuals/de/old/utility/Makefile.in index b37abf39..7136d1b6 100644 --- a/docs/manuals/es/utility/Makefile +++ b/docs/manuals/de/old/utility/Makefile.in @@ -78,8 +78,6 @@ html: latex2html -white -no_subdir -split 0 -toc_stars -white -notransparent \ -init_file latex2html-init.pl ${DOC} >tex.out 2>&1 ./translate_images.pl --to_meaningful_names ${DOC}.html - cp ${IMAGES}/bacula-logo.png ${DOC} - (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} .; done) @echo "Done making html" web: @@ -95,7 +93,6 @@ web: latex2html -split 3 -local_icons -t "Bacula Utility Programs" -long_titles 4 \ -toc_stars -contents_in_nav -init_file latex2html-init.pl -white -notransparent ${DOC} >tex.out 2>&1 ./translate_images.pl --to_meaningful_names ${DOC}/Bacula_Utilit*.html - (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} .; done) @echo "Done making web" show: xdvi ${DOC} diff --git a/docs/manuals/de/old/utility/bimagemgr-chapter.tex b/docs/manuals/de/old/utility/bimagemgr-chapter.tex new file mode 100644 index 00000000..36c7c0da --- /dev/null +++ b/docs/manuals/de/old/utility/bimagemgr-chapter.tex @@ -0,0 +1,149 @@ +%% +%% +%% The following characters must be preceded by a backslash +%% to be entered as printable characters: +%% +%% # $ % & ~ _ ^ \ { } +%% + +\section{bimagemgr} +\label{bimagemgr} +\index[general]{Bimagemgr } + +{\bf bimagemgr} ist ein Hilfsmittel f\"{u}r diejenigen, die Ihre Backups auf +Festplatten-Volumes speichern und diese Volumes auf CDR brennen wollen. +Es hat eine Web-basierte Bedienoberfl\"{a}che und ist in Perl programmiert. +Es wird benutzt, um zu kontrollieren, wann die Notwendigkeit besteht, eine +Volume-Datei auf eine CD zu brennen. +Es ben\"{o}tigt: + +\begin{itemize} +\item Einen Web-Server der auf derselben Maschine wie Bacula l\"{a}uft +\item Einen auf dem Bacula-Server installierten und konfigurierten CD-Rekorder +\item Das cdr-tools-Paket muss installiert sein +\item perl, perl-DBI Modul, und entweder das DBD-MySQL, DBD-SQLite oder DBD-PostgreSQL Modul +\end{itemize} + +DVD-Brenner werden von bimagemgr zur Zeit nicht unterst\"{u}tzt, das ist aber f\"{u}r +zuk\"{u}nftige Versionen geplant. + +\subsection{bimagemgr Installation} +\index[general]{bimagemgr!Installation } +\index[general]{bimagemgr Installation } + +Installation aus dem tar.gz: +% TODO: use itemized list for this? +1. Pr\"{u}fen und anpassen des Makefile, um es auf Ihre Computer-Konfiguration abzustimmen. +2. Editieren der Datei config.pm ,um sie auf Ihre Konfiguration abzustimmen. +3. F\"{u}hren Sie 'make install' als root aus. +4. Passen Sie in Ihrer httpd.conf das Timeout an. Der Web-Server darf die Verbindung nicht schliessen, +solange der Brennvorgang nicht abgeschlossen ist. Der ben\"{o}tigte Wert, den Sie als Timeout +konfigurieren m\"{u}ssen, h\"{a}ngt von der Geschwindigkeit Ihres CD-Brenners ab, oder ob Sie \"{u}ber das Netzwerk brennen. In den meisten F\"{a}llen reichen 1000 Sekunden als Timeout. Den httpd neu starten. +5. Stellen Sie sicher, dass das Kommando cdrecord als "setuid root" installiert ist. +% TODO: I am pretty sure cdrecord can be used without setuid root +% TODO: as long as devices are setup correctly + +Installation eines rpm-Paketes: +% TODO: use itemized list for this? +1. Installieren Sie das rpm-Paket f\"{u}r Ihre Plattform. +2. Editieren Sie die Datei /cgi-bin/config.pm, um sie an Ihre Konfiguration abzupassen. +3. Passen Sie in Ihrer httpd.conf das Timeout an. Der Web-Server darf die Verbindung nicht schliessen, +solange der Brennvorgang nicht abgeschlossen ist. Der ben\"{o}tigte Wert, den Sie als Timeout +konfigurieren m\"{u}ssen, h\"{a}ngt von der Geschwindigkeit Ihres CD-Brenners ab, oder ob Sie \"{u}ber das Netzwerk brennen. In den meisten F\"{a}llen reichen 1000 Sekunden als Timeout. Den httpd neu starten. +4. Stellen Sie sicher, dass das Kommando cdrecord als "setuid root" installiert ist. + +Zugriff auf die Volume-Dateien: +Die Volume-Dateien haben standardm\"{a}{\ss}ig die Zugriffsrechte 640 gesetzt +und k\"{o}nnen nur von Benutzer root gelesen werden. +Die empfohlene Methode ist die folgende (das funktioniert nur, wenn bacula und bimagemgr +auf demselben Computer laufen wie der Web-Server): + +F\"{u}r Bacula-Versionen 1.34 oder 1.36 installiert aus dem tar.gz - +% TODO: use itemized list for this? +1. Erstellen Sie eine neu Gruppe namens bacula und f\"{u}gen Sie den Benutzer apache dieser Gruppe +hinzu (bei RedHat und Mandrake, bei SuSE ist es der Benutzer wwwrun, bei debian www-data) +2. \"{A}ndern Sie den Eigent\"{u}mer aller Volume-Dateien auf root.bacula. +3. Passen Sie das Script /etc/init.d/bacula an und setzen Sie SD\_USER=root und SD\_GROUP=bacula. +Starten Sie Bacula neu. + +Anmerkung: Schritt Nr. 3 sollte auch in /etc/init.d/bacula-sd gemacht werden, +aber die Dateien aus Bacula-Versionen vor 1.36 unterst\"{u}tzen dies nicht. +In diesem Fall kann es n\"{o}tig sein den Computer neu zu starten, +um '/etc/bacula/bacula restart' auszuf\"{u}hren. + +F\"{u}r Bacula-Versionen 1.38 installiert aus dem tar.gz +% TODO: use itemized list for this? +1. Ihr configure-Aufruf sollte dies beinhalten: +% TODO: fix formatting here + --with-dir-user=bacula + --with-dir-group=bacula + --with-sd-user=bacula + --with-sd-group=disk + --with-fd-user=root + --with-fd-group=bacula +2. F\"{u}gen Sie den Benutzer apache der Gruppe bacula hinzu +(bei RedHat und Mandrake, bei SuSE ist es der Benutzer wwwrun, bei debian www-data) +3. Kontrollieren/\"{A}ndern Sie den Eigent\"{u}mer aller Volume-Dateien auf root.bacula + +F\"{u}r Bacul-Versionen 1.36 oder 1.38 mit rpm installiert - +% TODO: use itemized list for this? +1. F\"{u}gen Sie den Benutzer apache der Gruppe bacula hinzu +(bei RedHat und Mandrake, bei SuSE ist es der Benutzer wwwrun, bei debian www-data) +2. Kontrollieren/\"{A}ndern Sie den Eigent\"{u}mer aller Volume-Dateien auf root.bacula + +Wenn bimagemgr mit einem rpm-Paket Version gr\"{o}{\ss}er 1.38.9 installiert wird, +wird der Web-Server-Benutzer automatisch der Gruppe bacula hinzugef\"{u}gt. +Stellen Sie sicher, dass Sie die Datei config.pm nach der Installation anpassen. + +bimagemgr kann jetzt alle Volume-Dateien lesen, aber sie sind nicht durch alle Benutzer lesbar. + +Wenn Sie bimagemgr auf einen anderen Computer installieren (nicht empfohlen), +m\"{u}ssen Sie die Zugriffsrechte aller Volume-Dateien auf 644 \"{a}ndern, +damit Sie \"{u}ber nfs oder andere Mittel darauf zugreifen k\"{o}nnen. +Beachten Sie, dass bei diesem Vorgehen die Volume-Dateien f\"{u}r alle Benutzer lesbar sind +und Sie den Schutz der Dateien anders sicherstellen. + +\subsection{bimagemgr Benutzung} +\index[general]{bimagemgr!Benutzung } +\index[general]{bimagemgr Benutzung } + +Rufen Sie das Programm mit Ihrem Web-Browser auf, z.B. {\tt http://localhost/cgi-bin/bimagemgr.pl}, +dann sollten Sie eine Darstellung \"{a}hnlich der unten im Bild 1 abgebildeten sehen. +% TODO: use tex to say figure number +Das Programm wird die Bacula-Datenbank abfragen und alle Volume-Dateien mit dem Datum +des letzten Schreibvorgangs und dem Zeitpunkt darstellen, wo das Volume zum letzten +Mal auf CD gebrannt wurde. Wenn ein Volume auf CD gebrannt werden muss (letzter Schreibvorgang +ist neuer als der letzte Brennvorgang), wird ein "Brennen"-Knopf in der rechten Spalte angezeigt. + +\addcontentsline{lof}{figure}{Bacula CD Image Manager} +\includegraphics{\idir bimagemgr1.eps} \\Figure 1 +% TODO: use tex to say figure number + +Legen Sie eine leere CD in Ihren CD-Brenner und klicken Sie auf den "Brennen"-Knopf. +Dann \"{o}ffnet sich ein PopUp-Fenster, wie im Bild 2, das den Brennvorgang anzeigt. +% TODO: use tex to say figure number + +\addcontentsline{lof}{figure}{Bacula CD Image Brennfortschritt-Fenster} +\includegraphics{\idir bimagemgr2.eps} \\Figure 2 +% TODO: use tex to say figure number + +Wenn der Brennvorgang abgeschlo{\ss}en ist, zeigt das PopUp-Fenster die Ausgaben von cdrecord +an (siehe Bild 3). +% TODO: use tex to say figure number +Schlie{\ss}en Sie das PopUp-Fenster und laden Sie die Hauptseite neu. +Das Datum des letzten Brennvorgangs wird aktualisiert und der "Brennen"-Knopf verschwindet. +Sollte das Brennen fehlgeschlagen sein, k\"{o}nnen Sie das Datum des letzten Brennvorgangs +zur\"{u}cksetzen, indem Sie auf den Link "Reset" des Volumes klicken. + +\addcontentsline{lof}{figure}{Bacula CD Image Brennergebnis} +\includegraphics{\idir bimagemgr3.eps} \\Figure 3 +% TODO: use tex to say figure number + +In der untersten Zeile des Hauptfensters sind zwei weitere Kn\"{o}pfe, +mit "Burn Catalog" und "Blank CDRW" beschriftet. +"Burn Catalog" schreibt eine Kopie Ihrer Katalog-Datenbank auf eine CD. +Falls Sie CDRW-Medien benutzen, k\"{o}nnen Sie mit "Blank CDRW" ein Medium l\"{o}schen +bevor Sie es wiederverwenden. +Regelm\"{a}ssiges speichern Ihrer Volume-Dateien und Ihrer Katalog-Datenbank mit bimagemgr auf CD's +stellt sicher, dass Sie jederzeit im Falle eines Datenverlustes auf Ihrem Bacula-Server +diesen einfach wiederherstellen k\"{o}nnen. diff --git a/docs/manuals/fr/concepts/check_tex.pl b/docs/manuals/de/old/utility/check_tex.pl similarity index 100% rename from docs/manuals/fr/concepts/check_tex.pl rename to docs/manuals/de/old/utility/check_tex.pl diff --git a/docs/manuals/fr/install/do_echo b/docs/manuals/de/old/utility/do_echo similarity index 100% rename from docs/manuals/fr/install/do_echo rename to docs/manuals/de/old/utility/do_echo diff --git a/docs/manuals/fr/concepts/fdl.tex b/docs/manuals/de/old/utility/fdl.tex similarity index 100% rename from docs/manuals/fr/concepts/fdl.tex rename to docs/manuals/de/old/utility/fdl.tex diff --git a/docs/manuals/fr/concepts/fix_tex.pl b/docs/manuals/de/old/utility/fix_tex.pl similarity index 100% rename from docs/manuals/fr/concepts/fix_tex.pl rename to docs/manuals/de/old/utility/fix_tex.pl diff --git a/docs/manuals/fr/concepts/index.perl b/docs/manuals/de/old/utility/index.perl similarity index 100% rename from docs/manuals/fr/concepts/index.perl rename to docs/manuals/de/old/utility/index.perl diff --git a/docs/manuals/fr/install/latex2html-init.pl b/docs/manuals/de/old/utility/latex2html-init.pl similarity index 100% rename from docs/manuals/fr/install/latex2html-init.pl rename to docs/manuals/de/old/utility/latex2html-init.pl diff --git a/docs/manuals/de/old/utility/progs.tex b/docs/manuals/de/old/utility/progs.tex new file mode 100644 index 00000000..9187970d --- /dev/null +++ b/docs/manuals/de/old/utility/progs.tex @@ -0,0 +1,1332 @@ +%% +%% + +\chapter{Volume Utility Tools} +\label{_UtilityChapter} +\index[general]{Volume Utility Tools} +\index[general]{Tools!Volume Utility} + +This document describes the utility programs written to aid Bacula users and +developers in dealing with Volumes external to Bacula. + +\section{Specifying the Configuration File} +\index[general]{Specifying the Configuration File} + +Starting with version 1.27, each of the following programs requires a valid +Storage daemon configuration file (actually, the only part of the +configuration file that these programs need is the {\bf Device} resource +definitions). This permits the programs to find the configuration parameters +for your archive device (generally a tape drive). By default, they read {\bf +bacula-sd.conf} in the current directory, but you may specify a different +configuration file using the {\bf -c} option. + + +\section{Specifying a Device Name For a Tape} +\index[general]{Tape!Specifying a Device Name For a} +\index[general]{Specifying a Device Name For a Tape} + +Each of these programs require a {\bf device-name} where the Volume can be +found. In the case of a tape, this is the physical device name such as {\bf +/dev/nst0} or {\bf /dev/rmt/0ubn} depending on your system. For the program to +work, it must find the identical name in the Device resource of the +configuration file. See below for specifying Volume names. + +Please note that if you have Bacula running and you ant to use +one of these programs, you will either need to stop the Storage daemon, or +{\bf unmount} any tape drive you want to use, otherwise the drive +will {\bf busy} because Bacula is using it. + + +\section{Specifying a Device Name For a File} +\index[general]{File!Specifying a Device Name For a} +\index[general]{Specifying a Device Name For a File} + +If you are attempting to read or write an archive file rather than a tape, the +{\bf device-name} should be the full path to the archive location including +the filename. The filename (last part of the specification) will be stripped +and used as the Volume name, and the path (first part before the filename) +must have the same entry in the configuration file. So, the path is equivalent +to the archive device name, and the filename is equivalent to the volume name. + + +\section{Specifying Volumes} +\index[general]{Volumes!Specifying} +\index[general]{Specifying Volumes} + +In general, you must specify the Volume name to each of the programs below +(with the exception of {\bf btape}). The best method to do so is to specify a +{\bf bootstrap} file on the command line with the {\bf -b} option. As part of +the bootstrap file, you will then specify the Volume name or Volume names if +more than one volume is needed. For example, suppose you want to read tapes +{\bf tape1} and {\bf tape2}. First construct a {\bf bootstrap} file named say, +{\bf list.bsr} which contains: + +\footnotesize +\begin{verbatim} +Volume=test1|test2 +\end{verbatim} +\normalsize + +where each Volume is separated by a vertical bar. Then simply use: + +\footnotesize +\begin{verbatim} +./bls -b list.bsr /dev/nst0 +\end{verbatim} +\normalsize + +In the case of Bacula Volumes that are on files, you may simply append volumes +as follows: + +\footnotesize +\begin{verbatim} +./bls /tmp/test1\|test2 +\end{verbatim} +\normalsize + +where the backslash (\textbackslash{}) was necessary as a shell escape to +permit entering the vertical bar (|). + +And finally, if you feel that specifying a Volume name is a bit complicated +with a bootstrap file, you can use the {\bf -V} option (on all programs except +{\bf bcopy}) to specify one or more Volume names separated by the vertical bar +(|). For example, + +\footnotesize +\begin{verbatim} +./bls -V Vol001 /dev/nst0 +\end{verbatim} +\normalsize + +You may also specify an asterisk (*) to indicate that the program should +accept any volume. For example: + +\footnotesize +\begin{verbatim} +./bls -V* /dev/nst0 +\end{verbatim} +\normalsize + +\section{bls} +\label{bls} +\index[general]{bls} +\index[general]{program!bls} + +{\bf bls} can be used to do an {\bf ls} type listing of a {\bf Bacula} tape or +file. It is called: + +\footnotesize +\begin{verbatim} +Usage: bls [options] + -b specify a bootstrap file + -c specify a config file + -d specify debug level + -e exclude list + -i include list + -j list jobs + -k list blocks + (no j or k option) list saved files + -L dump label + -p proceed inspite of errors + -v be verbose + -V specify Volume names (separated by |) + -? print this message +\end{verbatim} +\normalsize + +For example, to list the contents of a tape: + +\footnotesize +\begin{verbatim} +./bls -V Volume-name /dev/nst0 +\end{verbatim} +\normalsize + +Or to list the contents of a file: + +\footnotesize +\begin{verbatim} +./bls /tmp/Volume-name +or +./bls -V Volume-name /tmp +\end{verbatim} +\normalsize + +Note that, in the case of a file, the Volume name becomes the filename, so in +the above example, you will replace the {\bf xxx} with the name of the volume +(file) you wrote. + +Normally if no options are specified, {\bf bls} will produce the equivalent +output to the {\bf ls -l} command for each file on the tape. Using other +options listed above, it is possible to display only the Job records, only the +tape blocks, etc. For example: + +\footnotesize +\begin{verbatim} + +./bls /tmp/File002 +bls: butil.c:148 Using device: /tmp +drwxrwxr-x 3 k k 4096 02-10-19 21:08 /home/kern/bacula/k/src/dird/ +drwxrwxr-x 2 k k 4096 02-10-10 18:59 /home/kern/bacula/k/src/dird/CVS/ +-rw-rw-r-- 1 k k 54 02-07-06 18:02 /home/kern/bacula/k/src/dird/CVS/Root +-rw-rw-r-- 1 k k 16 02-07-06 18:02 /home/kern/bacula/k/src/dird/CVS/Repository +-rw-rw-r-- 1 k k 1783 02-10-10 18:59 /home/kern/bacula/k/src/dird/CVS/Entries +-rw-rw-r-- 1 k k 97506 02-10-18 21:07 /home/kern/bacula/k/src/dird/Makefile +-rw-r--r-- 1 k k 3513 02-10-18 21:02 /home/kern/bacula/k/src/dird/Makefile.in +-rw-rw-r-- 1 k k 4669 02-07-06 18:02 /home/kern/bacula/k/src/dird/README-config +-rw-r--r-- 1 k k 4391 02-09-14 16:51 /home/kern/bacula/k/src/dird/authenticate.c +-rw-r--r-- 1 k k 3609 02-07-07 16:41 /home/kern/bacula/k/src/dird/autoprune.c +-rw-rw-r-- 1 k k 4418 02-10-18 21:03 /home/kern/bacula/k/src/dird/bacula-dir.conf +... +-rw-rw-r-- 1 k k 83 02-08-31 19:19 /home/kern/bacula/k/src/dird/.cvsignore +bls: Got EOF on device /tmp +84 files found. +\end{verbatim} +\normalsize + +\subsection{Listing Jobs} +\index[general]{Listing Jobs with bls} +\index[general]{bls!Listing Jobs} + +If you are listing a Volume to determine what Jobs to restore, normally the +{\bf -j} option provides you with most of what you will need as long as you +don't have multiple clients. For example, + +\footnotesize +\begin{verbatim} +./bls -j -V Test1 -c stored.conf DDS-4 +bls: butil.c:258 Using device: "DDS-4" for reading. +11-Jul 11:54 bls: Ready to read from volume "Test1" on device "DDS-4" (/dev/nst0). +Volume Record: File:blk=0:1 SessId=4 SessTime=1121074625 JobId=0 DataLen=165 +Begin Job Session Record: File:blk=0:2 SessId=4 SessTime=1121074625 JobId=1 Level=F Type=B +Begin Job Session Record: File:blk=0:3 SessId=5 SessTime=1121074625 JobId=5 Level=F Type=B +Begin Job Session Record: File:blk=0:6 SessId=3 SessTime=1121074625 JobId=2 Level=F Type=B +Begin Job Session Record: File:blk=0:13 SessId=2 SessTime=1121074625 JobId=4 Level=F Type=B +End Job Session Record: File:blk=0:99 SessId=3 SessTime=1121074625 JobId=2 Level=F Type=B + Files=168 Bytes=1,732,978 Errors=0 Status=T +End Job Session Record: File:blk=0:101 SessId=2 SessTime=1121074625 JobId=4 Level=F Type=B + Files=168 Bytes=1,732,978 Errors=0 Status=T +End Job Session Record: File:blk=0:108 SessId=5 SessTime=1121074625 JobId=5 Level=F Type=B + Files=168 Bytes=1,732,978 Errors=0 Status=T +End Job Session Record: File:blk=0:109 SessId=4 SessTime=1121074625 JobId=1 Level=F Type=B + Files=168 Bytes=1,732,978 Errors=0 Status=T +11-Jul 11:54 bls: End of Volume at file 1 on device "DDS-4" (/dev/nst0), Volume "Test1" +11-Jul 11:54 bls: End of all volumes. +\end{verbatim} +\normalsize + +shows a full save followed by two incremental saves. + +Adding the {\bf -v} option will display virtually all information that is +available for each record: + +\subsection{Listing Blocks} +\index[general]{Listing Blocks with bls} +\index[general]{bls!Listing Blocks} + +Normally, except for debugging purposes, you will not need to list Bacula +blocks (the "primitive" unit of Bacula data on the Volume). However, you can +do so with: + +\footnotesize +\begin{verbatim} +./bls -k /tmp/File002 +bls: butil.c:148 Using device: /tmp +Block: 1 size=64512 +Block: 2 size=64512 +... +Block: 65 size=64512 +Block: 66 size=19195 +bls: Got EOF on device /tmp +End of File on device +\end{verbatim} +\normalsize + +By adding the {\bf -v} option, you can get more information, which can be +useful in knowing what sessions were written to the volume: + +\footnotesize +\begin{verbatim} +./bls -k -v /tmp/File002 +Volume Label: +Id : Bacula 0.9 mortal +VerNo : 10 +VolName : File002 +PrevVolName : +VolFile : 0 +LabelType : VOL_LABEL +LabelSize : 147 +PoolName : Default +MediaType : File +PoolType : Backup +HostName : +Date label written: 2002-10-19 at 21:16 +Block: 1 blen=64512 First rec FI=VOL_LABEL SessId=1 SessTim=1035062102 Strm=0 rlen=147 +Block: 2 blen=64512 First rec FI=6 SessId=1 SessTim=1035062102 Strm=DATA rlen=4087 +Block: 3 blen=64512 First rec FI=12 SessId=1 SessTim=1035062102 Strm=DATA rlen=5902 +Block: 4 blen=64512 First rec FI=19 SessId=1 SessTim=1035062102 Strm=DATA rlen=28382 +... +Block: 65 blen=64512 First rec FI=83 SessId=1 SessTim=1035062102 Strm=DATA rlen=1873 +Block: 66 blen=19195 First rec FI=83 SessId=1 SessTim=1035062102 Strm=DATA rlen=2973 +bls: Got EOF on device /tmp +End of File on device +\end{verbatim} +\normalsize + +Armed with the SessionId and the SessionTime, you can extract just about +anything. + +If you want to know even more, add a second {\bf -v} to the command line to +get a dump of every record in every block. + +\footnotesize +\begin{verbatim} +./bls -k -v -v /tmp/File002 +bls: block.c:79 Dump block 80f8ad0: size=64512 BlkNum=1 + Hdrcksum=b1bdfd6d cksum=b1bdfd6d +bls: block.c:92 Rec: VId=1 VT=1035062102 FI=VOL_LABEL Strm=0 len=147 p=80f8b40 +bls: block.c:92 Rec: VId=1 VT=1035062102 FI=SOS_LABEL Strm=-7 len=122 p=80f8be7 +bls: block.c:92 Rec: VId=1 VT=1035062102 FI=1 Strm=UATTR len=86 p=80f8c75 +bls: block.c:92 Rec: VId=1 VT=1035062102 FI=2 Strm=UATTR len=90 p=80f8cdf +bls: block.c:92 Rec: VId=1 VT=1035062102 FI=3 Strm=UATTR len=92 p=80f8d4d +bls: block.c:92 Rec: VId=1 VT=1035062102 FI=3 Strm=DATA len=54 p=80f8dbd +bls: block.c:92 Rec: VId=1 VT=1035062102 FI=3 Strm=MD5 len=16 p=80f8e07 +bls: block.c:92 Rec: VId=1 VT=1035062102 FI=4 Strm=UATTR len=98 p=80f8e2b +bls: block.c:92 Rec: VId=1 VT=1035062102 FI=4 Strm=DATA len=16 p=80f8ea1 +bls: block.c:92 Rec: VId=1 VT=1035062102 FI=4 Strm=MD5 len=16 p=80f8ec5 +bls: block.c:92 Rec: VId=1 VT=1035062102 FI=5 Strm=UATTR len=96 p=80f8ee9 +bls: block.c:92 Rec: VId=1 VT=1035062102 FI=5 Strm=DATA len=1783 p=80f8f5d +bls: block.c:92 Rec: VId=1 VT=1035062102 FI=5 Strm=MD5 len=16 p=80f9668 +bls: block.c:92 Rec: VId=1 VT=1035062102 FI=6 Strm=UATTR len=95 p=80f968c +bls: block.c:92 Rec: VId=1 VT=1035062102 FI=6 Strm=DATA len=32768 p=80f96ff +bls: block.c:92 Rec: VId=1 VT=1035062102 FI=6 Strm=DATA len=32768 p=8101713 +bls: block.c:79 Dump block 80f8ad0: size=64512 BlkNum=2 + Hdrcksum=9acc1e7f cksum=9acc1e7f +bls: block.c:92 Rec: VId=1 VT=1035062102 FI=6 Strm=contDATA len=4087 p=80f8b40 +bls: block.c:92 Rec: VId=1 VT=1035062102 FI=6 Strm=DATA len=31970 p=80f9b4b +bls: block.c:92 Rec: VId=1 VT=1035062102 FI=6 Strm=MD5 len=16 p=8101841 +... +\end{verbatim} +\normalsize + +\section{bextract} +\label{bextract} +\index[general]{Bextract} +\index[general]{program!bextract} + +If you find yourself using {\bf bextract}, you probably have done +something wrong. For example, if you are trying to recover a file +but are having problems, please see the \ilink {Restoring When Things Go +Wrong}{database_restore} section of the Restore chapter of this manual. + +Normally, you will restore files by running a {\bf Restore} Job from the {\bf +Console} program. However, {\bf bextract} can be used to extract a single file +or a list of files from a Bacula tape or file. In fact, {\bf bextract} can be +a useful tool to restore files to an empty system assuming you are able to +boot, you have statically linked {\bf bextract} and you have an appropriate +{\bf bootstrap} file. + +Please note that some of the current limitations of bextract are: + +\begin{enumerate} +\item It cannot restore access control lists (ACL) that have been + backed up along with the file data. +\item It cannot restore Win32 non-portable streams (typically default). +\item It cannot restore encrypted files. +\item The command line length is relatively limited, + which means that you cannot enter a huge number of volumes. If you need to + enter more volumes than the command line supports, please use a bootstrap + file (see below). +\end{enumerate} + + +It is called: + +\footnotesize +\begin{verbatim} + +Usage: bextract [-d debug_level] + -b specify a bootstrap file + -dnn set debug level to nn + -e exclude list + -i include list + -p proceed inspite of I/O errors + -V specify Volume names (separated by |) + -? print this message +\end{verbatim} +\normalsize + +where {\bf device-name} is the Archive Device (raw device name or full +filename) of the device to be read, and {\bf directory-to-store-files} is a +path prefix to prepend to all the files restored. + +NOTE: On Windows systems, if you specify a prefix of say d:/tmp, any file that +would have been restored to {\bf c:/My Documents} will be restored to {\bf +d:/tmp/My Documents}. That is, the original drive specification will be +stripped. If no prefix is specified, the file will be restored to the original +drive. + +\subsection{Extracting with Include or Exclude Lists} +\index[general]{Lists!Extracting with Include or Exclude} +\index[general]{Extracting with Include or Exclude Lists} + +Using the {\bf -e} option, you can specify a file containing a list of files +to be excluded. Wildcards can be used in the exclusion list. This option will +normally be used in conjunction with the {\bf -i} option (see below). Both the +{\bf -e} and the {\bf -i} options may be specified at the same time as the +{\bf -b} option. The bootstrap filters will be applied first, then the include +list, then the exclude list. + +Likewise, and probably more importantly, with the {\bf -i} option, you can +specify a file that contains a list (one file per line) of files and +directories to include to be restored. The list must contain the full filename +with the path. If you specify a path name only, all files and subdirectories +of that path will be restored. If you specify a line containing only the +filename (e.g. {\bf my-file.txt}) it probably will not be extracted because +you have not specified the full path. + +For example, if the file {\bf include-list} contains: + +\footnotesize +\begin{verbatim} +/home/kern/bacula +/usr/local/bin +\end{verbatim} +\normalsize + +Then the command: + +\footnotesize +\begin{verbatim} +./bextract -i include-list -V Volume /dev/nst0 /tmp +\end{verbatim} +\normalsize + +will restore from the Bacula archive {\bf /dev/nst0} all files and directories +in the backup from {\bf /home/kern/bacula} and from {\bf /usr/local/bin}. The +restored files will be placed in a file of the original name under the +directory {\bf /tmp} (i.e. /tmp/home/kern/bacula/... and +/tmp/usr/local/bin/...). + +\subsection{Extracting With a Bootstrap File} +\index[general]{File!Extracting With a Bootstrap} +\index[general]{Extracting With a Bootstrap File} + +The {\bf -b} option is used to specify a {\bf bootstrap} file containing the +information needed to restore precisely the files you want. Specifying a {\bf +bootstrap} file is optional but recommended because it gives you the most +control over which files will be restored. For more details on the {\bf +bootstrap} file, please see +\ilink{Restoring Files with the Bootstrap File}{BootstrapChapter} +chapter of this document. Note, you may also use a bootstrap file produced by +the {\bf restore} command. For example: + +\footnotesize +\begin{verbatim} +./bextract -b bootstrap-file /dev/nst0 /tmp +\end{verbatim} +\normalsize + +The bootstrap file allows detailed specification of what files you want +restored (extracted). You may specify a bootstrap file and include and/or +exclude files at the same time. The bootstrap conditions will first be +applied, and then each file record seen will be compared to the include and +exclude lists. + +\subsection{Extracting From Multiple Volumes} +\index[general]{Volumes!Extracting From Multiple} +\index[general]{Extracting From Multiple Volumes} + +If you wish to extract files that span several Volumes, you can specify the +Volume names in the bootstrap file or you may specify the Volume names on the +command line by separating them with a vertical bar. See the section above +under the {\bf bls} program entitled {\bf Listing Multiple Volumes} for more +information. The same techniques apply equally well to the {\bf bextract} +program or read the \ilink{Bootstrap}{BootstrapChapter} +chapter of this document. + +\section{bscan} +\label{bscan} +\index[general]{bscan} +\index[general]{program!bscan} + +If you find yourself using this program, you have probably done something +wrong. For example, the best way to recover a lost or damaged Bacula +database is to reload the database by using the bootstrap file that +was written when you saved it (default bacula-dir.conf file). + +The {\bf bscan} program can be used to re-create a database (catalog) +records from the backup information written to one or more Volumes. +This is normally +needed only if one or more Volumes have been pruned or purged from your +catalog so that the records on the Volume are no longer in the catalog, or +for Volumes that you have archived. + +With some care, it can also be used to synchronize your existing catalog with +a Volume. Although we have never seen a case of bscan damaging a +catalog, since bscan modifies your catalog, we recommend that +you do a simple ASCII backup of your database before running {\bf bscan} just +to be sure. See \ilink{Compacting Your Database}{CompactingMySQL} for +the details of making a copy of your database. + +{\bf bscan} can also be useful in a disaster recovery situation, after the +loss of a hard disk, if you do not have a valid {\bf bootstrap} file for +reloading your system, or if a Volume has been recycled but not overwritten, +you can use {\bf bscan} to re-create your database, which can then be used to +{\bf restore} your system or a file to its previous state. + +It is called: + +\footnotesize +\begin{verbatim} + +Usage: bscan [options] + -b bootstrap specify a bootstrap file + -c specify configuration file + -d set debug level to nn + -m update media info in database + -n specify the database name (default bacula) + -u specify database user name (default bacula) + -P specify database password (default none) + -h specify database host (default NULL) + -p proceed inspite of I/O errors + -r list records + -s synchronize or store in database + -v verbose + -V specify Volume names (separated by |) + -w specify working directory (default from conf file) + -? print this message +\end{verbatim} +\normalsize + +If you are using MySQL or PostgreSQL, there is no need to supply a working +directory since in that case, bscan knows where the databases are. However, if +you have provided security on your database, you may need to supply either the +database name ({\bf -b} option), the user name ({\bf -u} option), and/or the +password ({\bf -p}) options. + +NOTE: before {\bf bscan} can work, it needs at least a bare bones valid +database. If your database exists but some records are missing because +they were pruned, then you are all set. If your database was lost or +destroyed, then you must first ensure that you have the SQL program running +(MySQL or PostgreSQL), then you must create the Bacula database (normally +named bacula), and you must create the Bacula tables using the scripts in +the {\bf cats} directory. This is explained in the +\ilink{Installation}{CreateDatabase} chapter of the manual. Finally, before +scanning into an empty database, you must start and stop the Director with +the appropriate bacula-dir.conf file so that it can create the Client and +Storage records which are not stored on the Volumes. Without these +records, scanning is unable to connect the Job records to the proper +client. + +Forgetting for the moment the extra complications of a full rebuild of +your catalog, let's suppose that you did a backup to Volumes "Vol001" +and "Vol002", then sometime later all records of one or both those +Volumes were pruned or purged from the +database. By using {\bf bscan} you can recreate the catalog entries for +those Volumes and then use the {\bf restore} command in the Console to restore +whatever you want. A command something like: + +\footnotesize +\begin{verbatim} +bscan -c bacula-sd.conf -v -V Vol001\|Vol002 /dev/nst0 +\end{verbatim} +\normalsize + +will give you an idea of what is going to happen without changing +your catalog. Of course, you may need to change the path to the Storage +daemon's conf file, the Volume name, and your tape (or disk) device name. This +command must read the entire tape, so if it has a lot of data, it may take a +long time, and thus you might want to immediately use the command listed +below. Note, if you are writing to a disk file, replace the device name with +the path to the directory that contains the Volumes. This must correspond to +the Archive Device in the conf file. + +Then to actually write or store the records in the catalog, add the {\bf -s} +option as follows: + +\footnotesize +\begin{verbatim} + bscan -s -m -c bacula-sd.conf -v -V Vol001\|Vol002 /dev/nst0 +\end{verbatim} +\normalsize + +When writing to the database, if bscan finds existing records, it will +generally either update them if something is wrong or leave them alone. Thus +if the Volumes you are scanning are all or partially in the catalog already, no +harm will be done to that existing data. Any missing data will simply be +added. + +If you have multiple tapes, you should scan them with: + +\footnotesize +\begin{verbatim} + bscan -s -m -c bacula-sd.conf -v -V Vol001\|Vol002\|Vol003 /dev/nst0 +\end{verbatim} +\normalsize + +Since there is a limit on the command line length (511 bytes) accepted +by {\bf bscan}, if you have too many Volumes, you will need to manually +create a bootstrap file. See the \ilink{Bootstrap}{BootstrapChapter} +chapter of this manual for more details, in particular the section +entitled \ilink{Bootstrap for bscan}{bscanBootstrap}. + +You should, always try to specify the tapes in the order they are written. +However, bscan can handle scanning tapes that are not sequential. Any +incomplete records at the end of the tape will simply be ignored in that +case. If you are simply repairing an existing catalog, this may be OK, but +if you are creating a new catalog from scratch, it will leave your database +in an incorrect state. If you do not specify all necessary Volumes on a +single bscan command, bscan will not be able to correctly restore the +records that span two volumes. In other words, it is much better to +specify two or three volumes on a single bscan command rather than run +bscan two or three times, each with a single volume. + + +Note, the restoration process using bscan is not identical to the original +creation of the catalog data. This is because certain data such as Client +records and other non-essential data such +as volume reads, volume mounts, etc is not stored on the Volume, and thus is +not restored by bscan. The results of bscanning are, however, perfectly valid, +and will permit restoration of any or all the files in the catalog using the +normal Bacula console commands. If you are starting with an empty catalog +and expecting bscan to reconstruct it, you may be a bit disappointed, but +at a minimum, you must ensure that your bacula-dir.conf file is the same +as what it previously was -- that is, it must contain all the appropriate +Client resources so that they will be recreated in your new database {\bf +before} running bscan. Normally when the Director starts, it will recreate +any missing Client records in the catalog. Another problem you will have +is that even if the Volumes (Media records) are recreated in the database, +they will not have their autochanger status and slots properly set. As a +result, you will need to repair that by using the {\bf update slots} +command. There may be other considerations as well. Rather than +bscanning, you should always attempt to recover you previous catalog +backup. + + +\subsection{Using bscan to Compare a Volume to an existing Catalog} +\index[general]{Catalog!Using bscan to Compare a Volume to an existing} +\index[general]{Using bscan to Compare a Volume to an existing Catalog} + +If you wish to compare the contents of a Volume to an existing catalog without +changing the catalog, you can safely do so if and only if you do {\bf not} +specify either the {\bf -m} or the {\bf -s} options. However, at this time +(Bacula version 1.26), the comparison routines are not as good or as thorough +as they should be, so we don't particularly recommend this mode other than for +testing. + +\subsection{Using bscan to Recreate a Catalog from a Volume} +\index[general]{Volume!Using bscan to Recreate a Catalog from a Volume} +\index[general]{Using bscan to Recreate a Catalog from a Volume} + +This is the mode for which {\bf bscan} is most useful. You can either {\bf +bscan} into a freshly created catalog, or directly into your existing catalog +(after having made an ASCII copy as described above). Normally, you should +start with a freshly created catalog that contains no data. + +Starting with a single Volume named {\bf TestVolume1}, you run a command such +as: + +\footnotesize +\begin{verbatim} +./bscan -V TestVolume1 -v -s -m -c bacula-sd.conf /dev/nst0 +\end{verbatim} +\normalsize + +If there is more than one volume, simply append it to the first one separating +it with a vertical bar. You may need to precede the vertical bar with a +forward slash escape the shell -- e.g. {\bf +TestVolume1\textbackslash{}|TestVolume2}. The {\bf -v} option was added for +verbose output (this can be omitted if desired). The {\bf -s} option that +tells {\bf bscan} to store information in the database. The physical device +name {\bf /dev/nst0} is specified after all the options. + +{\bf} For example, after having done a full backup of a directory, then two +incrementals, I reinitialized the SQLite database as described above, and +using the bootstrap.bsr file noted above, I entered the following command: + +\footnotesize +\begin{verbatim} +./bscan -b bootstrap.bsr -v -s -c bacula-sd.conf /dev/nst0 +\end{verbatim} +\normalsize + +which produced the following output: + +\footnotesize +\begin{verbatim} +bscan: bscan.c:182 Using Database: bacula, User: bacula +bscan: bscan.c:673 Created Pool record for Pool: Default +bscan: bscan.c:271 Pool type "Backup" is OK. +bscan: bscan.c:632 Created Media record for Volume: TestVolume1 +bscan: bscan.c:298 Media type "DDS-4" is OK. +bscan: bscan.c:307 VOL_LABEL: OK for Volume: TestVolume1 +bscan: bscan.c:693 Created Client record for Client: Rufus +bscan: bscan.c:769 Created new JobId=1 record for original JobId=2 +bscan: bscan.c:717 Created FileSet record "Kerns Files" +bscan: bscan.c:819 Updated Job termination record for new JobId=1 +bscan: bscan.c:905 Created JobMedia record JobId 1, MediaId 1 +bscan: Got EOF on device /dev/nst0 +bscan: bscan.c:693 Created Client record for Client: Rufus +bscan: bscan.c:769 Created new JobId=2 record for original JobId=3 +bscan: bscan.c:708 Fileset "Kerns Files" already exists. +bscan: bscan.c:819 Updated Job termination record for new JobId=2 +bscan: bscan.c:905 Created JobMedia record JobId 2, MediaId 1 +bscan: Got EOF on device /dev/nst0 +bscan: bscan.c:693 Created Client record for Client: Rufus +bscan: bscan.c:769 Created new JobId=3 record for original JobId=4 +bscan: bscan.c:708 Fileset "Kerns Files" already exists. +bscan: bscan.c:819 Updated Job termination record for new JobId=3 +bscan: bscan.c:905 Created JobMedia record JobId 3, MediaId 1 +bscan: Got EOF on device /dev/nst0 +bscan: bscan.c:652 Updated Media record at end of Volume: TestVolume1 +bscan: bscan.c:428 End of Volume. VolFiles=3 VolBlocks=57 VolBytes=10,027,437 +\end{verbatim} +\normalsize + +The key points to note are that {\bf bscan} prints a line when each major +record is created. Due to the volume of output, it does not print a line for +each file record unless you supply the {\bf -v} option twice or more on the +command line. + +In the case of a Job record, the new JobId will not normally be the same as +the original Jobid. For example, for the first JobId above, the new JobId is +1, but the original JobId is 2. This is nothing to be concerned about as it is +the normal nature of databases. {\bf bscan} will keep everything straight. + +Although {\bf bscan} claims that it created a Client record for Client: Rufus +three times, it was actually only created the first time. This is normal. + +You will also notice that it read an end of file after each Job (Got EOF on +device ...). Finally the last line gives the total statistics for the bscan. + +If you had added a second {\bf -v} option to the command line, Bacula would +have been even more verbose, dumping virtually all the details of each Job +record it encountered. + +Now if you start Bacula and enter a {\bf list jobs} command to the console +program, you will get: + +\footnotesize +\begin{verbatim} ++-------+----------+------------------+------+-----+----------+----------+---------+ +| JobId | Name | StartTime | Type | Lvl | JobFiles | JobBytes | JobStat | ++-------+----------+------------------+------+-----+----------+----------+---------+ +| 1 | kernsave | 2002-10-07 14:59 | B | F | 84 | 4180207 | T | +| 2 | kernsave | 2002-10-07 15:00 | B | I | 15 | 2170314 | T | +| 3 | kernsave | 2002-10-07 15:01 | B | I | 33 | 3662184 | T | ++-------+----------+------------------+------+-----+----------+----------+---------+ +\end{verbatim} +\normalsize + +which corresponds virtually identically with what the database contained +before it was re-initialized and restored with bscan. All the Jobs and Files +found on the tape are restored including most of the Media record. The Volume +(Media) records restored will be marked as {\bf Full} so that they cannot be +rewritten without operator intervention. + +It should be noted that {\bf bscan} cannot restore a database to the exact +condition it was in previously because a lot of the less important information +contained in the database is not saved to the tape. Nevertheless, the +reconstruction is sufficiently complete, that you can run {\bf restore} +against it and get valid results. + +An interesting aspect of restoring a catalog backup using {\bf bscan} is +that the backup was made while Bacula was running and writing to a tape. At +the point the backup of the catalog is made, the tape Bacula is writing to +will have say 10 files on it, but after the catalog backup is made, there +will be 11 files on the tape Bacula is writing. This there is a difference +between what is contained in the backed up catalog and what is actually on +the tape. If after restoring a catalog, you attempt to write on the same +tape that was used to backup the catalog, Bacula will detect the difference +in the number of files registered in the catalog compared to what is on the +tape, and will mark the tape in error. + +There are two solutions to this problem. The first is possibly the simplest +and is to mark the volume as Used before doing any backups. The second is +to manually correct the number of files listed in the Media record of the +catalog. This procedure is documented elsewhere in the manual and involves +using the {\bf update volume} command in {\bf bconsole}. + +\subsection{Using bscan to Correct the Volume File Count} +\index[general]{Using bscan to Correct the Volume File Count} +\index[general]{Count!Using bscan to Correct the Volume File Count} + +If the Storage daemon crashes during a backup Job, the catalog will not be +properly updated for the Volume being used at the time of the crash. This +means that the Storage daemon will have written say 20 files on the tape, but +the catalog record for the Volume indicates only 19 files. + +Bacula refuses to write on a tape that contains a different number of files +from what is in the catalog. To correct this situation, you may run a {\bf +bscan} with the {\bf -m} option (but {\bf without} the {\bf -s} option) to +update only the final Media record for the Volumes read. + +\subsection{After bscan} +\index[general]{After bscan} +\index[general]{Bscan!After} + +If you use {\bf bscan} to enter the contents of the Volume into an existing +catalog, you should be aware that the records you entered may be immediately +pruned during the next job, particularly if the Volume is very old or had been +previously purged. To avoid this, after running {\bf bscan}, you can manually +set the volume status (VolStatus) to {\bf Read-Only} by using the {\bf update} +command in the catalog. This will allow you to restore from the volume without +having it immediately purged. When you have restored and backed up the data, +you can reset the VolStatus to {\bf Used} and the Volume will be purged from +the catalog. + +\section{bcopy} +\label{bcopy} +\index[general]{Bcopy} +\index[general]{program!bcopy} + +The {\bf bcopy} program can be used to copy one {\bf Bacula} archive file to +another. For example, you may copy a tape to a file, a file to a tape, a file +to a file, or a tape to a tape. For tape to tape, you will need two tape +drives. (a later version is planned that will buffer it to disk). In the +process of making the copy, no record of the information written to the new +Volume is stored in the catalog. This means that the new Volume, though it +contains valid backup data, cannot be accessed directly from existing catalog +entries. If you wish to be able to use the Volume with the Console restore +command, for example, you must first bscan the new Volume into the catalog. + +\subsection{bcopy Command Options} +\index[general]{Options!bcopy Command} +\index[general]{Bcopy Command Options} + +\footnotesize +\begin{verbatim} +Usage: bcopy [-d debug_level] + -b bootstrap specify a bootstrap file + -c specify configuration file + -dnn set debug level to nn + -i specify input Volume names (separated by |) + -o specify output Volume names (separated by |) + -p proceed inspite of I/O errors + -v verbose + -w dir specify working directory (default /tmp) + -? print this message +\end{verbatim} +\normalsize + +By using a {\bf bootstrap} file, you can copy parts of a Bacula archive file +to another archive. + +One of the objectives of this program is to be able to recover as much data as +possible from a damaged tape. However, the current version does not yet have +this feature. + +As this is a new program, any feedback on its use would be appreciated. In +addition, I only have a single tape drive, so I have never been able to test +this program with two tape drives. + +\section{btape} +\label{btape} +\index[general]{Btape} +\index[general]{program!btape} + +This program permits a number of elementary tape operations via a tty command +interface. It works only with tapes and not with other kinds of Bacula +storage media (DVD, File, ...). The {\bf test} command, described below, +can be very useful for testing older tape drive compatibility problems. +Aside from initial testing of tape drive compatibility with {\bf Bacula}, +{\bf btape} will be mostly used by developers writing new tape drivers. + +{\bf btape} can be dangerous to use with existing {\bf Bacula} tapes because +it will relabel a tape or write on the tape if so requested regardless that +the tape may contain valuable data, so please be careful and use it only on +blank tapes. + +To work properly, {\bf btape} needs to read the Storage daemon's configuration +file. As a default, it will look for {\bf bacula-sd.conf} in the current +directory. If your configuration file is elsewhere, please use the {\bf -c} +option to specify where. + +The physical device name must be specified on the command line, and this +same device name must be present in the Storage daemon's configuration file +read by {\bf btape} + +\footnotesize +\begin{verbatim} +Usage: btape + -b specify bootstrap file + -c set configuration file to file + -d set debug level to nn + -p proceed inspite of I/O errors + -s turn off signals + -v be verbose + -? print this message. +\end{verbatim} +\normalsize + +\subsection{Using btape to Verify your Tape Drive} +\index[general]{Using btape to Verify your Tape Drive} +\index[general]{Drive!Using btape to Verify your Tape} + +An important reason for this program is to ensure that a Storage daemon +configuration file is defined so that Bacula will correctly read and write +tapes. + +It is highly recommended that you run the {\bf test} command before running +your first Bacula job to ensure that the parameters you have defined for your +storage device (tape drive) will permit {\bf Bacula} to function properly. You +only need to mount a blank tape, enter the command, and the output should be +reasonably self explanatory. Please see the +\ilink{Tape Testing}{TapeTestingChapter} Chapter of this manual for +the details. + +\subsection{btape Commands} +\index[general]{Btape Commands} +\index[general]{Commands!btape} + +The full list of commands are: + +\footnotesize +\begin{verbatim} + Command Description + ======= =========== + autochanger test autochanger + bsf backspace file + bsr backspace record + cap list device capabilities + clear clear tape errors + eod go to end of Bacula data for append + eom go to the physical end of medium + fill fill tape, write onto second volume + unfill read filled tape + fsf forward space a file + fsr forward space a record + help print this command + label write a Bacula label to the tape + load load a tape + quit quit btape + rawfill use write() to fill tape + readlabel read and print the Bacula tape label + rectest test record handling functions + rewind rewind the tape + scan read() tape block by block to EOT and report + scanblocks Bacula read block by block to EOT and report + status print tape status + test General test Bacula tape functions + weof write an EOF on the tape + wr write a single Bacula block + rr read a single record + qfill quick fill command +\end{verbatim} +\normalsize + +The most useful commands are: + +\begin{itemize} +\item test -- test writing records and EOF marks and reading them back. +\item fill -- completely fill a volume with records, then write a few records + on a second volume, and finally, both volumes will be read back. + This command writes blocks containing random data, so your drive will + not be able to compress the data, and thus it is a good test of + the real physical capacity of your tapes. +\item readlabel -- read and dump the label on a Bacula tape. +\item cap -- list the device capabilities as defined in the configuration + file and as perceived by the Storage daemon. + \end{itemize} + +The {\bf readlabel} command can be used to display the details of a Bacula +tape label. This can be useful if the physical tape label was lost or damaged. + + +In the event that you want to relabel a {\bf Bacula}, you can simply use the +{\bf label} command which will write over any existing label. However, please +note for labeling tapes, we recommend that you use the {\bf label} command in +the {\bf Console} program since it will never overwrite a valid Bacula tape. + +\section{Other Programs} +\index[general]{Programs!Other} +\index[general]{Other Programs} + +The following programs are general utility programs and in general do not need +a configuration file nor a device name. + +\section{bsmtp} +\label{bsmtp} +\index[general]{Bsmtp} +\index[general]{program!bsmtp} + +{\bf bsmtp} is a simple mail transport program that permits more flexibility +than the standard mail programs typically found on Unix systems. It can even +be used on Windows machines. + +It is called: + +\footnotesize +\begin{verbatim} +Usage: bsmtp [-f from] [-h mailhost] [-s subject] [-c copy] [recipient ...] + -c set the Cc: field + -dnn set debug level to nn + -f set the From: field + -h use mailhost:port as the bsmtp server + -l limit the lines accepted to nn + -s set the Subject: field + -? print this message. +\end{verbatim} +\normalsize + +If the {\bf -f} option is not specified, {\bf bsmtp} will use your userid. If +the option {\bf -h} is not specified {\bf bsmtp} will use the value in the environment +variable {\bf bsmtpSERVER} or if there is none {\bf localhost}. By default +port 25 is used. + +If a line count limit is set with the {\bf -l} option, {\bf bsmtp} will +not send an email with a body text exceeding that number of lines. This +is especially useful for large restore job reports where the list of +files restored might produce very long mails your mail-server would +refuse or crash. However, be aware that you will probably suppress the +job report and any error messages unless you check the log file written +by the Director (see the messages resource in this manual for details). + + +{\bf recipients} is a space separated list of email recipients. + +The body of the email message is read from standard input. + +An example of the use of {\bf bsmtp} would be to put the following statement +in the {\bf Messages} resource of your {\bf bacula-dir.conf} file. Note, these +commands should appear on a single line each. + +\footnotesize +\begin{verbatim} + mailcommand = "/home/bacula/bin/bsmtp -h mail.domain.com -f \"\(Bacula\) %r\" + -s \"Bacula: %t %e of %c %l\" %r" + operatorcommand = "/home/bacula/bin/bsmtp -h mail.domain.com -f \"\(Bacula\) %r\" + -s \"Bacula: Intervention needed for %j\" %r" +\end{verbatim} +\normalsize + +Where you replace {\bf /home/bacula/bin} with the path to your {\bf Bacula} +binary directory, and you replace {\bf mail.domain.com} with the fully +qualified name of your bsmtp (email) server, which normally listens on port +25. For more details on the substitution characters (e.g. \%r) used in the +above line, please see the documentation of the +\ilink{ MailCommand in the Messages Resource}{mailcommand} +chapter of this manual. + +It is HIGHLY recommended that you test one or two cases by hand to make sure +that the {\bf mailhost} that you specified is correct and that it will accept +your email requests. Since {\bf bsmtp} always uses a TCP connection rather +than writing in the spool file, you may find that your {\bf from} address is +being rejected because it does not contain a valid domain, or because your +message is caught in your spam filtering rules. Generally, you should specify +a fully qualified domain name in the {\bf from} field, and depending on +whether your bsmtp gateway is Exim or Sendmail, you may need to modify the +syntax of the from part of the message. Please test. + +When running {\bf bsmtp} by hand, you will need to terminate the message by +entering a ctl-d in column 1 of the last line. +% TODO: is "column" the correct terminology for this? + +If you are getting incorrect dates (e.g. 1970) and you are +running with a non-English language setting, you might try adding +a LANG=''en\_US'' immediately before the bsmtp call. + +\section{dbcheck} +\label{dbcheck} +\index[general]{Dbcheck} +\index[general]{program!dbcheck} +{\bf dbcheck} is a simple program that will search for logical +inconsistencies in the Bacula tables in your database, and optionally fix them. +It is a database maintenance routine, in the sense that it can +detect and remove unused rows, but it is not a database repair +routine. To repair a database, see the tools furnished by the +database vendor. Normally dbcheck should never need to be run, +but if Bacula has crashed or you have a lot of Clients, Pools, or +Jobs that you have removed, it could be useful. + +The {\bf dbcheck} program can be found in +the {\bf \lt{}bacula-source\gt{}/src/tools} directory of the source +distribution. Though it is built with the make process, it is not normally +"installed". + +It is called: + +\footnotesize +\begin{verbatim} +Usage: dbcheck [-c config] [-C catalog name] [-d debug_level] + [] + -b batch mode + -C catalog name in the director conf file + -c director conf filename + -dnn set debug level to nn + -f fix inconsistencies + -v verbose + -? print this message +\end{verbatim} +\normalsize + +If the {\bf -c} option is given with the Director's conf file, there is no +need to enter any of the command line arguments, in particular the working +directory as dbcheck will read them from the file. + +If the {\bf -f} option is specified, {\bf dbcheck} will repair ({\bf fix}) the +inconsistencies it finds. Otherwise, it will report only. + +If the {\bf -b} option is specified, {\bf dbcheck} will run in batch mode, and +it will proceed to examine and fix (if -f is set) all programmed inconsistency +checks. If the {\bf -b} option is not specified, {\bf dbcheck} will enter +interactive mode and prompt with the following: + +\footnotesize +\begin{verbatim} +Hello, this is the database check/correct program. +Please select the function you want to perform. + 1) Toggle modify database flag + 2) Toggle verbose flag + 3) Repair bad Filename records + 4) Repair bad Path records + 5) Eliminate duplicate Filename records + 6) Eliminate duplicate Path records + 7) Eliminate orphaned Jobmedia records + 8) Eliminate orphaned File records + 9) Eliminate orphaned Path records + 10) Eliminate orphaned Filename records + 11) Eliminate orphaned FileSet records + 12) Eliminate orphaned Client records + 13) Eliminate orphaned Job records + 14) Eliminate all Admin records + 15) Eliminate all Restore records + 16) All (3-15) + 17) Quit +Select function number: +\end{verbatim} +\normalsize + +By entering 1 or 2, you can toggle the modify database flag (-f option) and +the verbose flag (-v). It can be helpful and reassuring to turn off the modify +database flag, then select one or more of the consistency checks (items 3 +through 9) to see what will be done, then toggle the modify flag on and re-run +the check. + +The inconsistencies examined are the following: + +\begin{itemize} +\item Duplicate filename records. This can happen if you accidentally run two + copies of Bacula at the same time, and they are both adding filenames + simultaneously. It is a rare occurrence, but will create an inconsistent + database. If this is the case, you will receive error messages during Jobs + warning of duplicate database records. If you are not getting these error + messages, there is no reason to run this check. +\item Repair bad Filename records. This checks and corrects filenames that + have a trailing slash. They should not. +\item Repair bad Path records. This checks and corrects path names that do + not have a trailing slash. They should. +\item Duplicate path records. This can happen if you accidentally run two + copies of Bacula at the same time, and they are both adding filenames + simultaneously. It is a rare occurrence, but will create an inconsistent + database. See the item above for why this occurs and how you know it is + happening. +\item Orphaned JobMedia records. This happens when a Job record is deleted + (perhaps by a user issued SQL statement), but the corresponding JobMedia + record (one for each Volume used in the Job) was not deleted. Normally, this + should not happen, and even if it does, these records generally do not take + much space in your database. However, by running this check, you can + eliminate any such orphans. +\item Orphaned File records. This happens when a Job record is deleted + (perhaps by a user issued SQL statement), but the corresponding File record + (one for each Volume used in the Job) was not deleted. Note, searching for + these records can be {\bf very} time consuming (i.e. it may take hours) for a + large database. Normally this should not happen as Bacula takes care to + prevent it. Just the same, this check can remove any orphaned File records. + It is recommended that you run this once a year since orphaned File records + can take a large amount of space in your database. You might + want to ensure that you have indexes on JobId, FilenameId, and + PathId for the File table in your catalog before running this + command. +\item Orphaned Path records. This condition happens any time a directory is + deleted from your system and all associated Job records have been purged. + During standard purging (or pruning) of Job records, Bacula does not check + for orphaned Path records. As a consequence, over a period of time, old + unused Path records will tend to accumulate and use space in your database. + This check will eliminate them. It is recommended that you run this + check at least once a year. +\item Orphaned Filename records. This condition happens any time a file is + deleted from your system and all associated Job records have been purged. + This can happen quite frequently as there are quite a large number of files + that are created and then deleted. In addition, if you do a system update or + delete an entire directory, there can be a very large number of Filename + records that remain in the catalog but are no longer used. + + During standard purging (or pruning) of Job records, Bacula does not check + for orphaned Filename records. As a consequence, over a period of time, old + unused Filename records will accumulate and use space in your database. This + check will eliminate them. It is strongly recommended that you run this check + at least once a year, and for large database (more than 200 Megabytes), it is + probably better to run this once every 6 months. +\item Orphaned Client records. These records can remain in the database long + after you have removed a client. +\item Orphaned Job records. If no client is defined for a job or you do not + run a job for a long time, you can accumulate old job records. This option + allow you to remove jobs that are not attached to any client (and thus + useless). +\item All Admin records. This command will remove all Admin records, + regardless of their age. +\item All Restore records. This command will remove all Restore records, + regardless of their age. +\end{itemize} + +By the way, I personally run dbcheck only where I have messed up +my database due to a bug in developing Bacula code, so normally +you should never need to run dbcheck in spite of the +recommendations given above, which are given so that users don't +waste their time running dbcheck too often. + +\section{bregex} +\label{bregex} +\index[general]{bregex} +\index[general]{program!bregex} + +{\bf bregex} is a simple program that will allow you to test +regular expressions against a file of data. This can be useful +because the regex libraries on most systems differ, and in +addition, regex expressions can be complicated. + +{\bf bregex} is found in the src/tools directory and it is +normally installed with your system binaries. To run it, use: + +\begin{verbatim} +Usage: bregex [-d debug_level] -f + -f specify file of data to be matched + -l suppress line numbers + -n print lines that do not match + -? print this message. +\end{verbatim} + +The \lt{}data-file\gt{} is a filename that contains lines +of data to be matched (or not) against one or more patterns. +When the program is run, it will prompt you for a regular +expression pattern, then apply it one line at a time against +the data in the file. Each line that matches will be printed +preceded by its line number. You will then be prompted again +for another pattern. + +Enter an empty line for a pattern to terminate the program. You +can print only lines that do not match by using the -n option, +and you can suppress printing of line numbers with the -l option. + +This program can be useful for testing regex expressions to be +applied against a list of filenames. + +\section{bwild} +\label{bwild} +\index[general]{bwild} +\index[general]{program!bwild} + +{\bf bwild} is a simple program that will allow you to test +wild-card expressions against a file of data. + +{\bf bwild} is found in the src/tools directory and it is +normally installed with your system binaries. To run it, use: + +\begin{verbatim} +Usage: bwild [-d debug_level] -f + -f specify file of data to be matched + -l suppress line numbers + -n print lines that do not match + -? print this message. +\end{verbatim} + +The \lt{}data-file\gt{} is a filename that contains lines +of data to be matched (or not) against one or more patterns. +When the program is run, it will prompt you for a wild-card +pattern, then apply it one line at a time against +the data in the file. Each line that matches will be printed +preceded by its line number. You will then be prompted again +for another pattern. + +Enter an empty line for a pattern to terminate the program. You +can print only lines that do not match by using the -n option, +and you can suppress printing of line numbers with the -l option. + +This program can be useful for testing wild expressions to be +applied against a list of filenames. + +\section{testfind} +\label{testfind} +\index[general]{Testfind} +\index[general]{program!testfind} + +{\bf testfind} permits listing of files using the same search engine that is +used for the {\bf Include} resource in Job resources. Note, much of the +functionality of this program (listing of files to be included) is present in +the +\ilink{estimate command}{estimate} in the Console program. + +The original use of testfind was to ensure that Bacula's file search engine +was correct and to print some statistics on file name and path length. +However, you may find it useful to see what bacula would do with a given {\bf +Include} resource. The {\bf testfind} program can be found in the {\bf +\lt{}bacula-source\gt{}/src/tools} directory of the source distribution. +Though it is built with the make process, it is not normally "installed". + +It is called: + +\footnotesize +\begin{verbatim} +Usage: testfind [-d debug_level] [-] [pattern1 ...] + -a print extended attributes (Win32 debug) + -dnn set debug level to nn + - read pattern(s) from stdin + -? print this message. +Patterns are used for file inclusion -- normally directories. +Debug level>= 1 prints each file found. +Debug level>= 10 prints path/file for catalog. +Errors are always printed. +Files/paths truncated is a number with len> 255. +Truncation is only in the catalog. +\end{verbatim} +\normalsize + +Where a pattern is any filename specification that is valid within an {\bf +Include} resource definition. If none is specified, {\bf /} (the root +directory) is assumed. For example: + +\footnotesize +\begin{verbatim} +./testfind /bin +\end{verbatim} +\normalsize + +Would print the following: + +\footnotesize +\begin{verbatim} +Dir: /bin +Reg: /bin/bash +Lnk: /bin/bash2 -> bash +Lnk: /bin/sh -> bash +Reg: /bin/cpio +Reg: /bin/ed +Lnk: /bin/red -> ed +Reg: /bin/chgrp +... +Reg: /bin/ipcalc +Reg: /bin/usleep +Reg: /bin/aumix-minimal +Reg: /bin/mt +Lnka: /bin/gawk-3.1.0 -> /bin/gawk +Reg: /bin/pgawk +Total files : 85 +Max file length: 13 +Max path length: 5 +Files truncated: 0 +Paths truncated: 0 +\end{verbatim} +\normalsize + +Even though {\bf testfind} uses the same search engine as {\bf Bacula}, each +directory to be listed, must be entered as a separate command line entry or +entered one line at a time to standard input if the {\bf -} option was +specified. + +Specifying a debug level of one (i.e. {\bf -d1}) on the command line will +cause {\bf testfind} to print the raw filenames without showing the Bacula +internal file type, or the link (if any). Debug levels of 10 or greater cause +the filename and the path to be separated using the same algorithm that is +used when putting filenames into the Catalog database. diff --git a/docs/manuals/de/old/utility/rpm-faq.tex b/docs/manuals/de/old/utility/rpm-faq.tex new file mode 100644 index 00000000..0e73ad2a --- /dev/null +++ b/docs/manuals/de/old/utility/rpm-faq.tex @@ -0,0 +1,405 @@ +%% +%% + +\chapter{Bacula RPM Packaging FAQ} +\label{RpmFaqChapter} +\index[general]{FAQ!Bacula\textsuperscript{\textregistered} - RPM Packaging } +\index[general]{Bacula\textsuperscript{\textregistered} - RPM Packaging FAQ } + +\begin{enumerate} +\item + \ilink{How do I build Bacula for platform xxx?}{faq1} +\item + \ilink{How do I control which database support gets built?}{faq2} + +\item + \ilink{What other defines are used?}{faq3} +\item + \ilink{I'm getting errors about not having permission when I try to build the + packages. Do I need to be root?}{faq4} +\item + \ilink{I'm building my own rpms but on all platforms and compiles I get an + unresolved dependency for something called + /usr/afsws/bin/pagsh.}{faq5} +\item + \ilink{I'm building my own rpms because you don't publish for my platform. + Can I get my packages released to sourceforge for other people to use?}{faq6} +\item + \ilink{Is there an easier way than sorting out all these command line options?}{faq7} +\item + \ilink{I just upgraded from 1.36.x to 1.38.x and now my director daemon won't start. It appears to start but dies silently and I get a "connection refused" error when starting the console. What is wrong?}{faq8} +\item + \ilink{There are a lot of rpm packages. Which packages do I need for what?}{faq9} +\end{enumerate} + +\section{Answers} +\index[general]{Answers } + +\begin{enumerate} +\item + \label{faq1} + {\bf How do I build Bacula for platform xxx?} + The bacula spec file contains defines to build for several platforms: + Red Hat 7.x (rh7), Red Hat 8.0 (rh8), Red Hat 9 (rh9), Fedora Core (fc1, + fc3, fc4, fc5, fc6, fc7, fc8), Whitebox Enterprise Linux 3.0 (wb3), Red Hat Enterprise Linux + (rhel3, rhel4, rhel5), Mandrake 10.x (mdk), Mandriva 2006.x (mdv) CentOS (centos3, centos4, centos5) + Scientific Linux (sl3, sl4, sl5) and SuSE (su9, su10, su102, su103, su110). The package build is controlled by a mandatory define set at the beginning of the file. These defines basically just control the dependency information that gets coded into the finished rpm package as well + as any special configure options required. The platform define may be edited + in the spec file directly (by default all defines are set to 0 or "not set"). + For example, to build the Red Hat 7.x package find the line in the spec file + which reads + +\footnotesize +\begin{verbatim} + %define rh7 0 + +\end{verbatim} +\normalsize + +and edit it to read + +\footnotesize +\begin{verbatim} + %define rh7 1 + +\end{verbatim} +\normalsize + +Alternately you may pass the define on the command line when calling rpmbuild: + + +\footnotesize +\begin{verbatim} + rpmbuild -ba --define "build_rh7 1" bacula.spec + rpmbuild --rebuild --define build_rh7 1" bacula-x.x.x-x.src.rpm + +\end{verbatim} +\normalsize + +\item + \label{faq2} + {\bf How do I control which database support gets built?} + Another mandatory build define controls which database support is compiled, + one of build\_sqlite, build\_mysql or build\_postgresql. To get the MySQL + package and support either set the + +\footnotesize +\begin{verbatim} + %define mysql 0 + OR + %define mysql4 0 + OR + %define mysql5 0 + +\end{verbatim} +\normalsize + +to + +\footnotesize +\begin{verbatim} + %define mysql 1 + OR + %define mysql4 1 + OR + %define mysql5 1 + +\end{verbatim} +\normalsize + +in the spec file directly or pass it to rpmbuild on the command line: + +\footnotesize +\begin{verbatim} + rpmbuild -ba --define "build_rh7 1" --define "build_mysql 1" bacula.spec + rpmbuild -ba --define "build_rh7 1" --define "build_mysql4 1" bacula.spec + rpmbuild -ba --define "build_rh7 1" --define "build_mysql5 1" bacula.spec + +\end{verbatim} +\normalsize + +\item + \label{faq3} + {\bf What other defines are used?} + Three other building defines of note are the depkgs\_version, docs\_version and + \_rescuever identifiers. These two defines are set with each release and must + match the version of those sources that are being used to build the packages. + You would not ordinarily need to edit these. See also the Build Options section + below for other build time options that can be passed on the command line. +\item + \label{faq4} + {\bf I'm getting errors about not having permission when I try to build the + packages. Do I need to be root?} + No, you do not need to be root and, in fact, it is better practice to + build rpm packages as a non-root user. Bacula packages are designed to + be built by a regular user but you must make a few changes on your + system to do this. If you are building on your own system then the + simplest method is to add write permissions for all to the build + directory (/usr/src/redhat/, /usr/src/RPM or /usr/src/packages). + To accomplish this, execute the following command as root: + +\footnotesize +\begin{verbatim} + chmod -R 777 /usr/src/redhat + chmod -R 777 /usr/src/RPM + chmod -R 777 /usr/src/packages + +\end{verbatim} +\normalsize + +If you are working on a shared system where you can not use the method +above then you need to recreate the appropriate above directory tree with all +of its subdirectories inside your home directory. Then create a file named + +{\tt .rpmmacros} + +in your home directory (or edit the file if it already exists) +and add the following line: + +\footnotesize +\begin{verbatim} + %_topdir /home/myuser/redhat + %_tmppath /tmp + +\end{verbatim} +\normalsize + +Another handy directive for the .rpmmacros file if you wish to suppress the +creation of debug rpm packages is: + +\footnotesize +\begin{verbatim} + %debug_package %{nil} + +\end{verbatim} + +\normalsize + +\item + \label{faq5} + {\bf I'm building my own rpms but on all platforms and compiles I get an + unresolved dependency for something called /usr/afsws/bin/pagsh.} This + is a shell from the OpenAFS (Andrew File System). If you are seeing + this then you chose to include the docs/examples directory in your + package. One of the example scripts in this directory is a pagsh + script. Rpmbuild, when scanning for dependencies, looks at the shebang + line of all packaged scripts in addition to checking shared libraries. + To avoid this do not package the examples directory. If you are seeing this + problem you are building a very old bacula package as the examples have been + removed from the doc packaging. + +\item + \label{faq6} + {\bf I'm building my own rpms because you don't publish for my platform. + Can I get my packages released to sourceforge for other people to use?} Yes, + contributions from users are accepted and appreciated. Please examine the + directory platforms/contrib-rpm in the source code for further information. + +\item + \label{faq7} + {\bf Is there an easier way than sorting out all these command line options?} Yes, + there is a gui wizard shell script which you can use to rebuild the src rpm package. + Look in the source archive for platforms/contrib-rpm/rpm\_wizard.sh. This script will + allow you to specify build options using GNOME dialog screens. It requires zenity. + +\item + \label{faq8} + {\bf I just upgraded from 1.36.x to 1.38.x and now my director daemon +won't start. It appears to start but dies silently and I get a "connection +refused" error when starting the console. What is wrong?} Beginning with +1.38 the rpm packages are configured to run the director and storage +daemons as a non-root user. The file daemon runs as user root and group +bacula, the storage daemon as user bacula and group disk, and the director +as user bacula and group bacula. If you are upgrading you will need to +change some file permissions for things to work. Execute the following +commands as root: + +\footnotesize +\begin{verbatim} + chown bacula.bacula /var/bacula/* + chown root.bacula /var/bacula/bacula-fd.9102.state + chown bacula.disk /var/bacula/bacula-sd.9103.state + +\end{verbatim} +\normalsize + +Further, if you are using File storage volumes rather than tapes those +files will also need to have ownership set to user bacula and group bacula. + +\item + \label{faq9} + {\bf There are a lot of rpm packages. Which packages do I need for +what?} For a bacula server you need to select the packsge based upon your +preferred catalog database: one of bacula-mysql, bacula-postgresql or +bacula-sqlite. If your system does not provide an mtx package you also +need bacula-mtx to satisfy that dependancy. For a client machine you need +only install bacula-client. Optionally, for either server or client +machines, you may install a graphical console bacula-gconsole and/or +bacula-wxconsole. The Bacula Administration Tool is installed with the +bacula-bat package. One last package, bacula-updatedb is required only when +upgrading a server more than one database revision level. + + + +\item {\bf Support for RHEL3/4/5, CentOS 3/4/5, Scientific Linux 3/4/5 and x86\_64} + The examples below show + explicit build support for RHEL4 and CentOS 4. Build support + for x86\_64 has also been added. +\end{enumerate} + +\footnotesize +\begin{verbatim} +Build with one of these 3 commands: + +rpmbuild --rebuild \ + --define "build_rhel4 1" \ + --define "build_sqlite 1" \ + bacula-1.38.3-1.src.rpm + +rpmbuild --rebuild \ + --define "build_rhel4 1" \ + --define "build_postgresql 1" \ + bacula-1.38.3-1.src.rpm + +rpmbuild --rebuild \ + --define "build_rhel4 1" \ + --define "build_mysql4 1" \ + bacula-1.38.3-1.src.rpm + +For CentOS substitute '--define "build_centos4 1"' in place of rhel4. +For Scientific Linux substitute '--define "build_sl4 1"' in place of rhel4. + +For 64 bit support add '--define "build_x86_64 1"' +\end{verbatim} +\normalsize + +\section{Build Options} +\index[general]{Build Options} +The spec file currently supports building on the following platforms: +\footnotesize +\begin{verbatim} +Red Hat builds +--define "build_rh7 1" +--define "build_rh8 1" +--define "build_rh9 1" + +Fedora Core build +--define "build_fc1 1" +--define "build_fc3 1" +--define "build_fc4 1" +--define "build_fc5 1" +--define "build_fc6 1" +--define "build_fc7 1" +--define "build_fc8 1" +--define "build_fc9 1" + +Whitebox Enterprise build +--define "build_wb3 1" + +Red Hat Enterprise builds +--define "build_rhel3 1" +--define "build_rhel4 1" +--define "build_rhel5 1" + +CentOS build +--define "build_centos3 1" +--define "build_centos4 1" +--define "build_centos5 1" + +Scientific Linux build +--define "build_sl3 1" +--define "build_sl4 1" +--define "build_sl5 1" + +SuSE build +--define "build_su9 1" +--define "build_su10 1" +--define "build_su102 1" +--define "build_su103 1" +--define "build_su110 1" +--define "build_su111 1" + +Mandrake 10.x build +--define "build_mdk 1" + +Mandriva build +--define "build_mdv 1" + +MySQL support: +for mysql 3.23.x support define this +--define "build_mysql 1" +if using mysql 4.x define this, +currently: Mandrake 10.x, Mandriva 2006.0, SuSE 9.x & 10.0, FC4 & RHEL4 +--define "build_mysql4 1" +if using mysql 5.x define this, +currently: SuSE 10.1 & FC5 +--define "build_mysql5 1" + +PostgreSQL support: +--define "build_postgresql 1" + +Sqlite support: +--define "build_sqlite 1" + +Build the client rpm only in place of one of the above database full builds: +--define "build_client_only 1" + +X86-64 support: +--define "build_x86_64 1" + +Supress build of bgnome-console: +--define "nobuild_gconsole 1" + +Build the WXWindows console: +requires wxGTK >= 2.6 +--define "build_wxconsole 1" + +Build the Bacula Administration Tool: +requires QT >= 4.2 +--define "build_bat 1" + +Build python scripting support: +--define "build_python 1" + +Modify the Packager tag for third party packages: +--define "contrib_packager Your Name " + +Install most files to /opt/bacula directory: +--define "single_dir_install 1" + +Supress building the rescue files: +--define "nobuild_rescue 1" + +\end{verbatim} +\normalsize + +\section{RPM Install Problems} +\index[general]{RPM Install Problems} +In general the RPMs, once properly built should install correctly. +However, when attempting to run the daemons, a number of problems +can occur: +\begin{itemize} +\item [Wrong /var/bacula Permissions] + By default, the Director and Storage daemon do not run with + root permission. If the /var/bacula is owned by root, then it + is possible that the Director and the Storage daemon will not + be able to access this directory, which is used as the Working + Directory. To fix this, the easiest thing to do is: +\begin{verbatim} + chown bacula:bacula /var/bacula +\end{verbatim} + Note: as of 1.38.8 /var/bacula is installed root:bacula with + permissions 770. +\item [The Storage daemon cannot Access the Tape drive] + This can happen in some older RPM releases where the Storage + daemon ran under userid bacula, group bacula. There are two + ways of fixing this: the best is to modify the /etc/init.d/bacula-sd + file so that it starts the Storage daemon with group "disk". + The second way to fix the problem is to change the permissions + of your tape drive (usually /dev/nst0) so that Bacula can access it. + You will probably need to change the permissions of the SCSI control + device as well, which is usually /dev/sg0. The exact names depend + on your configuration, please see the Tape Testing chapter for + more information on devices. +\end{itemize} + diff --git a/docs/manuals/fr/catalog/setup.sm b/docs/manuals/de/old/utility/setup.sm similarity index 100% rename from docs/manuals/fr/catalog/setup.sm rename to docs/manuals/de/old/utility/setup.sm diff --git a/docs/manuals/fr/install/translate_images.pl b/docs/manuals/de/old/utility/translate_images.pl similarity index 100% rename from docs/manuals/fr/install/translate_images.pl rename to docs/manuals/de/old/utility/translate_images.pl diff --git a/docs/manuals/de/old/utility/utility.kilepr b/docs/manuals/de/old/utility/utility.kilepr new file mode 100644 index 00000000..a1163792 --- /dev/null +++ b/docs/manuals/de/old/utility/utility.kilepr @@ -0,0 +1,70 @@ +[General] +img_extIsRegExp=false +img_extensions=.eps .jpg .jpeg .png .pdf .ps .fig .gif +kileprversion=2 +kileversion=2.0 +lastDocument=utility.tex +masterDocument= +name=Utility +pkg_extIsRegExp=false +pkg_extensions=.cls .sty +src_extIsRegExp=false +src_extensions=.tex .ltx .latex .dtx .ins + +[Tools] +MakeIndex= +QuickBuild= + +[item:fdl.tex] +archive=true +column=34 +encoding= +highlight=LaTeX +line=0 +open=false +order=1 + +[item:progs.tex] +archive=true +column=0 +encoding= +highlight=LaTeX +line=0 +open=false +order=0 + +[item:rpm-faq.tex] +archive=true +column=0 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:utility.kilepr] +archive=true +column=103 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:utility.tex] +archive=true +column=36 +encoding=UTF-8 +highlight=LaTeX +line=53 +open=true +order=0 + +[item:version.tex] +archive=true +column=0 +encoding= +highlight= +line=0 +open=false +order=-1 diff --git a/docs/manuals/es/catalog/catalog.tex b/docs/manuals/de/old/utility/utility.tex similarity index 92% rename from docs/manuals/es/catalog/catalog.tex rename to docs/manuals/de/old/utility/utility.tex index 0e5723de..0c61b072 100644 --- a/docs/manuals/es/catalog/catalog.tex +++ b/docs/manuals/de/old/utility/utility.tex @@ -39,7 +39,7 @@ \parindent 0pt \title{\includegraphics{\idir bacula-logo.eps} \\ \bigskip - \Huge{Bacula Catalog Database Guide} + \Huge{Bacula Utility Programs} \begin{center} \large{It comes in the night and sucks the essence from your computers. } @@ -65,12 +65,14 @@ \clearpage \tableofcontents \clearpage +\listoffigures +\clearpage +\listoftables +\clearpage -\include{catmaintenance} -\include{mysql} -\include{postgresql} -\include{sqlite} -\include{internaldb} +\include{progs} +\include{bimagemgr-chapter} +\include{rpm-faq} \include{fdl} diff --git a/docs/manuals/de/problems/Makefile.in b/docs/manuals/de/problems/Makefile.in index 55cb58c6..d2557754 100644 --- a/docs/manuals/de/problems/Makefile.in +++ b/docs/manuals/de/problems/Makefile.in @@ -37,6 +37,7 @@ IMAGES=../../../images DOC=problems +MAINDOC=Bacula_Problem_Resolution_G.html first_rule: all @@ -77,22 +78,28 @@ html: fi) latex2html -white -no_subdir -split 0 -toc_stars -white -notransparent \ -init_file latex2html-init.pl ${DOC} >tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}.html + @(if [ -f imagename_translations ] ; then \ + ./translate_images.pl --from_meaningful_names ${DOC}.html; \ + fi) + (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} . 2>/dev/null; done) @echo "Done making html" web: @echo "Making web" + @rm -rf ${DOC} @mkdir -p ${DOC} @cp -fp ${IMAGES}/*.eps . @rm -f next.eps next.png prev.eps prev.png up.eps up.png - @cp -fp ${IMAGES}/*.eps ${DOC}/ - @cp -fp ${IMAGES}/*.eps ${IMAGES}/*.png ${DOC}/ @rm -f ${DOC}/xp-*.png @rm -f ${DOC}/next.eps ${DOC}/next.png ${DOC}/prev.eps ${DOC}/prev.png ${DOC}/up.eps ${DOC}/up.png - @rm -rf ${DOC}/*.html latex2html -split 3 -local_icons -t "Bacula Problem Resolution Guide" -long_titles 4 \ - -toc_stars -contents_in_nav -init_file latex2html-init.pl -white -notransparent ${DOC} >tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}/Bacula_Proble*.html + -toc_stars -contents_in_nav -init_file latex2html-init.pl \ + -no_antialias -no_antialias_text \ + -white -notransparent ${DOC} >tex.out 2>&1 + @(if [ -f imagename_translations ] ; then \ + ./translate_images.pl --from_meaningful_names ${DOC}.html; \ + fi) + @cp -f ${DOC}/${MAINDOC} ${DOC}/index.html @echo "Done making web" show: xdvi ${DOC} diff --git a/docs/manuals/de/problems/firewalls.tex b/docs/manuals/de/problems/firewalls.tex index 1e93c04e..9646ea65 100644 --- a/docs/manuals/de/problems/firewalls.tex +++ b/docs/manuals/de/problems/firewalls.tex @@ -28,7 +28,7 @@ FD -> SD:9103 Where hopefully it is obvious that DIR represents the Director, FD the File daemon or client, and SD the Storage daemon. The numbers that follow those -names are the standard ports used by Bacula, and the -\gt{} represents the +names are the standard ports used by Bacula, and the \verb:->: represents the left side making a connection to the right side (i.e. the right side is the "server" or is listening on the specified port), and the left side is the "client" that initiates the conversation. diff --git a/docs/manuals/de/problems/problems.kilepr b/docs/manuals/de/problems/problems.kilepr index b53ebfb3..c7d35087 100644 --- a/docs/manuals/de/problems/problems.kilepr +++ b/docs/manuals/de/problems/problems.kilepr @@ -3,7 +3,7 @@ img_extIsRegExp=false img_extensions=.eps .jpg .jpeg .png .pdf .ps .fig .gif kileprversion=2 kileversion=2.0 -lastDocument=problems.tex +lastDocument=faq.tex masterDocument= name=Problems pkg_extIsRegExp=false @@ -21,8 +21,8 @@ column=0 encoding=UTF-8 highlight=LaTeX line=146 -open=false -order=4 +open=true +order=0 [item:fdl.tex] archive=true @@ -35,21 +35,21 @@ order=-1 [item:firewalls.tex] archive=true -column=2 -encoding=UTF-8 -highlight=LaTeX +column=6357074 +encoding= +highlight= line=0 open=false -order=3 +order=-1 [item:kaboom.tex] archive=true column=0 -encoding=UTF-8 -highlight=LaTeX +encoding= +highlight= line=0 open=false -order=2 +order=-1 [item:problems.kilepr] archive=true @@ -65,24 +65,24 @@ archive=true column=36 encoding=UTF-8 highlight=LaTeX -line=53 -open=true -order=0 +line=46 +open=false +order=-1 [item:tapetesting.tex] archive=true -column=2 -encoding=UTF-8 -highlight=LaTeX +column=2147483647 +encoding= +highlight= line=0 open=false -order=1 +order=-1 [item:version.tex] archive=true column=0 -encoding=UTF-8 -highlight=LaTeX +encoding= +highlight= line=0 open=false -order=5 +order=-1 diff --git a/docs/manuals/de/problems/problems.tex b/docs/manuals/de/problems/problems.tex index d2376630..2633255c 100644 --- a/docs/manuals/de/problems/problems.tex +++ b/docs/manuals/de/problems/problems.tex @@ -24,7 +24,7 @@ \usepackage{setspace} \usepackage{hyperref} \usepackage{url} -%\usepackage{german} + \makeindex \newindex{general}{idx}{ind}{General Index} @@ -39,7 +39,7 @@ \parindent 0pt \title{\includegraphics{\idir bacula-logo.eps} \\ \bigskip - \Huge{Bacula Fehlerdiagnose Handbuch} + \Huge{Bacula Problem Resolution Guide} \begin{center} \large{It comes in the night and sucks the essence from your computers. } @@ -65,10 +65,6 @@ \clearpage \tableofcontents \clearpage -\listoffigures -\clearpage -\listoftables -\clearpage \include{faq} \include{tips} diff --git a/docs/manuals/de/problems/tapetesting.tex b/docs/manuals/de/problems/tapetesting.tex index 7281f34e..8b1bdee6 100644 --- a/docs/manuals/de/problems/tapetesting.tex +++ b/docs/manuals/de/problems/tapetesting.tex @@ -778,9 +778,12 @@ the other modes that Bacula needs to function properly. \index[general]{Tape Hardware Compression and Blocking Size} \index[general]{Size!Tape Hardware Compression and Blocking Size} -As far as I can tell, there is no way with the {\bf mt} program to check if -your tape hardware compression is turned on or off. You can, however, turn it -on by using (on Linux): +You should be able to verify the tape compression status with sysfs on Linux. +\begin{verbatim} +cat /sys/class/scsi_tape/nst0/default_compression +\end{verbatim} + +You can, turn it on by using (on Linux): \footnotesize \begin{verbatim} @@ -1251,6 +1254,38 @@ certain tape modes and MTEOM. \end{description} +\section{Tape Performance Problems} +\index[general]{Tape Performance} +If you have LTO-3 or LTO-4 drives, you should be able to +fairly good transfer rates; from 60 to 150 MB/second, providing +you have fast disks; GigaBit Ethernet connections (probably 2); you are +running multiple simultaneous jobs; you have Bacula data spooling +enabled; your tape block size is set to 131072 or 262144; and +you have set {\bf Maximum File Size = 5G}. + +If you are not getting good performance, consider some of the following +suggestions from the Allen Balck on the Bacula Users email list: + +\begin{enumerate} +\item You are using an old HBA (i.e. SCSI-1, which only does 5 MB/s) + +\item There are other, slower, devices on the SCSI bus. The HBA will + negotiate the speed of every device down to the speed of the + slowest. + +\item There is a termination problem on the bus (either too much or + too little termination). The HBA will drop the bus speed in an + attempt to increase the reliability of the bus. + +\item Loose or damaged cabling - this will probably make the HBA "think" + you have a termination problem and it will react as in 3 above. +\end{enumerate} + +See if /var/adm/messages (or /var/log/messages) tells you what the sync +rate of the SCSI devices/bus are. Also, the next time you reboot, the +BIOS may be able to tell you what the rate of each device is. + + \section{Autochanger Errors} \index[general]{Errors!Autochanger} \index[general]{Autochanger Errors} diff --git a/docs/manuals/de/utility/Makefile.in b/docs/manuals/de/utility/Makefile.in index 7136d1b6..96fc1fcc 100644 --- a/docs/manuals/de/utility/Makefile.in +++ b/docs/manuals/de/utility/Makefile.in @@ -37,6 +37,7 @@ IMAGES=../../../images DOC=utility +MAINDOC=Bacula_Utility_Programs.html first_rule: all @@ -77,22 +78,29 @@ html: fi) latex2html -white -no_subdir -split 0 -toc_stars -white -notransparent \ -init_file latex2html-init.pl ${DOC} >tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}.html + @(if [ -f imagename_translations ] ; then \ + ./translate_images.pl --from_meaningful_names ${DOC}.html; \ + fi) + cp ${IMAGES}/bacula-logo.png ${DOC} + (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} . 2>/dev/null; done) @echo "Done making html" web: @echo "Making web" + @rm -rf ${DOC} @mkdir -p ${DOC} @cp -fp ${IMAGES}/*.eps . @rm -f next.eps next.png prev.eps prev.png up.eps up.png - @cp -fp ${IMAGES}/*.eps ${DOC}/ - @cp -fp ${IMAGES}/*.eps ${IMAGES}/*.png ${DOC}/ @rm -f ${DOC}/xp-*.png @rm -f ${DOC}/next.eps ${DOC}/next.png ${DOC}/prev.eps ${DOC}/prev.png ${DOC}/up.eps ${DOC}/up.png - @rm -rf ${DOC}/*.html latex2html -split 3 -local_icons -t "Bacula Utility Programs" -long_titles 4 \ - -toc_stars -contents_in_nav -init_file latex2html-init.pl -white -notransparent ${DOC} >tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}/Bacula_Utilit*.html + -toc_stars -contents_in_nav -init_file latex2html-init.pl \ + -no_antialias -no_antialias_text \ + -white -notransparent ${DOC} >tex.out 2>&1 + @(if [ -f imagename_translations ] ; then \ + ./translate_images.pl --from_meaningful_names ${DOC}.html; \ + fi) + @cp -f ${DOC}/${MAINDOC} ${DOC}/index.html @echo "Done making web" show: xdvi ${DOC} diff --git a/docs/manuals/de/utility/bimagemgr-chapter.tex b/docs/manuals/de/utility/bimagemgr-chapter.tex index 36c7c0da..7ae67a7e 100644 --- a/docs/manuals/de/utility/bimagemgr-chapter.tex +++ b/docs/manuals/de/utility/bimagemgr-chapter.tex @@ -10,70 +10,77 @@ \label{bimagemgr} \index[general]{Bimagemgr } -{\bf bimagemgr} ist ein Hilfsmittel f\"{u}r diejenigen, die Ihre Backups auf -Festplatten-Volumes speichern und diese Volumes auf CDR brennen wollen. -Es hat eine Web-basierte Bedienoberfl\"{a}che und ist in Perl programmiert. -Es wird benutzt, um zu kontrollieren, wann die Notwendigkeit besteht, eine -Volume-Datei auf eine CD zu brennen. -Es ben\"{o}tigt: +{\bf bimagemgr} is a utility for those who backup to disk volumes in order to +commit them to CDR disk, rather than tapes. It is a web based interface +written in Perl and is used to monitor when a volume file needs to be burned to +disk. It requires: \begin{itemize} -\item Einen Web-Server der auf derselben Maschine wie Bacula l\"{a}uft -\item Einen auf dem Bacula-Server installierten und konfigurierten CD-Rekorder -\item Das cdr-tools-Paket muss installiert sein -\item perl, perl-DBI Modul, und entweder das DBD-MySQL, DBD-SQLite oder DBD-PostgreSQL Modul -\end{itemize} +\item A web server running on the bacula server +\item A CD recorder installed and configured on the bacula server +\item The cdrtools package installed on the bacula server. +\item perl, perl-DBI module, and either DBD-MySQL DBD-SQLite or DBD-PostgreSQL modules + \end{itemize} -DVD-Brenner werden von bimagemgr zur Zeit nicht unterst\"{u}tzt, das ist aber f\"{u}r -zuk\"{u}nftige Versionen geplant. +DVD burning is not supported by {\bf bimagemgr} at this +time, but both are planned for future releases. -\subsection{bimagemgr Installation} +\subsection{bimagemgr installation} \index[general]{bimagemgr!Installation } \index[general]{bimagemgr Installation } -Installation aus dem tar.gz: +Installation from tarball: % TODO: use itemized list for this? -1. Pr\"{u}fen und anpassen des Makefile, um es auf Ihre Computer-Konfiguration abzustimmen. -2. Editieren der Datei config.pm ,um sie auf Ihre Konfiguration abzustimmen. -3. F\"{u}hren Sie 'make install' als root aus. -4. Passen Sie in Ihrer httpd.conf das Timeout an. Der Web-Server darf die Verbindung nicht schliessen, -solange der Brennvorgang nicht abgeschlossen ist. Der ben\"{o}tigte Wert, den Sie als Timeout -konfigurieren m\"{u}ssen, h\"{a}ngt von der Geschwindigkeit Ihres CD-Brenners ab, oder ob Sie \"{u}ber das Netzwerk brennen. In den meisten F\"{a}llen reichen 1000 Sekunden als Timeout. Den httpd neu starten. -5. Stellen Sie sicher, dass das Kommando cdrecord als "setuid root" installiert ist. +1. Examine the Makefile and adjust it to your configuration if needed. +2. Edit config.pm to fit your configuration. +3. Do 'make install' as root. +4. Edit httpd.conf and change the Timeout value. The web server must not time +out and close the connection before the burn process is finished. The exact +value needed may vary depending upon your cd recorder speed and whether you are +burning on the bacula server on on another machine across your network. In my +case I set it to 1000 seconds. Restart httpd. +5. Make sure that cdrecord is setuid root. % TODO: I am pretty sure cdrecord can be used without setuid root % TODO: as long as devices are setup correctly -Installation eines rpm-Paketes: +Installation from rpm package: % TODO: use itemized list for this? -1. Installieren Sie das rpm-Paket f\"{u}r Ihre Plattform. -2. Editieren Sie die Datei /cgi-bin/config.pm, um sie an Ihre Konfiguration abzupassen. -3. Passen Sie in Ihrer httpd.conf das Timeout an. Der Web-Server darf die Verbindung nicht schliessen, -solange der Brennvorgang nicht abgeschlossen ist. Der ben\"{o}tigte Wert, den Sie als Timeout -konfigurieren m\"{u}ssen, h\"{a}ngt von der Geschwindigkeit Ihres CD-Brenners ab, oder ob Sie \"{u}ber das Netzwerk brennen. In den meisten F\"{a}llen reichen 1000 Sekunden als Timeout. Den httpd neu starten. -4. Stellen Sie sicher, dass das Kommando cdrecord als "setuid root" installiert ist. - -Zugriff auf die Volume-Dateien: -Die Volume-Dateien haben standardm\"{a}{\ss}ig die Zugriffsrechte 640 gesetzt -und k\"{o}nnen nur von Benutzer root gelesen werden. -Die empfohlene Methode ist die folgende (das funktioniert nur, wenn bacula und bimagemgr -auf demselben Computer laufen wie der Web-Server): - -F\"{u}r Bacula-Versionen 1.34 oder 1.36 installiert aus dem tar.gz - +1. Install the rpm package for your platform. +2. Edit /cgi-bin/config.pm to fit your configuration. +3. Edit httpd.conf and change the Timeout value. The web server must not time +out and close the connection before the burn process is finished. The exact +value needed may vary depending upon your cd recorder speed and whether you are +burning on the bacula server on on another machine across your network. In my +case I set it to 1000 seconds. Restart httpd. +4. Make sure that cdrecord is setuid root. + +For bacula systems less than 1.36: % TODO: use itemized list for this? -1. Erstellen Sie eine neu Gruppe namens bacula und f\"{u}gen Sie den Benutzer apache dieser Gruppe -hinzu (bei RedHat und Mandrake, bei SuSE ist es der Benutzer wwwrun, bei debian www-data) -2. \"{A}ndern Sie den Eigent\"{u}mer aller Volume-Dateien auf root.bacula. -3. Passen Sie das Script /etc/init.d/bacula an und setzen Sie SD\_USER=root und SD\_GROUP=bacula. -Starten Sie Bacula neu. - -Anmerkung: Schritt Nr. 3 sollte auch in /etc/init.d/bacula-sd gemacht werden, -aber die Dateien aus Bacula-Versionen vor 1.36 unterst\"{u}tzen dies nicht. -In diesem Fall kann es n\"{o}tig sein den Computer neu zu starten, -um '/etc/bacula/bacula restart' auszuf\"{u}hren. - -F\"{u}r Bacula-Versionen 1.38 installiert aus dem tar.gz +1. Edit the configuration section of config.pm to fit your configuration. +2. Run /etc/bacula/create\_cdimage\_table.pl from a console on your bacula +server (as root) to add the CDImage table to your bacula database. + +Accessing the Volume files: +The Volume files by default have permissions 640 and can only be read by root. +The recommended approach to this is as follows (and only works if bimagemgr and +apache are running on the same host as bacula. + +For bacula-1.34 or 1.36 installed from tarball - +% TODO: use itemized list for this? +1. Create a new user group bacula and add the user apache to the group for +Red Hat or Mandrake systems. For SuSE systems add the user wwwrun to the +bacula group. +2. Change ownership of all of your Volume files to root.bacula +3. Edit the /etc/bacula/bacula startup script and set SD\_USER=root and +SD\_GROUP=bacula. Restart bacula. + +Note: step 3 should also be done in /etc/init.d/bacula-sd but released versions +of this file prior to 1.36 do not support it. In that case it would be necessary after +a reboot of the server to execute '/etc/bacula/bacula restart'. + +For bacula-1.38 installed from tarball - % TODO: use itemized list for this? -1. Ihr configure-Aufruf sollte dies beinhalten: +1. Your configure statement should include: % TODO: fix formatting here --with-dir-user=bacula --with-dir-group=bacula @@ -81,69 +88,68 @@ F\"{u}r Bacula-Versionen 1.38 installiert aus dem tar.gz --with-sd-group=disk --with-fd-user=root --with-fd-group=bacula -2. F\"{u}gen Sie den Benutzer apache der Gruppe bacula hinzu -(bei RedHat und Mandrake, bei SuSE ist es der Benutzer wwwrun, bei debian www-data) -3. Kontrollieren/\"{A}ndern Sie den Eigent\"{u}mer aller Volume-Dateien auf root.bacula +2. Add the user apache to the bacula group for Red Hat or Mandrake systems. +For SuSE systems add the user wwwrun to the bacula group. +3. Check/change ownership of all of your Volume files to root.bacula -F\"{u}r Bacul-Versionen 1.36 oder 1.38 mit rpm installiert - +For bacula-1.36 or bacula-1.38 installed from rpm - % TODO: use itemized list for this? -1. F\"{u}gen Sie den Benutzer apache der Gruppe bacula hinzu -(bei RedHat und Mandrake, bei SuSE ist es der Benutzer wwwrun, bei debian www-data) -2. Kontrollieren/\"{A}ndern Sie den Eigent\"{u}mer aller Volume-Dateien auf root.bacula +1. Add the user apache to the group bacula for Red Hat or Mandrake systems. +For SuSE systems add the user wwwrun to the bacula group. +2. Check/change ownership of all of your Volume files to root.bacula -Wenn bimagemgr mit einem rpm-Paket Version gr\"{o}{\ss}er 1.38.9 installiert wird, -wird der Web-Server-Benutzer automatisch der Gruppe bacula hinzugef\"{u}gt. -Stellen Sie sicher, dass Sie die Datei config.pm nach der Installation anpassen. +bimagemgr installed from rpm > 1.38.9 will add the web server user to the +bacula group in a post install script. Be sure to edit the configuration +information in config.pm after installation of rpm package. -bimagemgr kann jetzt alle Volume-Dateien lesen, aber sie sind nicht durch alle Benutzer lesbar. +bimagemgr will now be able to read the Volume files but they are still not +world readable. -Wenn Sie bimagemgr auf einen anderen Computer installieren (nicht empfohlen), -m\"{u}ssen Sie die Zugriffsrechte aller Volume-Dateien auf 644 \"{a}ndern, -damit Sie \"{u}ber nfs oder andere Mittel darauf zugreifen k\"{o}nnen. -Beachten Sie, dass bei diesem Vorgehen die Volume-Dateien f\"{u}r alle Benutzer lesbar sind -und Sie den Schutz der Dateien anders sicherstellen. +If you are running bimagemgr on another host (not recommended) then you will +need to change the permissions on all of your backup volume files to 644 in +order to access them via nfs share or other means. This approach should only +be taken if you are sure of the security of your environment as it exposes +the backup Volume files to world read. -\subsection{bimagemgr Benutzung} -\index[general]{bimagemgr!Benutzung } -\index[general]{bimagemgr Benutzung } +\subsection{bimagemgr usage} +\index[general]{bimagemgr!Usage } +\index[general]{bimagemgr Usage } -Rufen Sie das Programm mit Ihrem Web-Browser auf, z.B. {\tt http://localhost/cgi-bin/bimagemgr.pl}, -dann sollten Sie eine Darstellung \"{a}hnlich der unten im Bild 1 abgebildeten sehen. +Calling the program in your web browser, e.g. {\tt +http://localhost/cgi-bin/bimagemgr.pl} will produce a display as shown below % TODO: use tex to say figure number -Das Programm wird die Bacula-Datenbank abfragen und alle Volume-Dateien mit dem Datum -des letzten Schreibvorgangs und dem Zeitpunkt darstellen, wo das Volume zum letzten -Mal auf CD gebrannt wurde. Wenn ein Volume auf CD gebrannt werden muss (letzter Schreibvorgang -ist neuer als der letzte Brennvorgang), wird ein "Brennen"-Knopf in der rechten Spalte angezeigt. +in Figure 1. The program will query the bacula database and display all volume +files with the date last written and the date last burned to disk. If a volume +needs to be burned (last written is newer than last burn date) a "Burn" +button will be displayed in the rightmost column. \addcontentsline{lof}{figure}{Bacula CD Image Manager} \includegraphics{\idir bimagemgr1.eps} \\Figure 1 % TODO: use tex to say figure number -Legen Sie eine leere CD in Ihren CD-Brenner und klicken Sie auf den "Brennen"-Knopf. -Dann \"{o}ffnet sich ein PopUp-Fenster, wie im Bild 2, das den Brennvorgang anzeigt. +Place a blank CDR disk in your recorder and click the "Burn" button. This will +cause a pop up window as shown in Figure 2 to display the burn progress. % TODO: use tex to say figure number -\addcontentsline{lof}{figure}{Bacula CD Image Brennfortschritt-Fenster} +\addcontentsline{lof}{figure}{Bacula CD Image Burn Progress Window} \includegraphics{\idir bimagemgr2.eps} \\Figure 2 % TODO: use tex to say figure number -Wenn der Brennvorgang abgeschlo{\ss}en ist, zeigt das PopUp-Fenster die Ausgaben von cdrecord -an (siehe Bild 3). +When the burn finishes the pop up window will display the results of cdrecord % TODO: use tex to say figure number -Schlie{\ss}en Sie das PopUp-Fenster und laden Sie die Hauptseite neu. -Das Datum des letzten Brennvorgangs wird aktualisiert und der "Brennen"-Knopf verschwindet. -Sollte das Brennen fehlgeschlagen sein, k\"{o}nnen Sie das Datum des letzten Brennvorgangs -zur\"{u}cksetzen, indem Sie auf den Link "Reset" des Volumes klicken. +as shown in Figure 3. Close the pop up window and refresh the main window. The +last burn date will be updated and the "Burn" button for that volume will +disappear. Should you have a failed burn you can reset the last burn date of +that volume by clicking its "Reset" link. -\addcontentsline{lof}{figure}{Bacula CD Image Brennergebnis} +\addcontentsline{lof}{figure}{Bacula CD Image Burn Results} \includegraphics{\idir bimagemgr3.eps} \\Figure 3 % TODO: use tex to say figure number -In der untersten Zeile des Hauptfensters sind zwei weitere Kn\"{o}pfe, -mit "Burn Catalog" und "Blank CDRW" beschriftet. -"Burn Catalog" schreibt eine Kopie Ihrer Katalog-Datenbank auf eine CD. -Falls Sie CDRW-Medien benutzen, k\"{o}nnen Sie mit "Blank CDRW" ein Medium l\"{o}schen -bevor Sie es wiederverwenden. -Regelm\"{a}ssiges speichern Ihrer Volume-Dateien und Ihrer Katalog-Datenbank mit bimagemgr auf CD's -stellt sicher, dass Sie jederzeit im Falle eines Datenverlustes auf Ihrem Bacula-Server -diesen einfach wiederherstellen k\"{o}nnen. +In the bottom row of the main display window are two more buttons labeled +"Burn Catalog" and "Blank CDRW". "Burn Catalog" will place a copy of +your bacula catalog on a disk. If you use CDRW disks rather than CDR then +"Blank CDRW" allows you to erase the disk before re-burning it. Regularly +committing your backup volume files and your catalog to disk with {\bf +bimagemgr} ensures that you can rebuild easily in the event of some disaster +on the bacula server itself. diff --git a/docs/manuals/de/utility/progs.tex b/docs/manuals/de/utility/progs.tex index 9187970d..d818bc3d 100644 --- a/docs/manuals/de/utility/progs.tex +++ b/docs/manuals/de/utility/progs.tex @@ -331,7 +331,6 @@ Please note that some of the current limitations of bextract are: \begin{enumerate} \item It cannot restore access control lists (ACL) that have been backed up along with the file data. -\item It cannot restore Win32 non-portable streams (typically default). \item It cannot restore encrypted files. \item The command line length is relatively limited, which means that you cannot enter a huge number of volumes. If you need to @@ -456,17 +455,21 @@ database is to reload the database by using the bootstrap file that was written when you saved it (default bacula-dir.conf file). The {\bf bscan} program can be used to re-create a database (catalog) -records from the backup information written to one or more Volumes. -This is normally -needed only if one or more Volumes have been pruned or purged from your -catalog so that the records on the Volume are no longer in the catalog, or -for Volumes that you have archived. - -With some care, it can also be used to synchronize your existing catalog with -a Volume. Although we have never seen a case of bscan damaging a -catalog, since bscan modifies your catalog, we recommend that -you do a simple ASCII backup of your database before running {\bf bscan} just -to be sure. See \ilink{Compacting Your Database}{CompactingMySQL} for +records from the backup information written to one or more Volumes. This +is normally needed only if one or more Volumes have been pruned or purged +from your catalog so that the records on the Volume are no longer in the +catalog, or for Volumes that you have archived. Note, if you scan in +Volumes that were previously purged, you will be able to do restores from +those Volumes. However, unless you modify the Job and File retention times +for the Jobs that were added by scanning, the next time you run any Job +with the same name, the records will be pruned again. Since it takes a +long time to scan Volumes this can be very frustrating. + +With some care, {\bf bscan} can also be used to synchronize your existing +catalog with a Volume. Although we have never seen a case of bscan +damaging a catalog, since bscan modifies your catalog, we recommend that +you do a simple ASCII backup of your database before running {\bf bscan} +just to be sure. See \ilink{Compacting Your Database}{CompactingMySQL} for the details of making a copy of your database. {\bf bscan} can also be useful in a disaster recovery situation, after the @@ -907,6 +910,7 @@ The full list of commands are: rewind rewind the tape scan read() tape block by block to EOT and report scanblocks Bacula read block by block to EOT and report + speed report drive speed status print tape status test General test Bacula tape functions weof write an EOF on the tape @@ -939,6 +943,54 @@ In the event that you want to relabel a {\bf Bacula}, you can simply use the note for labeling tapes, we recommend that you use the {\bf label} command in the {\bf Console} program since it will never overwrite a valid Bacula tape. +\subsubsection*{Testing your Tape Drive} +\label{sec:btapespeed} + +To determine the best configuration of your tape drive, you can run the new +\texttt{speed} command available in the \texttt{btape} program. + +This command can have the following arguments: +\begin{itemize} +\item[\texttt{file\_size=n}] Specify the Maximum File Size for this test + (between 1 and 5GB). This counter is in GB. +\item[\texttt{nb\_file=n}] Specify the number of file to be written. The amount + of data should be greater than your memory ($file\_size*nb\_file$). +\item[\texttt{skip\_zero}] This flag permits to skip tests with constant + data. +\item[\texttt{skip\_random}] This flag permits to skip tests with random + data. +\item[\texttt{skip\_raw}] This flag permits to skip tests with raw access. +\item[\texttt{skip\_block}] This flag permits to skip tests with Bacula block + access. +\end{itemize} + +\begin{verbatim} +*speed file_size=3 skip_raw +btape.c:1078 Test with zero data and bacula block structure. +btape.c:956 Begin writing 3 files of 3.221 GB with blocks of 129024 bytes. +++++++++++++++++++++++++++++++++++++++++++ +btape.c:604 Wrote 1 EOF to "Drive-0" (/dev/nst0) +btape.c:406 Volume bytes=3.221 GB. Write rate = 44.128 MB/s +... +btape.c:383 Total Volume bytes=9.664 GB. Total Write rate = 43.531 MB/s + +btape.c:1090 Test with random data, should give the minimum throughput. +btape.c:956 Begin writing 3 files of 3.221 GB with blocks of 129024 bytes. ++++++++++++++++++++++++++++++++++++++++++++ +btape.c:604 Wrote 1 EOF to "Drive-0" (/dev/nst0) +btape.c:406 Volume bytes=3.221 GB. Write rate = 7.271 MB/s ++++++++++++++++++++++++++++++++++++++++++++ +... +btape.c:383 Total Volume bytes=9.664 GB. Total Write rate = 7.365 MB/s + +\end{verbatim} + +When using compression, the random test will give your the minimum throughput +of your drive . The test using constant string will give you the maximum speed +of your hardware chain. (cpu, memory, scsi card, cable, drive, tape). + +You can change the block size in the Storage Daemon configuration file. + \section{Other Programs} \index[general]{Programs!Other} \index[general]{Other Programs} @@ -1027,6 +1079,17 @@ If you are getting incorrect dates (e.g. 1970) and you are running with a non-English language setting, you might try adding a LANG=''en\_US'' immediately before the bsmtp call. +In general, {\bf bsmtp} attempts to cleanup email addresses that you +specify in the from, copy, mailhost, and recipient fields, by adding +the necessary \lt{} and \gt{} characters around the address part. However, +if you include a {\bf display-name} (see RFC 5332), some SMTP servers +such as Exchange may not accept the message if the {\bf display-name} is +also included in \lt{} and \gt{}. As mentioned above, you must test, and +if you run into this situation, you may manually add the \lt{} and \gt{} +to the Bacula {\bf mailcommand} or {\bf operatorcommand} and when +{\bf bsmtp} is formatting an address if it already contains a \lt{} or +\gt{} character, it will leave the address unchanged. + \section{dbcheck} \label{dbcheck} \index[general]{Dbcheck} @@ -1049,18 +1112,37 @@ It is called: \footnotesize \begin{verbatim} -Usage: dbcheck [-c config] [-C catalog name] [-d debug_level] - [] +Usage: dbcheck [-c config ] [-B] [-C catalog name] [-d debug_level] + [] [] -b batch mode -C catalog name in the director conf file - -c director conf filename - -dnn set debug level to nn + -c Director conf filename + -B print catalog configuration and exit + -d set debug level to + -dt print timestamp in debug output -f fix inconsistencies -v verbose -? print this message \end{verbatim} \normalsize +If the \textbf{-B} option is specified, dbcheck will print out catalog +information in a simple text based format. This is useful to backup it in a +secure way. + +\begin{verbatim} + $ dbcheck -B + catalog=MyCatalog + db_type=SQLite + db_name=regress + db_driver= + db_user=regress + db_password= + db_address= + db_port=0 + db_socket= +\end{verbatim} %$ + If the {\bf -c} option is given with the Director's conf file, there is no need to enter any of the command line arguments, in particular the working directory as dbcheck will read them from the file. @@ -1171,6 +1253,20 @@ The inconsistencies examined are the following: regardless of their age. \end{itemize} + +If you are using Mysql, dbcheck will ask you if you want to create temporary +indexes to speed up orphaned Path and Filename elimination. + +Mostly for PostgreSQL users, we provide a pure SQL script dbcheck replacement +in \url{examples/database/dbcheck.sql} that works with global queries instead +of many small queries like dbcheck. Execution instructions are at the top of +the script and you will need to type \texttt{COMMIT} at the end to validate +modifications. + +If you are using bweb or brestore, don't eliminate orphaned Path, else you will +have to rebuild \texttt{brestore\_pathvisibility} and +\texttt{brestore\_pathhierarchy} indexes. + By the way, I personally run dbcheck only where I have messed up my database due to a bug in developing Bacula code, so normally you should never need to run dbcheck in spite of the diff --git a/docs/manuals/de/utility/rpm-faq.tex b/docs/manuals/de/utility/rpm-faq.tex index 0e73ad2a..2e66285e 100644 --- a/docs/manuals/de/utility/rpm-faq.tex +++ b/docs/manuals/de/utility/rpm-faq.tex @@ -39,11 +39,18 @@ \item \label{faq1} {\bf How do I build Bacula for platform xxx?} - The bacula spec file contains defines to build for several platforms: - Red Hat 7.x (rh7), Red Hat 8.0 (rh8), Red Hat 9 (rh9), Fedora Core (fc1, - fc3, fc4, fc5, fc6, fc7, fc8), Whitebox Enterprise Linux 3.0 (wb3), Red Hat Enterprise Linux - (rhel3, rhel4, rhel5), Mandrake 10.x (mdk), Mandriva 2006.x (mdv) CentOS (centos3, centos4, centos5) - Scientific Linux (sl3, sl4, sl5) and SuSE (su9, su10, su102, su103, su110). The package build is controlled by a mandatory define set at the beginning of the file. These defines basically just control the dependency information that gets coded into the finished rpm package as well + The bacula spec file contains defines to build for several platforms: \\ + \\ + Red Hat 7.x (rh7), Red Hat 8.0 (rh8), Red Hat 9 (rh9), \\ + Fedora Core (fc1, fc3, fc4, fc5, fc6, fc7, fc8), \\ + Whitebox Enterprise Linux 3.0 (wb3), \\ + Red Hat Enterprise Linux (rhel3, rhel4, rhel5), \\ + Mandrake 10.x (mdk), Mandriva 2006.x (mdv), \\ + CentOS (centos3, centos4, centos5) \\ + Scientific Linux (sl3, sl4, sl5) and \\ + SuSE (su9, su10, su102, su103, su110). \\ + \\ + The package build is controlled by a mandatory define set at the beginning of the file. These defines basically just control the dependency information that gets coded into the finished rpm package as well as any special configure options required. The platform define may be edited in the spec file directly (by default all defines are set to 0 or "not set"). For example, to build the Red Hat 7.x package find the line in the spec file @@ -120,7 +127,7 @@ in the spec file directly or pass it to rpmbuild on the command line: \item \label{faq3} - {\bf What other defines are used?} + {\bf What other defines are used?} \\ Three other building defines of note are the depkgs\_version, docs\_version and \_rescuever identifiers. These two defines are set with each release and must match the version of those sources that are being used to build the packages. @@ -129,7 +136,7 @@ in the spec file directly or pass it to rpmbuild on the command line: \item \label{faq4} {\bf I'm getting errors about not having permission when I try to build the - packages. Do I need to be root?} + packages. Do I need to be root?} \\ No, you do not need to be root and, in fact, it is better practice to build rpm packages as a non-root user. Bacula packages are designed to be built by a regular user but you must make a few changes on your @@ -178,41 +185,45 @@ creation of debug rpm packages is: \item \label{faq5} {\bf I'm building my own rpms but on all platforms and compiles I get an - unresolved dependency for something called /usr/afsws/bin/pagsh.} This - is a shell from the OpenAFS (Andrew File System). If you are seeing - this then you chose to include the docs/examples directory in your - package. One of the example scripts in this directory is a pagsh + unresolved dependency for something called /usr/afsws/bin/pagsh.} \\ + This is a shell from the OpenAFS (Andrew File System). If you are + seeing this then you chose to include the docs/examples directory in + your package. One of the example scripts in this directory is a pagsh script. Rpmbuild, when scanning for dependencies, looks at the shebang line of all packaged scripts in addition to checking shared libraries. - To avoid this do not package the examples directory. If you are seeing this - problem you are building a very old bacula package as the examples have been - removed from the doc packaging. + To avoid this do not package the examples directory. If you are seeing + this problem you are building a very old bacula package as the examples + have been removed from the doc packaging. \item \label{faq6} {\bf I'm building my own rpms because you don't publish for my platform. - Can I get my packages released to sourceforge for other people to use?} Yes, - contributions from users are accepted and appreciated. Please examine the - directory platforms/contrib-rpm in the source code for further information. + Can I get my packages released to sourceforge for other people to use?} + \\ + Yes, contributions from users are accepted and appreciated. Please + examine the directory platforms/contrib-rpm in the source code for + further information. \item \label{faq7} - {\bf Is there an easier way than sorting out all these command line options?} Yes, - there is a gui wizard shell script which you can use to rebuild the src rpm package. - Look in the source archive for platforms/contrib-rpm/rpm\_wizard.sh. This script will - allow you to specify build options using GNOME dialog screens. It requires zenity. + {\bf Is there an easier way than sorting out all these command line options?} + \\ + Yes, there is a gui wizard shell script which you can use to rebuild the + src rpm package. Look in the source archive for + platforms/contrib-rpm/rpm\_wizard.sh. This script will allow you to + specify build options using GNOME dialog screens. It requires zenity. \item \label{faq8} {\bf I just upgraded from 1.36.x to 1.38.x and now my director daemon won't start. It appears to start but dies silently and I get a "connection -refused" error when starting the console. What is wrong?} Beginning with -1.38 the rpm packages are configured to run the director and storage -daemons as a non-root user. The file daemon runs as user root and group -bacula, the storage daemon as user bacula and group disk, and the director -as user bacula and group bacula. If you are upgrading you will need to -change some file permissions for things to work. Execute the following -commands as root: +refused" error when starting the console. What is wrong?} \\ + Beginning with 1.38 the rpm packages are configured to run the director + and storage daemons as a non-root user. The file daemon runs as user + root and group bacula, the storage daemon as user bacula and group disk, + and the director as user bacula and group bacula. If you are upgrading + you will need to change some file permissions for things to work. + Execute the following commands as root: \footnotesize \begin{verbatim} @@ -229,7 +240,8 @@ files will also need to have ownership set to user bacula and group bacula. \item \label{faq9} {\bf There are a lot of rpm packages. Which packages do I need for -what?} For a bacula server you need to select the packsge based upon your +what?} \\ +For a bacula server you need to select the packsge based upon your preferred catalog database: one of bacula-mysql, bacula-postgresql or bacula-sqlite. If your system does not provide an mtx package you also need bacula-mtx to satisfy that dependancy. For a client machine you need @@ -242,6 +254,7 @@ upgrading a server more than one database revision level. \item {\bf Support for RHEL3/4/5, CentOS 3/4/5, Scientific Linux 3/4/5 and x86\_64} + \\ The examples below show explicit build support for RHEL4 and CentOS 4. Build support for x86\_64 has also been added. @@ -367,8 +380,8 @@ Modify the Packager tag for third party packages: Install most files to /opt/bacula directory: --define "single_dir_install 1" -Supress building the rescue files: ---define "nobuild_rescue 1" +Build the rescue files: +--define "build_rescue 1" \end{verbatim} \normalsize @@ -379,7 +392,7 @@ In general the RPMs, once properly built should install correctly. However, when attempting to run the daemons, a number of problems can occur: \begin{itemize} -\item [Wrong /var/bacula Permissions] +\item Wrong /var/bacula Permissions \\ By default, the Director and Storage daemon do not run with root permission. If the /var/bacula is owned by root, then it is possible that the Director and the Storage daemon will not @@ -390,7 +403,7 @@ can occur: \end{verbatim} Note: as of 1.38.8 /var/bacula is installed root:bacula with permissions 770. -\item [The Storage daemon cannot Access the Tape drive] +\item The Storage daemon cannot Access the Tape drive \\ This can happen in some older RPM releases where the Storage daemon ran under userid bacula, group bacula. There are two ways of fixing this: the best is to modify the /etc/init.d/bacula-sd diff --git a/docs/manuals/de/utility/utility.kilepr b/docs/manuals/de/utility/utility.kilepr index a1163792..ef877767 100644 --- a/docs/manuals/de/utility/utility.kilepr +++ b/docs/manuals/de/utility/utility.kilepr @@ -22,16 +22,16 @@ encoding= highlight=LaTeX line=0 open=false -order=1 +order=-1 [item:progs.tex] archive=true column=0 encoding= -highlight=LaTeX +highlight= line=0 open=false -order=0 +order=-1 [item:rpm-faq.tex] archive=true @@ -53,10 +53,10 @@ order=-1 [item:utility.tex] archive=true -column=36 +column=1 encoding=UTF-8 highlight=LaTeX -line=53 +line=46 open=true order=0 diff --git a/docs/manuals/de/utility/utility.tex b/docs/manuals/de/utility/utility.tex index 0c61b072..0502574e 100644 --- a/docs/manuals/de/utility/utility.tex +++ b/docs/manuals/de/utility/utility.tex @@ -65,10 +65,6 @@ \clearpage \tableofcontents \clearpage -\listoffigures -\clearpage -\listoftables -\clearpage \include{progs} \include{bimagemgr-chapter} diff --git a/docs/manuals/es/catalog/Makefile b/docs/manuals/es/catalog/Makefile deleted file mode 100644 index 279cad47..00000000 --- a/docs/manuals/es/catalog/Makefile +++ /dev/null @@ -1,137 +0,0 @@ -# -# -# Makefile for LaTeX -# -# To build everything do -# make tex -# make web -# make html -# make dvipdf -# -# or simply -# -# make -# -# for rapid development do: -# make tex -# make show -# -# -# If you are having problems getting "make" to work, debugging it is -# easier if can see the output from latex, which is normally redirected -# to /dev/null. To see it, do the following: -# -# cd docs/manual -# make tex -# latex bacula.tex -# -# typically the latex command will stop indicating the error (e.g. a -# missing \ in front of a _ or a missing { or ] ... -# -# The following characters must be preceded by a backslash -# to be entered as printable characters: -# -# # $ % & ~ _ ^ \ { } -# - -IMAGES=../../../images - -DOC=catalog - -first_rule: all - -all: tex web dvipdf mini-clean - -.SUFFIXES: .tex .html -.PHONY: -.DONTCARE: - - -tex: - @./update_version - @echo "Making version `cat version.tex`" - @cp -fp ${IMAGES}/hires/*.eps . - @touch ${DOC}i-dir.tex ${DOC}i-fd.tex ${DOC}i-sd.tex \ - ${DOC}i-console.tex ${DOC}i-general.tex - latex -interaction=batchmode ${DOC}.tex - makeindex ${DOC}.idx -o ${DOC}.ind 2>/dev/null - latex -interaction=batchmode ${DOC}.tex - -pdf: - @echo "Making pdfm" - @cp -fp ${IMAGES}/hires/*.eps . - dvipdfm -p a4 ${DOC}.dvi - -dvipdf: - @echo "Making dvi to pdf" - @cp -fp ${IMAGES}/hires/*.eps . - dvipdf ${DOC}.dvi ${DOC}.pdf - -html: - @echo " " - @echo "Making html" - @cp -fp ${IMAGES}/*.eps . - @rm -f next.eps next.png prev.eps prev.png up.eps up.png - @(if [ -f imagename_translations ] ; then \ - ./translate_images.pl --from_meaningful_names ${DOC}.html; \ - fi) - latex2html -white -no_subdir -split 0 -toc_stars -white -notransparent \ - -init_file latex2html-init.pl ${DOC} >tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}.html - (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} .; done) - @echo "Done making html" - -web: - @echo "Making web" - @mkdir -p ${DOC} - @cp -fp ${IMAGES}/*.eps . - @rm -f next.eps next.png prev.eps prev.png up.eps up.png - @cp -fp ${IMAGES}/*.eps ${DOC}/ - @cp -fp ${IMAGES}/*.eps ${IMAGES}/*.png ${DOC}/ - @rm -f ${DOC}/xp-*.png - @rm -f ${DOC}/next.eps ${DOC}/next.png ${DOC}/prev.eps ${DOC}/prev.png ${DOC}/up.eps ${DOC}/up.png - @rm -rf ${DOC}/*.html - latex2html -split 3 -local_icons -t "Bacula Catalog Database Guide" -long_titles 4 \ - -toc_stars -contents_in_nav -init_file latex2html-init.pl -white -notransparent ${DOC} >tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}/Bacula_Catalo*.html - (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} .; done) - @echo "Done making web" -show: - xdvi ${DOC} - -texcheck: - ./check_tex.pl ${DOC}.tex - -main_configs: - pic2graph -density 100 main_configs.png - -mini-clean: - @rm -f 1 2 3 *.tex~ - @rm -f *.gif *.jpg *.eps - @rm -f *.aux *.cp *.fn *.ky *.log *.pg - @rm -f *.backup *.ilg *.lof *.lot - @rm -f *.cdx *.cnd *.ddx *.ddn *.fdx *.fnd *.ind *.sdx *.snd - @rm -f *.dnd *.old *.out - @rm -f ${DOC}/*.gif ${DOC}/*.jpg ${DOC}/*.eps - @rm -f ${DOC}/*.aux ${DOC}/*.cp ${DOC}/*.fn ${DOC}/*.ky ${DOC}/*.log ${DOC}/*.pg - @rm -f ${DOC}/*.backup ${DOC}/*.ilg ${DOC}/*.lof ${DOC}/*.lot - @rm -f ${DOC}/*.cdx ${DOC}/*.cnd ${DOC}/*.ddx ${DOC}/*.ddn ${DOC}/*.fdx ${DOC}/*.fnd ${DOC}/*.ind ${DOC}/*.sdx ${DOC}/*.snd - @rm -f ${DOC}/*.dnd ${DOC}/*.old ${DOC}/*.out - @rm -f ${DOC}/WARNINGS - - -clean: - @rm -f 1 2 3 *.tex~ - @rm -f *.png *.gif *.jpg *.eps - @rm -f *.pdf *.aux *.cp *.fn *.ky *.log *.pg - @rm -f *.html *.backup *.ps *.dvi *.ilg *.lof *.lot - @rm -f *.cdx *.cnd *.ddx *.ddn *.fdx *.fnd *.ind *.sdx *.snd - @rm -f *.dnd imagename_translations - @rm -f *.old WARNINGS *.out *.toc *.idx - @rm -f ${DOC}i-*.tex - @rm -rf ${DOC} - - -distclean: clean - @rm -f images.pl labels.pl internals.pl - @rm -f Makefile version.tex diff --git a/docs/manuals/es/catalog/Makefile.in b/docs/manuals/es/catalog/Makefile.in deleted file mode 100644 index 279cad47..00000000 --- a/docs/manuals/es/catalog/Makefile.in +++ /dev/null @@ -1,137 +0,0 @@ -# -# -# Makefile for LaTeX -# -# To build everything do -# make tex -# make web -# make html -# make dvipdf -# -# or simply -# -# make -# -# for rapid development do: -# make tex -# make show -# -# -# If you are having problems getting "make" to work, debugging it is -# easier if can see the output from latex, which is normally redirected -# to /dev/null. To see it, do the following: -# -# cd docs/manual -# make tex -# latex bacula.tex -# -# typically the latex command will stop indicating the error (e.g. a -# missing \ in front of a _ or a missing { or ] ... -# -# The following characters must be preceded by a backslash -# to be entered as printable characters: -# -# # $ % & ~ _ ^ \ { } -# - -IMAGES=../../../images - -DOC=catalog - -first_rule: all - -all: tex web dvipdf mini-clean - -.SUFFIXES: .tex .html -.PHONY: -.DONTCARE: - - -tex: - @./update_version - @echo "Making version `cat version.tex`" - @cp -fp ${IMAGES}/hires/*.eps . - @touch ${DOC}i-dir.tex ${DOC}i-fd.tex ${DOC}i-sd.tex \ - ${DOC}i-console.tex ${DOC}i-general.tex - latex -interaction=batchmode ${DOC}.tex - makeindex ${DOC}.idx -o ${DOC}.ind 2>/dev/null - latex -interaction=batchmode ${DOC}.tex - -pdf: - @echo "Making pdfm" - @cp -fp ${IMAGES}/hires/*.eps . - dvipdfm -p a4 ${DOC}.dvi - -dvipdf: - @echo "Making dvi to pdf" - @cp -fp ${IMAGES}/hires/*.eps . - dvipdf ${DOC}.dvi ${DOC}.pdf - -html: - @echo " " - @echo "Making html" - @cp -fp ${IMAGES}/*.eps . - @rm -f next.eps next.png prev.eps prev.png up.eps up.png - @(if [ -f imagename_translations ] ; then \ - ./translate_images.pl --from_meaningful_names ${DOC}.html; \ - fi) - latex2html -white -no_subdir -split 0 -toc_stars -white -notransparent \ - -init_file latex2html-init.pl ${DOC} >tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}.html - (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} .; done) - @echo "Done making html" - -web: - @echo "Making web" - @mkdir -p ${DOC} - @cp -fp ${IMAGES}/*.eps . - @rm -f next.eps next.png prev.eps prev.png up.eps up.png - @cp -fp ${IMAGES}/*.eps ${DOC}/ - @cp -fp ${IMAGES}/*.eps ${IMAGES}/*.png ${DOC}/ - @rm -f ${DOC}/xp-*.png - @rm -f ${DOC}/next.eps ${DOC}/next.png ${DOC}/prev.eps ${DOC}/prev.png ${DOC}/up.eps ${DOC}/up.png - @rm -rf ${DOC}/*.html - latex2html -split 3 -local_icons -t "Bacula Catalog Database Guide" -long_titles 4 \ - -toc_stars -contents_in_nav -init_file latex2html-init.pl -white -notransparent ${DOC} >tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}/Bacula_Catalo*.html - (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} .; done) - @echo "Done making web" -show: - xdvi ${DOC} - -texcheck: - ./check_tex.pl ${DOC}.tex - -main_configs: - pic2graph -density 100 main_configs.png - -mini-clean: - @rm -f 1 2 3 *.tex~ - @rm -f *.gif *.jpg *.eps - @rm -f *.aux *.cp *.fn *.ky *.log *.pg - @rm -f *.backup *.ilg *.lof *.lot - @rm -f *.cdx *.cnd *.ddx *.ddn *.fdx *.fnd *.ind *.sdx *.snd - @rm -f *.dnd *.old *.out - @rm -f ${DOC}/*.gif ${DOC}/*.jpg ${DOC}/*.eps - @rm -f ${DOC}/*.aux ${DOC}/*.cp ${DOC}/*.fn ${DOC}/*.ky ${DOC}/*.log ${DOC}/*.pg - @rm -f ${DOC}/*.backup ${DOC}/*.ilg ${DOC}/*.lof ${DOC}/*.lot - @rm -f ${DOC}/*.cdx ${DOC}/*.cnd ${DOC}/*.ddx ${DOC}/*.ddn ${DOC}/*.fdx ${DOC}/*.fnd ${DOC}/*.ind ${DOC}/*.sdx ${DOC}/*.snd - @rm -f ${DOC}/*.dnd ${DOC}/*.old ${DOC}/*.out - @rm -f ${DOC}/WARNINGS - - -clean: - @rm -f 1 2 3 *.tex~ - @rm -f *.png *.gif *.jpg *.eps - @rm -f *.pdf *.aux *.cp *.fn *.ky *.log *.pg - @rm -f *.html *.backup *.ps *.dvi *.ilg *.lof *.lot - @rm -f *.cdx *.cnd *.ddx *.ddn *.fdx *.fnd *.ind *.sdx *.snd - @rm -f *.dnd imagename_translations - @rm -f *.old WARNINGS *.out *.toc *.idx - @rm -f ${DOC}i-*.tex - @rm -rf ${DOC} - - -distclean: clean - @rm -f images.pl labels.pl internals.pl - @rm -f Makefile version.tex diff --git a/docs/manuals/es/concepts/Makefile b/docs/manuals/es/concepts/Makefile deleted file mode 100644 index 6a582d84..00000000 --- a/docs/manuals/es/concepts/Makefile +++ /dev/null @@ -1,141 +0,0 @@ -# -# -# Makefile for LaTeX -# -# To build everything do -# make tex -# make web -# make html -# make dvipdf -# -# or simply -# -# make -# -# for rapid development do: -# make tex -# make show -# -# -# If you are having problems getting "make" to work, debugging it is -# easier if can see the output from latex, which is normally redirected -# to /dev/null. To see it, do the following: -# -# cd docs/manual -# make tex -# latex bacula.tex -# -# typically the latex command will stop indicating the error (e.g. a -# missing \ in front of a _ or a missing { or ] ... -# -# The following characters must be preceded by a backslash -# to be entered as printable characters: -# -# # $ % & ~ _ ^ \ { } -# - -IMAGES=../../../images - -DOC=concepts - -first_rule: all - -all: tex web dvipdf mini-clean - -.SUFFIXES: .tex .html -.PHONY: -.DONTCARE: - - -tex: - @./update_version - @echo "Making version `cat version.tex`" - @cp -fp ${IMAGES}/hires/*.eps . - @touch ${DOC}i-dir.tex ${DOC}i-fd.tex ${DOC}i-sd.tex \ - ${DOC}i-console.tex ${DOC}i-general.tex - latex -interaction=batchmode ${DOC}.tex - makeindex ${DOC}.idx -o ${DOC}.ind 2>/dev/null - makeindex ${DOC}.ddx -o ${DOC}.dnd >/dev/null 2>/dev/null - makeindex ${DOC}.fdx -o ${DOC}.fnd >/dev/null 2>/dev/null - makeindex ${DOC}.sdx -o ${DOC}.snd >/dev/null 2>/dev/null - makeindex ${DOC}.cdx -o ${DOC}.cnd >/dev/null 2>/dev/null - latex -interaction=batchmode ${DOC}.tex - -pdf: - @echo "Making pdfm" - @cp -fp ${IMAGES}/hires/*.eps . - dvipdfm -p a4 ${DOC}.dvi - -dvipdf: - @echo "Making dvi to pdf" - @cp -fp ${IMAGES}/hires/*.eps . - dvipdf ${DOC}.dvi ${DOC}.pdf - -html: - @echo " " - @echo "Making html" - @cp -fp ${IMAGES}/*.eps . - @rm -f next.eps next.png prev.eps prev.png up.eps up.png - @(if [ -f imagename_translations ] ; then \ - ./translate_images.pl --from_meaningful_names ${DOC}.html; \ - fi) - latex2html -white -no_subdir -split 0 -toc_stars -white \ - -init_file latex2html-init.pl ${DOC} >tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}.html - (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} .; done) - @echo "Done making html" - -web: - @echo "Making web" - @mkdir -p ${DOC} - @cp -fp ${IMAGES}/*.eps . - @rm -f next.eps next.png prev.eps prev.png up.eps up.png - @cp -fp ${IMAGES}/*.eps ${DOC}/ - @cp -fp ${IMAGES}/*.eps ${IMAGES}/*.png ${DOC}/ - @rm -f ${DOC}/xp-*.png - @rm -f ${DOC}/next.eps ${DOC}/next.png ${DOC}/prev.eps ${DOC}/prev.png ${DOC}/up.eps ${DOC}/up.png - @rm -rf ${DOC}/*.html - latex2html -split 3 -local_icons -t "Bacula Concepts and Overview Guide" -long_titles 4 \ - -toc_stars -contents_in_nav -init_file latex2html-init.pl -white ${DOC} >tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}/Bacula_Concep_Overvi_Guide.html - (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} .; done) - @echo "Done making web" -show: - xdvi ${DOC} - -texcheck: - ./check_tex.pl ${DOC}.tex - -main_configs: - pic2graph -density 100 main_configs.png - -mini-clean: - @rm -f 1 2 3 *.tex~ - @rm -f *.gif *.jpg *.eps - @rm -f *.aux *.cp *.fn *.ky *.log *.pg - @rm -f *.backup *.ilg *.lof *.lot - @rm -f *.cdx *.cnd *.ddx *.ddn *.fdx *.fnd *.ind *.sdx *.snd - @rm -f *.dnd *.old *.out - @rm -f ${DOC}/*.gif ${DOC}/*.jpg ${DOC}/*.eps - @rm -f ${DOC}/*.aux ${DOC}/*.cp ${DOC}/*.fn ${DOC}/*.ky ${DOC}/*.log ${DOC}/*.pg - @rm -f ${DOC}/*.backup ${DOC}/*.ilg ${DOC}/*.lof ${DOC}/*.lot - @rm -f ${DOC}/*.cdx ${DOC}/*.cnd ${DOC}/*.ddx ${DOC}/*.ddn ${DOC}/*.fdx ${DOC}/*.fnd ${DOC}/*.ind ${DOC}/*.sdx ${DOC}/*.snd - @rm -f ${DOC}/*.dnd ${DOC}/*.old ${DOC}/*.out - @rm -f ${DOC}/WARNINGS - - -clean: - @rm -f 1 2 3 *.tex~ - @rm -f *.png *.gif *.jpg *.eps - @rm -f *.pdf *.aux *.cp *.fn *.ky *.log *.pg - @rm -f *.html *.backup *.ps *.dvi *.ilg *.lof *.lot - @rm -f *.cdx *.cnd *.ddx *.ddn *.fdx *.fnd *.ind *.sdx *.snd - @rm -f *.dnd imagename_translations - @rm -f *.old WARNINGS *.out *.toc *.idx - @rm -f ${DOC}i-*.tex - @rm -rf ${DOC} - - -distclean: clean - @rm -f images.pl labels.pl internals.pl - @rm -f Makefile version.tex diff --git a/docs/manuals/es/concepts/Makefile.in b/docs/manuals/es/concepts/Makefile.in deleted file mode 100644 index 6a582d84..00000000 --- a/docs/manuals/es/concepts/Makefile.in +++ /dev/null @@ -1,141 +0,0 @@ -# -# -# Makefile for LaTeX -# -# To build everything do -# make tex -# make web -# make html -# make dvipdf -# -# or simply -# -# make -# -# for rapid development do: -# make tex -# make show -# -# -# If you are having problems getting "make" to work, debugging it is -# easier if can see the output from latex, which is normally redirected -# to /dev/null. To see it, do the following: -# -# cd docs/manual -# make tex -# latex bacula.tex -# -# typically the latex command will stop indicating the error (e.g. a -# missing \ in front of a _ or a missing { or ] ... -# -# The following characters must be preceded by a backslash -# to be entered as printable characters: -# -# # $ % & ~ _ ^ \ { } -# - -IMAGES=../../../images - -DOC=concepts - -first_rule: all - -all: tex web dvipdf mini-clean - -.SUFFIXES: .tex .html -.PHONY: -.DONTCARE: - - -tex: - @./update_version - @echo "Making version `cat version.tex`" - @cp -fp ${IMAGES}/hires/*.eps . - @touch ${DOC}i-dir.tex ${DOC}i-fd.tex ${DOC}i-sd.tex \ - ${DOC}i-console.tex ${DOC}i-general.tex - latex -interaction=batchmode ${DOC}.tex - makeindex ${DOC}.idx -o ${DOC}.ind 2>/dev/null - makeindex ${DOC}.ddx -o ${DOC}.dnd >/dev/null 2>/dev/null - makeindex ${DOC}.fdx -o ${DOC}.fnd >/dev/null 2>/dev/null - makeindex ${DOC}.sdx -o ${DOC}.snd >/dev/null 2>/dev/null - makeindex ${DOC}.cdx -o ${DOC}.cnd >/dev/null 2>/dev/null - latex -interaction=batchmode ${DOC}.tex - -pdf: - @echo "Making pdfm" - @cp -fp ${IMAGES}/hires/*.eps . - dvipdfm -p a4 ${DOC}.dvi - -dvipdf: - @echo "Making dvi to pdf" - @cp -fp ${IMAGES}/hires/*.eps . - dvipdf ${DOC}.dvi ${DOC}.pdf - -html: - @echo " " - @echo "Making html" - @cp -fp ${IMAGES}/*.eps . - @rm -f next.eps next.png prev.eps prev.png up.eps up.png - @(if [ -f imagename_translations ] ; then \ - ./translate_images.pl --from_meaningful_names ${DOC}.html; \ - fi) - latex2html -white -no_subdir -split 0 -toc_stars -white \ - -init_file latex2html-init.pl ${DOC} >tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}.html - (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} .; done) - @echo "Done making html" - -web: - @echo "Making web" - @mkdir -p ${DOC} - @cp -fp ${IMAGES}/*.eps . - @rm -f next.eps next.png prev.eps prev.png up.eps up.png - @cp -fp ${IMAGES}/*.eps ${DOC}/ - @cp -fp ${IMAGES}/*.eps ${IMAGES}/*.png ${DOC}/ - @rm -f ${DOC}/xp-*.png - @rm -f ${DOC}/next.eps ${DOC}/next.png ${DOC}/prev.eps ${DOC}/prev.png ${DOC}/up.eps ${DOC}/up.png - @rm -rf ${DOC}/*.html - latex2html -split 3 -local_icons -t "Bacula Concepts and Overview Guide" -long_titles 4 \ - -toc_stars -contents_in_nav -init_file latex2html-init.pl -white ${DOC} >tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}/Bacula_Concep_Overvi_Guide.html - (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} .; done) - @echo "Done making web" -show: - xdvi ${DOC} - -texcheck: - ./check_tex.pl ${DOC}.tex - -main_configs: - pic2graph -density 100 main_configs.png - -mini-clean: - @rm -f 1 2 3 *.tex~ - @rm -f *.gif *.jpg *.eps - @rm -f *.aux *.cp *.fn *.ky *.log *.pg - @rm -f *.backup *.ilg *.lof *.lot - @rm -f *.cdx *.cnd *.ddx *.ddn *.fdx *.fnd *.ind *.sdx *.snd - @rm -f *.dnd *.old *.out - @rm -f ${DOC}/*.gif ${DOC}/*.jpg ${DOC}/*.eps - @rm -f ${DOC}/*.aux ${DOC}/*.cp ${DOC}/*.fn ${DOC}/*.ky ${DOC}/*.log ${DOC}/*.pg - @rm -f ${DOC}/*.backup ${DOC}/*.ilg ${DOC}/*.lof ${DOC}/*.lot - @rm -f ${DOC}/*.cdx ${DOC}/*.cnd ${DOC}/*.ddx ${DOC}/*.ddn ${DOC}/*.fdx ${DOC}/*.fnd ${DOC}/*.ind ${DOC}/*.sdx ${DOC}/*.snd - @rm -f ${DOC}/*.dnd ${DOC}/*.old ${DOC}/*.out - @rm -f ${DOC}/WARNINGS - - -clean: - @rm -f 1 2 3 *.tex~ - @rm -f *.png *.gif *.jpg *.eps - @rm -f *.pdf *.aux *.cp *.fn *.ky *.log *.pg - @rm -f *.html *.backup *.ps *.dvi *.ilg *.lof *.lot - @rm -f *.cdx *.cnd *.ddx *.ddn *.fdx *.fnd *.ind *.sdx *.snd - @rm -f *.dnd imagename_translations - @rm -f *.old WARNINGS *.out *.toc *.idx - @rm -f ${DOC}i-*.tex - @rm -rf ${DOC} - - -distclean: clean - @rm -f images.pl labels.pl internals.pl - @rm -f Makefile version.tex diff --git a/docs/manuals/es/concepts/bimagemgr.bix b/docs/manuals/es/concepts/bimagemgr.bix deleted file mode 100644 index 8c18e201..00000000 --- a/docs/manuals/es/concepts/bimagemgr.bix +++ /dev/null @@ -1,7 +0,0 @@ -\indexentry {Bimagemgr }{2} -\indexentry {bimagemgr!Installation }{2} -\indexentry {bimagemgr Installation }{2} -\indexentry {bimagemgr!Usage }{4} -\indexentry {bimagemgr Usage }{4} -\indexentry {GNU Free Documentation License}{7} -\indexentry {License!GNU Free Documentation}{7} diff --git a/docs/manuals/es/concepts/dvd.tex b/docs/manuals/es/concepts/dvd.tex deleted file mode 100644 index 1860cc36..00000000 --- a/docs/manuals/es/concepts/dvd.tex +++ /dev/null @@ -1,329 +0,0 @@ -%% -%% - -\chapter{DVD Volumes} -\label{_DVDChapterStart} -\index[general]{DVD Volumes} -\index[general]{Writing DVDs} -\index[general]{DVD Writing} -\index[general]{Volumes!DVD} - -Bacula allows you to specify that you want to write to DVD. However, -this feature is implemented only in version 1.37 or later. -You may in fact write to DVD+RW, DVD+R, DVD-R, or DVD-RW -media. The actual process used by Bacula is to first write -the image to a spool directory, then when the Volume reaches -a certain size or, at your option, at the end of a Job, Bacula -will transfer the image from the spool directory to the -DVD. The actual work of transferring the image is done -by a script {\bf dvd-handler}, and the heart of that -script is a program called {\bf growisofs} which allows -creating or adding to a DVD ISO filesystem. - -You must have {\bf dvd+rw-tools} loaded on your system for DVD writing to -work. Please note that the original {\bf dvd+rw-tools} package does {\bf -NOT} work with Bacula. You must apply a patch which can be found in the -{\bf patches} directory of Bacula sources with the name -{\bf dvd+rw-tools-5.21.4.10.8.bacula.patch} for version 5.21 of the tools, -or patch {bf dvd+rw-tools-6.1.bacula.patch} if you have version 6.1 -on your system. Unfortunately, this requires you to build the dvd\_rw-tools -from source. - -Note, some Linux distros such as Debian dvd+rw-tools-7.0-4 package already -have the patch applied, so please check. - -The fact that Bacula cannot use the OS to write directly -to the DVD makes the whole process a bit more error prone than -writing to a disk or a tape, but nevertheless, it does work if you -use some care to set it up properly. However, at the current time -(version 1.39.30 -- 12 December 2006) we still consider this code to be -BETA quality. As a consequence, please do careful testing before relying -on DVD backups in production. - -The remainder of this chapter explains the various directives that you can -use to control the DVD writing. - -\label{DVDdirectives} -\section{DVD Specific SD Directives} -\index[general]{Directives!DVD} -\index[general]{DVD Specific SD Directives } - -The following directives are added to the Storage daemon's -Device resource. - -\begin{description} - -\item [Requires Mount = {\it Yes|No}] - \index[sd]{Requires Mount } - You must set this directive to {\bf yes} for DVD-writers, and to {\bf no} for - all other devices (tapes/files). This directive indicates if the device - requires to be mounted using the {\bf Mount Command}. - To be able to write a DVD, the following directives must also be - defined: {\bf Mount Point}, {\bf Mount Command}, {\bf Unmount Command} and - {\bf Write Part Command}. - -\item [Mount Point = {\it directory}] - \index[sd]{Mount Point} - Directory where the device can be mounted. - -\item [Mount Command = {\it name-string}] - \index[sd]{Mount Command} - Command that must be executed to mount the device. Although the - device is written directly, the mount command is necessary in - order to determine the free space left on the DVD. Before the command is - executed, \%a is replaced with the Archive Device, and \%m with the Mount - Point. - - Most frequently, you will define it as follows: - -\footnotesize -\begin{verbatim} - Mount Command = "/bin/mount -t iso9660 -o ro %a %m" -\end{verbatim} -\normalsize - -However, if you have defined a mount point in /etc/fstab, you might be -able to use a mount command such as: - -\footnotesize -\begin{verbatim} - Mount Command = "/bin/mount /media/dvd" -\end{verbatim} -\normalsize - - -\item [Unmount Command = {\it name-string}] - \index[sd]{Unmount Command} - Command that must be executed to unmount the device. Before the command is - executed, \%a is replaced with the Archive Device, and \%m with the Mount - Point. - - Most frequently, you will define it as follows: - -\footnotesize -\begin{verbatim} - Unmount Command = "/bin/umount %m" -\end{verbatim} -\normalsize - -\item [Write Part Command = {\it name-string}] - \index[sd]{Write Part Command } - Command that must be executed to write a part to the device. Before the - command is executed, \%a is replaced with the Archive Device, \%m with the - Mount Point, \%e is replaced with 1 if we are writing the first part, - and with 0 otherwise, and \%v with the current part filename. - - For a DVD, you will most frequently specify the Bacula supplied {\bf - dvd-handler} script as follows: - -\footnotesize -\begin{verbatim} - Write Part Command = "/path/dvd-handler %a write %e %v" -\end{verbatim} -\normalsize - - Where {\bf /path} is the path to your scripts install directory, and - dvd-handler is the Bacula supplied script file. - This command will already be present, but commented out, - in the default bacula-sd.conf file. To use it, simply remove - the comment (\#) symbol. - - -\item [Free Space Command = {\it name-string}] - \index[sd]{Free Space Command } - Command that must be executed to check how much free space is left on the - device. Before the command is executed,\%a is replaced with the Archive - Device. - - For a DVD, you will most frequently specify the Bacula supplied {\bf - dvd-handler} script as follows: - -\footnotesize -\begin{verbatim} - Free Space Command = "/path/dvd-handler %a free" -\end{verbatim} -\normalsize - - Where {\bf /path} is the path to your scripts install directory, and - dvd-handler is the Bacula supplied script file. - If you want to specify your own command, please look at the code in - dvd-handler to see what output Bacula expects from this command. - This command will already be present, but commented out, - in the default bacula-sd.conf file. To use it, simply remove - the comment (\#) symbol. - - If you do not set it, Bacula will expect there is always free space on the - device. - -\end{description} - -In addition to the directives specified above, you must also -specify the other standard Device resource directives. Please see the -sample DVD Device resource in the default bacula-sd.conf file. Be sure -to specify the raw device name for {\bf Archive Device}. It should -be a name such as {\bf /dev/cdrom} or {\bf /media/cdrecorder} or -{\bf /dev/dvd} depending on your system. It will not be a name such -as {\bf /mnt/cdrom}. - -Finally, for {\bf growisofs} to work, it must be able to lock -a certain amount of memory in RAM. If you have restrictions on -this function, you may have failures. Under {\bf bash}, you can -set this with the following command: - -\footnotesize -\begin{verbatim} -ulimit -l unlimited -\end{verbatim} -\normalsize - -\section{Edit Codes for DVD Directives} -\index[general]{Directives!DVD Edit Codes} -\index[general]{Edit Codes for DVD Directives } - -Before submitting the {\bf Mount Command}, {\bf Unmount Command}, -{\bf Write Part Command}, or {\bf Free Space Command} directives -to the operating system, Bacula performs character substitution of the -following characters: - -\footnotesize -\begin{verbatim} - %% = % - %a = Archive device name - %e = erase (set if cannot mount and first part) - %n = part number - %m = mount point - %v = last part name (i.e. filename) -\end{verbatim} -\normalsize - - - -\section{DVD Specific Director Directives} -\index[general]{Directives!DVD} -\index[general]{DVD Specific Director Directives } - -The following directives are added to the Director's Job resource. - -\label{WritePartAfterJob} -\begin{description} -\item [Write Part After Job = \lt{}yes|no\gt{}] - \index[dir]{Write Part After Job } - If this directive is set to {\bf yes} (default {\bf no}), the - Volume written to a temporary spool file for the current Job will - be written to the DVD as a new part file - will be created after the job is finished. - - It should be set to {\bf yes} when writing to devices that require a mount - (for example DVD), so you are sure that the current part, containing - this job's data, is written to the device, and that no data is left in - the temporary file on the hard disk. However, on some media, like DVD+R - and DVD-R, a lot of space (about 10Mb) is lost everytime a part is - written. So, if you run several jobs each after another, you could set - this directive to {\bf no} for all jobs, except the last one, to avoid - wasting too much space, but to ensure that the data is written to the - medium when all jobs are finished. - - This directive is ignored for devices other than DVDs. -\end{description} - - - -\label{DVDpoints} -\section{Other Points} -\index[general]{Points!Other } -\index[general]{Other Points } - -\begin{itemize} -\item Please be sure that you have any automatic DVD mounting - disabled before running Bacula -- this includes auto mounting - in /etc/fstab, hotplug, ... If the DVD is automatically - mounted by the OS, it will cause problems when Bacula tries - to mount/unmount the DVD. -\item Please be sure that you the directive {\bf Write Part After Job} - set to {\bf yes}, otherwise the last part of the data to be - written will be left in the DVD spool file and not written to - the DVD. The DVD will then be unreadable until this last part - is written. If you have a series of jobs that are run one at - a time, you can turn this off until the last job is run. -\item The current code is not designed to have multiple simultaneous - jobs writing to the DVD. As a consequence, please ensure that - only one DVD backup job runs at any time. -\item Writing and reading of DVD+RW seems to work quite reliably - provided you are using the patched dvd+rw-mediainfo programs. - On the other hand, we do not have enough information to ensure - that DVD-RW or other forms of DVDs work correctly. -\item DVD+RW supports only about 1000 overwrites. Every time you - mount the filesystem read/write will count as one write. This can - add up quickly, so it is best to mount your DVD+RW filesystem read-only. - Bacula does not need the DVD to be mounted read-write, since it uses - the raw device for writing. -\item Reformatting DVD+RW 10-20 times can apparently make the medium - unusable. Normally you should not have to format or reformat - DVD+RW media. If it is necessary, current versions of growisofs will - do so automatically. -\item We have had several problems writing to DVD-RWs (this does NOT - concern DVD+RW), because these media have two writing-modes: {\bf - Incremental Sequential} and {\bf Restricted Overwrite}. Depending on - your device and the media you use, one of these modes may not work - correctly (e.g. {\bf Incremental Sequential} does not work with my NEC - DVD-writer and Verbatim DVD-RW). - - To retrieve the current mode of a DVD-RW, run: -\begin{verbatim} - dvd+rw-mediainfo /dev/xxx -\end{verbatim} - where you replace xxx with your DVD device name. - - {\bf Mounted Media} line should give you the information. - - To set the device to {\bf Restricted Overwrite} mode, run: -\begin{verbatim} - dvd+rw-format /dev/xxx -\end{verbatim} - If you want to set it back to the default {\bf Incremental Sequential} mode, run: -\begin{verbatim} - dvd+rw-format -blank /dev/xxx -\end{verbatim} - -\item Bacula only accepts to write to blank DVDs. To quickly blank a DVD+/-RW, run - this command: -\begin{verbatim} - dd if=/dev/zero bs=1024 count=512 | growisofs -Z /dev/xxx=/dev/fd/0 -\end{verbatim} - Then, try to mount the device, if it cannot be mounted, it will be considered - as blank by Bacula, if it can be mounted, try a full blank (see below). - -\item If you wish to blank completely a DVD+/-RW, use the following: -\begin{verbatim} - growisofs -Z /dev/xxx=/dev/zero -\end{verbatim} - where you replace xxx with your DVD device name. However, note that this - blanks the whole DVD, which takes quite a long time (16 minutes on mine). -\item DVD+RW and DVD-RW support only about 1000 overwrites (i.e. don't use the -same medium for years if you don't want to have problems...). - -To write to the DVD the first time use: -\begin{verbatim} - growisofs -Z /dev/xxx filename -\end{verbatim} - -To add additional files (more parts use): - -\begin{verbatim} - growisofs -M /dev/xxx filename -\end{verbatim} - -The option {\bf -use-the-force-luke=4gms} was added in growisofs 5.20 to -override growisofs' behavior of always checking for the 4GB limit. -Normally, this option is recommended for all Linux 2.6.8 kernels or -greater, since these newer kernels can handle writing more than 4GB. -See below for more details on this subject. - -\item For more information about DVD writing, please look at the -\elink{dvd+rw-tools homepage}{http://fy.chalmers.se/~appro/linux/DVD+RW/}. - -\item According to bug \#912, bscan cannot read multi-volume DVDs. This is -on our TODO list, but unless someone submits a patch it is not likely to be -done any time in the near future. (9 Sept 2007). - -\end{itemize} diff --git a/docs/manuals/es/concepts/general.tex b/docs/manuals/es/concepts/general.tex deleted file mode 100644 index 5495209f..00000000 --- a/docs/manuals/es/concepts/general.tex +++ /dev/null @@ -1,454 +0,0 @@ - -%% -%% - - -\chapter{Qué es Bacula?} \label{GeneralChapter} \index{Bacula!Que es} \index{Qué es Bacula?} - -Bacula es un conjunto de programas de computadores, que permiten al administrador -de sistemas administrar backups, restauraciones y verificación de datos a través -de la red de computadores de diversas maneras. Puede correr en una sola computadora -y se pueden hacer respaldos a varios tipos de media, que incluyen cintas y disco. - -En términos técnicos, es un programa de respaldo en red basado en ambientes -Cliente/Servidor. Bacula es relativamente fácil de utilizar y muy eficiente, -además que ofrece muchas funcionalidades avanzadas de administración de almacenamiento, -que hacen mas fácil la búsqueda y recuperación de archivos dañados o perdidos. -Gracias a su diseño modular, puede escalar desde una pequeña computadores hasta -sistemas conformados por cientos de computadoras, localizadas en una red muy -amplia. - - -\section{Quién necesita Bacula?} - -\index{Quién necesita Bacula?} \index{Bacula!Quién necesita} - -Si actualmente estás utilizando un programa como tar, dump, cpio o rsync para -hacer respaldos de los datos de sus computadores o servidores, y le gustaría -una solución en red, con mayores facilidades y un servicio de catálogo, Bacula -suministrara estas funcionalidades que usted quiere. Sin embargo, si usted tiene -poco tiempo utilizando sistemas UNIX o Linux o no tiene mucha experiencia con -un paquete sofisticado de respaldo, el proyecto Bacula no recomienda el uso -de la aplicación, puesto que puede ser mas complicado que la configuración y -uso de los comandos tar o dump. - -Si usted quiere que Bacula se comporte como los programas mencionados con anterioridad -y que este escriba sobre cualquier cinta que usted coloque en la unidad del -drive, se podría conseguir con muchas dificultades. Bacula esta diseñado para -proteger la data siguiendo las reglas que los administradores indiquen, y esto -significa reutilizar la cinta como el ultimo recurso. Aunque es posible \textquotedblleft{}forzar\textquotedblright{} -a Bacula a escribir sobre cualquier cinta que se encuentre en la unidad, para -el uso de estas opciones es preferible y mas sencillo, utilizar un programa -simple para manejar esta clase de operaciones. - -Si se desea un programa de backup que pueda escribir a multilples volúmenes, -es decir, no existan limitaciones en cuanto a la capacidad de las unidades de -tape, Bacula puede cumplir con todas sus necesidades. Adicionalmente, un gran -numero de usuarios de Bacula reportan que este es mas simple de configurar y -utilizar que otros programas equivalentes. - -Por ultimo, si actualmente esta utilizando una aplicación comercial de respaldo -y recuperación, tales como Legato Networker, ARCserveIT. Arkeia, Data Protector -o PerfectBackup+, usted podría estar interesado en Bacula, el cual suministra -muchas de las funcionalidades y es un software libre disponible bajo la licencia -de software GNU Versión 2. - - -\section{Componentes de Bacula o Servicios } - -\index{Componentes de Bacula o Servicios} \index{Servicios!Componentes de Bacula o} - -Bacula se compone de los cinco componentes mayores siguientes: Director, consola, -file, storage y servicios de monitoreo (monitor). - -\addcontentsline{lof}{figure}{Bacula Applications} \includegraphics[bb = 0 0 200 100, draft, type=eps]{C:/idir bacula-applications.eps} -(Gracias a Aristedes Maniatis por este grafico y el siguiente) % TODO: move the thanks to Credits section in preface - - - -\subsection*{Bacula Director} - -\label{DirDef} El servicio de Bacula Director es el programa que supervisa -todas las operaciones de backup, recuperaciones, verificaciones y almacenamiento -(archive). El administrador de sistemas utiliza el Bacula Director para planificar -los backups y recuperaciones de archivos. El Director corre como un demonio -(o servicio) en según plan. % TODO: tell reader where this Developer's Guide is at? - \label{UADef} - - -\subsection*{Consola de Bacula} - -El servicio de la consola de Bacula es el programa que permite a los administradores -o usuarios comunicarse con el Bacula Director que esta en ejecución, y esta -disponible en tres versiones: consola de texto (linea de comandos), interfaz -GNOME y de interfaz gráfica wxWidgets. La primera, y la mas simple, consiste -en correr el programa de consola (bconsole) en una ventana de comandos, por -ejemplo, una interfaz TTY. La mayoría de los administradores encontraran que -esta completamente adecuada para las tareas de admininistracion. La segunda -versión es una basada en interfaz GNOME, que no es tan completa como la de texto, -pero es funcional y permite realizar la mayoría de las tareas que la de comandos. -La tercera versión es una GUI wxWidgets que permite restauración interactiva -de archivos. También cuenta con muchas de las opciones de la consola de texto, -permite la complementacion de comandos con tabuladores y ofrece ayuda en linea -en relación al comando que se esta escribiendo. Para mayores informaciones vea -la \ilink{Bacula Console Design Document}{ConsoleChapter}. - - -\subsection*{Bacula File} - -\label{FDDef} El servicio de Bacula file (también conocido como el programa -cliente), es el software que se instala en el equipo al cual se le hará backup. -Es especifico para cada sistema operativo en el cual corre y es el responsable -por suministrar los atributos de archivos y los datos cuando sean requeridos -por el Director. También es responsable por el file system en el cual se hace -la restauración los atributos de archivos y datos durante una operación de restore. -Este programa corre como un demonio o servicio en la maquina a la cual se le -hace respaldo. En adición a los demonios de Unix y Linux, hay un demonio para -Windows file (normalmente distribuido en formato de archivos binarios), y corre -en las siguientes versiones de Windows (NT, XP, 2000, 2003, y posiblemente en -Me y 98). - - -\subsection*{Bacula Storage} - -\label{SDDef} El servicio de Bacula storage consiste en el programa de software -que realiza el almacenamiento y recuperación de los atributos de archivos y -datos al medio físico de backup o volumen. En otras palabras, es el responsable -por la lectura y escritura en los tapes (u otro media de almacenamiento, como -archivos, DVD, USB, entre otros). El servicio de storage corre como un demonio -en el equipo que tiene conectado y configurado el dispositivo de backup (por -ejemplo, una unidad de cinta). - - -\subsection*{Catálogo} - -\label{DBDefinition} El servicio de catalogo comprende el programa de software -responsable del mantenimiento de la base de datos de volúmenes y archivos índices -para todos los archivos, a los cuales se les ha hecho respaldo. Permite a los -administradores y usuarios, localizar rápidamente y recuperar cualquier objeto -que se requiera. El catalogo distingue a Bacula de un programa de backup del -sistema operativo, tales como tar, cpio o dump, porque mantiene un registro -de todos los volúmenes utilizados, los jobs ejecutados y todos los archivos -grabados, permitiendo, de esta manera, una restauración eficiente y administración -de volúmenes. Bacula , actualmente, soporta tres tipos diferentes de bases de -datos: MySQL, PostgrSQL y SQLite, el cual debe ser seleccionado cuando se instala -el software. - -Las tres bases de datos soportadas actualmente, proveen un conjunto de funcionalidades, -que incluyen indexamiento rápido, consultas arbitrarias y seguridad. - -Aunque el proyecto de Bacula planea brindar soporte para otras bases de datos -SQL, las implementaciones actuales soportan únicamente MySQL, PostgreSQL y SQLite. -Para mayores detalles técnicos y de portabilidad, revisar el documento de Diseño -de Servicios de Catálogo de desarrolladores. - -Los paquetes de MySQL y PostgreSQL están disponibles para varios sistemas operativos. -Alternativamente, la instalación desde los fuentes es muy fácil, revisar el -enlace del capítulo\ilink{ Installing and Configuring MySQL}{MySqlChapter} -de este documento para los detalles. Para mayor información de MySQL, por favor -revise: \elink{www.mysql.com}{http://www.mysql.com}. De igual manera, revise -el capítulo\ilink{ Installing and Configuring PostgreSQL}{PostgreSqlChapter} -de este documento para mayores detalles. Para mas información de PostgreSQL, -observe: \elink{www.postgresql.org}{http://www.postgresql.org}. - -La configuración y construcción de SQLite es mas fácil. Para los detalles de -dicha configuración, por favor revise el capítulo\ilink{ Installing and Configuring -SQLite}{SqlLiteChapter} de este documento. - - -\subsection*{Bacula Monitor} - -\label{MonDef} Es el servicio que permite a los administradores o usuarios -observar el estado actual de los procesos de Bacula, tales como Director, file -y storage. Actualmente, únicamente una versión en GTK+ esta disponible, la cual -trabaja con GNOME, KDE o cualquier administrador de ventanas que soporte el -sistema de bandeja estándar FreeDesktop.org. - -Para realizar una operación de respaldo y recuperación exitosa, los cuatro demonios -siguientes deben estar configurados y en ejecución: el Director, el file, el -storage y el catalogo (MySQL, PostgreSQL o SQLite). - - -\section{Configuración de Bacula } - -\index{Configuración!Bacula} \index{Configuración de Bacula} - -Para que Bacula pueda entender su sistema, a cuáles clientes se les hará backup -y la manera de ejecutar esta tarea, se debe crear un conjunto de archivos de -configuración que contengan recursos (u objetos). La siguiente imagen muestra -un esquema de este proceso: - -\addcontentsline{lof}{figure}{Bacula Objects} \includegraphics[bb = 0 0 200 100, draft, type=eps]{C:/idir bacula-objects.eps} - - -\section{Convenciones utilizadas en este documento} - -\index{Conventions Used in this Document} \index{Document!Conventions Used in this} - -Bacula está en estado de evolución, y como consecuencia, este manual no siempre -estará acorde con el código. Si un item de este manual está precedido por un -asterisco ({*}), indica que la funcionalidad descrita no está implementada. -Si está precedido por un signo mas (+), indica que la funcionalidad puede estar -implementada parcialmente. - -Si usted está leyendo este manual y este es suministrado como una versión liberada -del software, lo mencionado en el párrafo anterior se mantiene. En cambio, si -está leyendo la versión online del manual, \elink{ www.bacula.org}{http://www.bacula.org}, -por favor, tenga en mente que este describe la versión actual en desarrollo -(en CVS), y puede contener funcionalidades que no estén en la versión liberada. -De igual manera, la documentación generalmente va del lado del código. - - -\section{Inicio rapido (Quick Start)} - -\index{Quick Start} \index{Start!Quick} - -Para hacer Bacula se instale y corra en forma rápida, el autor recomienda leer -la sección de Terminología, que se muestra mas abajo, luego revisar el siguiente -capítulo titulado \ilink{El estado actual de Bacula}{CapituloEstado}, seguidamente -el capítulo \ilink{Iniciando con Bacula}{QuickStartChapter}, el cual le -brindará un procedimiento que permite configurar y correr Bacula rápidamente. -Luego de esto, se debería proceder con el capítulo \ilink{Instalando Bacula}{InstallChapter}, -luego \ilink{Como configurar Bacula}{ConfigureChapter}, y finalmente el -el capítulo de \ilink{Corriendo Bacula}{TutorialChapter}. - - -\section{Terminología} - -\index{Terminología} -\begin{description} -\item [{Administrador}] \index{Administrador} La persona o personas responsables -por la adminitracion del sistema Bacula. -\item [{Backup}] \index{Backup} En Bacula, el termino backup se refiere a un Job -que salva archivos -\item [{Bootstrap}] File \index{Bootstrap File} Es un archivo ASCII que contiene -una forma compacta de comandos que permiten a Bacula o un utilitario de extracción -de archivos stand-alone (bextract), restaurar el contenido de uno o mas volúmenes, -por ejemplo, el estado actual de un sistema al cual se le hizo backup. Con un -archivo Bootstrap, Bacula puede restaurar un sistema sin el catalogo. Se puede -crear un archivo Bootstrap desde el catalogo para extraer cualquier archivo(s) -que se desee(n). -\item [{Catalogo}] \index{Catalogo} El catalogo es utilizado para almacenar información -resumida de los Jobs, clientes y archivos a los cuales se les hace backup, así -como en cual volumen o volúmenes La información registrada en el catalogo, permite -a los usuarios y administradores determinar los Jobs se ejecutaron, así como -su estado y las características importantes de los objetos respaldados, y lo -mas importante, es un recurso fundamental durante las operaciones de restauración -y recuperación El catalogo es un recurso online, pero no contiene los datos -de los archivos respaldados. La mayor parte de la información almacenada en -el catalogo, también es almacenada en los volúmenes de backup (como las cintas). -De hecho, las cintas tendrán una copia de los datos del archivo, así como sus -atributos particulares. - - -El uso del catálogo, representa una de las características fundamentales de -Bacula, que la distingue de los demás programas de backup y los comandos del -sistema operativo, tales como tar o cpio. - -\item [{Cliente}] \index{Cliente} En términos de Bacula, la palabra cliente se refiere -a la maquina a la cual se le esta haciendo backup, y es sinónimo para los servicios -o demonios de file, y frecuentemente, se denota como FD. Un cliente, se define -en un recurso en los archivos de configuración -\item [{Consola}] \index{Consola} Es un programa de interfaz con el Director, que -permite a los usuarios y administradores controlar los procesos de Bacula. -\item [{Demonio}] \index{Demonio} En la terminología de UNIX, es un programa que -esta en ejecución permanente en el background que permite llevar a cabo una -tarea especifica. En los sistemas Windows, los demonios se denominan servicios. -\item [{Directiva}] \index{Directiva} El termino Directiva, se utiliza para hacer -referencia a una declaración o un registro dentro de un recurso en un archivo -de configuración que indica una definición especifica. Por ejemplo, la directiva -Name define el nombre de un Recurso. -\item [{Director}] \index{Director} El demonio principal de los servicios de Bacula -que planifica y dirige todas las operaciones. Ocasionalmente, el proyecto se -refiere al Director como DIR. -\item [{Diferencial}] \index{Diferencial} Es un backup que incluye todos los archivos -modificados desde la ejecución del ultimo respaldo de tipo completo (full). -Hay que tener en cuenta que otros programas de respaldo, pueden definir este -backup de manera diferente. -\item [{Atributos}] \textbf{de Archivos }\index{Atributos de Archivos} Los atributos -de archivos representan toda la información necesaria para identificar un archivo -y todas sus propiedades, tales como tamaño, fecha de creación, permisos, entre -otros. Generalmente, los atributos son manejados completamente por Bacula, por -lo tanto el usuario no necesita conocer estos valores. Los atributos no incluyen -los datos con la información de los archivos. -\item [{File}] \textbf{Daemon} \index{File Daemon} Se refiere al demonio que esta -en ejecución en los computadores a los cuales se les hace backup. También se -conoce como servicios de Archivo, y algunas veces como los servicios del cliente -o FD. -\item [{FileSet}] \index{a name} Un FileSet es un recurso definido en los archivos -de configuración, que indica los archivos que serán respaldados. Este consiste -de una lista de archivos o Directorios, una lista de archivos excluidos y como -estos serán almacenados (compresión, encriptacion, firmas digitales). Para mayor -informacion vea \ilink{FileSet Resource definition}{FileSetResource} in -the Director chapter of this document. -\item [{Incremental}] \index{Incremental} Un backup que incluye todos los archivos -modificados desde el ultimo respaldo full, differential o incremental ejecutado. -Normalmente, se define con la directiva \textbf{Level} dentro de la configuración -del recurso Job, o en el recurso de Schedule. - - -\label{JobDef} - -\item [{Job}] \index{a name} Un Job es un recurso de configuración que define el -trabajo que Bacula debe realizar para ejecutar un backup o un restore para un -cliente particular. Esto consiste en el \textbf{Tipo} (backup, restore, verificar, -etc), el \textbf{Nivel} (full, incremental,differential), el \textbf{FileSet} -y el \textbf{Storage}, para los archivos a los cuales se les hará backup (dispositivo -de almacenamientos, medias para el pool). Para mayores detalles, vea the \ilink{Job -Resource definition}{JobResource} in the Director chapter of this document. -\item [{Monitor}] \index{Monitor} Es un programa que interactúa con todos los demonios -y permite al usuario o administrador monitorizar el estado de Bacula. -\item [{Resource}] \index{Resource} Un recurso es una parte de un archivo de configuración -que define una unidad especifica de información que esta disponible en Bacula. -Consiste de varias directivas (declaraciones individuales de configuración). -Por ejemplo, el recurso \textbf{Job} define todas las propiedades especificas -de un Job: nombre, schedule, volumen del pool, tipo de backup, nivel de backup, -entre otros. -\item [{Restore}] \index{Restore} Es un recurso de configuración que describe la -operación de recuperación de un archivo desde un medio de backup. Es lo contrario -a grabar, excepto que en la mayoría de los casos, una restauración (restore) -normalmente tendrá un número pequeño de archivos a recuperar, mientras que un -backup, abarca todos los archivos en un sistema. Después de una falla de disco, -se puede utilizar a Bacula para realizar una restauración completa de todos -los archivos que en encontraban en el equipo. -\item [{Schedule}] \index{Schedule} Es un recurso de configuración que define cuando -un Job de Bacula tiene planificada su ejecución Para utilizar el schedule, en -el recurso de Job se hace referencia al nombre del schedule. Para mayores detalles, -vea \ilink{Schedule Resource definition}{ScheduleResource} in the Director -chapter of this document. -\item [{Servicio}] \index{Servicio} Es un programa que permanece de manera permanente -en memoria esperando instrucciones. En entornos UNIX, los servicios se conocen -como \textbf{demonios}. -\item [{Almacenamiento}] \textbf{de Coordenada}s \index{Almacenamiento de Coordenadas} -La información retornada desde los servicios de almacenamiento que localiza -de manera única un archivo en un dispositivo de backup. Consiste de dos partes: -una parte contiene cada archivo grabado y la otra contiene el Job completo. -Normalmente, esta información es salvada en el catalogo, por lo tanto el usuario -no necesita tener conocimiento especifico de estas coordenadas. Adicionalmente, -incluyen los atributos de archivos (ver abajo) as la ubicación única de la información -en el volumen de respaldo. -\item [{Storage}] \textbf{Daemon} \index{Storage Daemon} Algunas veces se refiere -como el SD, y es el código que escribe los atributos y data al volumen de almacenamiento -(generalmente, disco o cinta). -\item [{Sesión}] \index{Sesión} Generalmente, se refiere a la conversación interna -entre el demonio del cliente y el demonio de almacenamiento. El demonio del -cliente abre una \textbf{sesión} con el demonio de almacenamiento para grabar -un FileSet o para restaurarlo. Una sesión tiene una correspondencia uno a uno -con un Job de Bacula. -\item [{Verificar}] \index{Verificar} Es un Job que compara los atributos actuales -de un archivo con los atributos que han sido previamente almacenados en el catalogo. -Esta funcionalidad puede ser utilizada para la detección de cambios a archivos -críticos del sistema, de manera similar a un chequeo de integridad. Una de las -mayores ventajas del uso de Bacula para esta actividad, es que en el equipo -que se quiere proteger, únicamente corre el servicio de archivo (file daemon), -y el Director, storage daemon y el catalogo residen en una maquina diferente. - - -También puede ser utilizado para chequear que la data del Job mas reciente escrito -en el volumen, coincida con lo que esta almacenado en el catalogo (es decir, -compara los atributos de los archivos), o puede chequear el contenido del volumen -contra los archivos originales en disco. - -\item [{{*}Archivar}] \index{{*}Archivar} Una operación de archivado (archive), -se realiza después del grabado, y consiste en la remoción de los volúmenes en -los cuales la data fue almacenada de las operaciones de respaldo. Los volúmenes -son marcados como Archivados, y ya no pueden ser usados para grabar archivos. -Todos los archivos contenidos en un volumen con estado Archivado son removidos -del catalogo. Todavía no esta implementado. -\item [{Periodo}] \textbf{de Retención} \index{Periodo de Retención} Hay varios -modos de periodos de retención que Bacula reconoce. Los mas importantes son -periodo de retención de \textbf{archivos} (file retention), periodo de retención -de \textbf{Jobs} (Job retention) y periodo de retención de \textbf{volúmenes} -(volume retention). Cada uno de estos periodos de retención aplican al tiempo -que los registros específicos se mantendrán en la base de datos del catalogo. -Esto no debe ser confundido con el tiempo para el cual la data grabada en el -volumen es considerada valida. - - -El periodo de retención de archivos determina el tiempo que los registros de -archivos se mantendrán en el catalogo. Este periodo es importante por dos razones: -la primera, es que el tiempo que los registros permanezcan en la base de datos, -se puede \textquotedblleft{}navegar\textquotedblright{} en estos archivos con -un programa de consola, y hacer restauraciones individuales. Una vez que los -registros son removidos (pruned) del catalogo, los archivos individuales de -un Job de respaldo no pueden ser visualizados en modo de \textquotedblleft{}navegación\textquotedblright{}. - -La segunda razón para seleccionar este periodo de manera cuidadosa, es que estos -registros ocupan la mayor parte del almacenamiento en la base de datos. Por -esto, se debe asegurar que el \textquotedblleft{}pruning\textquotedblright{} -regular de los registros de archivos en el catalogo se ejecute, para evitar -el crecimiento excesivo del mismo. (See the Console \textbf{prune} command for -more details on this subject). - -El periodo de retención de jobs, es el tiempo que los registros de los jobs -permanecerán en el catalogo. Hay que tener presente, que los registros de archivos -están unidos al Job que los grabo. Los registros de archivos pueden ser purgados -dejando los registros de jobs. Es este caso, la información que estará disponible -es la de los jobs ejecutados, y no los detalles de los archivos respaldados. -Generalmente, cuando los jobs son purgados, todos los registros de archivos -también serán purgados. - -El periodo de retención de volumen, representa el mínimo de tiempo que un volumen -sera mantenido antes que sea reutilizado. Bacula, en condiciones normales, nunca -sobreescribe un volumen que contenga la única copia del backup de un archivo. -Bajo condiciones ideales, el catalogo retendría las entradas para todos los -archivos respaldados para todos los volúmenes Una vez que un volumen es sobreescrito, -los archivos que contenía este volumen son removidos automáticamente del catalogo. -Sin embargo, si hay un gran numero de volúmenes para un pool o si un volumen -nunca es reutilizado, la base de datos del catalogo puede llegar a ser enorme. -Para mantener el catalogo con un tamaño manejable, la información del backup -debería ser removida de la base de datos después del periodo de retención de -archivos. Bacula suministra los mecanismos para que el \textquotedblleft{}pruning\textquotedblright{} -se haga de manera automática, de acuerdo a los periodos de retención definidos. - -\item [{Scan}] \index{Scan} Una operación de \textquotedblleft{}scan\textquotedblright{}, -provoca que el contenido de un volumen o un conjunto de volúmenes, sean explorados -(\textquotedblleft{}escaneados\textquotedblright{}). Estos volúmenes y la información -de los archivos que contienen, son restauradas al catalogo. Una vez que la información -esta en el catalogo, los archivos grabados en estos volúmenes puede ser restaurados -fácilmente Esta operación es particularmente útil cuando algunos volúmenes o -jobs han excedido sus periodos de retención y han sido eliminados del catalogo. -El escaneo de la data de los volúmenes al catalogo, se hace utilizando el programa -\textbf{bscan}. See the \ilink{ bscan section}{bscan} of the Bacula Utilities -Chapter of this manual for more details. -\item [{Volume}] \index{Volume} Es una unidad de archivo, generalmente una cinta -o un archivo en disco donde Bacula almacena la data de uno o mas jobs de respaldo. -Todos los volúmenes tienen una etiqueta de software escrita al volumen por Bacula, -para que se pueda identificar cual volumen se esta utilizando realmente (normalmente, -con habrá confusión con los archivos de disco, pero con las cintas, es muy fácil -montar uno equivocado). -\end{description} - -\section{Qué No es Bacula} - -\index{Qué No es Bacula} - -Bacula es una aplicación de backup, restauración y verificación y no un sistema -completo de disaster recovery en si mismo, sin embargo, puede ser una parte -fundamental del mismo y siga las instrucciones incluidas en el \ilink{ Disaster -Recovery}{RescueChapter} Chapter of this manual. - -Con una planificación apropiada, Bacula puede llegar a ser uno de los componentes -centrales del sistema de disaster recovery. Por ejemplo, si se ha creado un -disco de arranque de emergencia y/o un disco de rescate de Bacula para almacenar -la información del particionamiento actual del disco duro, y se cuenta con un -backup completo, es posible recuperar el sistema totalmente, partiendo desde -un disco vacío (\textquotedblleft{}bare metal\textquotedblright{}). - -Si se ha utilizado el registro de \textbf{WriteBootstrap} en los jobs o algún -otro medio para grabar un archivo Bootstrap valido, se puede hacer uso de este -para extraer los archivos que sean necesarios (sin el uso del catalogo o realizando -búsquedas manuales de los archivos a restaurar). - - -\section{Interacción Entre los Servicios de Bacula} - -\index{Interacción Entre los Servicios de Bacula} \index{Servicios!Interacción Entre los de Bacula} - -El siguiente diagrama de bloques muestra la interacción típica entre los servicios -de Bacula para Job de backup. Cada bloque representa un proceso separado (normalmente -un demonio). Generalmente, el Director supervisa el flujo de información y mantiene -el catalogo. - -\addcontentsline{lof}{figure}{Interacción entre los servicios de Bacula} -\includegraphics{\idir flow.eps} diff --git a/docs/manuals/es/concepts/requirements.tex b/docs/manuals/es/concepts/requirements.tex deleted file mode 100644 index 463c8800..00000000 --- a/docs/manuals/es/concepts/requirements.tex +++ /dev/null @@ -1,60 +0,0 @@ -%% -%% - - -\chapter{Requerimientos del sistema} \label{SysReqs} \index{Requerimientos del sistema} -\index{Requerimientos del!Sistema} -\begin{itemize} -\item \textbf{Bacula} ha sido compilado y corre en sistemas OpenSuse Linux, FreeBSD -y Solaris. -\item Requiere GNU C++, en la versión 2.95 o superior para compilar. En general, el -paquete GNU C++ es adicional al paquete de GNU C, y se necesita que ambos estén -instalados. En sistemas Red Hat, el compilador de C++ es parte del paquete rpm -\textbf{gcc-c++}. -\item Hay algunos paquetes de terceros que Bacula puede necesitar. A excepción de -MySQL y PostgreSQL que pueden ser hallados en los releases \textbf{depkgs} y -\textbf{depkgs1}. Sin embargo, la mayoría de los sistemas Linux y FreeBSD los -suministran como paquetes del sistema. -\item Las versiones mínimas para cada una de las bases de datos soportadas son las -siguientes: - -\begin{itemize} -\item MySQL 4.1 -\item PostgreSQL 7.4 -\item SQLite 2.8.16 o SQLite 3 -\end{itemize} -\item Si usted desea generar sus propios binarios Win32, por favor revise el archivo -README.mingw32 en el directorio src/win32. El proyecto Bacula realizo una compilación -cruzada del release de Win32 en Linux. De igual manera, se suministra documentación -para la construcción de la versión para Win32, sin embargo, aunque este proceso -puede resultar complejo, esta es de mucha ayuda en este proceso de desarrollo. -\item \textbf{Bacula} requiere una buena implementación de pthreads (\url{http://en.wikipedia.org/wiki/POSIX_Threads}) -para trabajar. Esto no es el caso para algunos de los sistemas BSD. -\item El código fuente ha sido escrito pensando en la portabilidad y la mayor parte -es compatible con POSIX. Asi, la instalación en cualquier sistema operativo -compatible con POSIX es muy sencilla. -\item El programa de consola en GNOME fue desarrollado y probado en GNOME 2.x. La -versión de GNOME 1.4 no está soportada por completo. -\item El programa de consola de wxWidgets fue desarrollado y probado con la ultima -versión estable ANSI o UNICODE de \elink{wxWidgets}{\url{http://www.wxwidgets.org/}} -(2.6.1). Esta aplicación trabaja muy bien con la versión de Windows y GTK+\_2.x -de wxWidgets, y debería funcionar en otras plataformas soportadas por wxWidgets. -\item El programa de Tray Monitor fue desarrollado en GTK+-2.x. Necesita la versión -de GNOME menor o igual a 2.2, KDE mayor o igual a 3.1 o cualquier manejador -de ventanas que soporte el sistema de bandeja estándar para \elink{ FreeDesktop}{\url{http://www.freedesktop.org/Standards/systemtray-spec}}. -\item Si se desea activar la edición de linea de comandos y el historial, se necesita -/usr/include/termcap.h y el paquete termcap o la librería ncurses instalada -(libtermcap-devel o ncurses-devel). -\item Si se desea utilizar DVDs como medios de respaldo, se necesita descargar el -paquete \elink{dvd+rw-tools 5.21.4.10.8}(\url{http://fy.chalmers.se/~appro/linux/DVD+RW/}, -aplicar el patch, ubicado en el directorio \textbf{patches} del árbol de fuentes -original, para hacer que estas herramientas sean compatibles con Bacula, luego -se debe compilarlas e instalarlas. Hay un patch de dvd+rw-tools con versión -6.1, y se espera que el mismo esté integrado en la ultima versión. Se recomienda -no utilizar el utilitario de dvd+rw-tols suministrado con la distribución, a -menos que este seguro que la misma contenga el patch. Las herramientas de dvd+rw-tools -sin el patch instalado, no trabajarán con Bacula. Para finalizar, los dispositivos -de DVD no se recomiendan para respaldos importantes y críticos, debido a su -baja confiabilidad. -\end{itemize} - diff --git a/docs/manuals/es/concepts/state.tex b/docs/manuals/es/concepts/state.tex deleted file mode 100644 index 8c47b7de..00000000 --- a/docs/manuals/es/concepts/state.tex +++ /dev/null @@ -1,262 +0,0 @@ -%% -%% - - -\chapter{El estado actual de Bacula} \label{StateChapter} \index{Estado actual de Bacula} - -En otras palabras, que está y que no está implementado y funcional.. - - -\section{Que está implementado?} -\index{Que está!implementado?} -\index{Que está implementado?} - -\begin{itemize} -\item Control de trabajos (jobs) -\begin{itemize} -\item Respaldos y restauraciones en red con un director centralizado. -\item Scheduler interno para ejecución automática de los \ilink{Jobs}{JobDefs}jobs -. -\item Scheduling de múltiples jobs al mismo tiempo. -\item Se puede correr uno o multiples jobs en forma simultánea (algunas veces, esto -se denomina multiplexado (multiplexing)). -\item Uso de prioridades para la secuencialidad de los jobs. -\item \ilink{Interfaz de Consola}{UADef} con el director, permitiendo un control -completo de las operaciones. Diferentes versiones de programas de consola estan -disponibles, tales como línea de comandos, Qt4 GUI, GNOME GUI y wxWidgets. Hay -que destacar, que el programa de Qt4 GUI, se denomina bacula administration -tool o bat, y ofrece mas funcionalidades adicionales al programa de shell. -\end{itemize} - -\item Seguridad -\begin{itemize} -\item Verificación de archivos, que han sido previamente catalogados, permitiendo -con esto capacidades como las ofrecidas con Tripwire (\url{http://es.wikipedia.org/wiki/Tripwire} -). -\item Autenticación con password CRAM-MD5 entre cada uno de los componentes (demonios). -\item Encriptación configurable de comunicaciones \ilink{TLS (SSL)}{CommEncryption} -entre cada uno de los componentes. -\item Encriptación configurable de la \ilink{Data (en un volumen)}{DataEncryption} -definidas cliente por cliente -\item Firmas de MD5 y SHA1 de la data de los archivos, de ser necesaria. -\end{itemize} - -\item Funcionalidades para las restauraciones -\begin{itemize} -\item Recuperación de uno o mas archivos, seleccionados interativamente desde el backup -actual o antes de una hora y fecha indicada. -\item Restauración de un sistema completo, para un equipo nuevo, configurado desde -\verb+"+cero\verb+"+ (también se le conoce como \verb+"+bare -metal\verb+"+). Este procedimiento está completamente automatizado para -equipos con Linux y parcialmente automatizado para Solaris. Vea el link \ilink{Disaster -Recovery utilizando Bacula}{Capítulo de Rescate}.También se ha reportado -que funciona en sistemas con Win2K/XP. -\item Listado y recuperación de archivos utilizando programas utilitarios como \textbf{bls} -y \textbf{bextract}. Entre otras cosas, estas permiten la extracción de archivos -cuando bacula y/o el catálogo no están disponibles. Hay que tener presente, -que la manera adecuada para recuperar archivos es utilizando el comando restore -en la consola, estos programas están diseñados para ser usados como un último -recurso. -\item Capacidad para restaurar la base de datos del catálogo de manera rápida con -el uso de archivos bootstrap (grabados previamente). -\item Capacidad para restaurar la base de datos del catalogo utilizando el programa -\textbf{bscan}, a traves del escaneo de los volumenes de backup. -\end{itemize} - -\item Catálogo SQL -\begin{itemize} -\item Base de datos de catálogo para almacenar volúmenes, pools, jobs y archivos respaldados. -\item Soporte para el catálogo con bases de datos MySQL, PostgreSQL y SQLite. -\item Consultas de usuario extensibles a las bases de datos MySQL, PostgreSQL y SQLite. -\end{itemize} - -\item Administración avanzada de pools y de volúmenes -\begin{itemize} -\item Etiquetado de volúmenes, para prevenir la sobreescritura accidental de los mismos -(al menos por Bacula). -\item Cualquier número de jobs y de clientes pueden ser respaldados a un simple volumen. -Es decir, se puede hacer backup y recuperaciones de maquinas Linux, Unix, Sun -y Windows a un mismo volumen. -\item Backup multivolumen. Cuando un volumen esta full, \textbf{Bacula} automáticamente -busca el siguiente volumen y continúa el respaldo. -\item La administración de la librería de\ilink{pools y de volúmenes}{Recurso -de Pool} brinda una gran flexibilidad para el manejo de estos últimos, tales -como, conjuntos de volúmenes diarios, semanales y volúmenes, clasificados por -cliente, entre otros). -\item El formato de la data del volumen es independiente de la máquina. Los clientes -Linux, Solaris y Windows pueden ser respaldados en el mismo volumen, si se desea. -\item El formato de data del volumen es compatible hacia arriba, para que los volumenes -viejos siempre puedan ser leidos. -\item Un manejador flexible de \ilink{mensajes}{Capítulo de Mensajes} , que incluye -el enrutamiento de mensajes desde cualquier demonio hacia el director y correo -de reporte de notificación automático -\item Spooling de la data en disco durante el backup, con la escritura subsiguiente -de los archivos grabados en el spool a la cinta. Esto previene el uso intensivo -del tape durante los respaldos incrementales y diferenciales. -\end{itemize} - -\item Soporte avanzado para la mayoría de los dispositivos de almacenamiento. -\begin{itemize} -\item Soporte a Autochanger, que utiliza una interfaz simple de comandos que interactúa -virtualmente con cualquier programa de autoloader. Un script para \textbf{mtx} -se copia durante la instalación. -\item Soporte para autochangers con códigos de barras, y etiquetado automático de -cintas desde los códigos de barras. -\item Soporte automático para múltiples librerías de recambio automático utilizando -código de barras o por la lectura de los tapes. -\item Soporte para múltiples unidades de autochangers. -\item Backup y restauración de dispositivos crudos (raw devices). La recuperación -debe hacerse al mismo dispositivo. -\item Todos los bloques de los volúmenes (aproximadamente 64K bytes) contienen un -checksum de la data. -\item Soporte a migración \textendash{} movimiento de la data de un pool a otro o -de un volumen a otro. -\item Soporte para escritura en DVD. -\end{itemize} - -\item Soporte para múltiples sistemas operativos -\begin{itemize} -\item Programado para el manejo arbitrario de nombre largos de archivos y mensajes. -\item Compresión tipo GZIP archivo por archivo, hecha por el programa cliente, si -se ha configurado, antes de la copia en red. -\item Grabado y recuperación de ACLs tipo POSIX en la mayoría de los sistemas operativos, -si está activadas. -\item Listas de control de accesos para las consolas que permiten restringir a los -usuarios el acceso a su datos únicamente. -\item Soporte para guardar y recuperar archivos mas grandes que 2GB. -\item Soporte para máquinas con 64 btis, tales como, amd64, Sparc. -\item Soporte para etiquetas de cintas ANSI e IBM. -\item Soporte para nombres de archivos Unicode (tales como chino) en equipos con Win32 -en la versión 1.37.28 y superiores. -\item Backup consistente de archivos abiertos en sistemas Win32 (WinXP, Win2003 y -Vista) pero no en Win200, utilizando el Volume Shadow Copy (VSS). -\item Soporte para longitudes de nombres de archivo y path hasta 64K en máquinas Win32 -(esta capacidad es ilimitada equipos con Unix/Linux). -\end{itemize} - -\item Misceláneos -\begin{itemize} -\item Implementación multi-threaded. -\item Un \ilink{archivo de configuración}{Capítulo de Director} comprensible -y extensible para cada servicio o demonio. -\end{itemize} -\end{itemize} - -\section{Ventajas sobre otros programas de backup} -\index{Advantages of Bacula Over Other Backup Programs} -\index{Programs!Advantages of Bacula Over Other Backup} - -\begin{itemize} -\item Debido que existe un cliente por cada máquina, se puede hacer backup y recuperaciones -de clientes de cualquier tipo, asegurando que todos los atributos de archivos -son grabados y restaurados de manera adecuada. -\item Es posible respaldar clientes sin la instalación del software para el file daemon, -utilizando NFS o Samba. Sin embargo, se recomienda la instalación del mismo -en cada equipo a respaldar. -\item Bacula maneja respaldos multi-volumenes. -\item Base de datos SQL estándar con un registro completo de todos los archivos grabados. -Esto permite una visualización en línea de los archivos para cualquier volumen -particular. -\item Pruning automático de la base de datos (eliminación de registros viejos), simplificando -con esto la administración de la misma. -\item Cualquier engine de base de datos puede ser utilizado, logrando con esto que -bacula sea muy flexible. Aunque actualmente, existen drivers para MySQL, PostgreSQL -y SQLite. -\item El diseño modular, pero integrado, hace de bacula una solución muy escalable. -\item Debido a que bacula utiliza archivos clientes para los servidores, cualquier -base de datos o aplicación pueden ser detenidas haciendo uso de las herramientas -nativas del sistema, hacer el backup y reiniciarlas, todo en un job de bacula. -\item Bacula cuenta con un scheduler interno para la planificación de los jobs. -\item El formato del volumen está documentado y existen programas sencillos en lenguaje -C que leen o escriben en ellos. -\item Bacula utiliza puertos TCPI/IP bien conocidos (registrados en IANA) \textendash{} -no se utiliza rpc ni memoria compartida. -\item La instalación y configuración de bacula es relativamente sencilla. -\item De acuerdo a un usuario de bacula, es tan rápido como las mas grandes aplicaciones -comerciales de backup. -\item De acuerdo con otro usuario de bacula, es cuatro veces más rápido que otra aplicación -comercial, probablemente, esto se debe a que esta almacena la información del -catálogo en un gran número de archivos individuales, en vez de una base de datos -SQL, como lo hace bacula. -\item Adicional a las interfaces administrativas en modo gráfico (GUI), bacula cuenta -con una interfaz de línea de comandos muy comprensible, que permite el uso de -herramientas, tales como ssh para gestionar cualquier parte de bacula desde -cualquier sitio (incluso desde la casa). -\item Bacula cuenta con un CD de rescate para sistemas Linux, con las siguientes funcionalidades: - -\begin{itemize} -\item Permite construir el sistema original luego de un desastre con un simple comando: -make \textendash{} por supuesto, luego hay que hacer la copia. -\item Utiliza su propio kernel. -\item Captura los parámetros actuales del disco, y construye scripts que permiten -el particionamiento automático y formateo del mismo, y colocarlo en el estado -original que se tenía.. -\item Cuenta con un script que permite reiniciar los servicios de red (con la dirección -IP correcta). -\item Cuenta con un script que monta automáticamente los discos configurados. -\item Cuenta con el software de bacula FD enlazado de manera estática. -\item Se puede adicionar cualquier programa o data al disco de manera fácil. -\end{itemize} -\end{itemize} - -\section{Restricciones de la implementación actual} -\index{Current Implementation Restrictions} -\index{Restrictions!Current Implementation} - -\begin{itemize} -\item Si se cuenta con mas de 4 billones de entradas de archivos almacenados en la -base de datos, los campos de FileId probablemente presenten un overflow. Aunque -esto representa una base gigantesca, es posible su ocurrencia. Los campos FileId -han sido modificados para que se les pueda hacer upgrade de 32 a 64 bits en -la versión 1.39 o superior, pero esta tarea debe realizarse de manera manual. -\item Los archivos eliminados luego de un backup full serán incluidos en la restauración. -Esto es común en la mayoría de los programas similares de respaldo (aunque existe -un proyecto en bacula para corregir esto). -\item Los backups diferenciales e incrementales están basados en modificaciones de -tiempo. Como consecuencia de esto, si se mueven archivos dentro de un directorio -existente o se mueve un directorio completo dentro del fileset de backup después -de un backup full, probablemente estos archivos no sean incluidos en el incremental -porque tienen fechas viejas. Para esto, se debe modificar de manera explícita -el registro de fecha y hora para todos los archivos movidos (existe un proyecto -para corregir esto). -\item Los módulos para file system (rutinas configurables para salvar y restaurar -archivos especiales) aún no están implementadas. Sin embargo, esta funcionalidad -se puede implementar fácilmente utilizando run scripts. -\item Bacula permite realizar backups y restauraciones a múltiples dispositivos de -diferentes tipos de media y múltiples demonios de almacenamiento (storage daemons). -Sin embargo, si un job ha hecho el backup a múltiples dispositivos, se puede -realizar el restore desde un único dispositivo. Esto significa, que se necesita -editar en forma manual el archivo bootstrap y dividirlo en dos restauraciones -si se desea dividir el backup entre los dispositivos de almacenamiento. Esta -restricción ha sido removida en la versión 2.2.0 y superiores, y no ha sido -probada por completo. -\item Bacula no puede restaurar dos jobs diferentes en la misma operación de restauración, -si estos jobs corrieron en forma simultánea, a menos que se haya habilitado -el spooling de la data y esta mantenga el contenido completo de ambos jobs. -En otras palabras, bacula no puede restaurar dos jobs en el mismo restore, si -los bloques de datos de los jobs están entremezclados en el medio de backup. -Esto no plantea restricciones para los jobs normales de backup, incluso si ellos -se ejecutan simultáneamente. -\item Bacula puede restaurar cualquier backup hecho desde un cliente a otro cliente. -Sin embargo, si la arquitectura es completamente diferente (tales como, arquitectura -de 32 bits a 64 bits, o de Win32 a Unix), algunas restricciones pueden aplicar -(por ejemplo, en Solaris existen archivos especiales que no existen en otros -equipos Unix o Linux; hay reportes que indican que la compresión de Zlib escrita -con máquinas de 64 bits no siempre es leida correctamente en una máquina de -32 bits). -\end{itemize} - -\section{Restricciones y limitaciones de diseño} -\index{Restrictions!Design Limitations or} -\index{Design Limitations or Restrictions} - -\begin{itemize} -\item Los nombres (recursos de nombres, nombres de volúmenes, entre otros) definidos -en los archivos de configuración de bacula están limitados a un número fijo -de caracteres. Actualmente, el límite está definido a 127 caracteres. Hay que -tener en cuenta, que esto no aplica a nombres de archivos, los cuales pueden -ser arbitrariamente largos. -\item La entrada para la línea de comandos para algunas de las herramientas stand -alone, tales como btape, bconsole, está restringida a un máximo de varios cientos -de caracteres. -\end{itemize} diff --git a/docs/manuals/es/concepts/supporteddrives.tex b/docs/manuals/es/concepts/supporteddrives.tex deleted file mode 100644 index 6fcb5290..00000000 --- a/docs/manuals/es/concepts/supporteddrives.tex +++ /dev/null @@ -1,158 +0,0 @@ -%% -%% - -\chapter{Unidades de Tape Soportadas} -\label{DrivesSoportados} -\index{Unidades! de Tape Soportadas} -\index{Unidades de Tape Soportadas} - -Bacula utiliza llamadas estándar al sistema operativo (read,write, ioctl) para interactuar -con las unidades de tape. Como consecuencia de esto, es necesario contar con el driver -de tape adecuado y desarrollado para el sistema operativo seleccionado. Bacula trabaja -perfectamente bien con unidades de tape SCSI en equipos FreeBSD, Linux, Solaris y -Windows, y puede funcionar en otras máquinas UNIX, sin embargo, esto no se ha probado -todavía. Recientemente, han surgido nuevos drives que utilizan interfaces IDE, ATAPI -o SATA, en vez de SCSI. En Linux, el drive de OnStream, que utiliza el driver OSST -es uno de estos ejemplos, es renocido que trabaja con Bacula. En adición, un gran -número de unidades de cinta (es decir, OS drivers) se ha visto que trabajan en sistemas -Windows. Sin embargo, las unidades de tape no-SCSI (diferentes a OnStream) que utilizan -drivers ide-scis, ide-tape o no-scsi, no funcionan de manera correcta con Bacula -(o cualquier otra aplicación que demande una unidad de tape) hasta hoy (abril 2007). -Si ha seleccionado un tape drive no-SCSI para utilizar con Bacula, hay una gran probabilidad -que la misma no funcione. El equipo de desarrollo de Bacula, está trabajando en conjunto -con los programadores del kernel para rectificar esta situación, sin embargo, esto -no se resolverá en un futuro cercano. - -Incluso, si su drive aparece en el listado siguiente, por favor, chequee el capítulo -\ilink{Probando el Tape}{btape1} de este manual, para revisar los procedimientos -que se pueden utilizar para verificar si la unidad de cinta trabajará con Bacula. -Si su drive está en un modo de bloque fijo, este puede aparentar que trabaja con -Bacula, hasta que se intenta realizar una restauración y Bacula necesita posicionarse -en el tape. Solo se puede estar seguro, siguiendo los procedimientos sugeridos anteriormente -y probar. - -Es muy difícil suministrar una lista de unidades de tape soportados, o drives conocidos -para trabajar con Bacula, debido al limitado feedback (por lo tanto, si usted utiliza -Bacula en un drive diferente, por favor, permitanos conocer su experiencia). Basado -en el feedback de los usuarios, los siguiente drives son conocidos que trabajan con -Bacula. Un signo menos \{''-''\} en la columna, significa desconocido. - -\addcontentsline{lot}{table}{Unidades de Tape Soportadas} -\begin{longtable}{|p{2.0in}|l|l|p{2.5in}|l|} - \hline -\multicolumn{1}{|c| }{\bf SO } & \multicolumn{1}{c| }{\bf Man. } & -\multicolumn{1}{c| }{\bf Media } & \multicolumn{1}{c| }{\bf Modelo } & -\multicolumn{1}{c| }{\bf Capacidad } \\ - \hline {- } & {ADIC } & {DLT } & {Adic Scalar 100 DLT } & {100GB } \\ - \hline {- } & {ADIC } & {DLT } & {Adic Fastor 22 DLT } & {- } \\ - \hline {FreeBSD 5.4-RELEASE-p1 amd64 } & {Certance} & {LTO } & {AdicCertance CL400 LTO Ultrium 2 } & {200GB } \\ - \hline {- } & {- } & {DDS } & {Compaq DDS 2,3,4 } & {- } \\ - \hline {SuSE 8.1 Pro} & {Compaq} & {AIT } & {Compaq AIT 35 LVD } & {35/70GB } \\ - \hline {- } & {Exabyte } & {- } & {Exabyte drives less than 10 years old } & {- } \\ - \hline {- } & {Exabyte } & {- } & {Exabyte VXA drives } & {- } \\ - \hline {- } & {HP } & {Travan 4 } & {Colorado T4000S } & {- } \\ - \hline {- } & {HP } & {DLT } & {HP DLT drives } & {- } \\ - \hline {- } & {HP } & {LTO } & {HP LTO Ultrium drives } & {- } \\ - \hline {- } & {IBM} & {??} & {3480, 3480XL, 3490, 3490E, 3580 and 3590 drives} & {- } \\ - \hline {FreeBSD 4.10 RELEASE } & {HP } & {DAT } & {HP StorageWorks DAT72i } & {- } \\ - \hline {- } & {Overland } & {LTO } & {LoaderXpress LTO } & {- } \\ - \hline {- } & {Overland } & {- } & {Neo2000 } & {- } \\ - \hline {- } & {OnStream } & {- } & {OnStream drives (see below) } & {- } \\ - \hline {FreeBSD 4.11-Release} & {Quantum } & {SDLT } & {SDLT320 } & {160/320GB } \\ - \hline {- } & {Quantum } & {DLT } & {DLT-8000 } & {40/80GB } \\ - \hline {Linux } & {Seagate } & {DDS-4 } & {Scorpio 40 } & {20/40GB } \\ - \hline {FreeBSD 4.9 STABLE } & {Seagate } & {DDS-4 } & {STA2401LW } & {20/40GB } \\ - \hline {FreeBSD 5.2.1 pthreads patched RELEASE } & {Seagate } & {AIT-1 } & {STA1701W} & {35/70GB } \\ - \hline {Linux } & {Sony } & {DDS-2,3,4 } & {- } & {4-40GB } \\ - \hline {Linux } & {Tandberg } & {- } & {Tandbert MLR3 } & {- } \\ - \hline {FreeBSD } & {Tandberg } & {- } & {Tandberg SLR6 } & {- } \\ - \hline {Solaris } & {Tandberg } & {- } & {Tandberg SLR75 } & {- } \\ - \hline - -\end{longtable} - -Hay una lista de \ilink{librerías de cintas con recambio automático soportadas}{Modelos}, -en el capítulo de Autochangers Soportados de este documento, se pueden ubicar otras -unidades de tape que trabajan con Bacula. - -\section{Unidades de Tape No Soportadas} -\label{DrivesNoSoportados} -\index[general]{Unidades de Tape No Soportadas} -\index[general]{Unidades! de Tape No Soportados } - -Anteriormente, las unidades de tape OnStream IDE-SCSI no trabajaban con Bacula. Desde -la versión 1.33 y la versión de driver de kernel de osst 0.9.14 o superior, ahora -se puede trabajar. Por favor, revise el capítulo de pruebas para definir un tamaño -de bloque fijo. - -Los tapes QIC son conocidos por tener un conjunto de particularidades (tamaño fijo -de bloque y una marca de EOF en vez de dos para terminar la cinta). Como consecuencia -de esto, se necesitan tomar algunas consideraciones para configurarlas y hacer que -las mismas trabajen correctamente con Bacula. - -\section{Los usuarios FreeBSD deben tener precaución!!!} -\index[general]{Los usuarios FreeBSD deben tener precaución!!!} -\index[general]{Precaución!Los usuarios FreeBSD deben tener } - -A menos que se haya aplicado el patch de las librerías pthreads en los sistemas FreeBSD -en versiones 4.11, se perderá data cuando Bacula se extienda sobre varios tapes. -Esto se debe a que las librerías que no cuentan con el patch, presentan errores para -retornar un status de advertencia a Bacula, cuando el fin de la cinta está próximo. -Este problema está corregido en los sistemas FreeBSD liberados después de la versión -4.11. Por favor, revise el capítulo \ilink{Probando el Tape}{FreeBSDTapes} de -este manual, para obtener información \textbf{importante} acerca de cómo configurar -su unidad de cinta, de manera que sea compatible con Bacula. - -\section{Autochangers Soportados} -\index[general]{Autochangers!Soportados } -\index[general]{Autochangers Soportados} - -Para mayor información acerca de los autochangers soportados, por favor vea la sección -\ilink{Autochangers conocidos que trabajan con Bacula}{Modelos}, de este manual. - -\section{Especificaciones de Tape} -\index[general]{Especificaciones!deTape} -\index[general]{Especificaciones de Tape} - -Si usted quiere conocer qué unidad de tape debe comprar para trabajar con Bacula, -realmente no se lo podemos decir. Sin embargo, podemos indicarle si usted va a comprar -un drive, debe evitar los drives DDS. La tecnología es más vieja y las unidades de -tape DDS necesitan limpieza frecuente. Los drives DLT, generalmente son mejores (tecnología -más nueva) y no requieren una limpieza tan frecuente. - -A continuación, encontrará una tabla con las especificaciones de tapes DLT y LTO -que le darán una idea de la capacidad y velocidad de las cintas modernas. Las capacidades -listadas están en la capacidad nativa del tape, sin compresión. Todos los drives -modernos cuentan con compresión de hardware, y los fabricantes, generalmente, muestran -las capacidades utilizando una razón de compresión de 2:1. La razón de compresión -actual, en mayor parte, depende de la data a la cual se le hace respaldo, pero una -razón de 1.5:1 es un número mas razonable (es decir, multiplique el valor mostrado -por 1.5, para obtener un promedio bruto de lo que usted probablemente observará). -Las ratas de transferencia son redondeadas a los GB/hr mas cercanos. Todos los -valores son suministrados por varios fabricantes. - -El tipo de media (Media Type), representa como está diseñado por el fabricante, y -usted no requiere utilizar (pero podría) el mismo nombre en sus recursos de configuración -de Bacula. - -\begin{tabular}{|c|c|c|c} -Tipo de Media & Tipo de Drive & Capacidad de la Media & Rata de Transferencia \\ \hline -DDS-1 & DAT & 2 GB & ?? GB/hr \\ \hline -DDS-2 & DAT & 4 GB & ?? GB/hr \\ \hline -DDS-3 & DAT & 12 GB & 5.4 GB/hr \\ \hline -Travan 40 & Travan & 20 GB & ?? GB/hr \\ \hline -DDS-4 & DAT & 20 GB & 11 GB/hr \\ \hline -VXA-1 & Exabyte & 33 GB & 11 GB/hr \\ \hline -DAT-72 & DAT & 36 GB & 13 GB/hr \\ \hline -DLT IV & DLT8000 & 40 GB & 22 GB/hr \\ \hline -VXA-2 & Exabyte & 80 GB & 22 GB/hr \\ \hline -Half-high Ultrium 1 & LTO 1 & 100 GB & 27 GB/hr \\ \hline -Ultrium 1 & LTO 1 & 100 GB & 54 GB/hr \\ \hline -Super DLT 1 & SDLT 220 & 110 GB & 40 GB/hr \\ \hline -VXA-3 & Exabyte & 160 GB & 43 GB/hr \\ \hline -Super DLT I & SDLT 320 & 160 GB & 58 GB/hr \\ \hline -Ultrium 2 & LTO 2 & 200 GB & 108 GB/hr \\ \hline -Super DLT II & SDLT 600 & 300 GB & 127 GB/hr \\ \hline -VXA-4 & Exabyte & 320 GB & 86 GB/hr \\ \hline -Ultrium 3 & LTO 3 & 400 GB & 216 GB/hr \\ \hline -\end{tabular} diff --git a/docs/manuals/es/concepts/supportedoses.tex b/docs/manuals/es/concepts/supportedoses.tex deleted file mode 100644 index 4adecf12..00000000 --- a/docs/manuals/es/concepts/supportedoses.tex +++ /dev/null @@ -1,79 +0,0 @@ -%% -%% - -\chapter{Sistemas Operativos Soportados} \label{SupportedOSes} \index{Sistemas!Operativos Soportados} -\index{Sistemas Operativos Soportados} -\begin{itemize} -\item [X] Soportado completamente -\item [$\star$] se ha reportado que trabaja en muchos sistemas, sin embargo, esto -no está garantizado por el proyecto de bacula. -\end{itemize} -\begin{tabular}{|l|l|c|c|c|} -\hline -Sistemas Operativos & Versión & Cliente {\small {Demonio} } & Director {\small {Demonio} } & Storage {\small {Demonio} }\tabularnewline -\hline -\hline -GNU/Linux & All & X & X & X \tabularnewline -\hline -FreeBSD & $\geq$ 5.0 & X & X & X \tabularnewline -\hline -Solaris & $\geq$ 8 & X & X & X \tabularnewline -\hline -OpenSolaris & ~ & X & X & X \tabularnewline -\hline -\hline -MS Windows 32bit & Win98/Me & X & ~ & ~ \tabularnewline -\hline -~ & WinNT/2K & X & $\star$ & $\star$ \tabularnewline -\hline -~ & XP & X & $\star$ & $\star$ \tabularnewline -~ & 2008/Vista & X & $\star$ & $\star$ \tabularnewline -MS Windows 64bit & 2008/Vista & X & ~ & ~ \tabularnewline -\hline -\hline -MacOS X/Darwin & ~ & X & ~ & ~ \tabularnewline -\hline -OpenBSD & ~ & X & $\star$ & ~ \tabularnewline -\hline -NetBSD & ~ & X & $\star$ & ~ \tabularnewline -\hline -Irix & ~ & $\star$ & ~ & ~ \tabularnewline -\hline -True64 & ~ & $\star$ & ~ & ~ \tabularnewline -\hline -AIX & $\geq$ 4.3 & $\star$ & ~ & ~ \tabularnewline -\hline -BSDI & ~ & $\star$ & ~ & ~ \tabularnewline -\hline -HPUX & ~ & $\star$ & ~ & ~ \tabularnewline -\hline -\end{tabular} - - -\section*{Notas importantes} -\begin{itemize} -\item Cuando se hace referencia a GNU/Linux, significa las versiones de 32/64 bits -para Gentoo, Red Hat, Fedora, Mandriva, Debian, OpenSUSE, Ubuntu, Kubuntu, {\ldots{}} -\item Para versiones menores a la 5.0 de FreeBSD, se deben tomar algunas consideraciones -\textbf{importantes} en los modos para la unidad de tape, descritos en la sección -\ilink{Modos de Tape en FreeBSD} {FreeBSDTapes} del capítulo de Probando -el Tape de este manual. -\item Los paquetes de director y storage para MS Windows están disponibles como un -programa binario de instalación. -\item Para MacOSX revisar \elink{http://fink.sourceforge.net/ para obtener los paquetes}{http://fink.sourceforge.net/} -\end{itemize} -Revise el capítulo de Portabilidad en la guia de Desarrolladores para Bacula, -para obtener información acerca de la portabilidad a otros sistemas. - -Si se cuenta con una versión de sistema operativo de Red Hat con kernel de 2.4.x -y se tiene el directorio \textbf{/lib/tls} instalado en el equipo (por defecto), -bacula \textbf{no} correrá. Esto es nuevo para la librería de pthreads y constituye -un defecto. Para correrlo, se debe remover el directorio antes de la ejecución -de bacula, o simplemente, se puede cambiar el nombre a \textbf{/lib/tls-broken}, -y luego reiniciar el sistema (una de las pocas veces que Linux debe reiniciarse). -Si no se puede eliminar o renombrar el directorio /lib/tls, un método alternativo -consiste en definir la variable de ambiente \textbf{LD\_ASSUME\_KERNEL=2.4.19}, -previo a la ejecución de bacula. Con esta opción, no es necesario el reinicio -y todos los programas, distintos a bacula, continuarán utilizando \textbf{/lib/tls}. -Este problema no ocurre con versiones de kernel 2.6 de Linux. - diff --git a/docs/manuals/es/concepts/tutorial.tex b/docs/manuals/es/concepts/tutorial.tex deleted file mode 100644 index 3f96fc3a..00000000 --- a/docs/manuals/es/concepts/tutorial.tex +++ /dev/null @@ -1,1358 +0,0 @@ -%% -%% - -\chapter{Tutorial resumido} -\label{TutorialChapter} -\index[general]{Tutorial Resumido} -\index[general]{Tutorial!Resumido } - -Este capítulo lo guiará en el proceso de ejecución de Bacula. Para esto, hemos asumido -que usted ya instaló Bacula, posiblemente en un simple archivo tal como se mostró -en el capítulo anterior, en cuyo caso, se puede correr Bacula con un usuario no root -para estas pruebas. De igual manera, asumimos que usted no ha cambiado los archivos -.conf. Si usted ha modificado estos archivo, por favor desinstale Bacula, y reinstalelo, -y no haga ningún cambio en la configuración Los ejemplos de este capítulo utilizan -los archivos de configuración creados por defecto, y escribirán los volúmenes a disco -en el directorio /tmp, de igual manera, la data almacenada en las operaciones de -respaldo está representada por el directorio de fuentes, en el cual se configuró -y compiló Bacula. Como consecuencia de esto, para estas pruebas se pueden correr -todos los demonios de Bacula como usuario no root. Por favor, tenga en cuenta que -en ambientes de producción, los demonios de clientes (file daemon(s)) deben correr -como root. Vea el capítulo de Seguridad para mayor información acerca de este tópico. - -El flujo general de ejecución de Bacula es el siguiente: -\begin{enumerate} -\item cd \lt{}directorio-instalación\gt{} -\item Arrancar los servicios de base de datos (si esta utilizando MySQL o PostgreSQL). -\item Iniciar los demonios con el comando ./bacula start. -\item Iniciar el programa de consola, para interactuar con el Director. -\item Correr un job. -\item Cuando el volumen este full, desmonte el volumen, si este es una cinta (tape), etiquete -uno nuevo, y continúe con la corrida. En este capítulo, únicamente escribiremos a -archivos en disco, por lo tanto, no necesitará preocuparse por las cintas en este -momento. -\item Pruebe recuperar algunos archivos desde el volumen escrito, y asegúrese que el backup -sea consistente y que contenga la información requerida. Es mejor realizar varias -pruebas, antes de una falla verdadera. -\item Agregar un segundo cliente. -\end{enumerate} - -Cada uno de estos pasos, se describe con mas detalle a continuación. - - -\section{Antes de correr Bacula} -\index[general]{Antes de !correr Bacula } -\index[general]{Antes de correr Bacula } - -Antes de ejecutar Bacula por primera vez en producción, recomendamos correr el comando -\textbf{test} en el programa \textbf{btape}, tal como se describe en el capítulo -de \ilink{Programas Utilitarios}{btape}de este manual. Esto permitirá determinar -si Bacula funciona correctamente con su unidad de cinta. Si usted cuenta con una -unidad moderna de cinta HP, Sony o Quantum, bien sea DDS, DLT o LTO, corriendo en -Linux o Solaris, probablemente pueda pasar estas pruebas, puesto que Bacula ha sido -probado con estos drives y sistemas. Para todos los demás casos, se recomienda \textbf{encarecidamente} -correr el test antes de continuar. \textbf{btape }también tiene el comando \textbf{fill}, -que intenta duplicar las acciones que Bacula realiza cuando se llena un tape, y se -necesita escribir en otra cinta. Usted debería considerar probar este comando también, -pero sea precavido puesto que esto puede tomar horas, para llenar un tape a su máxima -capacidad. - - -\section{Arrancando la Base de Datos} -\label{StartDB} -\index[general]{Arrancando la base de datos } -\index[general]{Arrancando!la base de datos } - -Si está utilizando MySQL o PostgreSQL, como la base de datos para Bacula, debería -arrancarla antes de intentar correr un job, para evitar mensajes de error, cuando -este se inicie. Los scripts \textbf{startmysql} y \textbf{stopmysql}, son los que -utiliza (Kern), para iniciar y detener MySQL en forma local. Note, que si está utilizando -SQLite, no se necesita utilizar \textbf{startmysql }o \textbf{stopmysql}. Si está -en un ambiente de producción, probablemente necesitará configurar alguna manera para -arrancar MySQL o PostgreSQL, de manera automática, después de cada reinicio del sistema. - -Si está utilizando SQLite (es decir, si usted indico la opción \textbf{--with-sqlite=xxx} -en el comando \textbf{./configure}), no necesita hacer nada. SQLite es iniciado de -manera automática por \textbf{Bacula}. - - -\section{\noindent Iniciando los demonios} -\label{InicioDemonios} -\index[general]{Iniciando los demonios } -\index[general]{Inicio!de los demonios } - -Asumiendo que usted instaló y configuró desde los fuentes o ha instalado desde los -archivos rpms, para iniciar los tres demonios, desde el directorio de instalación, -simplemente ingrese: - -./bacula start - -El script \textbf{bacula }inicia los demonios de Storage, File y Director, los cuales, -generalmente, corren en background. Si usted está utilizando la funcionalidad de -autostart de Bacula, los demonios serán iniciados automáticamente en cada reinicio, -o puede controlarlos de manera individual, con los archivos \textbf{bacula-dir}, -\textbf{bacula-fd }y \textbf{bacula-sd}, que están ubicados generalmente en el directorio -/etc/init.d, aunque las ubicaciones actuales dependen del sistema operativo utilizado. -Algunas distribuciones pueden manejar esto de manera diferente. - -Observe que en Windows, actualmente, el demonio File (File daemon), está probado, -y el mismo debe ser iniciado en forma diferente. Por favor, revise el capítulo de -Versión Windows de Bacula, de este manual. - -Los paquetes rpm configuran los demonios para correr como usuario=root y grupo=bacula. -La instalación del rpm, también crea el grupo bacula, si no existe en el sistema. -Los usuarios que se agregan al grupo bacula tendrán acceso a los archivos creados -por los demonios. Para deshabilitar o modificar este comportamiento, edite los scripts -para arranque de los demonios: - -\begin{itemize} -\item /etc/bacula/bacula -\item /etc/init.d/bacula-dir -\item /etc/init.d/bacula-sd -\item /etc/init.d/bacula-fd -\end{itemize} - -y luego debe reiniciarlos, como se indico anteriormente. - -El \ilink{capítulo de Instalación}{CapituloInstalacion}de este manual, explica como -se pueden instalar los scripts que automáticamente reiniciarán los demonios cuando -el sistema arranca. - - -\section{Usando el programa de consola} -\index[general]{Utilizando!el Programa de Consola} -\index[general]{Utilizando el Programa de Consola - -Para comunicarse con el director y consultar el estado de Bacula o correr los jobs, -desde el directorio superior de los binarios, simplemente ingrese: - -./bconsole - -Alternativamente, si esta en la consola de linea de comandos, y si tiene Qt4 instalado -y utilizo la opción \textbf{\textendash{}enable-bat} en el comando configure, usted -podría usar la herramienta de administración de bacula (Bacula Administration Tool) -\textbf{(bat)}: - -./bat - -El cual brinda una interfaz gráfica, y muchas funcionalidades adicionales a bconsole. - -Otras dos opciones consiste en: correr la consola de GNOME \textbf{bgnome-console -}o el programa wxWidgets \textbf{bwx-console.} - -Por simplicidad, aquí se describe únicamente el programa \textbf{./bconsole.} La -mayoría de lo descrito también aplica para \textbf{./bat}, \textbf{./bgnome-console} -y \textbf{./bwx-console}. - -El comando \textbf{./bconsole} corre el programa de consola de Bacula, el cual se -conecta con el demonio del Director. Dado que Bacula es un programa de red, este -se puede correr desde cualquier equipo en la red. Sin embargo, por lo general, uno -se ejecuta en la misma maquina del Director. Normalmente, el programa de consola -mostrará una salida similar a lo siguiente: - -\footnotesize -\begin{verbatim} -[kern@polymatou bin]$./bconsole -Connecting to Director lpmatou:9101 -1000 OK: HeadMan Version: 2.1.8 (14 May 2007) -* -\end{verbatim} -\normalsize - -El símbolo asterisco ('{*}'), es el prompt de la consola de comandos. - -Cuando se tipea \textbf{help}, se despliega una lista de comandos disponibles: - -\footnotesize -\begin{verbatim} -*help - Command Description - ======= =========== - add add media to a pool - autodisplay autodisplay [on|off] -- console messages - automount automount [on|off] -- after label - cancel cancel [ | ] -- cancel a job - create create DB Pool from resource - delete delete [pool= | media volume=] - disable disable -- disable a job - enable enable -- enable a job - estimate performs FileSet estimate, listing gives full listing - exit exit = quit - gui gui [on|off] -- non-interactive gui mode - help print this command - list list [pools | jobs | jobtotals | media | -files ]; from catalog - label label a tape - llist full or long list like list command - memory print current memory usage - messages messages - mount mount - prune prune expired records from catalog - purge purge records from catalog - python python control commands - quit quit - query query catalog - restore restore files - relabel relabel a tape - release release - reload reload conf file - run run - status status [[slots] storage | dir | client]= - setdebug sets debug level - setip sets new client address -- if authorized - show show (resource records) [jobs | pools | ... | all] - sqlquery use SQL to query catalog - time print current time - trace turn on/off trace to file - unmount unmount - umount umount for old-time Unix guys - update update Volume, Pool or slots - use use catalog xxx - var does variable expansion - version print Director version - wait wait until no jobs are running [ | | ] -* -\end{verbatim} -\normalsize - -Los detalles de los programas de la consola, se explican en el \ilink{Capitulo Consola}{_Capítulo de Consola} -de este manual. - -\section{Corriendo un job} -\label{Corriendo} -\index[general]{Corriendo un!Job } -\index[general]{Corriendo un Job } - -En este punto, asumimos que usted ha hecho lo siguiente: -\begin{itemize} -\item Configuró Bacula con \textbf{./configure }\textendash{}sus-opciones. -\item Compiló Bacula utilizando el comando\textbf{ make}. -\item Instaló Bacula utilizando \textbf{make install. } -\item Ha creado su base de datos corriendo \textbf{./create\_sqlite\_database}, por ejemplo. -\item Ha creado las tablas de la base de datos de Bacula con \textbf{./make\_bacula\_tables}. -\item Probablemente, editó su archivo de configuración \textbf{bacula-dir.conf}, para personalizarlo. -Hay que ser CUIDADOSO! Si usted cambia el nombre del Director o el password, necesitará -hacer los mismos cambios en los otros archivos de configuración (.conf). Para este -momento, puede ser conveniente, no hacer cambios. -\item Inició Bacula, con el comando \textbf{./bacula start.} -\item Usted invocó el programa de Consola, ejecutando .\textbf{/bconsole.} -\end{itemize} - -Adicionalmente, estamos asumiendo que usted está utilizando los archivos de configuración -por defecto. - -\footnotesize -\begin{verbatim} -show filesets -\end{verbatim} -\normalsize - -Y se mostraría algo similar a lo siguiente: - -\footnotesize -\begin{verbatim} -FileSet: name=Full Set - O M - N - I /home/kern/bacula/regress/build - N - E /proc - E /tmp - E /.journal - E /.fsck - N -FileSet: name=Catalog - O M - N - I /home/kern/bacula/regress/working/bacula.sql - N -\end{verbatim} -\normalsize - -Este es un \textbf{FileSet }predefinido, que le hará backup al directorio de fuentes -de Bacula. Los nombres actuales de directorios se corresponden con la configuración -de su sistema. Para propósitos de prueba, se ha seleccionado un directorio de tamaño -moderado (cerca de 40 Megabytes) y de complejidad relativamente sencilla. El FileSet -\textbf{Catalog} se utiliza para hacer respaldo del catálogo de Bacula, y no es de -mucho interés en este momento. Las entradas \textbf{\textquotedblleft{}I\textquotedblright{}}, -son los archivos o directorios que serán incluidos en el respaldo y las entradas -\textbf{\textquotedblleft{}E\textquotedblright{}}, son aquellas que estarán excluidas. -Las entradas \textbf{\textquotedblleft{}O\textquotedblright{}}, son las opciones -especificas para el FileSet. Se puede cambiar a los objetos a los cuales se les hace -backup, editando el archivo de configuración \textbf{bacula-dir.conf}, y se modifica -la linea \textbf{File=}, en el recurso \textbf{FileSet}. - -Ahora es tiempo de correr su primer respaldo. Se hará un backup del directorio de -fuentes de Bacula a un volumen de archivo, ubicado en el directorio \textbf{/tmp}, -para mostrarle lo fácil que es esto. Ahora tipee: - -\footnotesize -\begin{verbatim} -status dir -\end{verbatim} -\normalsize - -Y debería obtener la siguiente salida: - -\footnotesize -\begin{verbatim} -rufus-dir Version: 1.30 (28 April 2003) -Daemon started 28-Apr-2003 14:03, 0 Jobs run. -Console connected at 28-Apr-2003 14:03 -No jobs are running. -Level Type Scheduled Name -================================================================= -Incremental Backup 29-Apr-2003 01:05 Client1 -Full Backup 29-Apr-2003 01:10 BackupCatalog -==== -\end{verbatim} -\normalsize - -Donde los tiempos y los nombres para el Director serán diferentes, de acuerdo a su -configuración Por ejemplo, este indica que un job Incremental está planificado para -correr a la 1:05am para el cliente \textbf{Client1}, y a la 1:10, esta planificada -la ejecución del job para \textbf{BackupCatalog}. Note, que usted probablemente cambiara -el nombre de \textbf{Client1 }al nombre de su equipo, si no lo hace, cuando se adicionen -nuevos clientes, esto puede generar confusiones. Para esta prueba, se utilizó Rufus -en vez de \textbf{Client1}. - -Ahora ingrese: - -\footnotesize -\begin{verbatim} -status client -\end{verbatim} -\normalsize - -Y se mostrará algo parecido a la siguiente salida: - -\footnotesize -\begin{verbatim} -The defined Client resources are: - 1: rufus-fd -Item 1 selected automatically. -Connecting to Client rufus-fd at rufus:8102 -rufus-fd Version: 1.30 (28 April 2003) -Daemon started 28-Apr-2003 14:03, 0 Jobs run. -Director connected at: 28-Apr-2003 14:14 -No jobs running. -==== -\end{verbatim} -\normalsize - -En este caso, el cliente se llama \textbf{rufus-fd}, y su nombre puede ser diferente, -pero la línea que comienza con \textbf{rufus-fd Version....}, se muestra para el -demonio de archivo (File daemon), por lo tanto, ahora se puede estar seguro que está -configurado y corriendo. - -Finalmente, se puede hacer lo mismo con el demonio de almacenamiento (Storage daemon) -con: - -\footnotesize -\begin{verbatim} -status storage -\end{verbatim} -\normalsize - -Y debería mostrarse algo como: - -The defined Storage resources are: - -\footnotesize -\begin{verbatim} -The defined Storage resources are: - 1: File -Item 1 selected automatically. -Connecting to Storage daemon File at rufus:8103 -rufus-sd Version: 1.30 (28 April 2003) -Daemon started 28-Apr-2003 14:03, 0 Jobs run. -Device /tmp is not open. -No jobs running. -==== -\end{verbatim} -\normalsize - -Usted puede notar que el dispositivo por defecto para el demonio de almacenamiento -se denomina \textbf{file}, y que utilizará el directorio \textbf{/tmp}, el cual no -esta actualmente abierto. - -Ahora, se puede correr un job con: - -\footnotesize -\begin{verbatim} -run -\end{verbatim} -\normalsize - -Luego de la corrida, la salida que se despliega es la siguiente: - -\footnotesize -\begin{verbatim} -Using default Catalog name=MyCatalog DB=bacula -A job name must be specified. -The defined Job resources are: - 1: Client1 - 2: BackupCatalog - 3: RestoreFiles -Select Job resource (1-3): -\end{verbatim} -\normalsize - -En este punto, Bacula lista los tres diferentes Jobs que usted puede correr, y usted -debe seleccionar \textbf{1} y pulsar la tecla Enter, y obtendrá lo siguiente: - -\footnotesize -\begin{verbatim} -Run Backup job -JobName: Client1 -FileSet: Full Set -Level: Incremental -Client: rufus-fd -Storage: File -Pool: Default -When: 2003-04-28 14:18:57 -OK to run? (yes/mod/no): -\end{verbatim} -\normalsize - -En este punto, hay que tomarse algo de tiempo para observar cuidadosamente lo que -está impreso y comprender todas las opciones. Se está consultando si esta listo OK -para correr un job denominado \textbf{Client1} con un FileSet \textbf{FullSet }(listado -anteriormente) para un job Incremental en su Cliente (su nombre de cliente puede -ser diferente), utiliza un almacenamiento \textbf{File }y un pool \textbf{Default}. -Finalmente, se pregunta si se desea correrlo en este momento (la hora actual será -desplegada en su consola). - -Se puede seleccionar correr \textbf{(yes)}, modificar uno o mas parámetros \textbf{(mod)} -o no correr el job \textbf{(no)}. Por favor, tipear \textbf{yes}, y en este momento -se mostrará el prompt de comandos, de manera inmediata (un asterisco). Si espera -unos pocos segundos, y luego ingresa el comando \textbf{messages}, se mostrará algo -parecido a lo siguiente: - -\footnotesize -\begin{verbatim} -28-Apr-2003 14:22 rufus-dir: Last FULL backup time not found. Doing - FULL backup. -28-Apr-2003 14:22 rufus-dir: Start Backup JobId 1, - Job=Client1.2003-04-28_14.22.33 -28-Apr-2003 14:22 rufus-sd: Job Client1.2003-04-28_14.22.33 waiting. - Cannot find any appendable volumes. -Please use the "label" command to create a new Volume for: - Storage: FileStorage - Media type: File - Pool: Default -\end{verbatim} -\normalsize - -El primer mensaje, indica que no hay respaldos previos de tipo Full que se hayan -realizado, por lo tanto Bacula se hará upgrade del job Incremental a un respaldo -Full (esto es normal). El segundo mensaje, indica que el job se inició con un JobId -de 1, y el tercer mensaje nos dice que Bacula no puede encontrar ningún volumen en -el Pool para escribir la salida (el respaldo). Esto es normal, puesto que todavía -no se ha creado (etiquetado) ningún volumen. Bacula nos muestra todos los detalles -que el volumen necesita. - -En este punto, el job esta BLOQUEADO (BLOCKED) esperando por un volumen. Si desea -puede chequearlo, ejecutando el comando \textbf{status dir}. Para poder continuar, -se debe crear un volumen que Bacula pueda escribir. Esto se puede hacer con: - -\footnotesize -\begin{verbatim} -label -\end{verbatim} -\normalsize - -Y Bacula mostrará: - -\footnotesize -\begin{verbatim} -The defined Storage resources are: - 1: File -Item 1 selected automatically. -Enter new Volume name: -\end{verbatim} -\normalsize - -En este punto, se debería ingresar algún nombre comenzando con una letra y que contenga -únicamente letras y números (puntos, guiones y underscore son permitidos). Por ejemplo, -escriba \textbf{TestVolume001}, y obtendrá lo siguiente: - -\footnotesize -\begin{verbatim} -Defined Pools: - 1: Default -Item 1 selected automatically. -Connecting to Storage daemon File at rufus:8103 ... -Sending label command for Volume "TestVolume001" Slot 0 ... -3000 OK label. Volume=TestVolume001 Device=/tmp -Catalog record for Volume "TestVolume002", Slot 0 successfully created. -Requesting mount FileStorage ... -3001 OK mount. Device=/tmp -\end{verbatim} -\normalsize - -Finalmente, ingresando el comando \textbf{messages }se mostrara la siguiente salida: - -\footnotesize -\begin{verbatim} -28-Apr-2003 14:30 rufus-sd: Wrote label to prelabeled Volume - "TestVolume001" on device /tmp -28-Apr-2003 14:30 rufus-dir: Bacula 1.30 (28Apr03): 28-Apr-2003 14:30 -JobId: 1 -Job: Client1.2003-04-28_14.22.33 -FileSet: Full Set -Backup Level: Full -Client: rufus-fd -Start time: 28-Apr-2003 14:22 -End time: 28-Apr-2003 14:30 -Files Written: 1,444 -Bytes Written: 38,988,877 -Rate: 81.2 KB/s -Software Compression: None -Volume names(s): TestVolume001 -Volume Session Id: 1 -Volume Session Time: 1051531381 -Last Volume Bytes: 39,072,359 -FD termination status: OK -SD termination status: OK -Termination: Backup OK -28-Apr-2003 14:30 rufus-dir: Begin pruning Jobs. -28-Apr-2003 14:30 rufus-dir: No Jobs found to prune. -28-Apr-2003 14:30 rufus-dir: Begin pruning Files. -28-Apr-2003 14:30 rufus-dir: No Files found to prune. -28-Apr-2003 14:30 rufus-dir: End auto prune. -\end{verbatim} -\normalsize - -Si usted no puede ver la salida inmediatamente, usted puede ejecutar el comando \textbf{messages -}hasta que el job termine, o puede ingresar, \textbf{autodisplay on} y sus mensajes -serán desplegados automáticamente tan pronto como estén listos. - -Si usted hace un \textbf{ls -l} al directorio \textbf{/tmp}, verá una salida parecida -a lo siguiente: - -\footnotesize -\begin{verbatim} --rw-r----- 1 kern kern 39072153 Apr 28 14:30 TestVolume001 -\end{verbatim} -\normalsize - -Este es el archivo de Volumen que se creo y escribió, y contiene toda la data del -job que se ejecutó. Si se corren jobs adicionales, la información se adicionará al -Volumen, a menos que usted indique otro. - -Usted puede preguntarse si tiene que etiquetar todos los Volúmenes que Bacula va -a utilizar. La respuesta para Volúmenes de disco, como el que hemos utilizado, es -no. Es posible hacer que Bacula etiquete los volúmenes de manera automática. Para -Volúmenes de tapes (cintas), probablemente usted tenga que etiquetar cada uno de -los volúmenes que desee utilizar. - -Si desea terminar en este punto, simplemente ingrese el comando \textbf{quit }en -el programa de Consola, y detenga Bacula con \textbf{./bacula stop}. Para realizar -una limpieza del catalogo y del volumen, simplemente borre el archivo \textbf{/tmp/TestVolume001}, -y también debe reinicializar la base de datos, utilizando: - -\footnotesize -\begin{verbatim} -./drop_bacula_tables -./make_bacula_tables -\end{verbatim} -\normalsize - -Por favor, note que esto borrará toda la información acerca de los jobs previos que -se ejecutaron, y ahora, que estamos en prueba, podrá hacer esto, sin embargo, generalmente, -no se desea reinicializar la base de datos en ambientes de producción. - -Si le gustaría probar la restauración de los archivos, a los cuales se les hizo backup, -por favor, lea la siguiente sección. - -\label{Restaurando} - -\section{Restaurando sus archivos} -\index{Files!Restoring Your} -\index{Restoring Your Files} - -Si usted, ejecutó la configuración por defecto y respaldó el código fuente de Bacula, -tal como se indicó, usted puede recuperar estos archivos en la consola, ingresando -lo siguiente: - -\footnotesize -\begin{verbatim} -restore all -\end{verbatim} -\normalsize - -Luego de esto, se mostrará: - -\footnotesize -\begin{verbatim} -First you select one or more JobIds that contain files -to be restored. You will be presented several methods -of specifying the JobIds. Then you will be allowed to -select which files from those JobIds are to be restored. - -To select the JobIds, you have the following choices: - 1: List last 20 Jobs run - 2: List Jobs where a given File is saved - 3: Enter list of comma separated JobIds to select - 4: Enter SQL list command - 5: Select the most recent backup for a client - 6: Select backup for a client before a specified time - 7: Enter a list of files to restore - 8: Enter a list of files to restore before a specified time - 9: Find the JobIds of the most recent backup for a client - 10: Find the JobIds for a backup for a client before a specified time - 11: Enter a list of directories to restore for found JobIds - 12: Cancel -Select item: (1-12): -\end{verbatim} -\normalsize - -Como puede observar, hay una gran cantidad de opciones, sin embargo, para la demostración -actual, por favor, pulse \textbf{5} para hacer una restauración del último backup -que usted hizo, y obtendrá la siguiente salida: - -\footnotesize -\begin{verbatim} -Defined Clients: - 1: rufus-fd -Item 1 selected automatically. -The defined FileSet resources are: - 1: 1 Full Set 2003-04-28 14:22:33 -Item 1 selected automatically. -+-------+-------+----------+---------------------+---------------+ -| JobId | Level | JobFiles | StartTime | VolumeName | -+-------+-------+----------+---------------------+---------------+ -| 1 | F | 1444 | 2003-04-28 14:22:33 | TestVolume002 | -+-------+-------+----------+---------------------+---------------+ -You have selected the following JobId: 1 -Building directory tree for JobId 1 ... -1 Job inserted into the tree and marked for extraction. -The defined Storage resources are: - 1: File -Item 1 selected automatically. -You are now entering file selection mode where you add and -remove files to be restored. All files are initially added. -Enter "done" to leave this mode. -cwd is: / -$ -\end{verbatim} -\normalsize - -Donde, se ha truncado el listado del lado derecho, para hacerlo mas legible. Como -puede ver, en el tope del listado, Bacula conoce con cuales clientes usted cuenta, -y debido a que existe uno solo, el demonio de almacenamiento (Storage daemon) lo -selecciona de manera automática, igual ocurre para el FileSet. Luego, se muestra -un listado de todos los jobs que conforman el respaldo actual, en este caso, únicamente, -existe uno, y el demonio de almacenamiento, también lo selecciona. Luego, Bacula -tomó los archivos que estaban en el job numero 1, y se ingresó a un \textbf{árbol -de directorios }(representación ordenada en memoria de su filesystem). En este punto, -se pueden utilizar los comandos \textbf{cd}, \textbf{ls }y/o \textbf{dir}, para navegar -en el árbol de directorios y visualizar que archivos serán restaurados. Por ejemplo, -si se ingresa \textbf{cd /home/kern/bacula/bacula-1.30 }y luego se tipea \textbf{dir}, -se obtendrá un listado de todos los archivos en el directorio de fuentes de Bacula. -En su sistema, esta ruta puede ser diferente. Para mayor información acerca de esto, -por favor revise el \ilink{Capítulo de Comandos de Restauración}{RestoreChapter}. - -Para salir de este modo, simplemente ingrese: - -\footnotesize -\begin{verbatim} -done -\end{verbatim} -\normalsize - -Y se mostrará la siguiente salida: - -\footnotesize -\begin{verbatim} -Bootstrap records written to - /home/kern/bacula/testbin/working/restore.bsr -The restore job will require the following Volumes: - - TestVolume001 -1444 files selected to restore. -Run Restore job -JobName: RestoreFiles -Bootstrap: /home/kern/bacula/testbin/working/restore.bsr -Where: /tmp/bacula-restores -Replace: always -FileSet: Full Set -Backup Client: rufus-fd -Restore Client: rufus-fd -Storage: File -JobId: *None* -When: 2005-04-28 14:53:54 -OK to run? (yes/mod/no): -\end{verbatim} -\normalsize - -Si la respuesta es \textbf{yes}, los archivos serán restaurados al directorio \textbf{/tmp/bacula-restores}. -Si desea restaurar los archivos a sus directorios originales, se debe utilizar la -opción \textbf{mod}, y de manera explícita definir \textbf{Where:} a ningún valor -(o a /). Recomendamos,que siga hacia adelante y responda \textbf{yes}, y luego de -un corto tiempo, ingresar \textbf{messages}, y en este punto debe tener un listado -de todos los archivos recuperados, así como un resumen del job, similar a esto: - -\footnotesize -\begin{verbatim} -28-Apr-2005 14:56 rufus-dir: Bacula 2.1.8 (08May07): 08-May-2007 14:56:06 -Build OS: i686-pc-linux-gnu suse 10.2 -JobId: 2 -Job: RestoreFiles.2007-05-08_14.56.06 -Restore Client: rufus-fd -Start time: 08-May-2007 14:56 -End time: 08-May-2007 14:56 -Files Restored: 1,444 -Bytes Restored: 38,816,381 -Rate: 9704.1 KB/s -FD Errors: 0 -FD termination status: OK -SD termination status: OK -Termination: Restore OK -08-May-2007 14:56 rufus-dir: Begin pruning Jobs. -08-May-2007 14:56 rufus-dir: No Jobs found to prune. -08-May-2007 14:56 rufus-dir: Begin pruning Files. -08-May-2007 14:56 rufus-dir: No Files found to prune. -08-May-2007 14:56 rufus-dir: End auto prune. -\end{verbatim} -\normalsize - -Luego de salir de la consola, usted puede examinar los archivos en el directorio -\textbf{/tmp/bacula-restores}, el cual contendrá un pequeño árbol de directorios -con todos los archivos. Al finalizar, asegúrese de dejar limpio el directorio con: - -\footnotesize -\begin{verbatim} -rm -rf /tmp/bacula-restore -\end{verbatim} -\normalsize - - -\section{Saliendo del programa de Consola} -\index[general]{Saliendo!del programa de Consola } -\index[general]{Saliendo del programa de Consola } - -Simplemente, ingrese el comando \textbf{quit}. - - -\section{Agregando un segundo cliente} -\index[general]{Agregando!un segundo cliente } -\index[general]{Agregando un segundo cliente } - -Si usted ha seguido el ejemplo indicado para su sistema, ya está listo para agregar -un segundo cliente (Demonio de archivo o File daemon). Es decir, si usted cuenta -con una segunda máquina a la cual le gustaría hacer respaldo, el único componente -que usted necesita instalar en este equipo, es el binario de \textbf{bacula-fd }(o -\textbf{bacula-fd.exe }para Windows) y su archivo de configuración \textbf{bacula-fd.conf}. -Usted puede iniciar con el mismo archivo \textbf{bacula-fd.conf}, que está utilizando -actualmente, y hacer una modificación menor para crear el archivo de configuración -para el segundo cliente. Cambie el nombre del demonio de archivo (File daemon) que -está configurado, \textbf{rufus-fd }en el ejemplo anterior, quizás su sistema tendrá -un nombre diferente. Para este paso, lo mejor es cambiar el nombre en su segundo -equipo. Por ejemplo: - -\footnotesize -\begin{verbatim} -... -# -# "Global" File daemon configuration specifications -# -FileDaemon { # this is me - Name = rufus-fd - FDport = 9102 # where we listen for the director - WorkingDirectory = /home/kern/bacula/working - Pid Directory = /var/run -} -... -\end{verbatim} -\normalsize - -Quedaría así: - -\footnotesize -\begin{verbatim} -... -# -# "Global" File daemon configuration specifications -# -FileDaemon { # this is me - Name = matou-fd - FDport = 9102 # where we listen for the director - WorkingDirectory = /home/kern/bacula/working - Pid Directory = /var/run -} -... -\end{verbatim} -\normalsize - -Donde se muestra una porción del archivo y se ha cambiado \textbf{rufus-fd }por \textbf{matou-fd}. -Usted escoge los nombres que desee. Por el momento, se recomienda no cambiar nada -mas. Después, usted querrá cambiar el password. - -Ahora que usted hizo los cambios en su segunda máquina, necesita hacer algunas adiciones -al archivo de configuración del Director, con la finalidad de definir el nuevo demonio -de archivo (File daemon) o cliente. Tomando el ejemplo original que está configurado -en el sistema, se deben añadir las siguientes lineas (básicamente, copie la información -existente, pero con nombres diferentes) al archivo de configuración del Director -(\textbf{bacula-dir.conf}). - -\footnotesize -\begin{verbatim} -# -# Define the main nightly save backup job -# By default, this job will back up to disk in /tmp -Job { - Name = "Matou" - Type = Backup - Client = matou-fd - FileSet = "Full Set" - Schedule = "WeeklyCycle" - Storage = File - Messages = Standard - Pool = Default - Write Bootstrap = "/home/kern/bacula/working/matou.bsr" -} -# Client (File Services) to backup -Client { - Name = matou-fd - Address = matou - FDPort = 9102 - Catalog = MyCatalog - Password = "xxxxx" # password for - File Retention = 30d # 30 days - Job Retention = 180d # six months - AutoPrune = yes # Prune expired Jobs/Files -} -\end{verbatim} -\normalsize - -Luego, asegúrese que el parámetro de Address en el recurso de Storage esté definido -como un nombre completo de dominio calificado (fully qualified domain name) y no -a algo como \textquotedblleft{}localhost\textquotedblright{}. La dirección indicada -es enviada al File daemon (cliente) y debe ser un nombre completo de dominio. Si -usted utiliza \textquotedblleft{}localhost\textquotedblright{}, esto no se resolverá -de manera correcta y se generará un timeout cuando el File daemon falle al conectarse -al Storage daemon (demonio de almacenamiento). - -Esto es todo lo que hay que hacer. Se copia el recurso existente para crear el segundo -Job (Matou) para el backup del segundo cliente (matou-fd). Su nombre es \textbf{Matou}, -el cliente se denomina \textbf{matou-fd }y el nombre del archivo de bootstrap se -cambia, pero todo lo demás, es lo mismo.Esto significa que Matou sera respaldado -con la misma planificación, y utilizando el mismo conjunto de volúmenes. Mas adelante, -usted cambiará estos valores, sin embargo, por ahora se mantendrá esta configuración -sencilla. - -El segundo cambio, consiste en agregar un nuevo recurso Cliente que defina a \textbf{matou-fd -}y tenga la dirección correcta para matou, pero en ambientes reales, usted podría -requerir un nombre completo de dominio calificado o una dirección IP. Se mantendrá -el mismo password (mostrado como xxxxx en el ejemplo). - -En este punto, si usted detiene e inicia Bacula, e inicia el cliente en la otra maquina, -todo estará listo, y el prompt que se mostró anteriormente, ahora incluirá el segundo -equipo. - -Cuando se hace la instalación en entornos de producción reales, probablemente se -quiera utilizar pools diferentes o distintas planificaciones (schedules). Las personalizaciones -ahora dependen de usted. En cualquier caso, se debería cambiar el password en los -archivos de configuración del Director y del Cliente, por razones de seguridad adicionales. - -Para algunos tips importantes para los cambios de passwords y nombres, y un diagrama -de cuales nombres y passwords deben coincidir, por favor revise el capítulo \ilink{Errores de Autorización}{ErroresAutorizacion},de -este manual. - - -\section{Cuando el tape está lleno} -\label{FullTape} -\index[general]{Fills!When The Tape } -\index[general]{When The Tape Fills } - -Si usted planificó su job, generalmente en las noches, llegará el momento en que -la cinta se llene y \textbf{Bacula }no pueda continuar. En este caso, Bacula le enviará -un mensaje similar al siguiente: - -\footnotesize -\begin{verbatim} -rufus-sd: block.c:337 === Write error errno=28: ERR=No space left - on device -\end{verbatim} -\normalsize - -Esto indica que existe un error de escritura porque el tape está full. Bacula buscará -el Pool especificado por el Job, intentando conseguir un volumen disponible (appendable). -En el mejor de los casos, usted habrá definido de manera apropiada sus Períodos de -Retención y tendrá todos los tapes marcados para ser reciclados (Recycled), y con -esto se reciclararán de manera automática las cintas en el pool indicado y se reescribirán -los volúmenes mas viejos. Para mayor información acerca del reciclado, por favor -revise el capítulo de \ilink{Reciclaje}{CapituloReciclaje} de este manual. Si usted -observa que los volúmenes no son reciclados en forma adecuada (generalmente, debido -a un error de configuración), por favor, revise la sección de \ilink{Reciclaje Manual de Volúmenes}{reciclajemanuel} -del capítulo de Reciclaje. - -Si usted tiene una gran cantidad de volúmenes y los etiquetó con la fecha del volumen -cuando se escribió por primera vez, o no ha definido sus periodos de Retención, Bacula -no conseguirá un tape en el pool, y se enviara un mensaje similar al siguiente: - -\footnotesize -\begin{verbatim} -rufus-sd: Job kernsave.2002-09-19.10:50:48 waiting. Cannot find any - appendable volumes. -Please use the "label" command to create a new Volume for: - Storage: SDT-10000 - Media type: DDS-4 - Pool: Default -\end{verbatim} -\normalsize - -Hasta que usted cree un nuevo volumen, este mensaje se repetirá una hora después, -luego dos horas mas tarde, y doblando el intervalo cada vez, hasta un máximo de un -día - -La pregunta obvia en este punto es: Qué hacer ahora? - -La respuesta es simple: Primero, utilizando el programa de consola, cierre el tape -utilizando el comando \textbf{unmount}. Si usted tiene un solo drive, este es seleccionado -automáticamente, de lo contrario, asegúrese que libere el que se indica en el mensaje -(en este caso, \textbf{STD-10000}). - -A continuación, remueva el tape del drive e inserte uno nuevo en blanco. Tenga en -cuenta, que en algunas unidades de tape viejas, se necesita escribir una marca de -fin de archivo (\textbf{mt -f /dev/nst0 weof}) para prevenir al drive de otras corridas -cuando Bacula intente leer la etiqueta. - -Finalmente, utilice el comando \textbf{label }en la Consola para escribir una etiqueta -al nuevo volumen. El comando \textbf{label }contactará al demonio de almacenamiento -(Storage daemon) para escribir la etiqueta de software. Si este proceso es exitoso, -se agregará el nuevo volumen al Pool, luego se emite un comando \textbf{mount }al -demonio de almacenamiento. Vea las secciones previas de este capítulo para mayores -detalles acerca del etiquetado de cintas. - -El resultado es que Bacula continuará el Job previo, escribiendo el respaldo en el -nuevo Volumen. - -Si usted tiene un pool de volúmenes y Bacula está ciclando con estos, en vez del -mensaje \textquotedbl{}Cannot find any appendable volumes.\textquotedbl{}, (\textquotedblleft{}Bacula -no puede hallar volúmenes disponibles\textquotedblright{}), se solicitará montar -un volumen especifico. En este caso, usted debe intentar realizar esta acción. Si -no cuenta con otro volumen (debido a cualquier razón), simplemente puede montar otro -volumen del mismo pool, que se encuentre disponible para escritura, y Bacula hará -uso del mismo. Puede utilizar el comando \textbf{list volumes }en la consola para -determinar cuáles son los volúmenes que pueden ser usados. - -Si usted ha definido sus períodos de retención para los Volúmenes de manera correcta, -pero no cuenta con mas volúmenes disponibles para agregar data, se pueden reetiquetar -y reutilizar los existentes, considerando el siguiente procedimiento: -\begin{itemize} -\item Ejecutar \textbf{list volumes }en la consola, y seleccionar el volumen más viejo -para el reetiquetado. -\item Si usted definió sus períodos de retención correctamente, el volumen tendría status -(VolStatus) \textbf{Purged}. -\item Si el status del volumen no está como Purged, se necesitará purgar de la base de -datos los Jobs que están escritos en él. Usted puede hacer esto usando el comando -\textbf{purge jobs volume }en la consola. Si usted cuenta con múltiples Pools, se -le preguntará por el Pool, para luego ingresar el nombre del volumen (o MediaId), -cuando sea necesario. -\item Luego, simplemente use el comando \textbf{relabel }para reetiquetar el volumen. -\end{itemize} -Para reetiquetar un volumen de manera manual, se deben ejecutar los siguientes pasos -adicionales: -\begin{itemize} -\item Para borrar el volumen del catálogo, utilice el comando \textbf{delete volume }en -la consola, y seleccione el nombre del Volumen (o MediaId) que será eliminado. -\item Use el comando \textbf{unmount }en la consola para desmontar el viejo tape. -\item Reetiquete físicamente el viejo Volumen que usted borró, para que el mismo pueda -ser reutilizado. -\item Inserte el viejo Volumen en la unidad de tape. -\item Desde la línea de comandos, ejecute: \textbf{mt -f /dev/st0 rewind }y \textbf{mt --f /dev/st0 weof}, donde usted necesitará escoger el nombre apropiado para la unidad -de cinta de su sistema, en lugar de \textbf{/dev/st0}. -\item Utilice el comando \textbf{label }en la consola, para escribir una nueva etiqueta -de Bacula al tape. -\item Use el comando \textbf{mount }en la consola, si esto no se hace de manera automática, -para que Bacula inicie las operaciones con el nuevo tape etiquetado. -\end{itemize} - -\section{Otros comandos útiles de Consola} -\index[general]{Otros!comandos útiles de consola } -\index[general]{Otros comandos útiles de consola } - -\begin{description} - -\item [status dir] - \index[console]{status dir } - Muestra el status de todos los jobs que se están ejecutando y los planificados en las próximas 24 horas. - -\item [status] - \index[console]{status } -El programa de consola solicitará seleccionar un tipo de demonio, luego de esto, se muestra su status. - -\item [status jobid=nn] - \index[console]{status jobid } - Muestra el status del JobId nn, si este se encuentra en ejecución El demonio de almacenamiento es contactado y se le consulta para imprimir el status del job también. - -\item [list pools] - \index[console]{list pools } -Lista los pools definidos en el Catálogo (generalmente, se utiliza el pool por defecto Default). Aunque esto puede variar según el ambiente configurado. - -\item [list media] - \index[console]{list media } -Lista todas las medias definidas en el Catálogo. - -\item [list jobs] - \index[console]{list jobs } -Muestra todos los jobs en el Catálogo que se han ejecutado. - -\item [list jobid=nn] - \index[console]{list jobid } - Lista los jobs identificados con el jobid nn en el Catálogo. - -\item [list jobtotals] - \index[console]{list jobtotals } -Muestra los totales de todos los jobs que se encuentran en el Catálogo. - -\item [list files jobid=nn] - \index[console]{list files jobid } -Lista los archivos que fueron grabados para el job identificado con el JobId nn. - -\item [list jobmedia] - \index[console]{list jobmedia } -Muestra la información de la media (Volumen) para cada Job ejecutado. - -\item [messages] - \index[console]{messages } -Imprime los mensajes que han sido enviados a la consola. - -\item [unmount storage=storage-name] - \index[console]{unmount storage } -Desmonta el drive asociado con el dispositivo de almacenamiento indicado con el nombre {\bf -storage-name}, si este no se encuentra actualmente en uso. Este comando es utilizado cuando se desea que Bacula -libere la unidad configurada para etiquetar un tape. - -\item [mount storage=storage-name] - \index[sd]{mount storage } -Permite que el drive asociado con el dispositivo de almacenamiento sea montado nuevamente. Cuando Bacula llegue -al final de un volumen, y le solicite montar uno nuevo, debe ejecutar este comando luego de colocar un nuevo -volumen en la unidad. En efecto, esta es la señal que Bacula necesita conocer para iniciar la lectura o -escritura en el nuevo volumen. - -\item [quit] - \index[sd]{quit } - Salir del programa de consola. -\end{description} - -La mayoría de los comandos señalados anteriormente, con excepción de {\bf list}, solicitarán los argumentos -necesarios, si usted ingresa únicamente el nombre del comando. - - -\section{Depuración de la salida de un demonio} -\index[general]{Depuración de la salida de un demonio } -\index[general]{Depuración!Salida Demonio } - -Si usted desea depurar la salida de los demonios que se están ejecutando, estos se -deben iniciar desde el directorio de instalación de la siguiente manera: - -\footnotesize -\begin{verbatim} -./bacula start -d100 -\end{verbatim} -\normalsize - -Esto puede muy útil, si los demonios no se inician correctamente, puesto que la salida -directa de estos a la consola se direcciona al dispositivo NULL. Sin embargo, con -nivel de depuración (debug) mayor que cero, la salida es enviada al terminal donde -se corren los comandos. - -Para detener los tres demonios, ingrese lo siguiente desde el directorio de instalación: - -\footnotesize -\begin{verbatim} -./bacula stop -\end{verbatim} -\normalsize - -La ejecución de \textbf{bacula stop }puede indicar que algunos pids no fueron encontrados. -Esto puede ser ser normal, especialmente si alguno de los demonios ha \textquotedblleft{}muerto\textquotedblright{} -(died), lo cual es muy raro. - -Para realizar un respaldo full de un sistema, cada demonio en el cliente (File daemon), -debe estar corriendo como usuario root, para que este tenga permisos para acceder -a todos los archivos. Ninguno de los otros demonios, requiere privilegios de root. -Sin embargo, el demonio de almacenamiento (Storage daemon), debe ser capaz de abrir -las unidades de tape. En la mayoría de los sistemas, únicamente el usuario root puede -acceder estos dispositivos. Para esto, usted puede correr el demonio de almacenamiento -como root o cambiar los permisos de los dispositivos de cinta, para permitir el acceso -a usuarios no root. MySQL y PostgreSQL pueden ser instalados con cualquier id de -usuario; y no se requieren privilegios de superusuario. - - -\section{Paciencia al iniciar los demonios o al montar tapes en blanco} - -Cuando se inician los demonios de Bacula, el demonio de almacenamiento intenta abrir -todos los dispositivos de almacenamiento definidos y verificar el Volumen que está -montado actualmente (y si está configurado). Hasta que todos los dispositivos de -almacenamiento no sean verificados, el demonio de almacenamiento no aceptará conexiones -desde la Consola. Si la cinta ha sido utilizada con anterioridad, esta será rebobinada, -y en algunos dispositivos esto puede tomar varios minutos. Como consecuencia de esto, -usted debe tener un poco de paciencia la primera vez que se contacte al demonio de -almacenamiento, luego del arranque de estos. Si puede ver su unidad de cinta, una -vez que las luces dejen de parpadear, la misma estará disponible para su uso. - -Las mismas consideraciones aplican si usted ha montado una cinta en blanco en una -unidad de drive, tal como una DLT HP. Esta acción puede tomar uno o dos minutos antes -que la unidad reconozca de manera adecuada, que el tape esta en blanco. Si usted -intenta ejecutar el comando \textbf{mount }en el programa de Consola durante el proceso -de reconocimiento, es muy probable que inhiba su driver SCSI (al menos en mi sistema -Red Hat Linux). Por esto, se le recuerda, nuevamente, tener paciencia cuando se inserten -cintas en blanco. Se debe esperar que el dispositivo no muestre actividad antes de -intentar accederlo. - - -\section{Dificultades conectando el FD con el SD} -\index[general]{Dificultades conectando el FD con el SD} -\index[general]{Dificultades!conectando el FD con el SD} - -Si está teniendo dificultades para conectar uno o mas demonios de archivos con el -demonio de almacenamiento, probablemente esto se deba a que no utilizó un nombre -de dominio completamente calificado en la directiva \textbf{Address }en el recurso -de almacenamiento en el Director. Es decir, que el demonio de archivo del equipo -(no en el Director) debe ser capaz de resolver el nombre que se indique con la dirección -IP. Un ejemplo de una dirección que está garantizado no trabajará es:\textbf{ localhost}. -Un ejemplo de una que podría trabajar es: \textbf{megalon}. Otro ejemplo de otra -que probablemente pueda funcionar es: \textbf{magalon.mydomain.com}. En equipos Win32, -si usted no cuenta con una buena resolución (frecuentemente en sistemas muy viejos, -como Windows 98), usted puede probar utilizar una dirección IP en lugar de un nombre. - -Si su dirección IP es correcta, asegúrese que ningún otro programa esté utilizando -el puerto 9103 en el equipo donde corre el demonio de almacenamiento (Storage daemon). -Los números de puertos de Bacula están autorizadas por la IANA, y no deberían ser -utilizados por otros programas, sin embargo, algunas impresoras HP utilizan estos -números de puertos. La ejecución del comando \textbf{netstat -a }en el equipo con -el demonio de almacenamiento, puede indicar quien está usando el puerto 9103 (utilizado -para las comunicaciones desde el FD al SD en Bacula). - - -\section{Opciones del demonio en linea de comandos} -\index[general]{Daemon Command Line Options } -\index[general]{Options!Daemon Command Line } - -Cada uno de los tres demonios (Director, Archivo y Almacenamiento), aceptan un pequeño -conjunto de opciones en linea de comandos. En general, cada uno de estos, así como -el programa de consola, acepta las siguientes opciones: - -\begin{description} - -\item [-c \lt{}file\gt{}] - \index[sd]{-c \lt{}file\gt{} } - Define el archivo a utilizar como archivo de configuración El defecto es el nombre del demonio seguido por la -extensión {\bf .conf}, es decir, {\bf bacula-dir.conf} para el Director, {\bf bacula-fd.conf} para el demonio de -archivo y {\bf bacula-sd.conf} para el demonio de almacenamiento. - -\item [-d nn] - \index[sd]{-d nn } - Define el nivel de depuración a {\bf nn}. Niveles más altos de depuración, provocan que mayor información sea -desplegada en STDOUT, notificando lo que el demonio está haciendo. - -\item [-f] - Corre el demonio en el foreground. Esta opción es necesaria cuando se corre el demonio bajo el depurador. - -\item [-g ] - Corre el demonio con este grupo. Debe ser un nombre de grupo, no su identificador GID. - -\item [-s] - No se le hace un trap a las señales. Esta opción es necesaria cuando se corre el demonio bajo el depurador. - -\item [-t] - Lee el archivo de configuración e imprime cualquier mensaje de error, luego termina inmediatamente. Es muy -útil para chequear la sintaxis de nuevos archivos de configuración. - -\item [-u ] - Corre el demonio con este usuario. Debe ser un nombre de un usuario, y no un UID. - -\item [-v] - Impresión mas detallada y completa de los errores y mensajes de información Se recomienda su uso. - -\item [-?] - Imprime la versión y la lista de opciones. - -\end{description} - - -\section{Creando un Pool} -\label{Pool} -\index[general]{Pool!Creating a } -\index[general]{Creating a Pool } - -La creación del Pool se hace de manera automática cuando \textbf{Bacula }arranca, -por lo tanto, si usted entiende los Pools, puede proseguir con la próxima sección - -Cuando se ejecuta un job, una de las cosas que \textbf{Bacula }debe conocer es que -volúmenes se utilizarán para respaldar el conjunto de objetos (FileSet). En vez de -especificar un volumen (tape) directamente, se indica cuál es el pool de volúmenes -que \textbf{Bacula }consulta cuando se necesita una cinta para las escritura de los -backups. Bacula seleccionará el primer volumen disponible para el pool, apropiado -para el dispositivo de almacenamiento seleccionado para la ejecución del job. Cuando -un volumen está lleno, \textbf{Bacula }cambiar su atributo VolStatus de \textbf{Append -}a \textbf{Full}, luego se utilizará el siguiente volumen y así sucesivamente. Si -no existen volúmenes disponibles para escritura en el pool, el Director intentará -reciclar un volumen viejo, y si todavía no existen volúmenes, se enviará un mensaje -al operador solicitándole crear un nuevo volumen, de manera apropiada. - -\textbf{Bacula }mantiene un registro del nombre del pool, los volúmenes contenidos -en el pool y un número determinado de atributos para cada uno de estos. - -Cuando los servicios de Bacula se inician, se asegura que todas las definiciones -de los recursos de pool hayan sido grabadas en el catálogo. Esto se puede verificar -ingresando el siguiente comando: - -\footnotesize -\begin{verbatim} -list pools -\end{verbatim} -\normalsize - -En la consola de Bacula, y se mostraría algo parecido a lo siguiente: - -\footnotesize -\begin{verbatim} -*list pools -Using default Catalog name=MySQL DB=bacula -+--------+---------+---------+---------+----------+-------------+ -| PoolId | Name | NumVols | MaxVols | PoolType | LabelFormat | -+--------+---------+---------+---------+----------+-------------+ -| 1 | Default | 3 | 0 | Backup | * | -| 2 | File | 12 | 12 | Backup | File | -+--------+---------+---------+---------+----------+-------------+ -* -\end{verbatim} -\normalsize - - -Si usted intenta crear un pool con el mismo nombre, por segunda vez, se mostrará: - -\footnotesize -\begin{verbatim} -Error: Pool Default already exists. -Once created, you may use the {\bf update} command to -modify many of the values in the Pool record. -\end{verbatim} -\normalsize - -\section{Etiquetando sus volúmenes} -\label{Labeling} -\index[general]{Volumes!Labeling Your } -\index[general]{Labeling Your Volumes } - -Bacula requiere que cada volumen contenga una etiqueta de software. Hay varias estrategias -para el etiquetado de volúmenes Una de estas, consiste en etiquetarlos cuando sea -necesario, utilizando la consola. Es decir, cuando se necesita un nuevo volumen, -y no se consigue ninguno disponible en el catálogo, se envía un mensaje de correo -donde se solicita la adición de nuevos volúmenes al pool. Luego se utiliza el comando -\textbf{label}, en el programa de consola, para etiquetarlo y definirlo en la base -de datos del pool. Luego de esto, Bacula comenzará a escribir en el nuevo volumen. -De manera análoga, se puede utilizar el comando \textbf{relabel}, para reetiquetar -un volumen, que no ha sido usado por largos períodos de tiempo. Para esto, el atributo -VolStatus debe estar definido como \textbf{Purged}. - -Otra estrategia, consiste en etiquetar un conjunto de volúmenes al inicio, para que -puedan ser utilizados cuando \textbf{Bacula }los necesite. Esta es la forma mas frecuente -de hacerlo en el caso de contar con un conjunto de cintas para reciclaje, por ejemplo, -cuando se utiliza una librería de cambio automático de cintas. Para mayores detalles -del reciclado, por favor, revise el capítulo \ilink{Reciclado automático de Volúmenes }{RecyclingChapter}, -de este manual. - -Si usted corre un job, y no cuenta con tapes etiquetados en el pool, Bacula le informará -esta situación, y estos se pueden crear \textquotedblleft{}en el vuelo\textquotedblright{} -y continuar. Por ejemplo, se pueden etiquetar las cintas con la fecha, es decir: -\textbf{DLT-18Apr09}. Mas abajo, se muestran más detalles en el uso del comando \textbf{label.} - - -\section{Etiquetando volúmenes con el programa de consola} -\index[general]{Labeling Volumes with the Console Program } -\index[general]{Program!Labeling Volumes with the Console } - -El etiquetado de volúmenes, generalmente, se realiza utilizando el programa de consola. -\begin{enumerate} -\item ./bconsole -\item label -\end{enumerate} - -Si Bacula, muestra que no puede etiquetar la cinta, porque esta ha sido etiquetada -previamente, simplemente desmóntelo, utilizando el comando \textbf{unmount }en la -consola, y seguidamente, monte una cinta en blanco y ejecute nuevamente el comando\textbf{ -label.} - -\footnotesize -\begin{verbatim} -The defined Storage resources are: - 1: File - 2: 8mmDrive - 3: DLTDrive - 4: SDT-10000 -Select Storage resource (1-4): -\end{verbatim} -\normalsize - -En este punto, usted debe tener una cinta vacía en el drive correspondiente al recurso -de almacenamiento que seleccionó. - -Luego se pregunta por el nombre del volumen: - -\footnotesize -\begin{verbatim} -Enter new Volume name: -\end{verbatim} -\normalsize - -Si Bacula muestra: - -\footnotesize -\begin{verbatim} -Media record for Volume xxxx already exists. -\end{verbatim} -\normalsize - -Significa que el volumen con nombre \textbf{xxxx }que se ingresó, ya existe en la -base de datos de medios. Se pueden listar todas las medias (volúmenes) definidas, -con el comando \textbf{list media}. Observe, que la última columna LastWritten, se -ha truncado para mostrar una salida apropiada. - -\footnotesize -\begin{verbatim} -+---------------+---------+--------+----------------+-----/~/-+------------+-----+ -| VolumeName | MediaTyp| VolStat| VolBytes | LastWri | VolReten | Recy| -+---------------+---------+--------+----------------+---------+------------+-----+ -| DLTVol0002 | DLT8000 | Purged | 56,128,042,217 | 2001-10 | 31,536,000 | 0 | -| DLT-07Oct2001 | DLT8000 | Full | 56,172,030,586 | 2001-11 | 31,536,000 | 0 | -| DLT-08Nov2001 | DLT8000 | Full | 55,691,684,216 | 2001-12 | 31,536,000 | 0 | -| DLT-01Dec2001 | DLT8000 | Full | 55,162,215,866 | 2001-12 | 31,536,000 | 0 | -| DLT-28Dec2001 | DLT8000 | Full | 57,888,007,042 | 2002-01 | 31,536,000 | 0 | -| DLT-20Jan2002 | DLT8000 | Full | 57,003,507,308 | 2002-02 | 31,536,000 | 0 | -| DLT-16Feb2002 | DLT8000 | Full | 55,772,630,824 | 2002-03 | 31,536,000 | 0 | -| DLT-12Mar2002 | DLT8000 | Full | 50,666,320,453 | 1970-01 | 31,536,000 | 0 | -| DLT-27Mar2002 | DLT8000 | Full | 57,592,952,309 | 2002-04 | 31,536,000 | 0 | -| DLT-15Apr2002 | DLT8000 | Full | 57,190,864,185 | 2002-05 | 31,536,000 | 0 | -| DLT-04May2002 | DLT8000 | Full | 60,486,677,724 | 2002-05 | 31,536,000 | 0 | -| DLT-26May02 | DLT8000 | Append | 1,336,699,620 | 2002-05 | 31,536,000 | 1 | -+---------------+---------+--------+----------------+-----/~/-+------------+-----+ -\end{verbatim} -\normalsize - -Una vez que Bacula verifica que el volumen aún no ha sido creado, se solicitará el -nombre del pool al cual se agregará el volumen (cinta). Si existe un pool único (Default), -este se seleccionará de manera automática - -Si la cinta es etiquetada de manera exitosa, un registro de volumen también es creado -en el pool. Es decir, el nombre del volumen y todos sus atributos aparecerán cuando -se liste el pool. Adicionalmente, estará disponible para los respaldos, si el campo -MediaType coincide con el requerido por el demonio de almacenamiento. - -Cuando se etiquetó el tape, se le hicieron varias preguntas, básicamente el nombre -y quizás el slot. Sin embargo, el registro del volumen en la base de datos del catálogo -(conocido internamente como MediaRecord), contiene poco atributos. La mayoría de -los cuales se definen de los valores por defecto configurados para el pool ( es decir, -el pool mantiene la mayoría de los atributos por defecto utilizados para la creación -del volumen). - -También es posible agregar medias a un pool sin etiquetar físicamente el volumen. -Esto se hace con el comando \textbf{add}. Para mas información, por favor revise -el capítulo de \ilink{Consola}{_ConsoleChapter} , de este manual. diff --git a/docs/manuals/es/concepts/uploaddoc b/docs/manuals/es/concepts/uploaddoc deleted file mode 100755 index 02668a12..00000000 --- a/docs/manuals/es/concepts/uploaddoc +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -ftp -i ftp.sectoor.de <tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}.html + @(if [ -f imagename_translations ] ; then \ + ./translate_images.pl --from_meaningful_names ${DOC}.html; \ + fi) (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} .; done) @echo "Done making html" web: @echo "Making web" + @rm -rf ${DOC} @mkdir -p ${DOC} @cp -fp ${IMAGES}/*.eps . @rm -f next.eps next.png prev.eps prev.png up.eps up.png - @cp -fp ${IMAGES}/*.eps ${DOC}/ - @cp -fp ${IMAGES}/*.eps ${IMAGES}/*.png ${DOC}/ @rm -f ${DOC}/xp-*.png @rm -f ${DOC}/next.eps ${DOC}/next.png ${DOC}/prev.eps ${DOC}/prev.png ${DOC}/up.eps ${DOC}/up.png - @rm -rf ${DOC}/*.html latex2html -split 3 -local_icons -t "Bacula Console and Operators Guide" -long_titles 4 \ - -toc_stars -contents_in_nav -init_file latex2html-init.pl -white -notransparent ${DOC} >tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}/Bacula_Consol*.html - (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} .; done) + -toc_stars -contents_in_nav -init_file latex2html-init.pl \ + -no_antialias -no_antialias_text \ + -white -notransparent ${DOC} >tex.out 2>&1 + @(if [ -f imagename_translations ] ; then \ + ./translate_images.pl --from_meaningful_names ${DOC}.html; \ + fi) + @cp -f ${DOC}/${MAINDOC} ${DOC}/index.html @echo "Done making web" show: xdvi ${DOC} diff --git a/docs/manuals/es/console/bconsole.tex b/docs/manuals/es/console/bconsole.tex index db7e7ff5..32774003 100644 --- a/docs/manuals/es/console/bconsole.tex +++ b/docs/manuals/es/console/bconsole.tex @@ -62,6 +62,7 @@ Usage: bconsole [-s] [-c config_file] [-d debug_level] -dnn set debug level to nn -n no conio -s no signals + -u set command execution timeout to seconds -t test - read configuration and exit -? print this message. \end{verbatim} @@ -441,21 +442,21 @@ delete Job JobId=n,m,o-r,t ... the actual bytes. As such, the estimated backup size will generally be larger than an actual backup. - The estimate command isn't currently compatible with the Accurate mode, it - doesn't detect changes like with a backup using \textbf{Accurate=yes}. + The \texttt{estimate} command can use the accurate code to detect changes + and give a better estimation. You can set the accurate behavior on command + line using \texttt{accurate=yes/no} or use the Job setting as default value. Optionally you may specify the keyword {\bf listing} in which case, all the files to be backed up will be listed. Note, it could take quite some time to display them if the backup is large. The full form is: - \begin{verbatim} -estimate job= listing client= +estimate job= listing client= accurate= fileset= level= \end{verbatim} - Specification of the {\bf job} is sufficient, but you can also override - the client, fileset and/or level by specifying them on the estimate + Specification of the {\bf job} is sufficient, but you can also override the + client, fileset, accurate and/or level by specifying them on the estimate command line. @@ -1485,6 +1486,10 @@ regression test might be: \index[general]{anything} Comment +\item [@help] + \index[general]{@help} + Get the list of every special @ commands. + \item [@separator \lt{}char\gt{}] \index[general]{@separator} When using bconsole with readline, you can set the command separator to one diff --git a/docs/manuals/es/developers/Makefile.in b/docs/manuals/es/developers/Makefile.in index b565d792..947656bc 100644 --- a/docs/manuals/es/developers/Makefile.in +++ b/docs/manuals/es/developers/Makefile.in @@ -19,7 +19,7 @@ DOC=developers first_rule: all -all: tex web dvipdf mini-clean +all: tex web pdf mini-clean .SUFFIXES: .tex .html .PHONY: @@ -54,32 +54,36 @@ html: fi) latex2html -white -no_subdir -split 0 -toc_stars -white -notransparent \ ${DOC} >tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}.html - (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} .; done) + @(if [ -f imagename_translations ] ; then \ + ./translate_images.pl --from_meaningful_names ${DOC}.html; \ + fi) + (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} . 2>/dev/null; done) @rm -f *.eps *.gif *.jpg *.old web: @echo "Making ${DOC} web" + @rm -rf ${DOC} @mkdir -p ${DOC} @rm -f ${DOC}/* @cp -fp ${IMAGES}/*.eps . @rm -f next.eps next.png prev.eps prev.png up.eps up.png - @cp -fp ${IMAGES}/*.eps ${IMAGES}/*.png ${DOC}/ - @rm -f ${DOC}/next.eps ${DOC}/next.png ${DOC}/prev.eps ${DOC}/prev.png ${DOC}/up.eps ${DOC}/up.png @(if [ -f ${DOC}/imagename_translations ] ; then \ ./translate_images.pl --to_meaningful_names ${DOC}/Developer*Guide.html; \ fi) @rm -rf ${DOC}/*.html latex2html -split 4 -local_icons -t "Developer's Guide" -long_titles 4 \ - -contents_in_nav -toc_stars -white -notransparent ${DOC} >tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}/Developer*Guide.html - @cp -f ${DOC}/Developers_Guide.html ${DOC}/index.html + -toc_stars -contents_in_nav -init_file latex2html-init.pl \ + -no_antialias -no_antialias_text \ + -white -notransparent ${DOC} >tex.out 2>&1 + @(if [ -f imagename_translations ] ; then \ + ./translate_images.pl --from_meaningful_names ${DOC}.html; \ + fi) + @cp -f ${DOC}/Bacula_Developer_Notes.html ${DOC}/index.html @rm -f *.eps *.gif *.jpg ${DOC}/*.eps *.old @rm -f ${DOC}/idle.png @rm -f ${DOC}/win32-*.png ${DOC}/wx-console*.png ${DOC}/xp-*.png @rm -f ${DOC}/*.pl ${DOC}/*.log ${DOC}/*.aux ${DOC}/*.idx @rm -f ${DOC}/*.out WARNINGS - (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} .; done) texcheck: ./check_tex.pl ${DOC}.tex diff --git a/docs/manuals/es/developers/catalog.tex b/docs/manuals/es/developers/catalog.tex index f67866b5..4994d378 100644 --- a/docs/manuals/es/developers/catalog.tex +++ b/docs/manuals/es/developers/catalog.tex @@ -256,7 +256,7 @@ creates a 7.35 MB database. \hline {LStat } & {tinyblob } & {File attributes in base64 encoding } \\ \hline -{MD5 } & {tinyblob } & {MD5 signature in base64 encoding } +{MD5 } & {tinyblob } & {MD5/SHA1 signature in base64 encoding } \\ \hline \end{longtable} @@ -310,6 +310,8 @@ command in the Console program. \hline {EndTime } & {datetime } & {Time/date when Job ended } \\ \hline +{RealEndTime } & {datetime } & {Time/date when original Job ended } \\ + \hline {JobTDate } & {bigint } & {Start day in Unix format but 64 bits; used for Retention period. } \\ \hline @@ -330,6 +332,8 @@ Retention period. } \\ \hline {FileSetId } & {integer } & {Link to FileSet Record } \\ \hline +{PrioJobId } & {integer } & {Link to prior Job Record when migrated } \\ + \hline {PurgedFiles } & {tiny integer } & {Set when all File records purged } \\ \hline {HasBase } & {tiny integer } & {Set when Base Job run } @@ -368,18 +372,28 @@ The Job Type (or simply Type) can have one of the following values: \hline {B } & {Backup Job } \\ \hline +{M } & {Migrated Job } \\ + \hline {V } & {Verify Job } \\ \hline {R } & {Restore Job } \\ \hline {C } & {Console program (not in database) } \\ \hline +{I } & {Internal or system Job } \\ + \hline {D } & {Admin Job } \\ \hline {A } & {Archive Job (not implemented) } \\ \hline +{C } & {Copy Job } \\ + \hline +{M } & {Migration Job } \\ + \hline \end{longtable} +Note, the Job Type values noted above are not kept in an SQL table. + The JobStatus field specifies how the job terminated, and can be one of the following: @@ -397,6 +411,8 @@ following: \hline {T } & {Terminated normally } \\ \hline +{W } & {Terminated normally with warnings } +\\ \hline {E } & {Terminated in Error } \\ \hline {e } & {Non-fatal error } \\ @@ -407,6 +423,8 @@ following: \hline {A } & {Canceled by the user } \\ \hline +{I } & {Incomplete Job } +\\ \hline {F } & {Waiting on the File daemon } \\ \hline {S } & {Waiting on the Storage daemon } \\ @@ -427,10 +445,18 @@ following: \hline {p } & {Waiting for higher priority job to finish } \\ \hline +{i } & {Doing batch insert file records } +\\ \hline +{a } & {SD despooling attributes } +\\ \hline +{l } & {Doing data despooling } +\\ \hline +{L } & {Committing data (last despool) } +\\ \hline -\end{longtable} -\ + +\end{longtable} \addcontentsline{lot}{table}{File Sets Table Layout} \begin{longtable}{|l|l|l|} @@ -458,7 +484,6 @@ particularly important when doing an incremental update. If the user deletes a file or adds a file, we need to ensure that a Full backup is done prior to the next incremental. -\ \addcontentsline{lot}{table}{JobMedia Table Layout} \begin{longtable}{|l|l|p{2.5in}|} @@ -512,7 +537,6 @@ backup. -\ \addcontentsline{lot}{table}{Media Table Layout} \begin{longtable}{|l|l|p{2.4in}|} @@ -532,6 +556,10 @@ backup. \hline {MediaType } & {tinyblob } & {The MediaType supplied by the user } \\ \hline +{MediaTypeId } & {integer } & {The MediaTypeId } \\ + \hline +{LabelType } & {tinyint } & {The type of label on the Volume } \\ + \hline {FirstWritten } & {datetime } & {Time/date when first written } \\ \hline {LastWritten } & {datetime } & {Time/date when last written } \\ @@ -548,6 +576,8 @@ backup. \hline {VolBytes } & {bigint } & {Number of bytes saved in Job } \\ \hline +{VolParts } & {integer } & {The number of parts for a Volume (DVD) } \\ + \hline {VolErrors } & {integer } & {Number of errors during Job } \\ \hline {VolWrites } & {integer } & {Number of writes to media } \\ @@ -559,9 +589,13 @@ backup. {VolStatus } & {enum } & {Status of media: Full, Archive, Append, Recycle, Read-Only, Disabled, Error, Busy } \\ \hline +{Enabled } {tinyint } & {Whether or not Volume can be written } \\ + \hline {Recycle } & {tinyint } & {Whether or not Bacula can recycle the Volumes: Yes, No } \\ \hline +{ActionOnPurge } & {tinyint } & {What happens to a Volume after purging } \\ + \hline {VolRetention } & {bigint } & {64 bit seconds until expiration } \\ \hline {VolUseDuration } & {bigint } & {64 bit seconds volume can be used } \\ @@ -570,6 +604,35 @@ Yes, No } \\ \hline {MaxVolFiles } & {integer } & {maximume EOF marks to put on Volume } \\ \hline +{InChanger } & {tinyint } & {Whether or not Volume in autochanger } \\ + \hline +{StorageId } & {integer } & {Storage record ID } \\ + \hline +{DeviceId } & {integer } & {Device record ID } \\ + \hline +{MediaAddressing } & {integer } & {Method of addressing media } \\ + \hline +{VolReadTime } & {bigint } & {Time Reading Volume } \\ + \hline +{VolWriteTime } & {bigint } & {Time Writing Volume } \\ + \hline +{EndFile } & {integer } & {End File number of Volume } \\ + \hline +{EndBlock } & {integer } & {End block number of Volume } \\ + \hline +{LocationId } & {integer } & {Location record ID } \\ + \hline +{RecycleCount } & {integer } & {Number of times recycled } \\ + \hline +{InitialWrite } & {datetime } & {When Volume first written } \\ + \hline +{ScratchPoolId } & {integer } & {Id of Scratch Pool } \\ + \hline +{RecyclePoolId } & {integer } & {Pool ID where to recycle Volume } \\ + \hline +{Comment } & {blob } & {User text field } \\ + \hline + \end{longtable} @@ -614,13 +677,32 @@ created for each of the NumVols specified in the Pool resource record. \hline {AutoPrune } & {tinyint } & {yes|no for autopruning } \\ \hline -{Recycle } & {tinyint } & {yes|no for allowing auto recycling of Volume } -\\ +{Recycle } & {tinyint } & {yes|no for allowing auto recycling of Volume } \\ + \hline +{ActionOnPurge } & {tinyint } & {Default Volume ActionOnPurge } \\ \hline {PoolType } & {enum } & {Backup, Copy, Cloned, Archive, Migration } \\ \hline +{LabelType } & {tinyint } & {Type of label ANSI/Bacula } \\ + \hline {LabelFormat } & {Tinyblob } & {Label format } \\ \hline +{Enabled } {tinyint } & {Whether or not Volume can be written } \\ + \hline +{ScratchPoolId } & {integer } & {Id of Scratch Pool } \\ + \hline +{RecyclePoolId } & {integer } & {Pool ID where to recycle Volume } \\ + \hline +{NextPoolId } & {integer } & {Pool ID of next Pool } \\ + \hline +{MigrationHighBytes } & {bigint } & {High water mark for migration } \\ + \hline +{MigrationLowBytes } & {bigint } & {Low water mark for migration } \\ + \hline +{MigrationTime } & {bigint } & {Time before migration } \\ + \hline + + \end{longtable} @@ -659,31 +741,26 @@ number of the Media record for the current volume. The {\bf Client} table contains one entry for each machine backed up by Bacula in this database. Normally the Name is a fully qualified domain name. -\ -\addcontentsline{lot}{table}{Unsaved Files Table Layout} +\addcontentsline{lot}{table}{Storage Table Layout} \begin{longtable}{|l|l|l|} \hline -\multicolumn{3}{|l| }{\bf UnsavedFiles } \\ +\multicolumn{3}{|l| }{\bf Storage } \\ \hline \multicolumn{1}{|c| }{\bf Column Name } & \multicolumn{1}{c| }{\bf Data Type } & \multicolumn{1}{c| }{\bf Remark } \\ \hline -{UnsavedId } & {integer } & {Primary Key } \\ +{StorageId } & {integer } & {Unique Id } \\ \hline -{JobId } & {integer } & {JobId corresponding to this record } \\ +{Name } & {tinyblob } & {Resource name of Storage device } \\ \hline -{PathId } & {integer } & {Id of path } \\ +{AutoChanger } & {tinyint } & {Set if it is an autochanger } \\ \hline -{FilenameId } & {integer } & {Id of filename } -\\ \hline \end{longtable} -The {\bf UnsavedFiles} table contains one entry for each file that was not -saved. Note! This record is not yet implemented. +The {\bf Storage} table contains one entry for each Storage used. -\ \addcontentsline{lot}{table}{Counter Table Layout} \begin{longtable}{|l|l|l|} @@ -709,7 +786,140 @@ saved. Note! This record is not yet implemented. The {\bf Counter} table contains one entry for each permanent counter defined by the user. -\ +\addcontentsline{lot}{table}{Job History Table Layout} +\begin{longtable}{|l|l|p{2.5in}|} + \hline +\multicolumn{3}{|l| }{\bf JobHisto } \\ + \hline +\multicolumn{1}{|c| }{\bf Column Name } & \multicolumn{1}{c| }{\bf Data Type +} & \multicolumn{1}{c| }{\bf Remark } \\ + \hline +{JobId } & {integer } & {Primary Key } \\ + \hline +{Job } & {tinyblob } & {Unique Job Name } \\ + \hline +{Name } & {tinyblob } & {Job Name } \\ + \hline +{Type } & {binary(1) } & {Job Type: Backup, Copy, Clone, Archive, Migration +} \\ + \hline +{Level } & {binary(1) } & {Job Level } \\ + \hline +{ClientId } & {integer } & {Client index } \\ + \hline +{JobStatus } & {binary(1) } & {Job Termination Status } \\ + \hline +{SchedTime } & {datetime } & {Time/date when Job scheduled } \\ + \hline +{StartTime } & {datetime } & {Time/date when Job started } \\ + \hline +{EndTime } & {datetime } & {Time/date when Job ended } \\ + \hline +{RealEndTime } & {datetime } & {Time/date when original Job ended } \\ + \hline +{JobTDate } & {bigint } & {Start day in Unix format but 64 bits; used for +Retention period. } \\ + \hline +{VolSessionId } & {integer } & {Unique Volume Session ID } \\ + \hline +{VolSessionTime } & {integer } & {Unique Volume Session Time } \\ + \hline +{JobFiles } & {integer } & {Number of files saved in Job } \\ + \hline +{JobBytes } & {bigint } & {Number of bytes saved in Job } \\ + \hline +{JobErrors } & {integer } & {Number of errors during Job } \\ + \hline +{JobMissingFiles } & {integer } & {Number of files not saved (not yet used) } +\\ + \hline +{PoolId } & {integer } & {Link to Pool Record } \\ + \hline +{FileSetId } & {integer } & {Link to FileSet Record } \\ + \hline +{PrioJobId } & {integer } & {Link to prior Job Record when migrated } \\ + \hline +{PurgedFiles } & {tiny integer } & {Set when all File records purged } \\ + \hline +{HasBase } & {tiny integer } & {Set when Base Job run } +\\ \hline + +\end{longtable} + +The {bf JobHisto} table is the same as the Job table, but it keeps +long term statistics (i.e. it is not pruned with the Job). + + +\addcontentsline{lot}{table}{Log Table Layout} +\begin{longtable}{|l|l|l|} + \hline +\multicolumn{3}{|l| }{\bf Version } \\ + \hline +\multicolumn{1}{|c| }{\bf Column Name } & \multicolumn{1}{c| }{\bf Data Type +} & \multicolumn{1}{c| }{\bf Remark } \\ + \hline +{LogIdId } & {integer } & {Primary Key } +\\ \hline +{JobId } & {integer } & {Points to Job record } +\\ \hline +{Time } & {datetime } & {Time/date log record created } +\\ \hline +{LogText } & {blob } & {Log text } +\\ \hline + +\end{longtable} + +The {\bf Log} table contains a log of all Job output. + +\addcontentsline{lot}{table}{Location Table Layout} +\begin{longtable}{|l|l|l|} + \hline +\multicolumn{3}{|l| }{\bf Location } \\ + \hline +\multicolumn{1}{|c| }{\bf Column Name } & \multicolumn{1}{c| }{\bf Data Type +} & \multicolumn{1}{c| }{\bf Remark } \\ + \hline +{LocationId } & {integer } & {Primary Key } +\\ \hline +{Location } & {tinyblob } & {Text defining location } +\\ \hline +{Cost } & {integer } & {Relative cost of obtaining Volume } +\\ \hline +{Enabled } & {tinyint } & {Whether or not Volume is enabled } +\\ \hline + +\end{longtable} + +The {\bf Location} table defines where a Volume is physically. + + +\addcontentsline{lot}{table}{Location Log Table Layout} +\begin{longtable}{|l|l|l|} + \hline +\multicolumn{3}{|l| }{\bf LocationLog } \\ + \hline +\multicolumn{1}{|c| }{\bf Column Name } & \multicolumn{1}{c| }{\bf Data Type +} & \multicolumn{1}{c| }{\bf Remark } \\ + \hline +{locLogIdId } & {integer } & {Primary Key } +\\ \hline +{Date } & {datetime } & {Time/date log record created } +\\ \hline +{MediaId } & {integer } & {Points to Media record } +\\ \hline +{LocationId } & {integer } & {Points to Location record } +\\ \hline +{NewVolStatus } & {integer } & {enum: Full, Archive, Append, Recycle, Purged + Read-only, Disabled, Error, Busy, Used, Cleaning } +\\ \hline +{Enabled } & {tinyint } & {Whether or not Volume is enabled } +\\ \hline + + +\end{longtable} + +The {\bf Log} table contains a log of all Job output. + \addcontentsline{lot}{table}{Version Table Layout} \begin{longtable}{|l|l|l|} @@ -728,7 +938,6 @@ The {\bf Version} table defines the Bacula database version number. Bacula checks this number before reading the database to ensure that it is compatible with the Bacula binary file. -\ \addcontentsline{lot}{table}{Base Files Table Layout} \begin{longtable}{|l|l|l|} diff --git a/docs/manuals/es/developers/coverpage.tex b/docs/manuals/es/developers/coverpage.tex new file mode 100644 index 00000000..c1aaca82 --- /dev/null +++ b/docs/manuals/es/developers/coverpage.tex @@ -0,0 +1,28 @@ +\newfont{\bighead}{cmr17 at 36pt} +\parskip 10pt +\parindent 0pt + +\title{\includegraphics{\idir bacula-logo.eps} \\ \bigskip + \Huge{Bacula}$^{\normalsize \textregistered}$ \Huge{Developer's Guide} + \begin{center} + \large{It comes in the night and sucks + the essence from your computers. } + \end{center} +} + + +\author{Kern Sibbald} +\date{\vspace{1.0in}\today \\ + This manual documents Bacula version \fullversion \\ + \vspace{0.2in} + Copyright {\copyright} 1999-2009, Free Software Foundation Europe + e.V. \\ + Bacula {\textregistered} is a registered trademark of Kern Sibbald.\\ + \vspace{0.2in} + Permission is granted to copy, distribute and/or modify this document under the terms of the + GNU Free Documentation License, Version 1.2 published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. + A copy of the license is included in the section entitled "GNU Free Documentation License". +} + +\maketitle diff --git a/docs/manuals/es/developers/developers.kilepr b/docs/manuals/es/developers/developers.kilepr index 37c5a25d..04d798b1 100644 --- a/docs/manuals/es/developers/developers.kilepr +++ b/docs/manuals/es/developers/developers.kilepr @@ -3,7 +3,7 @@ img_extIsRegExp=false img_extensions=.eps .jpg .jpeg .png .pdf .ps .fig .gif kileprversion=2 kileversion=2.0 -lastDocument= +lastDocument=developers.tex masterDocument= name=Developers pkg_extIsRegExp=false @@ -46,10 +46,10 @@ order=-1 archive=true column=0 encoding= -highlight= -line=0 -open=false -order=-1 +highlight=LaTeX +line=73 +open=true +order=0 [item:director.tex] archive=true @@ -80,10 +80,19 @@ order=-1 [item:generaldevel.tex] archive=true -column=120 +column=62 encoding= -highlight= -line=0 +highlight=LaTeX +line=553 +open=false +order=2 + +[item:git.tex] +archive=true +column=13 +encoding=UTF-8 +highlight=LaTeX +line=339 open=false order=-1 @@ -125,7 +134,7 @@ order=-1 [item:netprotocol.tex] archive=true -column=3056701840 +column=0 encoding= highlight= line=0 @@ -141,6 +150,15 @@ line=0 open=false order=-1 +[item:pluginAPI.tex] +archive=true +column=32565 +encoding= +highlight= +line=0 +open=false +order=-1 + [item:porting.tex] archive=true column=0 @@ -154,10 +172,10 @@ order=-1 archive=true column=0 encoding= -highlight= +highlight=LaTeX line=0 open=false -order=-1 +order=0 [item:smartall.tex] archive=true @@ -170,7 +188,7 @@ order=-1 [item:storage.tex] archive=true -column=3056701840 +column=0 encoding= highlight= line=0 @@ -188,7 +206,7 @@ order=-1 [item:version.tex] archive=true -column=3056701840 +column=0 encoding= highlight= line=0 diff --git a/docs/manuals/es/developers/developers.tex b/docs/manuals/es/developers/developers.tex index 9fdf26c1..902fa8c8 100644 --- a/docs/manuals/es/developers/developers.tex +++ b/docs/manuals/es/developers/developers.tex @@ -39,41 +39,19 @@ \begin{document} \sloppy -\newfont{\bighead}{cmr17 at 36pt} -\parskip 10pt -\parindent 0pt - -\title{\includegraphics{\idir bacula-logo.eps} \\ \bigskip - \Huge{Bacula}$^{\normalsize \textregistered}$ \Huge{Developer's Guide} - \begin{center} - \large{It comes in the night and sucks - the essence from your computers. } - \end{center} -} - - -\author{Kern Sibbald} -\date{\vspace{1.0in}\today \\ - This manual documents Bacula version \fullversion \\ - \vspace{0.2in} - Copyright {\copyright} 1999-2009, Free Software Foundation Europe - e.V. \\ - Bacula {\textregistered} is a registered trademark of Kern Sibbald.\\ - \vspace{0.2in} - Permission is granted to copy, distribute and/or modify this document under the terms of the - GNU Free Documentation License, Version 1.2 published by the Free Software Foundation; - with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. - A copy of the license is included in the section entitled "GNU Free Documentation License". -} - -\maketitle +\include{coverpage} \clearpage \pagenumbering{roman} \tableofcontents +\clearpage - +\pagestyle{myheadings} +\markboth{Bacula Version \version}{Bacula Version \version} +\pagenumbering{arabic} \include{generaldevel} +\include{git} +\include{pluginAPI} \include{platformsupport} \include{daemonprotocol} \include{director} diff --git a/docs/manuals/es/developers/do_echo b/docs/manuals/es/developers/do_echo new file mode 100644 index 00000000..04b9f79a --- /dev/null +++ b/docs/manuals/es/developers/do_echo @@ -0,0 +1,6 @@ +# +# Avoid that @VERSION@ and @DATE@ are changed by configure +# This file is sourced by update_version +# +echo "s%@VERSION@%${VERSION}%g" >${out} +echo "s%@DATE@%${DATE}%g" >>${out} diff --git a/docs/manuals/es/developers/generaldevel.tex b/docs/manuals/es/developers/generaldevel.tex index 74a8a2a4..33312af4 100644 --- a/docs/manuals/es/developers/generaldevel.tex +++ b/docs/manuals/es/developers/generaldevel.tex @@ -39,28 +39,23 @@ The following text describes some of the requirements for such code. \addcontentsline{toc}{subsubsection}{Patches} Subject to the copyright assignment described below, your patches should be -sent in {\bf diff -u} format relative to the current contents of the Source -Forge GIT repository or SVN repository. The diff -u format is the easiest -for us to understand and integrate. Please be sure to use the Bacula +sent in {\bf git format-patch} format relative to the current contents of the +master branch of the Source Forge Git repository. Please attach the +output file or files generated by the {\bf git format-patch} to the email +rather than include them directory to avoid wrapping of the lines +in the patch. Please be sure to use the Bacula indenting standard (see below) for source code. If you have checked out -the source with GIT or SVN, you can get a diff using. +the source with Git, you can get a diff using. -For the bacula, gui, and regress directories: \begin{verbatim} git pull -git diff >change.patch +git format-patch -M \end{verbatim} -For the docs or rescue directories: -\begin{verbatim} -svn update -svn diff > change.patch -\end{verbatim} - If you plan on doing significant development work over a period of time, after having your first patch reviewed and approved, you will be eligible -for having developer GIT or SVN write access so that you can commit your changes -directly to the GIT or SVN repository. To do so, you will need a userid on Source +for having developer Git write access so that you can commit your changes +directly to the Git repository. To do so, you will need a userid on Source Forge. \subsection{Copyrights} @@ -164,7 +159,7 @@ to confirm reception of the signed FLA. \index{Cycle!Developement} \addcontentsline{toc}{subsubsection}{Development Cycle} -As I noted in previous emails the number of contributions are +As discussed on the email lists, the number of contributions are increasing significantly. We expect this positive trend will continue. As a consequence, we have modified how we do development, and instead of making a list of all the features that we will @@ -302,7 +297,7 @@ Getting code implemented in Bacula works roughly as follows: \item Kern is the project manager, but prefers not to be a "gate keeper". This means that the developers are expected to be self-motivated, - and once they have experience submit directly to the GIT or SVN + and once they have experience submit directly to the Git repositories. However, it is a good idea to have your patches reviewed prior to submitting, and it is a bad idea to submit monster patches because no one will @@ -344,7 +339,7 @@ If you fix a bug in a released version, you should, unless it is an absolutely trivial bug, create and release a patch file for the bug. The procedure is as follows: -Fix the bug in the branch and in the trunk. +Fix the bug in the released branch and in the develpment master branch. Make a patch file for the branch and add the branch patch to the patches directory in both the branch and the trunk. @@ -359,7 +354,8 @@ follows: (input description) (end edit) - git diff >>2.2.4-restore.patch + git format-patch -M + mv 0001-xxx 2.2.4-restore.patch \end{verbatim} check to make sure no extra junk got put into the patch file (i.e. @@ -384,606 +380,6 @@ So, end the end, the patch file is: \end{itemize} -\section{Bacula GIT and SVN repositories} -\index{GIT and SVN} -\addcontentsline{toc}{subsection}{GIT and SVN repositories} -As of August 2009, the Bacula source code has been split into -two repositories. One is a GIT repository that holds the -main Bacula source code with directories {\bf bacula}, {\bf gui}, -and {\bf regress}. The second repository (SVN) contains -the directories {\bf rescue} and {\bf docs}. Both repositories are -hosted on Source Forge. - -Previously everything was in a single SVN repository. -We have split the SVN repository into two because GIT -offers significant advantages for ease of managing and integrating -developer's changes. However, one of the disadvantages of GIT is that you -must work with the full repository, while SVN allows you to checkout -individual directories. If we put everything into a single GIT -repository it would be far bigger than most developers would want -to checkout, so we have left the docs and rescue in the old SVN -repository, and moved only the parts that are most actively -worked on by the developers (bacula, gui, and regress) to a GIT -repository. - -Unfortunately, Bacula developers must now have a certain knowledege -of both GIT and SVN, and if you are a core Bacula developer knowledge of -GIT is particularly important. - -\section{GIT Usage} -\index{GIT Usage} -\addcontentsline{toc}{subsection}{GIT Usage} - -Please note that if you are familiar with SVN, GIT is similar, -(and better), but there can be a few surprising differences that -can lead to damaging the history of the repository (repo) if -you attempt to force pushing data into the GIT repo. - -The GIT repo contains the subdirectories {\bf bacula}, {\bf gui}, -and {\bf regress}. With GIT it is not possible to pull only a -single directory, because of the hash code nature of git, you -must take all or nothing. - -For developers, the most important thing to remember about GIT and -the Source Forge repository is not to "force" a {\bf push} to the -repository, and not to use the {\bf rebase} command on the {\bf -master} branch of the repository. Doing so, will possibly rewrite -the GIT repository history and cause a lot of problems for the -project. - -You may and should use {\bf rebase} on your own branches that you -want to synchronize with the {\bf master} branch, but please -do not use {\bf rebase} on the {\bf master} branch. The proper -way of merging changes will be discussed below. - -You can get a full copy of the Source Forge Bacula GIT repository with the -following command: - -\begin{verbatim} -git clone git://bacula.git.sourceforge.net/gitroot/bacula/bacula trunk -\end{verbatim} - -This will put a read-only copy into the directory {\bf trunk} -in your current directory, and {\bf trunk} will contain -the subdirectories: {\bf bacula}, {\bf gui}, and {\bf regress}. - -If you have write permission, you can get a copy of the GIT -repo with: - -\begin{verbatim} -git clone ssh://@bacula.git.sourceforge.net/gitroot/bacula/bacula trunk -\end{verbatim} - -where you replace \verb++ with your Source Forge login -userid, and you must have previously uploaded your public ssh key -to Source Forge. - -The above command needs to be done only once. Thereafter, you can: - -\begin{verbatim} -cd trunk -git pull origin -\end{verbatim} - -As of August 2009, the size of the repository ({\bf trunk} in the above -example) will be approximately 55 Megabytes. However, if you build -from source in this directory and do a lot of updates and regression -testing, the directory could become several hundred megabytes. - -\subsection{Learning GIT} -\index{Learning GIT} -If you want to learn more about GIT, we recommend that you visit:\\ -\elink{http://book.git-scm.com/}{http://book.git-scm.com/}. - - -\subsection{Publishing your changes} -\index{Publishing} -Since GIT is more complex than SVN, it takes a bit of time to learn how -to use it properly, and if you are not careful, you can potentially create -a new history in the repository. In addition, since GIT is a distributed -version control system, we prefer to receive a full branch submission rather -than simply a patch. To accomplish this, you must create your changes in -a branch, then {\bf push} them to some public repository -- it can be your -own repository that you publish or another. To simplify this phase for you, we -have created a publich Bacula GIT repository on {\bf github} where you can -push your branch containing changes you would like integrated into the Bacula -source code. - -Once you have pushed your branch to {\bf github} or told us where we can pull -from your public repository, one of the senior Bacula devlopers will fetch your -changes, examine them, possibly make comments for changes they would like to -see, and as the final step, the senior developer will commit it to the -Bacula Source Forge GIT repository. - -\subsection{Github} -\index{github} -If you are going to submit before cloning the Bacula Github database, you must create a login on -the Github website:\\ -\elink{http://github.com/}{http://github.com/}\\ -You must also upload your public ssh key. Please see the instructions -at the above link. Then you notify one of the senior Bacula developers, -who will add your Github user name to the Bacula repository. Finally, -you clone the Bacula repository with: - -\begin{verbatim} - git clone git@github.com:/bacula.git -\end{verbatim} - -where you replace \verb++ with the User Name that you created -when you created your Github login, and you replace \verb++ with the name -of a directory that you want git to create to hold your local Bacula git -repository. - -Normally, you will work by creating a branch of the master branch of your -repository, make your modifications, then make sure it is up to date, and finally -push it to Github. Assuming you call the Bacula repository {\bf bacula}, you might -use the following commands: - -\begin{verbatim} -cd bacula -git checkout master -git pull -git branch /newbranch -git checkout /newbranch -(edit, ...) -git add -git commit -m "" -... -\end{verbatim} - -Note, we request you to create the branch name with your github -login name. This guarantees that the branch name will be unique and -easily identified as well. - -When you have completed working on your branch, you will do: - -\begin{verbatim} -cd bacula -git checkout /newbranch -git pull -git rebase master -\end{verbatim} - -If you have completed your edits before anyone has modified the repository, -the {\bf git rebase master} will report that there was nothing to do. Otherwise, -it will merge the changes that were made in the repository before your changes. -If there are any conflicts, git will tell you. Typically resolving conflicts with -git is relatively easy. You simply make a diff: - -\begin{verbatim} -git diff -\end{verbatim} - -Then edit each file that was listed in the {\bf git diff} to remove the -conflict, which will be indicated by lines of: - -\begin{verbatim} -<<<<<<< HEAD -text ->>>>>>>> -other text -===== -\end{verbatim} - -where {\bf text} is what is in the Bacula repository, and {\bf other text} -is what you have changed. - -Once you have eliminated the conflict, the {\bf git diff} will show nothing, -and you must do a: - -\begin{verbatim} -git add -\end{verbatim} - -Once you have fixed all the files with conflicts in the above manner, you enter: - -\begin{verbatim} -git rebase --continue -\end{verbatim} - -and your rebase will be complete. - -If for some reason, before doing the --continue, you want to abort the rebase and return to what you had, you enter: - -\begin{verbatim} -git rebase --abort -\end{verbatim} - -Finally to upload your branch, you do: - -\begin{verbatim} -git push origin /newbranch -\end{verbatim} - -If you wish to delete it later, you can use: - -\begin{verbatim} -git push origin :/newbranch -\end{verbatim} - - - -\section{SVN Usage} -\index{SVN Usage} -\addcontentsline{toc}{subsection}{SVN Usage} - -Note: this section is somewhat out of date, since the SVN now -contains only the docs and rescue subdirectories. The bacula, -gui, and regress directories are now maintained in a GIT -repository. - -Please note that if you are familiar with CVS, SVN is very -similar (and better), but there can be a few surprising -differences. - -The Bacula SourceForge.net Subversion repository that contains -the documentation and the rescue scripts checked out through SVN with the -following command: - -\begin{verbatim} -svn checkout https://bacula.svn.sourceforge.net/svnroot/bacula bacula -\end{verbatim} - -With the above command, you will get everything, which is a very large -amount of data: - -\begin{verbatim} -branches/ - Branch-1.32a/ - ... - Branch-2.0/ - import/ - vendor/ -tags/ - Release-1.1/ - ... - Release-2.0.2/ -trunk/ - bacula/ - docs/ - gui/ - regress/ - rescue/ -\end{verbatim} - -Note, you should NEVER commit code to any checkout that you have -done of a tag. All tags (e.g. Release-1.1, ... Release-2.0.2) -should be considered read-only. - -You may commit code to the most recent item in -branches (in the above the most recent one is Branch-2.0). If -you want to commit code to an older branch, then please contact -Kern first. - -You may create your own tags and/or branches, but they should -have a name clearly distinctive from Branch-, Release-, or Beta-, -which are official names used by the project. If you create a -tag, then you should NEVER commit code to it, for the same -reason noted above -- it should serve as a marker for something -you released. If you create a branch, then you are free to -commit to it as you wish. - -You may, of course, commit to the trunk. - -In summary: - -\begin{verbatim} -branches - Branch-nnn -tags - Release-nnn - Beta-nnn -\end{verbatim} - -are reserved names to be created only by the project manager (or -with his OK), where the nnn is any sequence of numbers and -periods (e.g. 2.0, 2.0.1, ...). - -In addition all tags even those that you create are read-only -forever. Typically tags represent release points either in the -trunk or in a branch. - - -Coming back to getting source code. -If you only want the current Bacula source code, you should see -the above section that describes the GIT repository. - -To view what is in the SVN, point your browser at the following URL: -http://bacula.svn.sourceforge.net/viewvc/bacula/ - -Many of the Subversion (svn) commands are almost identical to those that -you have used for cvs, but some (such as a checkout) can have surprising -results, so you should take a careful look at the documentation. - -The following documentation on the new -svn repository will help you know how to use it: - -Here is the list of branches: -\begin{verbatim} - Branch-1.32a - Branch-1.32e - Branch-1.34.2 - Branch-1.34.5 - Branch-1.36 - Branch-1.36.1 - Branch-1.36.2 - Branch-1.38 - Branch-2.0 - import - vendor -\end{verbatim} - -The list of tags is: -\begin{verbatim} - Release-1.1 Release-1.19 Release-1.19a Release-1.19b - Release-1.20 Release-1.21 Release-1.22 Release-1.23 - Release-1.23a Release-1.24 Release-1.25 Release-1.25a - Release-1.26 Release-1.27 Release-1.27a Release-1.27b - Release-1.27c Release-1.28 Release-1.29 Release-1.30 - Release-1.31 Release-1.31a Release-1.32 Release-1.32a - Release-1.32b Release-1.32c Release-1.32d Release-1.32e - Release-1.32f Release-1.32f-2 Release-1.32f-3 Release-1.32f-4 - Release-1.32f-5 Release-1.34.0 Release-1.34.1 Release-1.34.3 - Release-1.34.4 Release-1.34.5 Release-1.34.6 Release-1.35.1 - Release-1.35.2 Release-1.35.3 Release-1.35.6 Release-1.35.7 - Release-1.35.8 Release-1.36.0 Release-1.36.1 Release-1.36.2 - Release-1.36.3 Release-1.38.0 Release-1.38.1 Release-1.38.10 - Release-1.38.11 Release-1.38.2 Release-1.38.3 Release-1.38.4 - Release-1.38.5 Release-1.38.6 Release-1.38.7 Release-1.38.8 - Release-1.38.9 Release-1.8.1 Release-1.8.2 Release-1.8.3 - Release-1.8.4 Release-1.8.5 Release-1.8.6 Release-2.0.0 - Release-2.0.1 Release-2.0.2 -\end{verbatim} - -Here is a list of commands to get you started. The recommended book is -"Version Control with Subversion", by Ben Collins-Sussmann, -Brian W. Fitzpatrick, and Michael Pilato, O'Reilly. The book is -Open Source, so it is also available on line at: - -\begin{verbatim} - http://svnbook.red-bean.com -\end{verbatim} - -Get a list of commands - -\begin{verbatim} - svn help -\end{verbatim} - -Get a help with a command - -\begin{verbatim} - svn help command -\end{verbatim} - -Checkout the HEAD revision of all modules from the project into the -directory bacula-new - -\begin{verbatim} - svn co https://bacula.svn.sourceforge.net/svnroot/bacula/trunk bacula.new -\end{verbatim} - -Checkout the HEAD revision of the bacula module into the bacula subdirectory - -\begin{verbatim} - svn checkout https://bacula.svn.sourceforge.net/svnroot/bacula/trunk/bacula -\end{verbatim} - -See which files have changed in the working copy - -\begin{verbatim} - svn status -\end{verbatim} - -See which files are out of date - -\begin{verbatim} - svn status -u -\end{verbatim} - -Add a new file file.c - -\begin{verbatim} - svn add file.c -\end{verbatim} - -Create a new directory - -\begin{verbatim} - svn mkdir newdir -\end{verbatim} - -Delete an obsolete file - -\begin{verbatim} - svn delete file.c -\end{verbatim} - -Rename a file - -\begin{verbatim} - svn move file.c newfile.c -\end{verbatim} - -Move a file to a new location - -\begin{verbatim} - svn move file.c ../newdir/file.c -\end{verbatim} - -Copy a file retaining the original history in the new file - -\begin{verbatim} - svn copy file.c newfile.c -\end{verbatim} - -Update the working copy with the outstanding changes - -\begin{verbatim} - svn update -\end{verbatim} - -Compare working copy with the repository - -\begin{verbatim} - svn diff file.c -\end{verbatim} - -Commit the changes in the local working copy - -\begin{verbatim} - svn commit -\end{verbatim} - -Specify which files are ignored in the current directory - -\begin{verbatim} - svn propedit svn:ignore . -\end{verbatim} - -Mark a file to be executable - -\begin{verbatim} - svn propset svn:executable '*' prog.sh -\end{verbatim} - -Unmark a file as executable - -\begin{verbatim} - svn propdel svn:executable prog.sh -\end{verbatim} - -List a file's properties - -\begin{verbatim} - svn proplist file.c -\end{verbatim} - -Create a branch for a new version - -\begin{verbatim} - svn copy https://bacula.svn.sourceforge.net/svnroot/bacula/trunk \ - https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.1 -\end{verbatim} - -Tag a version for a new release - -\begin{verbatim} - svn copy https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.1 \ - https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Release-2.1 -\end{verbatim} - - -Let's say you are working in the directory scripts. You would then do: - -\begin{verbatim} -cd scripts -(edit some files) -\end{verbatim} - -when you are happy with your changes, you can do the following: - -\begin{verbatim} -cd bacula (to your top level directory) -svn diff my-changes.patch -\end{verbatim} - -When the command is done, you can look in the file my-changes.patch -and you will see all the changes you have made to your copy of the -repository. Make sure that you understand all the changes that -it reports before proceeding. If you modified files that you do -do not want to commit to the main repository, you can simply delete -them from your local directory, and they will be restored from the -repository with the "svn update" that is shown below. Normally, you -should not find changes to files that you do not want to commit, and -if you find yourself in that position a lot, you are probably doing -something wrong. - -Let's assume that now you want to commit your changes to the main -SVN repository. - -First do: - -\begin{verbatim} -cd bacula -svn update -\end{verbatim} - -When you do this, it will pull any changes made by other developers into -your local copy of the repository, and it will check for conflicts. If there -are any, it will tell you, and you will need to resolve them. The problems -of resolving conflicts are a bit more than this document can cover, but -you can examine the files it claims have conflicts and look for \lt{}\lt{}\lt{}\lt{} -or look in the .rej files that it creates. If you have problems, just ask -on the developer's list. - -Note, doing the above "svn update" is not absolutely necessary. There are -times when you may be working on code and you want to commit it, but you -explicitly do not want to move up to the latest version of the code in -the SVN. If that is the case, you can simply skip the "svn update" and -do the commit shown below. If the commit fails because of a conflict, it -will tell you, and you must resolve the conflict before it will permit -you to do the commit. - -Once your local copy of the repository has been updated, you can now -commit your changes: - -\begin{verbatim} -svn commit -m "Some comment about what you changed" -\end{verbatim} - -or if you really only want to commit a single file, you can -do: - -\begin{verbatim} -svn commit -m "comment" scripts/file-I-edited -\end{verbatim} - -Note, if you have done a build in your directory, or you have added -other new files, the commit will update only the files that are -actually in the repository. For example, none of the object files -are stored in the repository, so when you do a commit, those object -files will simply be ignored. - -If you want to add new files or remove files from the main SVN -repository, and you are not experienced with SVN, please ask Kern -to do it. If you follow the simple steps above, it is unlikely that -you will do any damage to the repository, and if you do, it is always -possible for us to recover, but it can be painful. - -If you are only working in one subdirectory of say the bacula project, -for example, the scripts directory, you can do your commit from -that subdirectory, and only the changes in that directory and all its -subdirectories will be committed. This can be helpful for translators. -If you are doing a French translation, you will be working in -docs/manual-fr, and if you are always cd'ed into that directory when -doing your commits, your commit will effect only that directory. As -long as you are careful only to change files that you want changed, -you have little to worry about. - -\section{Subversion Resources} -\index{Subversion (svn) Resources} -\addcontentsline{toc}{subsection}{Subversion Resources} - -Main Subversion Web Page -\elink{http://subversion.tigris.org}{http://subversion.tigris.org} - -Subversion Book -\elink{http://svnbook.red-bean.com}{http://svnbook.red-bean.com} - -Subversion Clients -\elink{http://subversion.tigris.org/project\_packages.html}{http://subversion.tigris.org/project\_packages.html} - - (For Windows users the TortoiseSVN package is awesome) - -GUI UNIX client link -\elink{http://rapidsvn.tigris.org/}{http://rapidsvn.tigris.org/} - -A nice KDE GUI client: -kdesvn - - - \section{Developing Bacula} \index{Developing Bacula} \index{Bacula!Developing} diff --git a/docs/manuals/es/developers/git.tex b/docs/manuals/es/developers/git.tex new file mode 100644 index 00000000..6674441c --- /dev/null +++ b/docs/manuals/es/developers/git.tex @@ -0,0 +1,372 @@ +\chapter{Bacula Git Usage} +\label{_GitChapterStart} +\index{Git} +\index{Git!Repo} +\addcontentsline{toc}{section}{Bacula Bit Usage} + +This chapter is intended to help you use the Git source code +repositories to obtain, modify, and submit Bacula source code. + + +\section{Bacula Git repositories} +\index{Git} +\addcontentsline{toc}{subsection}{Git repositories} +As of September 2009, the Bacula source code has been split into +three Git repositories. One is a repository that holds the +main Bacula source code with directories {\bf bacula}, {\bf gui}, +and {\bf regress}. The second repository contains +the directories {\bf docs} directory, and the third repository +contains the {\bf rescue} directory. All three repositories are +hosted on Source Forge. + +Previously everything was in a single SVN repository. +We have split the SVN repository into three because Git +offers significant advantages for ease of managing and integrating +developer's changes. However, one of the disadvantages of Git is that you +must work with the full repository, while SVN allows you to checkout +individual directories. If we put everything into a single Git +repository it would be far bigger than most developers would want +to checkout, so we have separted the docs and rescue into their own +repositories, and moved only the parts that are most actively +worked on by the developers (bacula, gui, and regress) to a the +Git Bacula repository. + +Bacula developers must now have a certain knowledege of Git. + +\section{Git Usage} +\index{Git Usage} +\addcontentsline{toc}{subsection}{Git Usage} + +Please note that if you are familiar with SVN, Git is similar, +(and better), but there can be a few surprising differences that +can be very confusing (nothing worse than converting from CVS to SVN). + +The main Bacula Git repo contains the subdirectories {\bf bacula}, {\bf gui}, +and {\bf regress}. With Git it is not possible to pull only a +single directory, because of the hash code nature of Git, you +must take all or nothing. + +For developers, the most important thing to remember about Git and +the Source Forge repository is not to "force" a {\bf push} to the +repository. Doing so, can possibly rewrite +the Git repository history and cause a lot of problems for the +project. + +You can get a full copy of the Source Forge Bacula Git repository with the +following command: + +\begin{verbatim} +git clone git://bacula.git.sourceforge.net/gitroot/bacula/bacula trunk +\end{verbatim} + +This will put a read-only copy into the directory {\bf trunk} +in your current directory, and {\bf trunk} will contain +the subdirectories: {\bf bacula}, {\bf gui}, and {\bf regress}. +Obviously you can use any name an not just {\bf trunk}. In fact, +once you have the repository in say {\bf trunk}, you can copy the +whole directory to another place and have a fully functional +git repository. + +If you have write permission to the Source Forge +repository, you can get a copy of the Git repo with: + +\begin{verbatim} +git clone ssh://@bacula.git.sourceforge.net/gitroot/bacula/bacula trunk +\end{verbatim} + +where you replace \verb++ with your Source Forge login +userid, and you must have previously uploaded your public ssh key +to Source Forge. + +The above command needs to be done only once. Thereafter, you can: + +\begin{verbatim} +cd trunk +git pull # refresh my repo with the latest code +\end{verbatim} + +As of August 2009, the size of the repository ({\bf trunk} in the above +example) will be approximately 55 Megabytes. However, if you build +from source in this directory and do a lot of updates and regression +testing, the directory could become several hundred megabytes. + +\subsection{Learning Git} +\index{Learning Git} +If you want to learn more about Git, we recommend that you visit:\\ +\elink{http://book.git-scm.com/}{http://book.git-scm.com/}. + +Some of the differences between Git and SVN are: +\begin{itemize} +\item Your main Git directory is a full Git repository to which you can + and must commit. In fact, we suggest you commit frequently. +\item When you commit, the commit goes into your local Git + database. You must use another command to write it to the + master Source Forge repository (see below). +\item The local Git database is kept in the directory {\bf .git} at the + top level of the directory. +\item All the important Git configuration information is kept in the + file {\bf .git/config} in ASCII format that is easy to manually edit. +\item When you do a {\bf commit} the changes are put in {\bf .git} + rather but not in the main Source Forge repository. +\item You can push your changes to the external repository using + the command {\bf git push} providing you have write permission + on the repository. +\item We restrict developers just learning git to have read-only + access until they feel comfortable with git before giving them + write access. +\item You can download all the current changes in the external repository + and merge them into your {\bf master} branch using the command + {\bf git pull}. +\item The command {\bf git add} is used to add a new file to the + repository AND to tell Git that you want a file that has changed + to be in the next commit. This has lots of advantages, because + a {\bf git commit} only commits those files that have been + explicitly added. Note with SVN {\bf add} is used only + to add new files to the repo. +\item You can add and commit all files modifed in one command + using {\bf git commit -a}. +\item This extra use of {\bf add} allows you to make a number + of changes then add only a few of the files and commit them, + then add more files and commit them until you have committed + everything. This has the advantage of allowing you to more + easily group small changes and do individaual commits on them. + By keeping commits smaller, and separated into topics, it makes + it much easier to later select certain commits for backporting. +\item If you {\bf git pull} from the main repository and make + some changes, and before you do a {\bf git push} someone + else pushes changes to the Git repository, your changes will + apply to an older version of the repository you will probably + get an error message such as: + +\begin{verbatim} + git push + To git@github.com:bacula/bacula.git + ! [rejected] master -> master (non-fast forward) + error: failed to push some refs to 'git@github.com:bacula/bacula.git' +\end{verbatim} + + which is Git's way of telling you that the main repository has changed + and that if you push your changes, they will not be integrated properly. + This is very similar to what happens when you do an "svn update" and + get merge conflicts. + As we have noted above, you should never ask Git to force the push. + See below for an explanation of why. +\item To integrate (merge) your changes properly, you should always do + a {\bf git pull} just prior to doing a {\bf git push}. +\item If Git is unable to merge your changes or finds a conflict it + will tell you and you must do conflict resolution, which is much + easier in Git than in SVN. +\item Resolving conflicts is described below in the {\bf github} section. +\end{itemize} + +\section{Step by Step Modifying Bacula Code} +Suppose you want to download Bacula source code, build it, make +a change, then submit your change to the Bacula developers. What +would you do? + +\begin{itemize} +\item Download the Source code:\\ +\begin{verbatim} +git clone ssh://@bacula.git.sourceforge.net/gitroot/bacula/bacula trunk +\end{verbatim} + +\item Configure and Build Bacula:\\ +\begin{verbatim} +./configure (all-your-normal-options) +make +\end{verbatim} + +\item Create a branch to work on: +\begin{verbatim} +cd trunk/bacula +git checkout -b bugfix master +\end{verbatim} + +\item Edit, build, Test, ...\\ +\begin{verbatim} +edit file jcr.h +make +test +\end{verbatim} + +\item commit your work: +\begin{verbatim} +git commit -am "Short comment on what I did" +\end{verbatim} + +\item Possibly repeat the above two items + +\item Switch back to the master branch:\\ +\begin{verbatim} +git checkout master +\end{verbatim} + +\item Pull the latest changes:\\ +\begin{verbatim} +git pull +\end{verbatim} + +\item Get back on your bugfix branch:\\ +\begin{verbatim} +git checkout bugfix +\end{verbatim} + +\item Merge your changes and correct any conflicts:\\ +\begin{verbatim} +git rebase master bugfix +\end{verbatim} + +\item Fix any conflicts:\\ +You will be notified if there are conflicts. The first +thing to do is: + +\begin{verbatim} +git diff +\end{verbatim} + +This will produce a diff of only the files having a conflict. +Fix each file in turn. When it is fixed, the diff for that file +will go away. + +For each file fixed, you must do the same as SVN, inform git with: + +\begin{verbatim} +git add (name-of-file-no-longer-in-conflict) +\end{verbatim} + +\item When all files are fixed do: +\begin{verbatim} +git rebase --continue +\end{verbatim} + +\item When you are ready to send a patch, do the following:\\ +\begin{verbatim} +git checkout bugfix +git format-patch -M master +\end{verbatim} +Look at the files produced. They should be numbered 0001-xxx.patch +where there is one file for each commit you did, number sequentially, +and the xxx is what you put in the commit comment. + +\item If the patch files are good, send them by email to the developers +as attachments. + +\end{itemize} + + + +\subsection{More Details} + +Normally, you will work by creating a branch of the master branch of your +repository, make your modifications, then make sure it is up to date, and finally +create format-patch patches or push it to the Source Forge repo. Assuming +you call the Bacula repository {\bf trunk}, you might use the following +commands: + +\begin{verbatim} +cd trunk +git checkout master +git pull +git checkout -b newbranch master +(edit, ...) +git add +git commit -m "" +... +\end{verbatim} + +When you have completed working on your branch, you will do: + +\begin{verbatim} +cd trunk +git checkout newbranch # ensure I am on my branch +git pull # get latest source code +git rebase master # merge my code +\end{verbatim} + +If you have completed your edits before anyone has modified the repository, +the {\bf git rebase master} will report that there was nothing to do. Otherwise, +it will merge the changes that were made in the repository before your changes. +If there are any conflicts, Git will tell you. Typically resolving conflicts with +Git is relatively easy. You simply make a diff: + +\begin{verbatim} +git diff +\end{verbatim} + +Then edit each file that was listed in the {\bf git diff} to remove the +conflict, which will be indicated by lines of: + +\begin{verbatim} +<<<<<<< HEAD +text +>>>>>>>> +other text +===== +\end{verbatim} + +where {\bf text} is what is in the Bacula repository, and {\bf other text} +is what you have changed. + +Once you have eliminated the conflict, the {\bf git diff} will show nothing, +and you must do a: + +\begin{verbatim} +git add +\end{verbatim} + +Once you have fixed all the files with conflicts in the above manner, you enter: + +\begin{verbatim} +git rebase --continue +\end{verbatim} + +and your rebase will be complete. + +If for some reason, before doing the --continue, you want to abort the rebase and return to what you had, you enter: + +\begin{verbatim} +git rebase --abort +\end{verbatim} + +Finally to make a set of patch files + +\begin{verbatim} +git format-patch -M master +\end{verbatim} + +When you see your changes have been integrated and pushed to the +main repo, you can delete your branch with: + +\begin{verbatim} +git checkout master +git branch -D newbranch +\end{verbatim} + + +\section{Forcing Changes} +If you want to understand why it is not a good idea to force a +push to the repository, look at the following picture: + +\includegraphics[width=0.85\textwidth]{\idir git-edit-commit.eps} + +The above graphic has three lines of circles. Each circle represents +a commit, and time runs from the left to the right. The top line +shows the repository just before you are going to do a push. Note the +point at which you pulled is the circle on the left, your changes are +represented by the circle labeled {\bf Your mods}. It is shown below +to indicate that the changes are only in your local repository. Finally, +there are pushes A and B that came after the time at which you pulled. + +If you were to force your changes into the repository, Git would place them +immediately after the point at which you pulled them, so they would +go before the pushes A and B. However, doing so would rewrite the history +of the repository and make it very difficult for other users to synchronize +since they would have to somehow wedge their changes at some point before the +current HEAD of the repository. This situation is shown by the second line of +pushes. + +What you really want to do is to put your changes after Push B (the current HEAD). +This is shown in the third line of pushes. The best way to accomplish this is to +work in a branch, pull the repository so you have your master equal to HEAD (in first +line), then to rebase your branch on the current master and then commit it. The +exact commands to accomplish this are shown in the next couple of sections. diff --git a/docs/manuals/es/developers/gui-interface.tex b/docs/manuals/es/developers/gui-interface.tex new file mode 100644 index 00000000..2733cda9 --- /dev/null +++ b/docs/manuals/es/developers/gui-interface.tex @@ -0,0 +1,102 @@ +%% +%% + +\chapter*{Implementing a GUI Interface} +\label{_ChapterStart} +\index[general]{Interface!Implementing a Bacula GUI } +\index[general]{Implementing a Bacula GUI Interface } +\addcontentsline{toc}{section}{Implementing a Bacula GUI Interface} + +\section{General} +\index[general]{General } +\addcontentsline{toc}{subsection}{General} + +This document is intended mostly for developers who wish to develop a new GUI +interface to {\bf Bacula}. + +\subsection{Minimal Code in Console Program} +\index[general]{Program!Minimal Code in Console } +\index[general]{Minimal Code in Console Program } +\addcontentsline{toc}{subsubsection}{Minimal Code in Console Program} + +Until now, I have kept all the Catalog code in the Directory (with the +exception of dbcheck and bscan). This is because at some point I would like to +add user level security and access. If we have code spread everywhere such as +in a GUI this will be more difficult. The other advantage is that any code you +add to the Director is automatically available to both the tty console program +and the GNOME program. The major disadvantage is it increases the size of the +code -- however, compared to Networker the Bacula Director is really tiny. + +\subsection{GUI Interface is Difficult} +\index[general]{GUI Interface is Difficult } +\index[general]{Difficult!GUI Interface is } +\addcontentsline{toc}{subsubsection}{GUI Interface is Difficult} + +Interfacing to an interactive program such as Bacula can be very difficult +because the interfacing program must interpret all the prompts that may come. +This can be next to impossible. There are are a number of ways that Bacula is +designed to facilitate this: + +\begin{itemize} +\item The Bacula network protocol is packet based, and thus pieces of +information sent can be ASCII or binary. +\item The packet interface permits knowing where the end of a list is. +\item The packet interface permits special ``signals'' to be passed rather +than data. +\item The Director has a number of commands that are non-interactive. They +all begin with a period, and provide things such as the list of all Jobs, +list of all Clients, list of all Pools, list of all Storage, ... Thus the GUI +interface can get to virtually all information that the Director has in a +deterministic way. See \lt{}bacula-source\gt{}/src/dird/ua\_dotcmds.c for +more details on this. +\item Most console commands allow all the arguments to be specified on the +command line: e.g. {\bf run job=NightlyBackup level=Full} +\end{itemize} + +One of the first things to overcome is to be able to establish a conversation +with the Director. Although you can write all your own code, it is probably +easier to use the Bacula subroutines. The following code is used by the +Console program to begin a conversation. + +\footnotesize +\begin{verbatim} +static BSOCK *UA_sock = NULL; +static JCR *jcr; +... + read-your-config-getting-address-and-pasword; + UA_sock = bnet_connect(NULL, 5, 15, "Director daemon", dir->address, + NULL, dir->DIRport, 0); + if (UA_sock == NULL) { + terminate_console(0); + return 1; + } + jcr.dir_bsock = UA_sock; + if (!authenticate_director(\&jcr, dir)) { + fprintf(stderr, "ERR=%s", UA_sock->msg); + terminate_console(0); + return 1; + } + read_and_process_input(stdin, UA_sock); + if (UA_sock) { + bnet_sig(UA_sock, BNET_TERMINATE); /* send EOF */ + bnet_close(UA_sock); + } + exit 0; +\end{verbatim} +\normalsize + +Then the read\_and\_process\_input routine looks like the following: + +\footnotesize +\begin{verbatim} + get-input-to-send-to-the-Director; + bnet_fsend(UA_sock, "%s", input); + stat = bnet_recv(UA_sock); + process-output-from-the-Director; +\end{verbatim} +\normalsize + +For a GUI program things will be a bit more complicated. Basically in the very +inner loop, you will need to check and see if any output is available on the +UA\_sock. For an example, please take a look at the GNOME GUI interface code +in: \lt{}bacula-source\>/src/gnome-console/console.c diff --git a/docs/manuals/es/developers/pluginAPI.tex b/docs/manuals/es/developers/pluginAPI.tex new file mode 100644 index 00000000..8996cecc --- /dev/null +++ b/docs/manuals/es/developers/pluginAPI.tex @@ -0,0 +1,854 @@ +%% +%% + +\chapter{Bacula FD Plugin API} +To write a Bacula plugin, you create a dynamic shared object program (or dll on +Win32) with a particular name and two exported entry points, place it in the +{\bf Plugins Directory}, which is defined in the {\bf bacula-fd.conf} file in +the {\bf Client} resource, and when the FD starts, it will load all the plugins +that end with {\bf -fd.so} (or {\bf -fd.dll} on Win32) found in that directory. + +\section{Normal vs Command Plugins} +In general, there are two ways that plugins are called. The first way, is when +a particular event is detected in Bacula, it will transfer control to each +plugin that is loaded in turn informing the plugin of the event. This is very +similar to how a {\bf RunScript} works, and the events are very similar. Once +the plugin gets control, it can interact with Bacula by getting and setting +Bacula variables. In this way, it behaves much like a RunScript. Currently +very few Bacula variables are defined, but they will be implemented as the need +arrises, and it is very extensible. + +We plan to have plugins register to receive events that they normally would +not receive, such as an event for each file examined for backup or restore. +This feature is not yet implemented. + +The second type of plugin, which is more useful and fully implemented in the +current version is what we call a command plugin. As with all plugins, it gets +notified of important events as noted above (details described below), but in +addition, this kind of plugin can accept a command line, which is a: + +\begin{verbatim} + Plugin = +\end{verbatim} + +directive that is placed in the Include section of a FileSet and is very +similar to the "File = " directive. When this Plugin directive is encountered +by Bacula during backup, it passes the "command" part of the Plugin directive +only to the plugin that is explicitly named in the first field of that command +string. This allows that plugin to backup any file or files on the system that +it wants. It can even create "virtual files" in the catalog that contain data +to be restored but do not necessarily correspond to actual files on the +filesystem. + +The important features of the command plugin entry points are: +\begin{itemize} + \item It is triggered by a "Plugin =" directive in the FileSet + \item Only a single plugin is called that is named on the "Plugin =" directive. + \item The full command string after the "Plugin =" is passed to the plugin + so that it can be told what to backup/restore. +\end{itemize} + + +\section{Loading Plugins} +Once the File daemon loads the plugins, it asks the OS for the +two entry points (loadPlugin and unloadPlugin) then calls the +{\bf loadPlugin} entry point (see below). + +Bacula passes information to the plugin through this call and it gets +back information that it needs to use the plugin. Later, Bacula + will call particular functions that are defined by the +{\bf loadPlugin} interface. + +When Bacula is finished with the plugin +(when Bacula is going to exit), it will call the {\bf unloadPlugin} +entry point. + +The two entry points are: + +\begin{verbatim} +bRC loadPlugin(bInfo *lbinfo, bFuncs *lbfuncs, pInfo **pinfo, pFuncs **pfuncs) + +and + +bRC unloadPlugin() +\end{verbatim} + +both these external entry points to the shared object are defined as C entry +points to avoid name mangling complications with C++. However, the shared +object can actually be written in any language (preferrably C or C++) providing +that it follows C language calling conventions. + +The definitions for {\bf bRC} and the arguments are {\bf +src/filed/fd-plugins.h} and so this header file needs to be included in +your plugin. It along with {\bf src/lib/plugins.h} define basically the whole +plugin interface. Within this header file, it includes the following +files: + +\begin{verbatim} +#include +#include "config.h" +#include "bc_types.h" +#include "lib/plugins.h" +#include +\end{verbatim} + +Aside from the {\bf bc\_types.h} and {\bf confit.h} headers, the plugin +definition uses the minimum code from Bacula. The bc\_types.h file is required +to ensure that the data type defintions in arguments correspond to the Bacula +core code. + +The return codes are defined as: +\begin{verbatim} +typedef enum { + bRC_OK = 0, /* OK */ + bRC_Stop = 1, /* Stop calling other plugins */ + bRC_Error = 2, /* Some kind of error */ + bRC_More = 3, /* More files to backup */ +} bRC; +\end{verbatim} + + +At a future point in time, we hope to make the Bacula libbac.a into a +shared object so that the plugin can use much more of Bacula's +infrastructure, but for this first cut, we have tried to minimize the +dependence on Bacula. + +\section{loadPlugin} +As previously mentioned, the {\bf loadPlugin} entry point in the plugin +is called immediately after Bacula loads the plugin when the File daemon +itself is first starting. This entry point is only called once during the +execution of the File daemon. In calling the +plugin, the first two arguments are information from Bacula that +is passed to the plugin, and the last two arguments are information +about the plugin that the plugin must return to Bacula. The call is: + +\begin{verbatim} +bRC loadPlugin(bInfo *lbinfo, bFuncs *lbfuncs, pInfo **pinfo, pFuncs **pfuncs) +\end{verbatim} + +and the arguments are: + +\begin{description} +\item [lbinfo] +This is information about Bacula in general. Currently, the only value +defined in the bInfo structure is the version, which is the Bacula plugin +interface version, currently defined as 1. The {\bf size} is set to the +byte size of the structure. The exact definition of the bInfo structure +as of this writing is: + +\begin{verbatim} +typedef struct s_baculaInfo { + uint32_t size; + uint32_t version; +} bInfo; +\end{verbatim} + +\item [lbfuncs] +The bFuncs structure defines the callback entry points within Bacula +that the plugin can use register events, get Bacula values, set +Bacula values, and send messages to the Job output or debug output. + +The exact definition as of this writing is: +\begin{verbatim} +typedef struct s_baculaFuncs { + uint32_t size; + uint32_t version; + bRC (*registerBaculaEvents)(bpContext *ctx, ...); + bRC (*getBaculaValue)(bpContext *ctx, bVariable var, void *value); + bRC (*setBaculaValue)(bpContext *ctx, bVariable var, void *value); + bRC (*JobMessage)(bpContext *ctx, const char *file, int line, + int type, utime_t mtime, const char *fmt, ...); + bRC (*DebugMessage)(bpContext *ctx, const char *file, int line, + int level, const char *fmt, ...); + void *(*baculaMalloc)(bpContext *ctx, const char *file, int line, + size_t size); + void (*baculaFree)(bpContext *ctx, const char *file, int line, void *mem); +} bFuncs; +\end{verbatim} + +We will discuss these entry points and how to use them a bit later when +describing the plugin code. + + +\item [pInfo] +When the loadPlugin entry point is called, the plugin must initialize +an information structure about the plugin and return a pointer to +this structure to Bacula. + +The exact definition as of this writing is: + +\begin{verbatim} +typedef struct s_pluginInfo { + uint32_t size; + uint32_t version; + const char *plugin_magic; + const char *plugin_license; + const char *plugin_author; + const char *plugin_date; + const char *plugin_version; + const char *plugin_description; +} pInfo; +\end{verbatim} + +Where: + \begin{description} + \item [version] is the current Bacula defined plugin interface version, currently + set to 1. If the interface version differs from the current version of + Bacula, the plugin will not be run (not yet implemented). + \item [plugin\_magic] is a pointer to the text string "*FDPluginData*", a + sort of sanity check. If this value is not specified, the plugin + will not be run (not yet implemented). + \item [plugin\_license] is a pointer to a text string that describes the + plugin license. Bacula will only accept compatible licenses (not yet + implemented). + \item [plugin\_author] is a pointer to the text name of the author of the program. + This string can be anything but is generally the author's name. + \item [plugin\_date] is the pointer text string containing the date of the plugin. + This string can be anything but is generally some human readable form of + the date. + \item [plugin\_version] is a pointer to a text string containing the version of + the plugin. The contents are determined by the plugin writer. + \item [plugin\_description] is a pointer to a string describing what the + plugin does. The contents are determined by the plugin writer. + \end{description} + +The pInfo structure must be defined in static memory because Bacula does not +copy it and may refer to the values at any time while the plugin is +loaded. All values must be supplied or the plugin will not run (not yet +implemented). All text strings must be either ASCII or UTF-8 strings that +are terminated with a zero byte. + +\item [pFuncs] +When the loadPlugin entry point is called, the plugin must initialize +an entry point structure about the plugin and return a pointer to +this structure to Bacula. This structure contains pointer to each +of the entry points that the plugin must provide for Bacula. When +Bacula is actually running the plugin, it will call the defined +entry points at particular times. All entry points must be defined. + +The pFuncs structure must be defined in static memory because Bacula does not +copy it and may refer to the values at any time while the plugin is +loaded. + +The exact definition as of this writing is: + +\begin{verbatim} +typedef struct s_pluginFuncs { + uint32_t size; + uint32_t version; + bRC (*newPlugin)(bpContext *ctx); + bRC (*freePlugin)(bpContext *ctx); + bRC (*getPluginValue)(bpContext *ctx, pVariable var, void *value); + bRC (*setPluginValue)(bpContext *ctx, pVariable var, void *value); + bRC (*handlePluginEvent)(bpContext *ctx, bEvent *event, void *value); + bRC (*startBackupFile)(bpContext *ctx, struct save_pkt *sp); + bRC (*endBackupFile)(bpContext *ctx); + bRC (*startRestoreFile)(bpContext *ctx, const char *cmd); + bRC (*endRestoreFile)(bpContext *ctx); + bRC (*pluginIO)(bpContext *ctx, struct io_pkt *io); + bRC (*createFile)(bpContext *ctx, struct restore_pkt *rp); + bRC (*setFileAttributes)(bpContext *ctx, struct restore_pkt *rp); + bRC (*checkFile)(bpContext *ctx, char *fname); +} pFuncs; +\end{verbatim} + +The details of the entry points will be presented in +separate sections below. + +Where: + \begin{description} + \item [size] is the byte size of the structure. + \item [version] is the plugin interface version currently set to 3. + \end{description} + +Sample code for loadPlugin: +\begin{verbatim} + bfuncs = lbfuncs; /* set Bacula funct pointers */ + binfo = lbinfo; + *pinfo = &pluginInfo; /* return pointer to our info */ + *pfuncs = &pluginFuncs; /* return pointer to our functions */ + + return bRC_OK; +\end{verbatim} + +where pluginInfo and pluginFuncs are statically defined structures. +See bpipe-fd.c for details. + + + +\end{description} + +\section{Plugin Entry Points} +This section will describe each of the entry points (subroutines) within +the plugin that the plugin must provide for Bacula, when they are called +and their arguments. As noted above, pointers to these subroutines are +passed back to Bacula in the pFuncs structure when Bacula calls the +loadPlugin() externally defined entry point. + +\subsection{newPlugin(bpContext *ctx)} + This is the entry point that Bacula will call + when a new "instance" of the plugin is created. This typically + happens at the beginning of a Job. If 10 Jobs are running + simultaneously, there will be at least 10 instances of the + plugin. + + The bpContext structure will be passed to the plugin, and + during this call, if the plugin needs to have its private + working storage that is associated with the particular + instance of the plugin, it should create it from the heap + (malloc the memory) and store a pointer to + its private working storage in the {\bf pContext} variable. + Note: since Bacula is a multi-threaded program, you must not + keep any variable data in your plugin unless it is truely meant + to apply globally to the whole plugin. In addition, you must + be aware that except the first and last call to the plugin + (loadPlugin and unloadPlugin) all the other calls will be + made by threads that correspond to a Bacula job. The + bpContext that will be passed for each thread will remain the + same throughout the Job thus you can keep your privat Job specific + data in it ({\bf bContext}). + +\begin{verbatim} +typedef struct s_bpContext { + void *pContext; /* Plugin private context */ + void *bContext; /* Bacula private context */ +} bpContext; + +\end{verbatim} + + This context pointer will be passed as the first argument to all + the entry points that Bacula calls within the plugin. Needless + to say, the plugin should not change the bContext variable, which + is Bacula's private context pointer for this instance (Job) of this + plugin. + +\subsection{freePlugin(bpContext *ctx)} +This entry point is called when the +this instance of the plugin is no longer needed (the Job is +ending), and the plugin should release all memory it may +have allocated for this particular instance (Job) i.e. the pContext. +This is not the final termination +of the plugin signaled by a call to {\bf unloadPlugin}. +Any other instances (Job) will +continue to run, and the entry point {\bf newPlugin} may be called +again if other jobs start. + +\subsection{getPluginValue(bpContext *ctx, pVariable var, void *value)} +Bacula will call this entry point to get +a value from the plugin. This entry point is currently not called. + +\subsection{setPluginValue(bpContext *ctx, pVariable var, void *value)} +Bacula will call this entry point to set +a value in the plugin. This entry point is currently not called. + +\subsection{handlePluginEvent(bpContext *ctx, bEvent *event, void *value)} +This entry point is called when Bacula +encounters certain events (discussed below). This is, in fact, the +main way that most plugins get control when a Job runs and how +they know what is happening in the job. It can be likened to the +{\bf RunScript} feature that calls external programs and scripts, +and is very similar to the Bacula Python interface. +When the plugin is called, Bacula passes it the pointer to an event +structure (bEvent), which currently has one item, the eventType: + +\begin{verbatim} +typedef struct s_bEvent { + uint32_t eventType; +} bEvent; +\end{verbatim} + + which defines what event has been triggered, and for each event, + Bacula will pass a pointer to a value associated with that event. + If no value is associated with a particular event, Bacula will + pass a NULL pointer, so the plugin must be careful to always check + value pointer prior to dereferencing it. + + The current list of events are: + +\begin{verbatim} +typedef enum { + bEventJobStart = 1, + bEventJobEnd = 2, + bEventStartBackupJob = 3, + bEventEndBackupJob = 4, + bEventStartRestoreJob = 5, + bEventEndRestoreJob = 6, + bEventStartVerifyJob = 7, + bEventEndVerifyJob = 8, + bEventBackupCommand = 9, + bEventRestoreCommand = 10, + bEventLevel = 11, + bEventSince = 12, +} bEventType; + +\end{verbatim} + +Most of the above are self-explanatory. + +\begin{description} + \item [bEventJobStart] is called whenever a Job starts. The value + passed is a pointer to a string that contains: "Jobid=nnn + Job=job-name". Where nnn will be replaced by the JobId and job-name + will be replaced by the Job name. The variable is temporary so if you + need the values, you must copy them. + + \item [bEventJobEnd] is called whenever a Job ends. No value is passed. + + \item [bEventStartBackupJob] is called when a Backup Job begins. No value + is passed. + + \item [bEventEndBackupJob] is called when a Backup Job ends. No value is + passed. + + \item [bEventStartRestoreJob] is called when a Restore Job starts. No value + is passed. + + \item [bEventEndRestoreJob] is called when a Restore Job ends. No value is + passed. + + \item [bEventStartVerifyJob] is called when a Verify Job starts. No value + is passed. + + \item [bEventEndVerifyJob] is called when a Verify Job ends. No value + is passed. + + \item [bEventBackupCommand] is called prior to the bEventStartBackupJob and + the plugin is passed the command string (everything after the equal sign + in "Plugin =" as the value. + + Note, if you intend to backup a file, this is an important first point to + write code that copies the command string passed into your pContext area + so that you will know that a backup is being performed and you will know + the full contents of the "Plugin =" command (i.e. what to backup and + what virtual filename the user wants to call it. + + \item [bEventRestoreCommand] is called prior to the bEventStartRestoreJob and + the plugin is passed the command string (everything after the equal sign + in "Plugin =" as the value. + + See the notes above concerning backup and the command string. This is the + point at which Bacula passes you the original command string that was + specified during the backup, so you will want to save it in your pContext + area for later use when Bacula calls the plugin again. + + \item [bEventLevel] is called when the level is set for a new Job. The value + is a 32 bit integer stored in the void*, which represents the Job Level code. + + \item [bEventSince] is called when the since time is set for a new Job. The + value is a time\_t time at which the last job was run. +\end{description} + +During each of the above calls, the plugin receives either no specific value or +only one value, which in some cases may not be sufficient. However, knowing +the context of the event, the plugin can call back to the Bacula entry points +it was passed during the {\bf loadPlugin} call and get to a number of Bacula +variables. (at the current time few Bacula variables are implemented, but it +easily extended at a future time and as needs require). + +\subsection{startBackupFile(bpContext *ctx, struct save\_pkt *sp)} +This entry point is called only if your plugin is a command plugin, and +it is called when Bacula encounters the "Plugin = " directive in +the Include section of the FileSet. +Called when beginning the backup of a file. Here Bacula provides you +with a pointer to the {\bf save\_pkt} structure and you must fill in +this packet with the "attribute" data of the file. + +\begin{verbatim} +struct save_pkt { + int32_t pkt_size; /* size of this packet */ + char *fname; /* Full path and filename */ + char *link; /* Link name if any */ + struct stat statp; /* System stat() packet for file */ + int32_t type; /* FT_xx for this file */ + uint32_t flags; /* Bacula internal flags */ + bool portable; /* set if data format is portable */ + char *cmd; /* command */ + int32_t pkt_end; /* end packet sentinel */ +}; +\end{verbatim} + +The second argument is a pointer to the {\bf save\_pkt} structure for the file +to be backed up. The plugin is responsible for filling in all the fields +of the {\bf save\_pkt}. If you are backing up +a real file, then generally, the statp structure can be filled in by doing +a {\bf stat} system call on the file. + +If you are backing up a database or +something that is more complex, you might want to create a virtual file. +That is a file that does not actually exist on the filesystem, but represents +say an object that you are backing up. In that case, you need to ensure +that the {\bf fname} string that you pass back is unique so that it +does not conflict with a real file on the system, and you need to +artifically create values in the statp packet. + +Example programs such as {\bf bpipe-fd.c} show how to set these fields. You +must take care not to store pointers the stack in the pointer fields such as +fname and link, because when you return from your function, your stack entries +will be destroyed. The solution in that case is to malloc() and return the +pointer to it. In order to not have memory leaks, you should store a pointer to +all memory allocated in your pContext structure so that in subsequent calls or +at termination, you can release it back to the system. + +Once the backup has begun, Bacula will call your plugin at the {\bf pluginIO} +entry point to "read" the data to be backed up. Please see the {\bf bpipe-fd.c} +plugin for how to do I/O. + +Example of filling in the save\_pkt as used in bpipe-fd.c: + +\begin{verbatim} + struct plugin_ctx *p_ctx = (struct plugin_ctx *)ctx->pContext; + time_t now = time(NULL); + sp->fname = p_ctx->fname; + sp->statp.st_mode = 0700 | S_IFREG; + sp->statp.st_ctime = now; + sp->statp.st_mtime = now; + sp->statp.st_atime = now; + sp->statp.st_size = -1; + sp->statp.st_blksize = 4096; + sp->statp.st_blocks = 1; + p_ctx->backup = true; + return bRC_OK; +\end{verbatim} + +Note: the filename to be created has already been created from the +command string previously sent to the plugin and is in the plugin +context (p\_ctx->fname) and is a malloc()ed string. This example +creates a regular file (S\_IFREG), with various fields being created. + +In general, the sequence of commands issued from Bacula to the plugin +to do a backup while processing the "Plugin = " directive are: + +\begin{enumerate} + \item generate a bEventBackupCommand event to the specified plugin + and pass it the command string. + \item make a startPluginBackup call to the plugin, which + fills in the data needed in save\_pkt to save as the file + attributes and to put on the Volume and in the catalog. + \item call Bacula's internal save\_file() subroutine to save the specified + file. The plugin will then be called at pluginIO() to "open" + the file, and then to read the file data. + Note, if you are dealing with a virtual file, the "open" operation + is something the plugin does internally and it doesn't necessarily + mean opening a file on the filesystem. For example in the case of + the bpipe-fd.c program, it initiates a pipe to the requested program. + Finally when the plugin signals to Bacula that all the data was read, + Bacula will call the plugin with the "close" pluginIO() function. +\end{enumerate} + + +\subsection{endBackupFile(bpContext *ctx)} +Called at the end of backing up a file for a command plugin. If the plugin's +work is done, it should return bRC\_OK. If the plugin wishes to create another +file and back it up, then it must return bRC\_More (not yet implemented). This +is probably a good time to release any malloc()ed memory you used to pass back +filenames. + +\subsection{startRestoreFile(bpContext *ctx, const char *cmd)} +Called when the first record is read from the Volume that was +previously written by the command plugin. + +\subsection{createFile(bpContext *ctx, struct restore\_pkt *rp)} +Called for a command plugin to create a file during a Restore job before +restoring the data. +This entry point is called before any I/O is done on the file. After +this call, Bacula will call pluginIO() to open the file for write. + +The data in the +restore\_pkt is passed to the plugin and is based on the data that was +originally given by the plugin during the backup and the current user +restore settings (e.g. where, RegexWhere, replace). This allows the +plugin to first create a file (if necessary) so that the data can +be transmitted to it. The next call to the plugin will be a +pluginIO command with a request to open the file write-only. + +This call must return one of the following values: + +\begin{verbatim} + enum { + CF_SKIP = 1, /* skip file (not newer or something) */ + CF_ERROR, /* error creating file */ + CF_EXTRACT, /* file created, data to extract */ + CF_CREATED /* file created, no data to extract */ +}; +\end{verbatim} + +in the restore\_pkt value {\bf create\_status}. For a normal file, +unless there is an error, you must return {\bf CF\_EXTRACT}. + +\begin{verbatim} + +struct restore_pkt { + int32_t pkt_size; /* size of this packet */ + int32_t stream; /* attribute stream id */ + int32_t data_stream; /* id of data stream to follow */ + int32_t type; /* file type FT */ + int32_t file_index; /* file index */ + int32_t LinkFI; /* file index to data if hard link */ + uid_t uid; /* userid */ + struct stat statp; /* decoded stat packet */ + const char *attrEx; /* extended attributes if any */ + const char *ofname; /* output filename */ + const char *olname; /* output link name */ + const char *where; /* where */ + const char *RegexWhere; /* regex where */ + int replace; /* replace flag */ + int create_status; /* status from createFile() */ + int32_t pkt_end; /* end packet sentinel */ + +}; +\end{verbatim} + +Typical code to create a regular file would be the following: + +\begin{verbatim} + struct plugin_ctx *p_ctx = (struct plugin_ctx *)ctx->pContext; + time_t now = time(NULL); + sp->fname = p_ctx->fname; /* set the full path/filename I want to create */ + sp->type = FT_REG; + sp->statp.st_mode = 0700 | S_IFREG; + sp->statp.st_ctime = now; + sp->statp.st_mtime = now; + sp->statp.st_atime = now; + sp->statp.st_size = -1; + sp->statp.st_blksize = 4096; + sp->statp.st_blocks = 1; + return bRC_OK; +\end{verbatim} + +This will create a virtual file. If you are creating a file that actually +exists, you will most likely want to fill the statp packet using the +stat() system call. + +Creating a directory is similar, but requires a few extra steps: + +\begin{verbatim} + struct plugin_ctx *p_ctx = (struct plugin_ctx *)ctx->pContext; + time_t now = time(NULL); + sp->fname = p_ctx->fname; /* set the full path I want to create */ + sp->link = xxx; where xxx is p_ctx->fname with a trailing forward slash + sp->type = FT_DIREND + sp->statp.st_mode = 0700 | S_IFDIR; + sp->statp.st_ctime = now; + sp->statp.st_mtime = now; + sp->statp.st_atime = now; + sp->statp.st_size = -1; + sp->statp.st_blksize = 4096; + sp->statp.st_blocks = 1; + return bRC_OK; +\end{verbatim} + +The link field must be set with the full cononical path name, which always +ends with a forward slash. If you do not terminate it with a forward slash, +you will surely have problems later. + +As with the example that creates a file, if you are backing up a real +directory, you will want to do an stat() on the directory. + +Note, if you want the directory permissions and times to be correctly +restored, you must create the directory {\bf after} all the file directories +have been sent to Bacula. That allows the restore process to restore all the +files in a directory using default directory options, then at the end, restore +the directory permissions. If you do it the other way around, each time you +restore a file, the OS will modify the time values for the directory entry. + +\subsection{setFileAttributes(bpContext *ctx, struct restore\_pkt *rp)} +This is call not yet implemented. Called for a command plugin. + +See the definition of {\bf restre\_pkt} in the above section. + +\subsection{endRestoreFile(bpContext *ctx)} +Called when a command plugin is done restoring a file. + +\subsection{pluginIO(bpContext *ctx, struct io\_pkt *io)} +Called to do the input (backup) or output (restore) of data from or to a file +for a command plugin. These routines simulate the Unix read(), write(), open(), +close(), and lseek() I/O calls, and the arguments are passed in the packet and +the return values are also placed in the packet. In addition for Win32 systems +the plugin must return two additional values (described below). + +\begin{verbatim} + enum { + IO_OPEN = 1, + IO_READ = 2, + IO_WRITE = 3, + IO_CLOSE = 4, + IO_SEEK = 5 +}; + +struct io_pkt { + int32_t pkt_size; /* Size of this packet */ + int32_t func; /* Function code */ + int32_t count; /* read/write count */ + mode_t mode; /* permissions for created files */ + int32_t flags; /* Open flags */ + char *buf; /* read/write buffer */ + const char *fname; /* open filename */ + int32_t status; /* return status */ + int32_t io_errno; /* errno code */ + int32_t lerror; /* Win32 error code */ + int32_t whence; /* lseek argument */ + boffset_t offset; /* lseek argument */ + bool win32; /* Win32 GetLastError returned */ + int32_t pkt_end; /* end packet sentinel */ +}; +\end{verbatim} + +The particular Unix function being simulated is indicated by the {\bf func}, +which will have one of the IO\_OPEN, IO\_READ, ... codes listed above. The +status code that would be returned from a Unix call is returned in {\bf status} +for IO\_OPEN, IO\_CLOSE, IO\_READ, and IO\_WRITE. The return value for IO\_SEEK +is returned in {\bf offset} which in general is a 64 bit value. + +When there is an error on Unix systems, you must always set io\_error, and +on a Win32 system, you must always set win32, and the returned value from +the OS call GetLastError() in lerror. + +For all except IO\_SEEK, {\bf status} is the return result. In general it is +a positive integer unless there is an error in which case it is -1. + +The following describes each call and what you get and what you +should return: + +\begin{description} + \item [IO\_OPEN] + You will be passed fname, mode, and flags. + You must set on return: status, and if there is a Unix error + io\_errno must be set to the errno value, and if there is a + Win32 error win32 and lerror. + + \item [IO\_READ] + You will be passed: count, and buf (buffer of size count). + You must set on return: status to the number of bytes + read into the buffer (buf) or -1 on an error, + and if there is a Unix error + io\_errno must be set to the errno value, and if there is a + Win32 error, win32 and lerror must be set. + + \item [IO\_WRITE] + You will be passed: count, and buf (buffer of size count). + You must set on return: status to the number of bytes + written from the buffer (buf) or -1 on an error, + and if there is a Unix error + io\_errno must be set to the errno value, and if there is a + Win32 error, win32 and lerror must be set. + + \item [IO\_CLOSE] + Nothing will be passed to you. On return you must set + status to 0 on success and -1 on failure. If there is a Unix error + io\_errno must be set to the errno value, and if there is a + Win32 error, win32 and lerror must be set. + + \item [IO\_LSEEK] + You will be passed: offset, and whence. offset is a 64 bit value + and is the position to seek to relative to whence. whence is one + of the following SEEK\_SET, SEEK\_CUR, or SEEK\_END indicating to + either to seek to an absolute possition, relative to the current + position or relative to the end of the file. + You must pass back in offset the absolute location to which you + seeked. If there is an error, offset should be set to -1. + If there is a Unix error + io\_errno must be set to the errno value, and if there is a + Win32 error, win32 and lerror must be set. + + Note: Bacula will call IO\_SEEK only when writing a sparse file. + +\end{description} + +\subsection{bool checkFile(bpContext *ctx, char *fname)} +If this entry point is set, Bacula will call it after backing up all file +data during an Accurate backup. It will be passed the full filename for +each file that Bacula is proposing to mark as deleted. Only files +previously backed up but not backed up in the current session will be +marked to be deleted. If you return {\bf false}, the file will be be +marked deleted. If you return {\bf true} the file will not be marked +deleted. This permits a plugin to ensure that previously saved virtual +files or files controlled by your plugin that have not change (not backed +up in the current job) are not marked to be deleted. This entry point will +only be called during Accurate Incrmental and Differential backup jobs. + + +\section{Bacula Plugin Entrypoints} +When Bacula calls one of your plugin entrypoints, you can call back to +the entrypoints in Bacula that were supplied during the xxx plugin call +to get or set information within Bacula. + +\subsection{bRC registerBaculaEvents(bpContext *ctx, ...)} +This Bacula entrypoint will allow you to register to receive events +that are not autmatically passed to your plugin by default. This +entrypoint currently is unimplemented. + +\subsection{bRC getBaculaValue(bpContext *ctx, bVariable var, void *value)} +Calling this entrypoint, you can obtain specific values that are available +in Bacula. The following Variables can be referenced: +\begin{itemize} +\item bVarJobId returns an int +\item bVarFDName returns a char * +\item bVarLevel returns an int +\item bVarClient returns a char * +\item bVarJobName returns a char * +\item bVarJobStatus returns an int +\item bVarSinceTime returns an int (time\_t) +\item bVarAccurate returns an int +\end{itemize} + +\subsection{bRC setBaculaValue(bpContext *ctx, bVariable var, void *value)} +Calling this entrypoint allows you to set particular values in +Bacula. The only variable that can currently be set is +{\bf bVarFileSeen} and the value passed is a char * that points +to the full filename for a file that you are indicating has been +seen and hence is not deleted. + +\subsection{bRC JobMessage(bpContext *ctx, const char *file, int line, + int type, utime\_t mtime, const char *fmt, ...)} +This call permits you to put a message in the Job Report. + + +\subsection{bRC DebugMessage(bpContext *ctx, const char *file, int line, + int level, const char *fmt, ...)} +This call permits you to print a debug message. + + +\subsection{void baculaMalloc(bpContext *ctx, const char *file, int line, + size\_t size)} +This call permits you to obtain memory from Bacula's memory allocator. + + +\subsection{void baculaFree(bpContext *ctx, const char *file, int line, void *mem)} +This call permits you to free memory obtained from Bacula's memory allocator. + +\section{Building Bacula Plugins} +There is currently one sample program {\bf example-plugin-fd.c} and +one working plugin {\bf bpipe-fd.c} that can be found in the Bacula +{\bf src/plugins/fd} directory. Both are built with the following: + +\begin{verbatim} + cd + ./configure + make + ... + cd src/plugins/fd + make + make test +\end{verbatim} + +After building Bacula and changing into the src/plugins/fd directory, +the {\bf make} command will build the {\bf bpipe-fd.so} plugin, which +is a very useful and working program. + +The {\bf make test} command will build the {\bf example-plugin-fd.so} +plugin and a binary named {\bf main}, which is build from the source +code located in {\bf src/filed/fd\_plugins.c}. + +If you execute {\bf ./main}, it will load and run the example-plugin-fd +plugin simulating a small number of the calling sequences that Bacula uses +in calling a real plugin. This allows you to do initial testing of +your plugin prior to trying it with Bacula. + +You can get a good idea of how to write your own plugin by first +studying the example-plugin-fd, and actually running it. Then +it can also be instructive to read the bpipe-fd.c code as it is +a real plugin, which is still rather simple and small. + +When actually writing your own plugin, you may use the example-plugin-fd.c +code as a template for your code. + diff --git a/docs/manuals/es/developers/regression.tex b/docs/manuals/es/developers/regression.tex new file mode 100644 index 00000000..2d4c90ba --- /dev/null +++ b/docs/manuals/es/developers/regression.tex @@ -0,0 +1,619 @@ +%% +%% + +\chapter{Bacula Regression Testing} +\label{_ChapterStart8} +\index{Testing!Bacula Regression} +\index{Bacula Regression Testing} +\addcontentsline{toc}{section}{Bacula Regression Testing} + +\section{General} +\index{General} +\addcontentsline{toc}{section}{General} + +This document is intended mostly for developers who wish to ensure that their +changes to Bacula don't introduce bugs in the base code. However, you +don't need to be a developer to run the regression scripts, and we +recommend them before putting your system into production, and before each +upgrade, especially if you build from source code. They are +simply shell scripts that drive Bacula through bconsole and then typically +compare the input and output with {\bf diff}. + +You can find the existing regression scripts in the Bacula developer's +{\bf git} repository on SourceForge. We strongly recommend that you {\bf +clone} the repository because afterwards, you can easily get pull the +updates that have been made. + +To get started, we recommend that you create a directory named {\bf +bacula}, under which you will put the current source code and the current +set of regression scripts. Below, we will describe how to set this up. + +The top level directory that we call {\bf bacula} can be named anything you +want. Note, all the standard regression scripts run as non-root and can be +run on the same machine as a production Bacula system (the developers run +it this way). + +To create the directory structure for the current trunk and to +clone the repository, do the following (note, we assume you +are working in your home directory in a non-root account): + +\footnotesize +\begin{verbatim} +cd +git clone git://bacula.git.sourceforge.net/gitroot/bacula bacula +\end{verbatim} +\normalsize + +This will create the directory {\bf bacula} and populate it with +three directories: {\bf bacula}, {\bf gui}, and {\bf regress}. +{\bf bacula} contains the Bacula source code; {\bf gui} contains +certain gui programs that you will not need, and {\bf regress} contains +all the regression scripts. The above should be needed only +once. Thereafter to update to the latest code, you do: + +\footnotesize +\begin{verbatim} +cd bacula +git pull +\end{verbatim} +\normalsize + +If you want to test with SQLite and it is not installed on your system, +you will need to download the latest depkgs release from Source Forge and +unpack it into {\bf depkgs}, then simply: + +\footnotesize +\begin{verbatim} +cd depkgs +make +\end{verbatim} +\normalsize + + +There are two different aspects of regression testing that this document will +discuss: 1. Running the Regression Script, 2. Writing a Regression test. + +\section{Running the Regression Script} +\index{Running the Regression Script} +\index{Script!Running the Regression} +\addcontentsline{toc}{section}{Running the Regression Script} + +There are a number of different tests that may be run, such as: the standard +set that uses disk Volumes and runs under any userid; a small set of tests +that write to tape; another set of tests where you must be root to run them. +Normally, I run all my tests as non-root and very rarely run the root +tests. The tests vary in length, and running the full tests including disk +based testing, tape based testing, autochanger based testing, and multiple +drive autochanger based testing can take 3 or 4 hours. + +\subsection{Setting the Configuration Parameters} +\index{Setting the Configuration Parameters} +\index{Parameters!Setting the Configuration} +\addcontentsline{toc}{subsection}{Setting the Configuration Parameters} + +There is nothing you need to change in the source directory. + +To begin: + +\footnotesize +\begin{verbatim} +cd bacula/regress +\end{verbatim} +\normalsize + + +The +very first time you are going to run the regression scripts, you will +need to create a custom config file for your system. +We suggest that you start by: + +\footnotesize +\begin{verbatim} +cp prototype.conf config +\end{verbatim} +\normalsize + +Then you can edit the {\bf config} file directly. + +\footnotesize +\begin{verbatim} + +# Where to get the source to be tested +BACULA_SOURCE="${HOME}/bacula/bacula" + +# Where to send email !!!!! Change me !!!!!!! +EMAIL=your-name@your-domain.com +SMTP_HOST="localhost" + +# Full "default" path where to find sqlite (no quotes!) +SQLITE3_DIR=${HOME}/depkgs/sqlite3 +SQLITE_DIR=${HOME}/depkgs/sqlite + +TAPE_DRIVE="/dev/nst0" +# if you don't have an autochanger set AUTOCHANGER to /dev/null +AUTOCHANGER="/dev/sg0" +# For two drive tests -- set to /dev/null if you do not have it +TAPE_DRIVE1="/dev/null" + +# This must be the path to the autochanger including its name +AUTOCHANGER_PATH="/usr/sbin/mtx" + +# Set your database here +#WHICHDB="--with-sqlite=${SQLITE_DIR}" +#WHICHDB="--with-sqlite3=${SQLITE3_DIR}" +#WHICHDB="--with-mysql" +WHICHDB="--with-postgresql" + +# Set this to "--with-tcp-wrappers" or "--without-tcp-wrappers" +TCPWRAPPERS="--with-tcp-wrappers" + +# Set this to "" to disable OpenSSL support, "--with-openssl=yes" +# to enable it, or provide the path to the OpenSSL installation, +# eg "--with-openssl=/usr/local" +OPENSSL="--with-openssl" + +# You may put your real host name here, but localhost is valid also +# and it has the advantage that it works on a non-newtworked machine +HOST="localhost" + +\end{verbatim} +\normalsize + +\begin{itemize} +\item {\bf BACULA\_SOURCE} should be the full path to the Bacula source code + that you wish to test. It will be loaded configured, compiled, and + installed with the "make setup" command, which needs to be done only + once each time you change the source code. + +\item {\bf EMAIL} should be your email addres. Please remember to change this + or I will get a flood of unwanted messages. You may or may not want to see + these emails. In my case, I don't need them so I direct it to the bit bucket. + +\item {\bf SMTP\_HOST} defines where your SMTP server is. + +\item {\bf SQLITE\_DIR} should be the full path to the sqlite package, must + be build before running a Bacula regression, if you are using SQLite. This + variable is ignored if you are using MySQL or PostgreSQL. To use PostgreSQL, + edit the Makefile and change (or add) WHICHDB?=``\verb{--{with-postgresql''. For + MySQL use ``WHICHDB=''\verb{--{with-mysql``. + + The advantage of using SQLite is that it is totally independent of any + installation you may have running on your system, and there is no + special configuration or authorization that must be done to run it. + With both MySQL and PostgreSQL, you must pre-install the packages, + initialize them and ensure that you have authorization to access the + database and create and delete tables. + +\item {\bf TAPE\_DRIVE} is the full path to your tape drive. The base set of + regression tests do not use a tape, so this is only important if you want to + run the full tests. Set this to /dev/null if you do not have a tape drive. + +\item {\bf TAPE\_DRIVE1} is the full path to your second tape drive, if + have one. The base set of + regression tests do not use a tape, so this is only important if you want to + run the full two drive tests. Set this to /dev/null if you do not have a + second tape drive. + +\item {\bf AUTOCHANGER} is the name of your autochanger control device. Set this to + /dev/null if you do not have an autochanger. + +\item {\bf AUTOCHANGER\_PATH} is the full path including the program name for + your autochanger program (normally {\bf mtx}. Leave the default value if you + do not have one. + +\item {\bf TCPWRAPPERS} defines whether or not you want the ./configure + to be performed with tcpwrappers enabled. + +\item {\bf OPENSSL} used to enable/disable SSL support for Bacula + communications and data encryption. + +\item {\bf HOST} is the hostname that it will use when building the + scripts. The Bacula daemons will be named -dir, -fd, + ... It is also the name of the HOST machine that to connect to the + daemons by the network. Hence the name should either be your real + hostname (with an appropriate DNS or /etc/hosts entry) or {\bf + localhost} as it is in the default file. + +\item {\bf bin} is the binary location. + +\item {\bf scripts} is the bacula scripts location (where we could find + database creation script, autochanger handler, etc.) + +\end{itemize} + +\subsection{Building the Test Bacula} +\index{Building the Test Bacula} +\index{Bacula!Building the Test} +\addcontentsline{toc}{subsection}{Building the Test Bacula} + +Once the above variables are set, you can build the Makefile by entering: + +\footnotesize +\begin{verbatim} +./config xxx.conf +\end{verbatim} +\normalsize + +Where xxx.conf is the name of the conf file containing your system parameters. +This will build a Makefile from Makefile.in, and you should not need to +do this again unless you want to change the database or other regression +configuration parameter. + + +\subsection{Setting up your SQL engine} +\index{Setting up your SQL engine} +\addcontentsline{toc}{subsection}{Setting up your SQL engine} +If you are using SQLite or SQLite3, there is nothing more to do; you can +simply run the tests as described in the next section. + +If you are using MySQL or PostgreSQL, you will need to establish an +account with your database engine for the user name {\bf regress} and +you will need to manually create a database named {\bf regress} that can be +used by user name regress, which means you will have to give the user +regress sufficient permissions to use the database named regress. +There is no password on the regress account. + +You have probably already done this procedure for the user name and +database named bacula. If not, the manual describes roughly how to +do it, and the scripts in bacula/regress/build/src/cats named +create\_mysql\_database, create\_postgresql\_database, grant\_mysql\_privileges, +and grant\_postgresql\_privileges may be of a help to you. + +Generally, to do the above, you will need to run under root to +be able to create databases and modify permissions within MySQL and +PostgreSQL. + + +\subsection{Running the Disk Only Regression} +\index{Regression!Running the Disk Only} +\index{Running the Disk Only Regression} +\addcontentsline{toc}{subsection}{Running the Disk Only Regression} + +The simplest way to copy the source code, configure it, compile it, link +it, and run the tests is to use a helper script: + +\footnotesize +\begin{verbatim} +./do_disk +\end{verbatim} +\normalsize + + + + +This will run the base set of tests using disk Volumes. +If you are testing on a +non-Linux machine several of the of the tests may not be run. In any case, +as we add new tests, the number will vary. It will take about 1 hour +and you don't need to be root +to run these tests (I run under my regular userid). The result should be +something similar to: + +\footnotesize +\begin{verbatim} +Test results + ===== auto-label-test OK 12:31:33 ===== + ===== backup-bacula-test OK 12:32:32 ===== + ===== bextract-test OK 12:33:27 ===== + ===== bscan-test OK 12:34:47 ===== + ===== bsr-opt-test OK 12:35:46 ===== + ===== compressed-test OK 12:36:52 ===== + ===== compressed-encrypt-test OK 12:38:18 ===== + ===== concurrent-jobs-test OK 12:39:49 ===== + ===== data-encrypt-test OK 12:41:11 ===== + ===== encrypt-bug-test OK 12:42:00 ===== + ===== fifo-test OK 12:43:46 ===== + ===== backup-bacula-fifo OK 12:44:54 ===== + ===== differential-test OK 12:45:36 ===== + ===== four-concurrent-jobs-test OK 12:47:39 ===== + ===== four-jobs-test OK 12:49:22 ===== + ===== incremental-test OK 12:50:38 ===== + ===== query-test OK 12:51:37 ===== + ===== recycle-test OK 12:53:52 ===== + ===== restore2-by-file-test OK 12:54:53 ===== + ===== restore-by-file-test OK 12:55:40 ===== + ===== restore-disk-seek-test OK 12:56:29 ===== + ===== six-vol-test OK 12:57:44 ===== + ===== span-vol-test OK 12:58:52 ===== + ===== sparse-compressed-test OK 13:00:00 ===== + ===== sparse-test OK 13:01:04 ===== + ===== two-jobs-test OK 13:02:39 ===== + ===== two-vol-test OK 13:03:49 ===== + ===== verify-vol-test OK 13:04:56 ===== + ===== weird-files2-test OK 13:05:47 ===== + ===== weird-files-test OK 13:06:33 ===== + ===== migration-job-test OK 13:08:15 ===== + ===== migration-jobspan-test OK 13:09:33 ===== + ===== migration-volume-test OK 13:10:48 ===== + ===== migration-time-test OK 13:12:59 ===== + ===== hardlink-test OK 13:13:50 ===== + ===== two-pool-test OK 13:18:17 ===== + ===== fast-two-pool-test OK 13:24:02 ===== + ===== two-volume-test OK 13:25:06 ===== + ===== incremental-2disk OK 13:25:57 ===== + ===== 2drive-incremental-2disk OK 13:26:53 ===== + ===== scratch-pool-test OK 13:28:01 ===== +Total time = 0:57:55 or 3475 secs + +\end{verbatim} +\normalsize + +and the working tape tests are run with + +\footnotesize +\begin{verbatim} +make full_test +\end{verbatim} +\normalsize + + +\footnotesize +\begin{verbatim} +Test results + + ===== Bacula tape test OK ===== + ===== Small File Size test OK ===== + ===== restore-by-file-tape test OK ===== + ===== incremental-tape test OK ===== + ===== four-concurrent-jobs-tape OK ===== + ===== four-jobs-tape OK ===== +\end{verbatim} +\normalsize + +Each separate test is self contained in that it initializes to run Bacula from +scratch (i.e. newly created database). It will also kill any Bacula session +that is currently running. In addition, it uses ports 8101, 8102, and 8103 so +that it does not intefere with a production system. + +Alternatively, you can do the ./do\_disk work by hand with: + +\footnotesize +\begin{verbatim} +make setup +\end{verbatim} +\normalsize + +The above will then copy the source code within +the regression tree (in directory regress/build), configure it, and build it. +There should be no errors. If there are, please correct them before +continuing. From this point on, as long as you don't change the Bacula +source code, you should not need to repeat any of the above steps. If +you pull down a new version of the source code, simply run {\bf make setup} +again. + + +Once Bacula is built, you can run the basic disk only non-root regression test +by entering: + +\footnotesize +\begin{verbatim} +make test +\end{verbatim} +\normalsize + + +\subsection{Other Tests} +\index{Other Tests} +\index{Tests!Other} +\addcontentsline{toc}{subsection}{Other Tests} + +There are a number of other tests that can be run as well. All the tests are a +simply shell script keep in the regress directory. For example the ''make +test`` simply executes {\bf ./all-non-root-tests}. The other tests, which +are invoked by directly running the script are: + +\begin{description} + +\item [all\_non-root-tests] + \index{all\_non-root-tests} + All non-tape tests not requiring root. This is the standard set of tests, +that in general, backup some data, then restore it, and finally compares the +restored data with the original data. + +\item [all-root-tests] + \index{all-root-tests} + All non-tape tests requiring root permission. These are a relatively small +number of tests that require running as root. The amount of data backed up +can be quite large. For example, one test backs up /usr, another backs up +/etc. One or more of these tests reports an error -- I'll fix it one day. + +\item [all-non-root-tape-tests] + \index{all-non-root-tape-tests} + All tape test not requiring root. There are currently three tests, all run +without being root, and backup to a tape. The first two tests use one volume, +and the third test requires an autochanger, and uses two volumes. If you +don't have an autochanger, then this script will probably produce an error. + +\item [all-tape-and-file-tests] + \index{all-tape-and-file-tests} + All tape and file tests not requiring root. This includes just about +everything, and I don't run it very often. +\end{description} + +\subsection{If a Test Fails} +\index{Fails!If a Test} +\index{If a Test Fails} +\addcontentsline{toc}{subsection}{If a Test Fails} + +If you one or more tests fail, the line output will be similar to: + +\footnotesize +\begin{verbatim} + !!!!! concurrent-jobs-test failed!!! !!!!! +\end{verbatim} +\normalsize + +If you want to determine why the test failed, you will need to rerun the +script with the debug output turned on. You do so by defining the +environment variable {\bf REGRESS\_DEBUG} with commands such as: + +\begin{verbatim} +REGRESS_DEBUG=1 +export REGRESS_DEBUG +\end{verbatim} + +Then from the "regress" directory (all regression scripts assume that +you have "regress" as the current directory), enter: + +\begin{verbatim} +tests/test-name +\end{verbatim} + +where test-name should be the name of a test script -- for example: +{\bf tests/backup-bacula-test}. + +\section{Testing a Binary Installation} +\index{Test!Testing a Binary Installation} + +If you have installed your Bacula from a binary release such as (rpms or debs), +you can still run regression tests on it. +First, make sure that your regression {\bf config} file uses the same catalog backend as +your installed binaries. Then define the variables \texttt{bin} and \texttt{scripts} variables +in your config file. + +Example: +\begin{verbatim} +bin=/opt/bacula/bin +scripts=/opt/bacula/scripts +\end{verbatim} + +The \texttt{./scripts/prepare-other-loc} will tweak the regress scripts to use +your binary location. You will need to run it manually once before you run any +regression tests. + +\begin{verbatim} +$ ./scripts/prepare-other-loc +$ ./tests/backup-bacula-test +... +\end{verbatim} + +All regression scripts must be run by hand or by calling the test scripts. +These are principally scripts that begin with {\bf all\_...} such as {\bf all\_disk\_tests}, +{\bf ./all\_test} ... +None of the +{\bf ./do\_disk}, {\bf ./do\_all}, {\bf ./nightly...} scripts will work. + +If you want to switch back to running the regression scripts from source, first +remove the {\bf bin} and {\bf scripts} variables from your {\bf config} file and +rerun the {\bf make setup} step. + +\section{Running a Single Test} +\index{Running a Single Test} +\addcontentsline{toc}{section}{Running a Single Test} + +If you wish to run a single test, you can simply: + +\begin{verbatim} +cd regress +tests/ +\end{verbatim} + +or, if the source code has been updated, you would do: + +\begin{verbatim} +cd bacula +git pull +cd regress +make setup +tests/backup-to-null +\end{verbatim} + + +\section{Writing a Regression Test} +\index{Test!Writing a Regression} +\index{Writing a Regression Test} +\addcontentsline{toc}{section}{Writing a Regression Test} + +Any developer, who implements a major new feature, should write a regression +test that exercises and validates the new feature. Each regression test is a +complete test by itself. It terminates any running Bacula, initializes the +database, starts Bacula, then runs the test by using the console program. + +\subsection{Running the Tests by Hand} +\index{Hand!Running the Tests by} +\index{Running the Tests by Hand} +\addcontentsline{toc}{subsection}{Running the Tests by Hand} + +You can run any individual test by hand by cd'ing to the {\bf regress} +directory and entering: + +\footnotesize +\begin{verbatim} +tests/ +\end{verbatim} +\normalsize + +\subsection{Directory Structure} +\index{Structure!Directory} +\index{Directory Structure} +\addcontentsline{toc}{subsection}{Directory Structure} + +The directory structure of the regression tests is: + +\footnotesize +\begin{verbatim} + regress - Makefile, scripts to start tests + |------ scripts - Scripts and conf files + |-------tests - All test scripts are here + | + |------------------ -- All directories below this point are used + | for testing, but are created from the + | above directories and are removed with + | "make distclean" + | + |------ bin - This is the install directory for + | Bacula to be used testing + |------ build - Where the Bacula source build tree is + |------ tmp - Most temp files go here + |------ working - Bacula working directory + |------ weird-files - Weird files used in two of the tests. +\end{verbatim} +\normalsize + +\subsection{Adding a New Test} +\index{Adding a New Test} +\index{Test!Adding a New} +\addcontentsline{toc}{subsection}{Adding a New Test} + +If you want to write a new regression test, it is best to start with one of +the existing test scripts, and modify it to do the new test. + +When adding a new test, be extremely careful about adding anything to any of +the daemons' configuration files. The reason is that it may change the prompts +that are sent to the console. For example, adding a Pool means that the +current scripts, which assume that Bacula automatically selects a Pool, will +now be presented with a new prompt, so the test will fail. If you need to +enhance the configuration files, consider making your own versions. + +\subsection{Running a Test Under The Debugger} +\index{Debugger} +\addcontentsline{toc}{subsection}{Running a Test Under The Debugger} +You can run a test under the debugger (actually run a Bacula daemon +under the debugger) by first setting the environment variable +{\bf REGRESS\_WAIT} with commands such as: + +\begin{verbatim} +REGRESS_WAIT=1 +export REGRESS_WAIT +\end{verbatim} + +Then executing the script. When the script prints the following line: + +\begin{verbatim} +Start Bacula under debugger and enter anything when ready ... +\end{verbatim} + +You start the Bacula component you want to run under the debugger in a +different shell window. For example: + +\begin{verbatim} +cd .../regress/bin +gdb bacula-sd +(possibly set breakpoints, ...) +run -s -f +\end{verbatim} + +Then enter any character in the window with the above message. +An error message will appear saying that the daemon you are debugging +is already running, which is the case. You can simply ignore the +error message. diff --git a/docs/manuals/es/install/Makefile.save b/docs/manuals/es/install/Makefile.save deleted file mode 100644 index 8a1708ab..00000000 --- a/docs/manuals/es/install/Makefile.save +++ /dev/null @@ -1,101 +0,0 @@ -# -# -# Makefile for LaTeX -# -# To build everything do -# make tex -# make web -# make html -# make dvipdf -# -# or simply -# -# make -# - -IMAGES=../../../images - -first_rule: bacula - -bacula: tex web html dvipdf - -.SUFFIXES: .tex .html -.PHONY: -.DONTCARE: - - -tex: - @cp -fp ${IMAGES}/hires/*.eps . - touch install.idx installi-general.tex - -latex -interaction=batchmode install.tex - makeindex install.idx >/dev/null 2>/dev/null - -latex -interaction=batchmode install.tex - -pdf: - @echo "Making install pdf" - @cp -fp ${IMAGES}/hires/*.eps . - dvipdf install.dvi install.pdf - @rm -f *.eps *.old - -dvipdf: - @echo "Making install pdfm" - @cp -fp ${IMAGES}/hires/*.eps . - dvipdfm -p a4 install.dvi - @rm -f *.eps *.old - -html: - @echo "Making install html" - @cp -fp ${IMAGES}/*.eps . - @rm -f next.eps next.png prev.eps prev.png up.eps up.png - @(if [ -f imagename_translations ] ; then \ - ./translate_images.pl --from_meaningful_names install.html; \ - fi) - latex2html -white -no_subdir -split 0 -toc_stars -white -notransparent \ - install >/dev/null - ./translate_images.pl --to_meaningful_names install.html - @rm -f *.eps *.gif *.jpg *.old - -web: - @echo "Making install web" - @mkdir -p install - @rm -f install/* - @cp -fp ${IMAGES}/*.eps . - @rm -f next.eps next.png prev.eps prev.png up.eps up.png - @cp -fp ${IMAGES}/*.eps ${IMAGES}/*.png install/ - @rm -f install/next.eps install/next.png install/prev.eps install/prev.png install/up.eps install/up.png - @(if [ -f install/imagename_translations ] ; then \ - ./translate_images.pl --to_meaningful_names install/Bacula_Users_Guide.html; \ - fi) - @rm -rf install/*.html - latex2html -split 3 -local_icons -t "Developer's Guide" \ - -long_titles 4 -contents_in_nav -toc_stars -white \ - -notransparent install >/dev/null - ./translate_images.pl --to_meaningful_names install/install_Guide.html - @cp -f install/install_Guide.html install/index.html - @rm -f *.eps *.gif *.jpg install/*.eps *.old - @rm -f install/idle.png - @rm -f install/win32-*.png install/wx-console*.png install/xp-*.png - @rm -f install/*.pl install/*.log install/*.aux install/*.idx - @rm -f install/*.out WARNINGS - -texcheck: - ./check_tex.pl install.tex - -main_configs: - pic2graph -density 100 main_configs.png - -clean: - @rm -f 1 2 3 - @rm -f *.png *.gif *.jpg *.eps - @rm -f *.pdf *.aux *.cp *.fn *.ky *.log *.pg - @rm -f *.html *.backup *.pdf *.ps *.dvi *.ilg *.lof *.lot - @rm -f *.cdx *.cnd *.ddx *.ddn *.fdx *.fnd *.ind *.sdx *.snd - @rm -f *.dnd imagename_translations - @rm -f *.old WARNINGS *.out *.toc *.idx - @rm -f images.pl labels.pl internals.pl - @rm -rf install - @rm -f images.tex installi-general.tex - - -distclean: clean - @rm -f install.html install.pdf diff --git a/docs/manuals/es/main.tex b/docs/manuals/es/main.tex new file mode 100644 index 00000000..245c6ccf --- /dev/null +++ b/docs/manuals/es/main.tex @@ -0,0 +1,167 @@ +%% +%% +%% The following characters must be preceded by a backslash +%% to be entered as printable characters: +%% +%% # $ % & ~ _ ^ \ { } +%% + +\documentclass[10pt,a4paper]{book} + +\topmargin -0.5in +\oddsidemargin 0.0in +\evensidemargin 0.0in +\textheight 10in +\textwidth 6.5in + + +\usepackage{html} +\usepackage{float} +\usepackage{graphicx} +\usepackage{bacula} +\usepackage{longtable} +\usepackage{makeidx} +\usepackage{index} +\usepackage{setspace} +\usepackage{hyperref} +% \usepackage[linkcolor=black,colorlinks=true]{hyperref} +\usepackage{url} + +\makeindex +\newindex{dir}{ddx}{dnd}{Director Index} +\newindex{fd}{fdx}{fnd}{File Daemon Index} +\newindex{sd}{sdx}{snd}{Storage Daemon Index} +\newindex{console}{cdx}{cnd}{Console Index} +\newindex{general}{idx}{ind}{General Index} + +\sloppy + +\begin{document} +\sloppy + +\newfont{\bighead}{cmr17 at 36pt} +\parskip 10pt +\parindent 0pt + +\title{\includegraphics{\idir bacula-logo.eps} \\ \bigskip + \Huge{Bacula}$^{\normalsize \textregistered}$ \Huge{Concepts and Overview Guide} + \begin{center} + \large{It comes in the night and sucks + the essence from your computers. } + \end{center} +} + + +\author{Kern Sibbald} +\date{\vspace{1.0in}\today \\ + This manual documents Bacula version \fullversion \\ + \vspace{0.2in} + Copyright {\copyright} 1999-2009, Free Software Foundation Europe + e.V. \\ + Bacula {\textregistered} is a registered trademark of Kern Sibbald.\\ + \vspace{0.2in} + Permission is granted to copy, distribute and/or modify this document under the terms of the + GNU Free Documentation License, Version 1.2 published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. + A copy of the license is included in the section entitled "GNU Free Documentation License". +} + +\maketitle + +\clearpage +\pagenumbering{roman} +\tableofcontents +\clearpage + +\pagestyle{myheadings} +\markboth{Bacula Version \version}{Bacula Version \version} +\pagenumbering{arabic} + +\part{Concepts and Overview} +\include{concepts/general} +\include{concepts/newfeatures} +\include{concepts/pluginAPI} +\include{concepts/state} +\include{concepts/requirements} +\include{concepts/supportedoses} +\include{concepts/supporteddrives} +\include{concepts/tutorial} +\include{concepts/restore} +\include{concepts/recycling} +\include{concepts/disk} +\include{concepts/pools} +\include{concepts/migration} +\include{concepts/strategies} +\include{concepts/autochangers} +\include{concepts/supportedchangers} +\include{concepts/spooling} +\include{concepts/statistics} +\include{concepts/ansi-labels} +\include{concepts/win32} +\include{concepts/rescue} +\include{concepts/tls} +\include{concepts/dataencryption} +\include{concepts/verify} +\include{concepts/bootstrap} + +\part{Installation and Configuration} +\include{install/quickstart} +\include{install/installation} +\include{install/critical} +\include{install/configure} +\include{install/dirdconf} +\include{install/filedconf} +\include{install/storedconf} +\include{install/messagesres} +\include{install/consoleconf} +\include{install/monitorconf} +\include{install/security} + +\part{Console and Operators} +\include{console/bconsole} +\include{console/gui} + +\part{Catalog Database} +\include{catalog/catmaintenance} +\include{catalog/mysql} +\include{catalog/postgresql} +\include{catalog/sqlite} + +\part{Problem and Resolution} +\include{problems/faq} +\include{problems/tips} +\include{problems/tapetesting} +\include{problems/firewalls} +\include{problems/kaboom} + +\part{Utility Programs} +\include{utility/progs} +\include{utility/bimagemgr-chapter} +\include{utility/rpm-faq} + +\part{Miscellaneous} +\include{misc/python} +\include{misc/vars} +\include{misc/stunnel} +\include{misc/dvd} +\include{misc/internaldb} + +\part{Annexes} +\include{concepts/license} +\include{concepts/fdl} +\include{concepts/gpl} +\include{concepts/lesser} +\include{concepts/projects} +\include{concepts/thanks} +\include{concepts/bugs} + + +% pull in the index +\clearpage +\printindex[general] +\printindex[dir] +\printindex[fd] +\printindex[sd] +\printindex[console] + +\end{document} diff --git a/docs/manuals/es/install/Makefile.in b/docs/manuals/es/main/Makefile.in similarity index 81% rename from docs/manuals/es/install/Makefile.in rename to docs/manuals/es/main/Makefile.in index 63152755..e7d83401 100644 --- a/docs/manuals/es/install/Makefile.in +++ b/docs/manuals/es/main/Makefile.in @@ -1,6 +1,5 @@ # -# -# Makefile for LaTeX +# Makefile for Bacula LaTeX Manual # # To build everything do # make tex @@ -36,7 +35,8 @@ IMAGES=../../../images -DOC=install +DOC=main +MAINDOC=Bacula_Main_Reference.html first_rule: all @@ -81,24 +81,26 @@ html: fi) latex2html -white -no_subdir -split 0 -toc_stars -white -notransparent \ -init_file latex2html-init.pl ${DOC} >tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}.html - (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} .; done) + @(if [ -f imagename_translations ] ; then \ + ./translate_images.pl --from_meaningful_names ${DOC}.html; \ + fi) + (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} . 2>/dev/null; done) @echo "Done making html" web: @echo "Making web" + @rm -rf ${DOC} @mkdir -p ${DOC} @cp -fp ${IMAGES}/*.eps . @rm -f next.eps next.png prev.eps prev.png up.eps up.png - @cp -fp ${IMAGES}/*.eps ${DOC}/ - @cp -fp ${IMAGES}/*.eps ${IMAGES}/*.png ${DOC}/ - @rm -f ${DOC}/xp-*.png - @rm -f ${DOC}/next.eps ${DOC}/next.png ${DOC}/prev.eps ${DOC}/prev.png ${DOC}/up.eps ${DOC}/up.png - @rm -rf ${DOC}/*.html - latex2html -split 3 -local_icons -t "Bacula Installation and Configuration Guide" -long_titles 4 \ - -toc_stars -contents_in_nav -init_file latex2html-init.pl -white -notransparent ${DOC} >tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}/Bacula_Instal_Config_Guide.html - (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} .; done) + latex2html -split 3 -local_icons -t "Bacula Main Reference" -long_titles 4 \ + -toc_stars -contents_in_nav -init_file latex2html-init.pl \ + -no_antialias -no_antialias_text \ + -white -notransparent ${DOC} >tex.out 2>&1 + @(if [ -f imagename_translations ] ; then \ + ./translate_images.pl --from_meaningful_names ${DOC}.html; \ + fi) + @cp -f ${DOC}/${MAINDOC} ${DOC}/index.html @echo "Done making web" show: xdvi ${DOC} diff --git a/docs/manuals/fr/concepts/STYLE b/docs/manuals/es/main/STYLE similarity index 99% rename from docs/manuals/fr/concepts/STYLE rename to docs/manuals/es/main/STYLE index 6cd70564..ccdf2368 100644 --- a/docs/manuals/fr/concepts/STYLE +++ b/docs/manuals/es/main/STYLE @@ -73,4 +73,3 @@ don't assume all BSD is "FreeBSD" don't assume all "kernel" is Linux. If it is Linux, be clear. - diff --git a/docs/manuals/fr/concepts/ansi-labels.tex b/docs/manuals/es/main/ansi-labels.tex similarity index 100% rename from docs/manuals/fr/concepts/ansi-labels.tex rename to docs/manuals/es/main/ansi-labels.tex diff --git a/docs/manuals/es/install/autochangerres.tex b/docs/manuals/es/main/autochangerres.tex similarity index 100% rename from docs/manuals/es/install/autochangerres.tex rename to docs/manuals/es/main/autochangerres.tex diff --git a/docs/manuals/es/main/autochangers.tex b/docs/manuals/es/main/autochangers.tex new file mode 100644 index 00000000..d3fa47e0 --- /dev/null +++ b/docs/manuals/es/main/autochangers.tex @@ -0,0 +1,1011 @@ +%% +%% + +\chapter{Autochanger Support} +\label{AutochangersChapter} +\index[general]{Support!Autochanger } +\index[general]{Autochanger Support } + +Bacula provides autochanger support for reading and writing tapes. In +order to work with an autochanger, Bacula requires a number of things, each of +which is explained in more detail after this list: + +\begin{itemize} +\item A script that actually controls the autochanger according to commands + sent by Bacula. We furnish such a script that works with {\bf mtx} found in + the {\bf depkgs} distribution. + +\item That each Volume (tape) to be used must be defined in the Catalog and + have a Slot number assigned to it so that Bacula knows where the Volume is + in the autochanger. This is generally done with the {\bf label} command, but + can also done after the tape is labeled using the {\bf update slots} + command. See below for more details. You must pre-label the tapes manually + before using them. + +\item Modifications to your Storage daemon's Device configuration resource to + identify that the device is a changer, as well as a few other parameters. + +\item You should also modify your Storage resource definition in the + Director's configuration file so that you are automatically prompted for the + Slot when labeling a Volume. + +\item You need to ensure that your Storage daemon (if not running as root) + has access permissions to both the tape drive and the control device. + +\item You need to have {\bf Autochanger = yes} in your Storage resource + in your bacula-dir.conf file so that you will be prompted for the + slot number when you label Volumes. +\end{itemize} + +In version 1.37 and later, there is a new \ilink{Autochanger +resource}{AutochangerRes} that permits you to group Device resources thus +creating a multi-drive autochanger. If you have an autochanger, +you {\bf must} use this new resource. + +Bacula uses its own {\bf mtx-changer} script to interface with a program +that actually does the tape changing. Thus in principle, {\bf mtx-changer} +can be adapted to function with any autochanger program, or you can +call any other script or program. The current +version of {\bf mtx-changer} works with the {\bf mtx} program. However, +FreeBSD users have provided a script in the {\bf examples/autochangers} +directory that allows Bacula to use the {\bf chio} program. + +Bacula also supports autochangers with barcode +readers. This support includes two Console commands: {\bf label barcodes} +and {\bf update slots}. For more details on these commands, see the "Barcode +Support" section below. + +Current Bacula autochanger support does not include cleaning, stackers, or +silos. Stackers and silos are not supported because Bacula expects to +be able to access the Slots randomly. +However, if you are very careful to setup Bacula to access the Volumes +in the autochanger sequentially, you may be able to make Bacula +work with stackers (gravity feed and such). + +Support for multi-drive +autochangers requires the \ilink{Autochanger resource}{AutochangerRes} +introduced in version 1.37. This resource is also recommended for single +drive autochangers. + +In principle, if {\bf mtx} will operate your changer correctly, then it is +just a question of adapting the {\bf mtx-changer} script (or selecting one +already adapted) for proper interfacing. You can find a list of autochangers +supported by {\bf mtx} at the following link: +\elink{http://mtx.opensource-sw.net/compatibility.php} +{http://mtx.opensource-sw.net/compatibility.php}. +The home page for the {\bf mtx} project can be found at: +\elink{http://mtx.opensource-sw.net/}{http://mtx.opensource-sw.net/}. + +Note, we have feedback from some users that there are certain +incompatibilities between the Linux kernel and mtx. For example between +kernel 2.6.18-8.1.8.el5 of CentOS and RedHat and version 1.3.10 and 1.3.11 +of mtx. This was fixed by upgrading to a version 2.6.22 kernel. + +In addition, apparently certain versions of mtx, for example, version +1.3.11 limit the number of slots to a maximum of 64. The solution was to +use version 1.3.10. + +If you are having troubles, please use the {\bf auto} command in the {\bf +btape} program to test the functioning of your autochanger with Bacula. When +Bacula is running, please remember that for many distributions (e.g. FreeBSD, +Debian, ...) the Storage daemon runs as {\bf bacula.tape} rather than {\bf +root.root}, so you will need to ensure that the Storage daemon has sufficient +permissions to access the autochanger. + +Some users have reported that the the Storage daemon blocks under certain +circumstances in trying to mount a volume on a drive that has a different +volume loaded. As best we can determine, this is simply a matter of +waiting a bit. The drive was previously in use writing a Volume, and +sometimes the drive will remain BLOCKED for a good deal of time (up to 7 +minutes on a slow drive) waiting for the cassette to rewind and to unload +before the drive can be used with a different Volume. + +\label{SCSI devices} +\section{Knowing What SCSI Devices You Have} +\index[general]{Have!Knowing What SCSI Devices You } +\index[general]{Knowing What SCSI Devices You Have } +\index[general]{SCSI devices} +\index[general]{devices!SCSI} + +Under Linux, you can + +\footnotesize +\begin{verbatim} +cat /proc/scsi/scsi +\end{verbatim} +\normalsize + +to see what SCSI devices you have available. You can also: + +\footnotesize +\begin{verbatim} +cat /proc/scsi/sg/device_hdr /proc/scsi/sg/devices +\end{verbatim} +\normalsize + +to find out how to specify their control address ({\bf /dev/sg0} for the +first, {\bf /dev/sg1} for the second, ...) on the {\bf Changer Device = } +Bacula directive. + +You can also use the excellent {\bf lsscsi} tool. +\footnotesize +\begin{verbatim} +$ lsscsi -g + [1:0:2:0] tape SEAGATE ULTRIUM06242-XXX 1619 /dev/st0 /dev/sg9 + [1:0:14:0] mediumx STK L180 0315 /dev/sch0 /dev/sg10 + [2:0:3:0] tape HP Ultrium 3-SCSI G24S /dev/st1 /dev/sg11 + [3:0:0:0] enclosu HP A6255A HP04 - /dev/sg3 + [3:0:1:0] disk HP 36.4G ST336753FC HP00 /dev/sdd /dev/sg4 +\end{verbatim} +\normalsize + +For more detailed information on what SCSI devices you have please see +the \ilink{Linux SCSI Tricks}{SCSITricks} section of the Tape Testing +chapter of this manual. + +Under FreeBSD, you can use: + +\footnotesize +\begin{verbatim} +camcontrol devlist +\end{verbatim} +\normalsize + +To list the SCSI devices as well as the {\bf /dev/passn} that you will use on +the Bacula {\bf Changer Device = } directive. + +Please check that your Storage daemon has permission to access this +device. + +The following tip for FreeBSD users comes from Danny Butroyd: +on reboot Bacula will NOT have permission to +control the device /dev/pass0 (assuming this is your changer device). +To get around this just edit the /etc/devfs.conf file and add the +following to the bottom: +\footnotesize +\begin{verbatim} +own pass0 root:bacula +perm pass0 0666 +own nsa0.0 root:bacula +perm nsa0.0 0666 +\end{verbatim} +\normalsize + +This gives the bacula group permission to write to the nsa0.0 device +too just to be on the safe side. To bring these changes into effect +just run:- + +/etc/rc.d/devfs restart + +Basically this will stop you having to manually change permissions on these +devices to make Bacula work when operating the AutoChanger after a reboot. + +\label{scripts} +\section{Example Scripts} +\index[general]{Scripts!Example } +\index[general]{Example Scripts } + +Please read the sections below so that you understand how autochangers work +with Bacula. Although we supply a default {\bf mtx-changer} script, your +autochanger may require some additional changes. If you want to see examples +of configuration files and scripts, please look in the {\bf +\lt{}bacula-src\gt{}/examples/devices} directory where you will find an +example {\bf HP-autoloader.conf} Bacula Device resource, and several {\bf +mtx-changer} scripts that have been modified to work with different +autochangers. + +\label{Slots} + +\section{Slots} +\index[general]{Slots } + +To properly address autochangers, Bacula must know which Volume is in each +{\bf slot} of the autochanger. Slots are where the changer cartridges reside +when not loaded into the drive. Bacula numbers these slots from one to the +number of cartridges contained in the autochanger. + +Bacula will not automatically use a Volume in your autochanger unless it is +labeled and the slot number is stored in the catalog and the Volume is marked +as InChanger. This is because it must know where each volume is (slot) to +be able to load the volume. +For each Volume in your +changer, you will, using the Console program, assign a slot. This information +is kept in {\bf Bacula's} catalog database along with the other data for the +volume. If no slot is given, or the slot is set to zero, Bacula will not +attempt to use the autochanger even if all the necessary configuration records +are present. When doing a {\bf mount} command on an autochanger, you must +specify which slot you want mounted. If the drive is loaded with a tape +from another slot, it will unload it and load the correct tape, but +normally, no tape will be loaded because an {\bf unmount} command causes +Bacula to unload the tape in the drive. + + +You can check if the Slot number and InChanger flag are set by doing a: +\begin{verbatim} +list Volumes +\end{verbatim} + +in the Console program. + +\label{mult} +\section{Multiple Devices} +\index[general]{Devices!Multiple} +\index[general]{Multiple Devices} + +Some autochangers have more than one read/write device (drive). The +new \ilink{Autochanger resource}{AutochangerRes} introduced in version +1.37 permits you to group Device resources, where each device +represents a drive. The Director may still reference the Devices (drives) +directly, but doing so, bypasses the proper functioning of the +drives together. Instead, the Director (in the Storage resource) +should reference the Autochanger resource name. Doing so permits +the Storage daemon to ensure that only one drive uses the mtx-changer +script at a time, and also that two drives don't reference the +same Volume. + +Multi-drive requires the use of the {\bf +Drive Index} directive in the Device resource of the Storage daemon's +configuration file. Drive numbers or the Device Index are numbered beginning +at zero, which is the default. To use the second Drive in an autochanger, you +need to define a second Device resource and set the Drive Index to 1 for +that device. In general, the second device will have the same {\bf Changer +Device} (control channel) as the first drive, but a different {\bf Archive +Device}. + +As a default, Bacula jobs will prefer to write to a Volume that is +already mounted. If you have a multiple drive autochanger and you want +Bacula to write to more than one Volume in the same Pool at the same +time, you will need to set \ilink{Prefer Mounted Volumes} {PreferMountedVolumes} +in the Directors Job resource to {\bf no}. This will cause +the Storage daemon to maximize the use of drives. + + +\label{ConfigRecords} +\section{Device Configuration Records} +\index[general]{Records!Device Configuration } +\index[general]{Device Configuration Records } + +Configuration of autochangers within Bacula is done in the Device resource of +the Storage daemon. Four records: {\bf Autochanger}, {\bf Changer Device}, +{\bf Changer Command}, and {\bf Maximum Changer Wait} control how Bacula uses +the autochanger. + +These four records, permitted in {\bf Device} resources, are described in +detail below. Note, however, that the {\bf Changer Device} and the +{\bf Changer Command} directives are not needed in the Device resource +if they are present in the {\bf Autochanger} resource. + +\begin{description} + +\item [Autochanger = {\it Yes|No} ] + \index[sd]{Autochanger } + The {\bf Autochanger} record specifies that the current device is or is not +an autochanger. The default is {\bf no}. + +\item [Changer Device = \lt{}device-name\gt{}] + \index[sd]{Changer Device } + In addition to the Archive Device name, you must specify a {\bf Changer +Device} name. This is because most autochangers are controlled through a +different device than is used for reading and writing the cartridges. For +example, on Linux, one normally uses the generic SCSI interface for +controlling the autochanger, but the standard SCSI interface for reading and +writing the tapes. On Linux, for the {\bf Archive Device = /dev/nst0}, you +would typically have {\bf Changer Device = /dev/sg0}. Note, some of the more +advanced autochangers will locate the changer device on {\bf /dev/sg1}. Such +devices typically have several drives and a large number of tapes. + +On FreeBSD systems, the changer device will typically be on {\bf /dev/pass0} +through {\bf /dev/passn}. + +On Solaris, the changer device will typically be some file under {\bf +/dev/rdsk}. + +Please ensure that your Storage daemon has permission to access this +device. + +\item [Changer Command = \lt{}command\gt{}] + \index[sd]{Changer Command } + This record is used to specify the external program to call and what +arguments to pass to it. The command is assumed to be a standard program or +shell script that can be executed by the operating system. This command is +invoked each time that Bacula wishes to manipulate the autochanger. The +following substitutions are made in the {\bf command} before it is sent to +the operating system for execution: + +\footnotesize +\begin{verbatim} + %% = % + %a = archive device name + %c = changer device name + %d = changer drive index base 0 + %f = Client's name + %j = Job name + %o = command (loaded, load, or unload) + %s = Slot base 0 + %S = Slot base 1 + %v = Volume name +\end{verbatim} +\normalsize + +An actual example for using {\bf mtx} with the {\bf mtx-changer} script (part +of the Bacula distribution) is: + +\footnotesize +\begin{verbatim} +Changer Command = "/etc/bacula/mtx-changer %c %o %S %a %d" +\end{verbatim} +\normalsize + +Where you will need to adapt the {\bf /etc/bacula} to be the actual path on +your system where the mtx-changer script resides. Details of the three +commands currently used by Bacula (loaded, load, unload) as well as the +output expected by Bacula are give in the {\bf Bacula Autochanger Interface} +section below. + +\item [Maximum Changer Wait = \lt{}time\gt{}] + \index[sd]{Maximum Changer Wait } + This record is used to define the maximum amount of time that Bacula + will wait for an autoloader to respond to a command (e.g. load). The + default is set to 120 seconds. If you have a slow autoloader you may + want to set it longer. + +If the autoloader program fails to respond in this time, it will be killed +and Bacula will request operator intervention. + +\item [Drive Index = \lt{}number\gt{}] + \index[sd]{Drive Index } + This record allows you to tell Bacula to use the second or subsequent + drive in an autochanger with multiple drives. Since the drives are + numbered from zero, the second drive is defined by + +\footnotesize +\begin{verbatim} +Device Index = 1 + +\end{verbatim} +\normalsize + +To use the second drive, you need a second Device resource definition in the +Bacula configuration file. See the Multiple Drive section above in this +chapter for more information. +\end{description} + +In addition, for proper functioning of the Autochanger, you must +define an Autochanger resource. +\input{autochangerres} + +\label{example} +\section{An Example Configuration File} +\index[general]{Example Configuration File } +\index[general]{File!Example Configuration } + +The following two resources implement an autochanger: + +\footnotesize +\begin{verbatim} +Autochanger { + Name = "Autochanger" + Device = DDS-4 + Changer Device = /dev/sg0 + Changer Command = "/etc/bacula/mtx-changer %c %o %S %a %d" +} + +Device { + Name = DDS-4 + Media Type = DDS-4 + Archive Device = /dev/nst0 # Normal archive device + Autochanger = yes + LabelMedia = no; + AutomaticMount = yes; + AlwaysOpen = yes; +} +\end{verbatim} +\normalsize + +where you will adapt the {\bf Archive Device}, the {\bf Changer Device}, and +the path to the {\bf Changer Command} to correspond to the values used on your +system. + +\section{A Multi-drive Example Configuration File} +\index[general]{Multi-drive Example Configuration File } + +The following resources implement a multi-drive autochanger: + +\footnotesize +\begin{verbatim} +Autochanger { + Name = "Autochanger" + Device = Drive-1, Drive-2 + Changer Device = /dev/sg0 + Changer Command = "/etc/bacula/mtx-changer %c %o %S %a %d" +} + +Device { + Name = Drive-1 + Drive Index = 0 + Media Type = DDS-4 + Archive Device = /dev/nst0 # Normal archive device + Autochanger = yes + LabelMedia = no; + AutomaticMount = yes; + AlwaysOpen = yes; +} + +Device { + Name = Drive-2 + Drive Index = 1 + Media Type = DDS-4 + Archive Device = /dev/nst1 # Normal archive device + Autochanger = yes + LabelMedia = no; + AutomaticMount = yes; + AlwaysOpen = yes; +} + +\end{verbatim} +\normalsize + +where you will adapt the {\bf Archive Device}, the {\bf Changer Device}, and +the path to the {\bf Changer Command} to correspond to the values used on your +system. + +\label{SpecifyingSlots} +\section{Specifying Slots When Labeling} +\index[general]{Specifying Slots When Labeling } +\index[general]{Labeling!Specifying Slots When } + +If you add an {\bf Autochanger = yes} record to the Storage resource in your +Director's configuration file, the Bacula Console will automatically prompt +you for the slot number when the Volume is in the changer when +you {\bf add} or {\bf label} tapes for that Storage device. If your +{\bf mtx-changer} script is properly installed, Bacula will automatically +load the correct tape during the label command. + +You must also set +{\bf Autochanger = yes} in the Storage daemon's Device resource +as we have described above in +order for the autochanger to be used. Please see the +\ilink{Storage Resource}{Autochanger1} in the Director's chapter +and the +\ilink{Device Resource}{Autochanger} in the Storage daemon +chapter for more details on these records. + +Thus all stages of dealing with tapes can be totally automated. It is also +possible to set or change the Slot using the {\bf update} command in the +Console and selecting {\bf Volume Parameters} to update. + +Even though all the above configuration statements are specified and correct, +Bacula will attempt to access the autochanger only if a {\bf slot} is non-zero +in the catalog Volume record (with the Volume name). + +If your autochanger has barcode labels, you can label all the Volumes in +your autochanger one after another by using the {\bf label barcodes} command. +For each tape in the changer containing a barcode, Bacula will mount the tape +and then label it with the same name as the barcode. An appropriate Media +record will also be created in the catalog. Any barcode that begins with the +same characters as specified on the "CleaningPrefix=xxx" command, will be +treated as a cleaning tape, and will not be labeled. For example with: + +Please note that Volumes must be pre-labeled to be automatically used in +the autochanger during a backup. If you do not have a barcode reader, this +is done manually (or via a script). + +\footnotesize +\begin{verbatim} +Pool { + Name ... + Cleaning Prefix = "CLN" +} +\end{verbatim} +\normalsize + +Any slot containing a barcode of CLNxxxx will be treated as a cleaning tape +and will not be mounted. + +\section{Changing Cartridges} +\index[general]{Changing Cartridges } +If you wish to insert or remove cartridges in your autochanger or +you manually run the {\bf mtx} program, you must first tell Bacula +to release the autochanger by doing: + +\footnotesize +\begin{verbatim} +unmount +(change cartridges and/or run mtx) +mount +\end{verbatim} +\normalsize + +If you do not do the unmount before making such a change, Bacula +will become completely confused about what is in the autochanger +and may stop function because it expects to have exclusive use +of the autochanger while it has the drive mounted. + + +\label{Magazines} +\section{Dealing with Multiple Magazines} +\index[general]{Dealing with Multiple Magazines } +\index[general]{Magazines!Dealing with Multiple } + +If you have several magazines or if you insert or remove cartridges from a +magazine, you should notify Bacula of this. By doing so, Bacula will as +a preference, use Volumes that it knows to be in the autochanger before +accessing Volumes that are not in the autochanger. This prevents unneeded +operator intervention. + +If your autochanger has barcodes (machine readable tape labels), the task of +informing Bacula is simple. Every time, you change a magazine, or add or +remove a cartridge from the magazine, simply do + +\footnotesize +\begin{verbatim} +unmount +(remove magazine) +(insert new magazine) +update slots +mount +\end{verbatim} +\normalsize + +in the Console program. This will cause Bacula to request the autochanger to +return the current Volume names in the magazine. This will be done without +actually accessing or reading the Volumes because the barcode reader does this +during inventory when the autochanger is first turned on. Bacula will ensure +that any Volumes that are currently marked as being in the magazine are marked +as no longer in the magazine, and the new list of Volumes will be marked as +being in the magazine. In addition, the Slot numbers of the Volumes will be +corrected in Bacula's catalog if they are incorrect (added or moved). + +If you do not have a barcode reader on your autochanger, you have several +alternatives. + +\begin{enumerate} +\item You can manually set the Slot and InChanger flag using the {\bf update + volume} command in the Console (quite painful). + +\item You can issue a + +\footnotesize +\begin{verbatim} +update slots scan +\end{verbatim} +\normalsize + + command that will cause Bacula to read the label on each of the cartridges in + the magazine in turn and update the information (Slot, InChanger flag) in the + catalog. This is quite effective but does take time to load each cartridge + into the drive in turn and read the Volume label. + +\item You can modify the mtx-changer script so that it simulates an + autochanger with barcodes. See below for more details. +\end{enumerate} + +\label{simulating} +\section{Simulating Barcodes in your Autochanger} +\index[general]{Autochanger!Simulating Barcodes in your } +\index[general]{Simulating Barcodes in your Autochanger } + +You can simulate barcodes in your autochanger by making the {\bf mtx-changer} +script return the same information that an autochanger with barcodes would do. +This is done by commenting out the one and only line in the {\bf list)} case, +which is: + +\footnotesize +\begin{verbatim} + ${MTX} -f $ctl status | grep " *Storage Element [0-9]*:.*Full" | awk "{print \$3 \$4}" | sed "s/Full *\(:VolumeTag=\)*//" +\end{verbatim} +\normalsize + +at approximately line 99 by putting a \# in column one of that line, or by +simply deleting it. Then in its place add a new line that prints the contents +of a file. For example: + +\footnotesize +\begin{verbatim} +cat /etc/bacula/changer.volumes +\end{verbatim} +\normalsize + +Be sure to include a full path to the file, which can have any name. The +contents of the file must be of the following format: + +\footnotesize +\begin{verbatim} +1:Volume1 +2:Volume2 +3:Volume3 +... +\end{verbatim} +\normalsize + +Where the 1, 2, 3 are the slot numbers and Volume1, Volume2, ... are the +Volume names in those slots. You can have multiple files that represent the +Volumes in different magazines, and when you change magazines, simply copy the +contents of the correct file into your {\bf /etc/bacula/changer.volumes} file. +There is no need to stop and start Bacula when you change magazines, simply +put the correct data in the file, then run the {\bf update slots} command, and +your autochanger will appear to Bacula to be an autochanger with barcodes. +\label{updateslots} + +\section{The Full Form of the Update Slots Command} +\index[general]{Full Form of the Update Slots Command } +\index[general]{Command!Full Form of the Update Slots } + +If you change only one cartridge in the magazine, you may not want to scan all +Volumes, so the {\bf update slots} command (as well as the {\bf update slots +scan} command) has the additional form: + +\footnotesize +\begin{verbatim} +update slots=n1,n2,n3-n4, ... +\end{verbatim} +\normalsize + +where the keyword {\bf scan} can be appended or not. The n1,n2, ... represent +Slot numbers to be updated and the form n3-n4 represents a range of Slot +numbers to be updated (e.g. 4-7 will update Slots 4,5,6, and 7). + +This form is particularly useful if you want to do a scan (time expensive) and +restrict the update to one or two slots. + +For example, the command: + +\footnotesize +\begin{verbatim} +update slots=1,6 scan +\end{verbatim} +\normalsize + +will cause Bacula to load the Volume in Slot 1, read its Volume label and +update the Catalog. It will do the same for the Volume in Slot 6. The command: + + +\footnotesize +\begin{verbatim} +update slots=1-3,6 +\end{verbatim} +\normalsize + +will read the barcoded Volume names for slots 1,2,3 and 6 and make the +appropriate updates in the Catalog. If you don't have a barcode reader or have +not modified the mtx-changer script as described above, the above command will +not find any Volume names so will do nothing. +\label{FreeBSD} + +\section{FreeBSD Issues} +\index[general]{Issues!FreeBSD } +\index[general]{FreeBSD Issues } + +If you are having problems on FreeBSD when Bacula tries to select a tape, and +the message is {\bf Device not configured}, this is because FreeBSD has made +the tape device {\bf /dev/nsa1} disappear when there is no tape mounted in the +autochanger slot. As a consequence, Bacula is unable to open the device. The +solution to the problem is to make sure that some tape is loaded into the tape +drive before starting Bacula. This problem is corrected in Bacula versions +1.32f-5 and later. + +Please see the +\ilink{ Tape Testing}{FreeBSDTapes} chapter of this manual for +{\bf important} information concerning your tape drive before doing the +autochanger testing. +\label{AutochangerTesting} + +\section{Testing Autochanger and Adapting mtx-changer script} +\index[general]{Testing the Autochanger } +\index[general]{Adapting Your mtx-changer script} + + +Before attempting to use the autochanger with Bacula, it is preferable to +"hand-test" that the changer works. To do so, we suggest you do the +following commands (assuming that the {\bf mtx-changer} script is installed in +{\bf /etc/bacula/mtx-changer}): + +\begin{description} + +\item [Make sure Bacula is not running.] + +\item [/etc/bacula/mtx-changer \ /dev/sg0 \ list \ 0 \ /dev/nst0 \ 0] +\index[sd]{mtx-changer list} + +This command should print: + +\footnotesize +\begin{verbatim} + 1: + 2: + 3: + ... + +\end{verbatim} +\normalsize + +or one number per line for each slot that is occupied in your changer, and +the number should be terminated by a colon ({\bf :}). If your changer has +barcodes, the barcode will follow the colon. If an error message is printed, +you must resolve the problem (e.g. try a different SCSI control device name +if {\bf /dev/sg0} is incorrect). For example, on FreeBSD systems, the +autochanger SCSI control device is generally {\bf /dev/pass2}. + +\item [/etc/bacula/mtx-changer \ /dev/sg0 \ slots ] +\index[sd]{mtx-changer slots} + +This command should return the number of slots in your autochanger. + +\item [/etc/bacula/mtx-changer \ /dev/sg0 \ unload \ 1 \ /dev/nst0 \ 0 ] +\index[sd]{mtx-changer unload} + + If a tape is loaded from slot 1, this should cause it to be unloaded. + +\item [/etc/bacula/mtx-changer \ /dev/sg0 \ load \ 3 \ /dev/nst0 \ 0 ] +\index[sd]{mtx-changer load} + +Assuming you have a tape in slot 3, it will be loaded into drive (0). + + +\item [/etc/bacula/mtx-changer \ /dev/sg0 \ loaded \ 0 \ /dev/nst0 \ 0] +\index[sd]{mtx-changer loaded} + +It should print "3" +Note, we have used an "illegal" slot number 0. In this case, it is simply +ignored because the slot number is not used. However, it must be specified +because the drive parameter at the end of the command is needed to select +the correct drive. + +\item [/etc/bacula/mtx-changer \ /dev/sg0 \ unload \ 3 /dev/nst0 \ 0] + +will unload the tape into slot 3. + +\end{description} + +Once all the above commands work correctly, assuming that you have the right +{\bf Changer Command} in your configuration, Bacula should be able to operate +the changer. The only remaining area of problems will be if your autoloader +needs some time to get the tape loaded after issuing the command. After the +{\bf mtx-changer} script returns, Bacula will immediately rewind and read the +tape. If Bacula gets rewind I/O errors after a tape change, you will probably +need to insert a {\bf sleep 20} after the {\bf mtx} command, but be careful to +exit the script with a zero status by adding {\bf exit 0} after any additional +commands you add to the script. This is because Bacula checks the return +status of the script, which should be zero if all went well. + +You can test whether or not you need a {\bf sleep} by putting the following +commands into a file and running it as a script: + +\footnotesize +\begin{verbatim} +#!/bin/sh +/etc/bacula/mtx-changer /dev/sg0 unload 1 /dev/nst0 0 +/etc/bacula/mtx-changer /dev/sg0 load 3 /dev/nst0 0 +mt -f /dev/st0 rewind +mt -f /dev/st0 weof +\end{verbatim} +\normalsize + +If the above script runs, you probably have no timing problems. If it does not +run, start by putting a {\bf sleep 30} or possibly a {\bf sleep 60} in the +script just after the mtx-changer load command. If that works, then you should +move the sleep into the actual {\bf mtx-changer} script so that it will be +effective when Bacula runs. + +A second problem that comes up with a small number of autochangers is that +they need to have the cartridge ejected before it can be removed. If this is +the case, the {\bf load 3} will never succeed regardless of how long you wait. +If this seems to be your problem, you can insert an eject just after the +unload so that the script looks like: + +\footnotesize +\begin{verbatim} +#!/bin/sh +/etc/bacula/mtx-changer /dev/sg0 unload 1 /dev/nst0 0 +mt -f /dev/st0 offline +/etc/bacula/mtx-changer /dev/sg0 load 3 /dev/nst0 0 +mt -f /dev/st0 rewind +mt -f /dev/st0 weof +\end{verbatim} +\normalsize + +Obviously, if you need the {\bf offline} command, you should move it into the +mtx-changer script ensuring that you save the status of the {\bf mtx} command +or always force an {\bf exit 0} from the script, because Bacula checks the +return status of the script. + +As noted earlier, there are several scripts in {\bf +\lt{}bacula-source\gt{}/examples/devices} that implement the above features, +so they may be a help to you in getting your script to work. + +If Bacula complains "Rewind error on /dev/nst0. ERR=Input/output error." you +most likely need more sleep time in your {\bf mtx-changer} before returning to +Bacula after a load command has been completed. + +\label{using} + +\section{Using the Autochanger} +\index[general]{Using the Autochanger } +\index[general]{Autochanger!Using the } + +Let's assume that you have properly defined the necessary Storage daemon +Device records, and you have added the {\bf Autochanger = yes} record to the +Storage resource in your Director's configuration file. + +Now you fill your autochanger with say six blank tapes. + +What do you do to make Bacula access those tapes? + +One strategy is to prelabel each of the tapes. Do so by starting Bacula, then +with the Console program, enter the {\bf label} command: + +\footnotesize +\begin{verbatim} +./bconsole +Connecting to Director rufus:8101 +1000 OK: rufus-dir Version: 1.26 (4 October 2002) +*label +\end{verbatim} +\normalsize + +it will then print something like: + +\footnotesize +\begin{verbatim} +Using default Catalog name=BackupDB DB=bacula +The defined Storage resources are: + 1: Autochanger + 2: File +Select Storage resource (1-2): 1 +\end{verbatim} +\normalsize + +I select the autochanger (1), and it prints: + +\footnotesize +\begin{verbatim} +Enter new Volume name: TestVolume1 +Enter slot (0 for none): 1 +\end{verbatim} +\normalsize + +where I entered {\bf TestVolume1} for the tape name, and slot {\bf 1} for the +slot. It then asks: + +\footnotesize +\begin{verbatim} +Defined Pools: + 1: Default + 2: File +Select the Pool (1-2): 1 +\end{verbatim} +\normalsize + +I select the Default pool. This will be automatically done if you only have a +single pool, then Bacula will proceed to unload any loaded volume, load the +volume in slot 1 and label it. In this example, nothing was in the drive, so +it printed: + +\footnotesize +\begin{verbatim} +Connecting to Storage daemon Autochanger at localhost:9103 ... +Sending label command ... +3903 Issuing autochanger "load slot 1" command. +3000 OK label. Volume=TestVolume1 Device=/dev/nst0 +Media record for Volume=TestVolume1 successfully created. +Requesting mount Autochanger ... +3001 Device /dev/nst0 is mounted with Volume TestVolume1 +You have messages. +* +\end{verbatim} +\normalsize + +You may then proceed to label the other volumes. The messages will change +slightly because Bacula will unload the volume (just labeled TestVolume1) +before loading the next volume to be labeled. + +Once all your Volumes are labeled, Bacula will automatically load them as they +are needed. + +To "see" how you have labeled your Volumes, simply enter the {\bf list +volumes} command from the Console program, which should print something like +the following: + +\footnotesize +\begin{verbatim} +*{\bf list volumes} +Using default Catalog name=BackupDB DB=bacula +Defined Pools: + 1: Default + 2: File +Select the Pool (1-2): 1 ++-------+----------+--------+---------+-------+--------+----------+-------+------+ +| MedId | VolName | MedTyp | VolStat | Bites | LstWrt | VolReten | Recyc | Slot | ++-------+----------+--------+---------+-------+--------+----------+-------+------+ +| 1 | TestVol1 | DDS-4 | Append | 0 | 0 | 30672000 | 0 | 1 | +| 2 | TestVol2 | DDS-4 | Append | 0 | 0 | 30672000 | 0 | 2 | +| 3 | TestVol3 | DDS-4 | Append | 0 | 0 | 30672000 | 0 | 3 | +| ... | ++-------+----------+--------+---------+-------+--------+----------+-------+------+ +\end{verbatim} +\normalsize + +\label{Barcodes} + +\section{Barcode Support} +\index[general]{Support!Barcode } +\index[general]{Barcode Support } + +Bacula provides barcode support with two Console commands, {\bf label +barcodes} and {\bf update slots}. + +The {\bf label barcodes} will cause Bacula to read the barcodes of all the +cassettes that are currently installed in the magazine (cassette holder) using +the {\bf mtx-changer} {\bf list} command. Each cassette is mounted in turn and +labeled with the same Volume name as the barcode. + +The {\bf update slots} command will first obtain the list of cassettes and +their barcodes from {\bf mtx-changer}. Then it will find each volume in turn +in the catalog database corresponding to the barcodes and set its Slot to +correspond to the value just read. If the Volume is not in the catalog, then +nothing will be done. This command is useful for synchronizing Bacula with the +current magazine in case you have changed magazines or in case you have moved +cassettes from one slot to another. If the autochanger is empty, nothing will +be done. + +The {\bf Cleaning Prefix} statement can be used in the Pool resource to define +a Volume name prefix, which if it matches that of the Volume (barcode) will +cause that Volume to be marked with a VolStatus of {\bf Cleaning}. This will +prevent Bacula from attempting to write on the Volume. + +\section{Use bconsole to display Autochanger content} + +The {\bf status slots storage=xxx} command displays autochanger content. + +\footnotesize +\begin{verbatim} + Slot | Volume Name | Status | Type | Pool | Loaded | +------+-----------------+----------+-------------------+----------------+---------| + 1 | 00001 | Append | DiskChangerMedia | Default | 0 | + 2 | 00002 | Append | DiskChangerMedia | Default | 0 | + 3*| 00003 | Append | DiskChangerMedia | Scratch | 0 | + 4 | | | | | 0 | +\end{verbatim} +\normalsize + +If you see a {\bf *} near the slot number, you have to run {\bf update slots} +command to synchronize autochanger content with your catalog. + +\label{interface} + +\section{Bacula Autochanger Interface} +\index[general]{Interface!Bacula Autochanger } +\index[general]{Bacula Autochanger Interface } + +Bacula calls the autochanger script that you specify on the {\bf Changer +Command} statement. Normally this script will be the {\bf mtx-changer} script +that we provide, but it can in fact be any program. The only requirement +for the script is that it must understand the commands that +Bacula uses, which are {\bf loaded}, {\bf load}, {\bf +unload}, {\bf list}, and {\bf slots}. In addition, +each of those commands must return the information in the precise format as +specified below: + +\footnotesize +\begin{verbatim} +- Currently the changer commands used are: + loaded -- returns number of the slot that is loaded, base 1, + in the drive or 0 if the drive is empty. + load -- loads a specified slot (note, some autochangers + require a 30 second pause after this command) into + the drive. + unload -- unloads the device (returns cassette to its slot). + list -- returns one line for each cassette in the autochanger + in the format :. Where + the {\bf slot} is the non-zero integer representing + the slot number, and {\bf barcode} is the barcode + associated with the cassette if it exists and if you + autoloader supports barcodes. Otherwise the barcode + field is blank. + slots -- returns total number of slots in the autochanger. +\end{verbatim} +\normalsize + +Bacula checks the exit status of the program called, and if it is zero, the +data is accepted. If the exit status is non-zero, Bacula will print an +error message and request the tape be manually mounted on the drive. diff --git a/docs/manuals/fr/concepts/bootstrap.tex b/docs/manuals/es/main/bootstrap.tex similarity index 98% rename from docs/manuals/fr/concepts/bootstrap.tex rename to docs/manuals/es/main/bootstrap.tex index b69cdfbf..882aaf03 100644 --- a/docs/manuals/fr/concepts/bootstrap.tex +++ b/docs/manuals/es/main/bootstrap.tex @@ -132,7 +132,7 @@ matched against the Volume records are: This value is optional and not used by Bacula to restore files. \item [FileIndex] - \index[general]{FileIndex } + \index[general]{FileIndex} The value specifies a FileIndex, list of FileIndexes, or range of FileIndexes to be selected from the current Volume. Each file (data) stored on a Volume within a Session has a unique FileIndex. For each Session, the first file @@ -148,6 +148,15 @@ matched against the Volume records are: To restore a particular file, this value (or a range of FileIndexes) is required. +\item [FileRegex] + \index[general]{FileRegex} + The value is a regular expression. When specified, only matching + filenames will be restored. + +\begin{verbatim} + FileRegex=^/etc/passwd(.old)? +\end{verbatim} + \item [Slot] \index[general]{Slot } The value specifies the autochanger slot. There may be only a single {\bf diff --git a/docs/manuals/fr/concepts/bugs.tex b/docs/manuals/es/main/bugs.tex similarity index 100% rename from docs/manuals/fr/concepts/bugs.tex rename to docs/manuals/es/main/bugs.tex diff --git a/docs/manuals/fr/catalog/catmaintenance.tex b/docs/manuals/es/main/catmaintenance.tex similarity index 93% rename from docs/manuals/fr/catalog/catmaintenance.tex rename to docs/manuals/es/main/catmaintenance.tex index bbdf013b..b22208e8 100644 --- a/docs/manuals/fr/catalog/catmaintenance.tex +++ b/docs/manuals/es/main/catmaintenance.tex @@ -271,6 +271,32 @@ the MySQL documentation, which can be found at: \elink{http://dev.mysql.com/doc/refman/5.0/en/gone-away.html} {http://dev.mysql.com/doc/refman/5.0/en/gone-away.html} +\section{MySQL Temporary Tables} +When doing backups with large numbers of files, MySQL creates some +temporary tables. When these tables are small they can be held in +system memory, but as they approach some size, they +spool off to disk. The default location for these temp tables is +/tmp. Once that space fills up, Bacula daemons such as the Storage +daemon doing spooling can get strange errors. E.g. + +\footnotesize +\begin{verbatim} +Fatal error: spool.c:402 Spool data read error. +Fatal error: backup.c:892 Network send error to SD. ERR=Connection reset by +peer +\end{verbatim} +\normalsize + +What you need to do is setup MySQL to use a different (larger) temp +directory, which can be set in the /etc/my.cnf with these variables +set: + +\footnotesize +\begin{verbatim} + tmpdir=/path/to/larger/tmpdir + bdb_tmpdir=/path/to/larger/tmpdir +\end{verbatim} +\normalsize \label{RepairingPSQL} \section{Repairing Your PostgreSQL Database} @@ -343,10 +369,10 @@ Several users have reported finding that their database did not have all the indexes in the default configuration. In addition, you may find that because of your own usage patterns, you need additional indexes. -The most important indexes for performance are the three indexes on the +The most important indexes for performance are the two indexes on the {\bf File} table. The first index is on {\bf FileId} and is automatically made because it is the unique key used to access the table. The other -two are the JobId index and the (Filename, PathId) index. If these Indexes +one is the (JobId, PathId, Filename) index. If these Indexes are not present, your performance may suffer a lot. \subsection{PostgreSQL Indexes} @@ -367,10 +393,12 @@ are created, you can create the two additional indexes using: \begin{verbatim} psql bacula CREATE INDEX file_jobid_idx on file (jobid); -CREATE INDEX file_fp_idx on file (filenameid, pathid); +CREATE INDEX file_jpf_idx on file (jobid, pathid, filenameid); \end{verbatim} \normalsize +Make sure that you doesn't have an index on File (filenameid, pathid). + \subsection{MySQL Indexes} On MySQL, you can check if you have the proper indexes by: @@ -388,7 +416,7 @@ create them with the following commands: \begin{verbatim} mysql bacula CREATE INDEX file_jobid_idx on File (JobId); -CREATE INDEX file_jpf_idx on File (Job, FilenameId, PathId); +CREATE INDEX file_jpf_idx on File (JobId, FilenameId, PathId); \end{verbatim} \normalsize @@ -428,7 +456,7 @@ On SQLite, you can check if you have the proper indexes by: \footnotesize \begin{verbatim} -sqlite bacula.db +sqlite /bacula.db select * from sqlite_master where type='index' and tbl_name='File'; \end{verbatim} \normalsize @@ -438,9 +466,9 @@ create them with the following commands: \footnotesize \begin{verbatim} -mysql bacula +sqlite /bacula.db CREATE INDEX file_jobid_idx on File (JobId); -CREATE INDEX file_jfp_idx on File (Job, FilenameId, PathId); +CREATE INDEX file_jfp_idx on File (JobId, PathId, FilenameId); \end{verbatim} \normalsize @@ -524,18 +552,18 @@ Director's configuration file. Note, in the case of SQLite, it is necessary to completely delete (rm) the old database before creating a new compressed version. -\section{Migrating from SQLite to MySQL} +\section{Migrating from SQLite to MySQL or PostgreSQL} \index[general]{MySQL!Migrating from SQLite to } -\index[general]{Migrating from SQLite to MySQL } +\index[general]{Migrating from SQLite to MySQL or PostgreSQL} You may begin using Bacula with SQLite then later find that you want to switch -to MySQL for any of a number of reasons: SQLite tends to use more disk than -MySQL; when the database is corrupted it is often more catastrophic than -with MySQL or PostgreSQL. -Several users have succeeded in converting from SQLite to MySQL by -exporting the MySQL data and then processing it with Perl scripts -prior to putting it into MySQL. This is, however, not a simple -process. +to MySQL or Postgres for any of a number of reasons: SQLite tends to use more +disk than MySQL; when the database is corrupted it is often more catastrophic +than with MySQL or PostgreSQL. Several users have succeeded in converting by +exporting the SQLite data and then processing it with Perl scripts prior to +putting it into MySQL or PostgreSQL. This is, however, not a simple process. +Scripts are available on bacula source distribution under +\texttt{examples/database}. \label{BackingUpBacula} \section{Backing Up Your Bacula Database} diff --git a/docs/manuals/fr/install/check_tex.pl b/docs/manuals/es/main/check_tex.pl similarity index 100% rename from docs/manuals/fr/install/check_tex.pl rename to docs/manuals/es/main/check_tex.pl diff --git a/docs/manuals/fr/install/configure.tex b/docs/manuals/es/main/configure.tex similarity index 96% rename from docs/manuals/fr/install/configure.tex rename to docs/manuals/es/main/configure.tex index e37773b9..4a2dece6 100644 --- a/docs/manuals/fr/install/configure.tex +++ b/docs/manuals/es/main/configure.tex @@ -27,9 +27,7 @@ the installation process, but you will need to modify them to correspond to your system. An overall view of the resources can be seen in the following: \addcontentsline{lof}{figure}{Bacula Objects} -\includegraphics{./bacula-objects.eps} -\\ -(thanks to Aristides Maniatis for the above graphic) +\includegraphics{\idir bacula-objects.eps} \label{ResFormat} \section{Character Sets} @@ -136,6 +134,15 @@ so by including other files using the syntax @{\bf filename} where {\bf filename} is the full path and filename of another file. The @filename specification can be given anywhere a primitive token would appear. +If you wish include all files in a specific directory, you can use the following: +\begin{verbatim} +# Include subfiles associated with configuration of clients. +# They define the bulk of the Clients, Jobs, and FileSets. +# Remember to "reload" the Director after adding a client file. +# +@|"sh -c 'for f in /etc/bacula/clientdefs/*.conf ; do echo @${f} ; done'" +\end{verbatim} + \label{DataTypes} \subsection{Recognized Primitive Data Types} \index[general]{Types!Recognized Primitive Data } @@ -196,7 +203,7 @@ constructs such as {\bf \$HOME} are interpreted to be their correct values. A 64 bit integer value. Typically these are values such as bytes that can exceed 4 billion and thus require a 64 bit value. -\item [yes|no] +\item [yes\vb{}no] \index[dir]{yes or no } Either a {\bf yes} or a {\bf no}. @@ -359,7 +366,7 @@ will need to take care to keep them consistent. Here is sort of a picture of what names/passwords in which files/Resources must match up: -\includegraphics{./Conf-Diagram.eps} +\includegraphics{\idir Conf-Diagram.eps} In the left column, you will find the Director, Storage, and Client resources, with their names and passwords -- these are all in {\bf bacula-dir.conf}. In diff --git a/docs/manuals/fr/install/consoleconf.tex b/docs/manuals/es/main/consoleconf.tex similarity index 100% rename from docs/manuals/fr/install/consoleconf.tex rename to docs/manuals/es/main/consoleconf.tex diff --git a/docs/manuals/es/main/coverpage.tex b/docs/manuals/es/main/coverpage.tex new file mode 100644 index 00000000..d6aa6a5c --- /dev/null +++ b/docs/manuals/es/main/coverpage.tex @@ -0,0 +1,28 @@ +\newfont{\bighead}{cmr17 at 36pt} +\parskip 10pt +\parindent 0pt + +\title{\includegraphics{\idir bacula-logo.eps} \\ \bigskip + \Huge{Bacula}$^{\normalsize \textregistered}$ \Huge{Bacula Main Reference} + \begin{center} + \large{It comes in the night and sucks + the essence from your computers. } + \end{center} +} + + +\author{Kern Sibbald} +\date{\vspace{1.0in}\today \\ + This manual documents Bacula version \fullversion \\ + \vspace{0.2in} + Copyright {\copyright} 1999-2009, Free Software Foundation Europe + e.V. \\ + Bacula {\textregistered} is a registered trademark of Kern Sibbald.\\ + \vspace{0.2in} + Permission is granted to copy, distribute and/or modify this document under the terms of the + GNU Free Documentation License, Version 1.2 published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. + A copy of the license is included in the section entitled "GNU Free Documentation License". +} + +\maketitle diff --git a/docs/manuals/fr/install/critical.tex b/docs/manuals/es/main/critical.tex similarity index 99% rename from docs/manuals/fr/install/critical.tex rename to docs/manuals/es/main/critical.tex index 30462e39..ee0d225c 100644 --- a/docs/manuals/fr/install/critical.tex +++ b/docs/manuals/es/main/critical.tex @@ -83,7 +83,7 @@ production, use the checklist anyway). will also vary. On most modern Win32 machines, you can edit the conf files with {\bf - notebook} and choose output encoding UTF-8. + notepad} and choose output encoding UTF-8. \end{itemize} \section{Recommended Items} diff --git a/docs/manuals/fr/concepts/dataencryption.tex b/docs/manuals/es/main/dataencryption.tex similarity index 96% rename from docs/manuals/fr/concepts/dataencryption.tex rename to docs/manuals/es/main/dataencryption.tex index 34b050fe..9b259cef 100644 --- a/docs/manuals/fr/concepts/dataencryption.tex +++ b/docs/manuals/es/main/dataencryption.tex @@ -19,7 +19,7 @@ do: possible for the director to restore new keys or a Bacula configuration file to the client, and thus force later backups to be made with a compromised key and/or with no encryption at all. You can avoid this by - not not changing the location of the keys in your Bacula File daemon + not changing the location of the keys in your Bacula File daemon configuration file, and not changing your File daemon keys. If you do change either one, you must ensure that no restore is done that restores the old configuration or the old keys. In general, the worst effect of @@ -120,11 +120,11 @@ client's keypair, recovery with the master keypair is possible. You must: \begin{itemize} -\item Concatenate the master private and public key into a single +\item Concatenate the master private and public key into a single keypair file, ie: - cat master.key master.cert >master.keypair + cat master.key master.cert \gt master.keypair -\item 2) Set the PKI Keypair statement in your bacula configuration file: +\item Set the PKI Keypair statement in your bacula configuration file: \begin{verbatim} PKI Keypair = master.keypair diff --git a/docs/manuals/fr/install/dirdconf.tex b/docs/manuals/es/main/dirdconf.tex similarity index 91% rename from docs/manuals/fr/install/dirdconf.tex rename to docs/manuals/es/main/dirdconf.tex index c823d640..e262af1a 100644 --- a/docs/manuals/fr/install/dirdconf.tex +++ b/docs/manuals/es/main/dirdconf.tex @@ -195,31 +195,34 @@ in the graphical user interface. This directive is optional. done when the configuration file is read so that values such as {\bf \$HOME} will be properly expanded. This directive is required. +\item [Heartbeat Interval = \lt{}time-interval\gt{}] + \index[dir]{Heartbeat Interval} + \index[dir]{Directive!Heartbeat} + This directive is optional and if specified will cause the Director to + set a keepalive interval (heartbeat) in seconds on each of the sockets + it opens for the Client resource. This value will override any + specified at the Director level. It is implemented only on systems + (Linux, ...) that provide the {\bf setsockopt} TCP\_KEEPIDLE function. + The default value is zero, which means no change is made to the socket. + + \label{DirMaxConJobs} \item [Maximum Concurrent Jobs = \lt{}number\gt{}] -\index[dir]{Maximum Concurrent Jobs} -\index[dir]{Directive!Maximum Concurrent Jobs} -\index[general]{Simultaneous Jobs} -\index[general]{Concurrent Jobs} + \index[dir]{Maximum Concurrent Jobs} + \index[dir]{Directive!Maximum Concurrent Jobs} + \index[general]{Simultaneous Jobs} + \index[general]{Concurrent Jobs} where \lt{}number\gt{} is the maximum number of total Director Jobs that should run concurrently. The default is set to 1, but you may set it to a larger number. - Please note that the Volume format becomes much more complicated with - multiple simultaneous jobs, consequently, restores can take much longer if + The Volume format becomes more complicated with + multiple simultaneous jobs, consequently, restores may take longer if Bacula must sort through interleaved volume blocks from multiple simultaneous - jobs. This can be avoided by having each simultaneously running job write to + jobs. This can be avoided by having each simultaneous job write to a different volume or by using data spooling, which will first spool the data - to disk simultaneously, then write each spool file to the volume in - sequence. - - There may also still be some cases where directives such as {\bf Maximum - Volume Jobs} are not properly synchronized with multiple simultaneous jobs - (subtle timing issues can arise), so careful testing is recommended. - - At the current time, there is no configuration parameter set to limit the - number of console connections. A maximum of five simultaneous console - connections are permitted. + to disk simultaneously, then write one spool file at a time to the volume + thus avoiding excessive interleaving of the different job blocks. \item [FD Connect Timeout = \lt{}time\gt{}] \index[dir]{FD Connect Timeout} @@ -286,22 +289,63 @@ resource. listen for Bacula Console connections. This same port number must be specified in the Director resource of the Console configuration file. The default is 9101, so normally this directive need not be specified. This - directive should not be used if you specify DirAddresses (not plural) + directive should not be used if you specify DirAddresses (N.B plural) directive. \item [DirAddress = \lt{}IP-Address\gt{}] \index[dir]{DirAddress} \index[dir]{Directive!DirAddress} - This directive is optional, but if it is specified, it will cause the - Director server (for the Console program) to bind to the specified {\bf - IP-Address}, which is either a domain name or an IP address specified as a - dotted quadruple in string or quoted string format. If this directive is not - specified, the Director will bind to any available address (the default). - Note, unlike the DirAddresses specification noted above, this directive only - permits a single address to be specified. This directive should not be used if you - specify a DirAddresses (note plural) directive. - - + This directive is optional, but if it is specified, it will cause the + Director server (for the Console program) to bind to the specified {\bf + IP-Address}, which is either a domain name or an IP address specified as a + dotted quadruple in string or quoted string format. If this directive is + not specified, the Director will bind to any available address (the + default). Note, unlike the DirAddresses specification noted above, this + directive only permits a single address to be specified. This directive + should not be used if you specify a DirAddresses (N.B. plural) directive. + +\item [DirSourceAddress = \lt{}IP-Address\gt{}] + \index[fd]{DirSourceAddress} + \index[fd]{Directive!DirSourceAddress} + This record is optional, and if it is specified, it will cause the Director + server (when initiating connections to a storage or file daemon) to source + its connections from the specified address. Only a single IP address may be + specified. If this record is not specified, the Director server will source + its outgoing connections according to the system routing table (the default). + +\item[Statistics Retention = \lt{}time\gt{}] + \index[dir]{StatisticsRetention} + \index[dir]{Directive!StatisticsRetention} + \label{PruneStatistics} + + The \texttt{Statistics Retention} directive defines the length of time that + Bacula will keep statistics job records in the Catalog database after the + Job End time. (In \texttt{JobHistory} table) When this time period expires, + and if user runs \texttt{prune stats} command, Bacula will prune (remove) + Job records that are older than the specified period. + + Theses statistics records aren't use for restore purpose, but mainly for + capacity planning, billings, etc. See \ilink{Statistics chapter} for + additional information. + + See the \ilink{ Configuration chapter}{Time} of this manual for additional + details of time specification. + + The default is 5 years. + +\item[VerId = \lt{}string\gt{}] + \index[dir]{Directive!VerId} + where \lt{}string\gt{} is an identifier which can be used for support purpose. + This string is displayed using the \texttt{version} command. + +\item[MaxConsoleConnections = \lt{}number\gt{}] + \index[dir]{MaximumConsoleConnections} + \index[dir]{MaxConsoleConnections} + \index[dir]{Directive!MaxConsoleConnections} + \index[dir]{Console} + where \lt{}number\gt{} is the maximum number of Console Connections that + could run concurrently. The default is set to 20, but you may set it to a + larger number. \end{description} @@ -343,6 +387,16 @@ a unique Job name. Normally, you will have only one Job per Client, but if a client has a really huge number of files (more than several million), you might want to split it into to Jobs each with a different FileSet covering only part of the total files. + +Multiple Storage daemons are not currently supported for Jobs, so if +you do want to use multiple storage daemons, you will need to create +a different Job and ensure that for each Job that the combination of +Client and FileSet are unique. The Client and FileSet are what Bacula +uses to restore a client, so if there are multiple Jobs with the same +Client and FileSet or multiple Storage daemons that are used, the +restore will not work. This problem can be resolved by defining multiple +FileSet definitions (the names must be different, but the contents of +the FileSets may be the same). \begin{description} @@ -365,7 +419,7 @@ covering only part of the total files. specify here followed by the date and time the job was scheduled for execution. This directive is required. -\item [Enabled = \lt{}yes|no\gt{}] +\item [Enabled = \lt{}yes\vb{}no\gt{}] \index[dir]{Enable} \index[dir]{Directive!Enable} This directive allows you to enable or disable automatic execution @@ -456,6 +510,7 @@ For a {\bf Backup} Job, the Level may be one of the following: different FileSet. \item The Job was a Full, Differential, or Incremental backup. \item The Job terminated normally (i.e. did not fail or was not canceled). +\item The Job started no longer ago than {\bf Max Full Interval}. \end{itemize} If all the above conditions do not hold, the Director will upgrade the @@ -480,13 +535,11 @@ For a {\bf Backup} Job, the Level may be one of the following: When Bacula does an Incremental backup, all modified files that are still on the system are backed up. However, any file that has been - deleted since the last Full backup remains in the Bacula catalog, which - means that if between a Full save and the time you do a restore, some - files are deleted, those deleted files will also be restored. The - deleted files will no longer appear in the catalog after doing another - Full save. However, to remove deleted files from the catalog during an - Incremental backup is quite a time consuming process and not currently - implemented in Bacula. + deleted since the last Full backup remains in the Bacula catalog, + which means that if between a Full save and the time you do a + restore, some files are deleted, those deleted files will also be + restored. The deleted files will no longer appear in the catalog + after doing another Full save. In addition, if you move a directory rather than copy it, the files in it do not have their modification time (st\_mtime) or their attribute @@ -496,6 +549,11 @@ For a {\bf Backup} Job, the Level may be one of the following: it to be properly backed up, it is generally preferable to copy it, then delete the original. + However, to manage deleted files or directories changes in the + catalog during an Incremental backup you can use \texttt{accurate} + mode. This is quite memory consuming process. See \ilink{Accurate + mode}{accuratemode} for more details. + \item [Differential] \index[dir]{Differential} When the Level is set to Differential @@ -515,6 +573,7 @@ For a {\bf Backup} Job, the Level may be one of the following: different FileSet. \item The Job was a FULL backup. \item The Job terminated normally (i.e. did not fail or was not canceled). +\item The Job started no longer ago than {\bf Max Full Interval}. \end{itemize} If all the above conditions do not hold, the Director will upgrade the @@ -556,6 +615,12 @@ For a {\bf Backup} Job, the Level may be one of the following: delete the original. Alternatively, you can move the directory, then use the {\bf touch} program to update the timestamps. +%% TODO: merge this with incremental + However, to manage deleted files or directories changes in the + catalog during an Differential backup you can use \texttt{accurate} + mode. This is quite memory consuming process. See \ilink{Accurate + mode}{accuratemode} for more details. + Every once and a while, someone asks why we need Differential backups as long as Incremental backups pickup all changed files. There are possibly many answers to this question, but the one @@ -647,6 +712,27 @@ For a {\bf Verify} Job, the Level may be one of the following: have been deleted. \end{description} +\item [Accurate = \lt{}yes\vb{}no\gt{}] +\index[dir]{Accurate} + In accurate mode, the File daemon knowns exactly which files were present + after the last backup. So it is able to handle deleted or renamed files. + + When restoring a FileSet for a specified date (including "most + recent"), Bacula is able to restore exactly the files and + directories that existed at the time of the last backup prior to + that date including ensuring that deleted files are actually deleted, + and renamed directories are restored properly. + + In this mode, the File daemon must keep data concerning all files in + memory. So you do not have sufficient memory, the restore may + either be terribly slow or fail. + +%% $$ memory = \sum_{i=1}^{n}(strlen(path_i + file_i) + sizeof(CurFile))$$ + + For 500.000 files (a typical desktop linux system), it will require + approximately 64 Megabytes of RAM on your File daemon to hold the + required information. + \item [Verify Job = \lt{}Job-Resource-Name\gt{}] \index[dir]{Verify Job} \index[dir]{Directive!Verify Job} @@ -839,8 +925,37 @@ JobDefs { \index[dir]{Directive!Max Run Time} The time specifies the maximum allowed time that a job may run, counted from when the job starts, ({\bf not} necessarily the same as when the - job was scheduled). This directive is implemented in version 1.33 and - later. + job was scheduled). + +\item [Incremental|Differential Max Wait Time = \lt{}time\gt{}] +\index[dir]{Incremental Wait Run Time} +\index[dir]{Differential Wait Run Time} +\index[dir]{Directive!Differential Max Wait Time} + Theses directives have been deprecated in favor of + \texttt{Incremental|Differential Max Run Time} since bacula 2.3.18. + +\item [Incremental Max Run Time = \lt{}time\gt{}] +\index[dir]{Incremental Max Run Time} +\index[dir]{Directive!Incremental Max Run Time} +The time specifies the maximum allowed time that an Incremental backup job may +run, counted from when the job starts, ({\bf not} necessarily the same as when +the job was scheduled). + +\item [Differential Max Wait Time = \lt{}time\gt{}] +\index[dir]{Differential Max Run Time} +\index[dir]{Directive!Differential Max Run Time} +The time specifies the maximum allowed time that a Differential backup job may +run, counted from when the job starts, ({\bf not} necessarily the same as when +the job was scheduled). + +\item [Max Run Sched Time = \lt{}time\gt{}] +\index[dir]{Max Run Sched Time} +\index[dir]{Directive!Max Run Sched Time} + +The time specifies the maximum allowed time that a job may run, counted from +when the job was scheduled. This can be useful to prevent jobs from running +during working hours. We can see it like \texttt{Max Start Delay + Max Run + Time}. \item [Max Wait Time = \lt{}time\gt{}] \index[dir]{Max Wait Time} @@ -849,31 +964,24 @@ JobDefs { for a resource (such as waiting for a tape to be mounted, or waiting for the storage or file daemons to perform their duties), counted from the when the job starts, ({\bf not} necessarily the same as when the job was - scheduled). This directive is implemented only in version 1.33 and - later. - -\item [Incremental Max Wait Time = \lt{}time\gt{}] -\index[dir]{Incremental Max Wait Time} -\index[dir]{Directive!Incremental Max Wait Time} - The time specifies the maximum allowed time that an Incremental backup - job may block waiting for a resource (such as waiting for a tape to be - mounted, or waiting for the storage or file daemons to perform their - duties), counted from the when the job starts, ({\bf not} necessarily - the same as when the job was scheduled). Please note that if there is a - {\bf Max Wait Time} it may also be applied to the job. - -\item [Differential Max Wait Time = \lt{}time\gt{}] -\index[dir]{Differential Max Wait Time} -\index[dir]{Directive!Differential Max Wait Time} - The time specifies the maximum allowed time that a Differential backup - job may block waiting for a resource (such as waiting for a tape to be - mounted, or waiting for the storage or file daemons to perform their - duties), counted from the when the job starts, ({\bf not} necessarily - the same as when the job was scheduled). Please note that if there is a - {\bf Max Wait Time} it may also be applied to the job. + scheduled). This directive works as expected since bacula 2.3.18. + +\addcontentsline{lof}{figure}{Job time control directives} +\includegraphics{\idir different_time.eps} + +\item [Max Full Interval = \lt{}time\gt{}] +\index[dir]{Max Full Interval} +\index[dir]{Directive!Max Full Interval} + The time specifies the maximum allowed age (counting from start time) of + the most recent successful Full backup that is required in order to run + Incremental or Differential backup jobs. If the most recent Full backup + is older than this interval, Incremental and Differential backups will be + upgraded to Full backups automatically. If this directive is not present, + or specified as 0, then the age of the previous Full backup is not + considered. \label{PreferMountedVolumes} -\item [Prefer Mounted Volumes = \lt{}yes|no\gt{}] +\item [Prefer Mounted Volumes = \lt{}yes\vb{}no\gt{}] \index[dir]{Prefer Mounted Volumes} \index[dir]{Directive!Prefer Mounted Volumes} If the Prefer Mounted Volumes directive is set to {\bf yes} (default @@ -881,7 +989,8 @@ JobDefs { a drive with a valid Volume already mounted in preference to a drive that is not ready. This means that all jobs will attempt to append to the same Volume (providing the Volume is appropriate -- right Pool, - ... for that job). If no drive with a suitable Volume is available, it + ... for that job), unless you are using multiple pools. + If no drive with a suitable Volume is available, it will select the first available drive. Note, any Volume that has been requested to be mounted, will be considered valid as a mounted volume by another job. This if multiple jobs start at the same time @@ -897,7 +1006,18 @@ JobDefs { This means that the job will prefer to use an unused drive rather than use a drive that is already in use. -\item [Prune Jobs = \lt{}yes|no\gt{}] + Despite the above, we recommend against setting this directive to + {\bf no} since + it tends to add a lot of swapping of Volumes between the different + drives and can easily lead to deadlock situations in the Storage + daemon. We will accept bug reports against it, but we cannot guarantee + that we will be able to fix the problem in a reasonable time. + + A better alternative for using multiple drives is to use multiple + pools so that Bacula will be forced to mount Volumes from those Pools + on different drives. + +\item [Prune Jobs = \lt{}yes\vb{}no\gt{}] \index[dir]{Prune Jobs} \index[dir]{Directive!Prune Jobs} Normally, pruning of Jobs from the Catalog is specified on a Client by @@ -907,7 +1027,7 @@ JobDefs { default is {\bf no}. -\item [Prune Files = \lt{}yes|no\gt{}] +\item [Prune Files = \lt{}yes\vb{}no\gt{}] \index[dir]{Prune Files} \index[dir]{Directive!Prune Files} Normally, pruning of Files from the Catalog is specified on a Client by @@ -916,7 +1036,7 @@ JobDefs { yes}, it will override the value specified in the Client resource. The default is {\bf no}. -\item [Prune Volumes = \lt{}yes|no\gt{}] +\item [Prune Volumes = \lt{}yes\vb{}no\gt{}] \index[dir]{Prune Volumes} \index[dir]{Directive!Prune Volumes} Normally, pruning of Volumes from the Catalog is specified on a Client @@ -929,13 +1049,33 @@ JobDefs { \index[dir]{RunScript} \index[dir]{Directive!Run Script} - This directive is implemented in version 1.39.22 and later. The RunScript directive behaves like a resource in that it requires opening and closing braces around a number of directives that make up the body of the runscript. - The specified {\bf Command} (see below for details) is run as an - external program prior or after the current Job. This is optional. + The specified {\bf Command} (see below for details) is run as an external + program prior or after the current Job. This is optional. By default, the + program is executed on the Client side like in \texttt{ClientRunXXXJob}. + + \textbf{Console} options are special commands that are sent to the director instead + of the OS. At this time, console command ouputs are redirected to log with + the jobid 0. + + You can use following console command : \texttt{delete}, \texttt{disable}, + \texttt{enable}, \texttt{estimate}, \texttt{list}, \texttt{llist}, + \texttt{memory}, \texttt{prune}, \texttt{purge}, \texttt{reload}, + \texttt{status}, \texttt{setdebug}, \texttt{show}, \texttt{time}, + \texttt{trace}, \texttt{update}, \texttt{version}, \texttt{.client}, + \texttt{.jobs}, \texttt{.pool}, \texttt{.storage}. See console chapter for + more information. You need to specify needed information on command line, nothing + will be prompted. Example : + +\begin{verbatim} + Console = "prune files client=%c" + Console = "update stats age=3" +\end{verbatim} + + You can specify more than one Command/Console option per RunScript. You can use following options may be specified in the body of the runscript:\\ @@ -950,13 +1090,15 @@ Runs On Failure & Yes/No & {\it No} & Run command if JobStatus isn't successful\ \hline Runs On Client & Yes/No & {\it Yes} & Run command on client\\ \hline -Runs When & Before|After|Always & {\it Never} & When run commands\\ +Runs When & Before|After|Always|\textsl{AfterVSS} & {\it Never} & When run commands\\ \hline Fail Job On Error & Yes/No & {\it Yes} & Fail job if script returns something different from 0 \\ \hline Command & & & Path to your script\\ \hline +Console & & & Console command\\ +\hline \end{tabular} \\ @@ -986,8 +1128,8 @@ Command & & & Path to your script\\ %n = Job name %s = Since time %t = Job type (Backup, ...) - %v = Volume name - + %v = Volume name (Only on director side) + \end{verbatim} \normalsize @@ -1038,8 +1180,18 @@ RunScript { } \end{verbatim} + {\bf Notes about ClientRunBeforeJob} + + For compatibility reasons, with this shortcut, the command is executed + directly when the client recieve it. And if the command is in error, other + remote runscripts will be discarded. To be sure that all commands will be + sent and executed, you have to use RunScript syntax. + {\bf Special Windows Considerations} + You can run scripts just after snapshots initializations with + \textsl{AfterVSS} keyword. + In addition, for a Windows client on version 1.33 and above, please take note that you must ensure a correct path to your script. The script or program can be a .com, .exe or a .bat file. If you just put the program @@ -1305,7 +1457,7 @@ RunScript { Note, please see the notes above in {\bf RunScript} concerning Windows clients. -\item [Rerun Failed Levels = \lt{}yes|no\gt{}] +\item [Rerun Failed Levels = \lt{}yes\vb{}no\gt{}] \index[dir]{Rerun Failed Levels} \index[dir]{Directive!Rerun Failed Levels} If this directive is set to {\bf yes} (default no), and Bacula detects that @@ -1323,7 +1475,7 @@ RunScript { when checking for failed levels, which means that any FileSet change will trigger a rerun. -\item [Spool Data = \lt{}yes|no\gt{}] +\item [Spool Data = \lt{}yes\vb{}no\gt{}] \index[dir]{Spool Data} \index[dir]{Directive!Spool Data} @@ -1338,7 +1490,7 @@ RunScript { NOTE: When this directive is set to yes, Spool Attributes is also automatically set to yes. -\item [Spool Attributes = \lt{}yes|no\gt{}] +\item [Spool Attributes = \lt{}yes\vb{}no\gt{}] \index[dir]{Spool Attributes} \index[dir]{Directive!Spool Attributes} \index[dir]{slow} @@ -1428,7 +1580,7 @@ RunScript { \item [always] \index[dir]{always} when the file to be restored already exists, it is deleted and then - replaced by the copy that was backed up. + replaced by the copy that was backed up. This is the default value. \item [ifnewer] \index[dir]{ifnewer} @@ -1445,7 +1597,7 @@ RunScript { if the backed up file already exists, Bacula skips restoring this file. \end{description} -\item [Prefix Links=\lt{}yes|no\gt{}] +\item [Prefix Links=\lt{}yes\vb{}no\gt{}] \index[dir]{Prefix Links} \index[dir]{Directive!Prefix Links} If a {\bf Where} path prefix is specified for a recovery job, apply it @@ -1469,7 +1621,7 @@ RunScript { documented under \ilink{ Maximum Concurrent Jobs}{DirMaxConJobs} in the Director's resource. -\item [Reschedule On Error = \lt{}yes|no\gt{}] +\item [Reschedule On Error = \lt{}yes\vb{}no\gt{}] \index[dir]{Reschedule On Error} \index[dir]{Directive!Reschedule On Error} If this directive is enabled, and the job terminates in error, the job @@ -1554,7 +1706,8 @@ RunScript { The priority only affects waiting jobs that are queued to run, not jobs that are already running. If one or more jobs of priority 2 are already running, and a new job is scheduled with priority 1, the currently - running priority 2 jobs must complete before the priority 1 job is run. + running priority 2 jobs must complete before the priority 1 job is + run, unless Allow Mixed Priority is set. The default priority is 10. @@ -1592,8 +1745,25 @@ avoid it by starting any higher priority jobs a few seconds before lower priority ones. This insures that Bacula will examine the jobs in the correct order, and that your priority scheme will be respected. +\label{AllowMixedPriority} +\item [Allow Mixed Priority = \lt{}yes\vb{}no\gt{}] +\index[dir]{Allow Mixed Priority} + This directive is only implemented in version 2.5 and later. When + set to {\bf yes} (default {\bf no}), this job may run even if lower + priority jobs are already running. This means a high priority job + will not have to wait for other jobs to finish before starting. + The scheduler will only mix priorities when all running jobs have + this set to true. + + Note that only higher priority jobs will start early. Suppose the + director will allow two concurrent jobs, and that two jobs with + priority 10 are running, with two more in the queue. If a job with + priority 5 is added to the queue, it will be run as soon as one of + the running jobs finishes. However, new priority 10 jobs will not + be run until the priority 5 job has finished. + \label{WritePartAfterJob} -\item [Write Part After Job = \lt{}yes|no\gt{}] +\item [Write Part After Job = \lt{}yes\vb{}no\gt{}] \index[dir]{Write Part After Job} \index[dir]{Directive!Write Part After Job} This directive is only implemented in version 1.37 and later. @@ -1612,16 +1782,6 @@ correct order, and that your priority scheme will be respected. This directive is ignored with tape and FIFO devices. -\item [Heartbeat Interval = \lt{}time-interval\gt{}] - \index[dir]{Heartbeat Interval} - \index[dir]{Directive!Heartbeat} - This directive is optional and if specified will cause the Director to - set a keepalive interval (heartbeat) in seconds on each of the sockets - it opens for the Client resource. This value will override any - specified at the Director level. It is implemented only on systems - (Linux, ...) that provide the {\bf setsockopt} TCP\_KEEPIDLE function. - The default value is zero, which means no change is made to the socket. - \end{description} The following is an example of a valid Job resource definition: @@ -1753,7 +1913,7 @@ upgraded from another type to a full backup. specifies to use the Pool named {\bf Incremental} if the job is an incremental backup. -\item [SpoolData=yes|no] +\item [SpoolData=yes\vb{}no] \index[dir]{SpoolData} \index[dir]{Directive!SpoolData} tells Bacula to request the Storage daemon to spool data to a disk file @@ -1771,7 +1931,7 @@ incremental backup. This directive is available only in Bacula version 2.3.5 or later. -\item [WritePartAfterJob=yes|no] +\item [WritePartAfterJob=yes\vb{}no] \index[dir]{WritePartAfterJob} \index[dir]{Directive!WritePartAfterJob} tells Bacula to request the Storage daemon to write the current part @@ -1851,13 +2011,11 @@ pseudo-BNF: = | | = | - = | | - | | - = | | | | | - + | + = | | = @@ -2068,7 +2226,7 @@ console run command. This directive is required. The default is 180 days. \label{AutoPrune} -\item [AutoPrune = \lt{}yes|no\gt{}] +\item [AutoPrune = \lt{}yes\vb{}no\gt{}] \index[dir]{AutoPrune} \index[dir]{Directive!AutoPrune} If AutoPrune is set to {\bf yes} (default), Bacula (version 1.20 or greater) @@ -2086,10 +2244,7 @@ console run command. This directive is required. with the same name as the resource in which it appears. Any other restrictions on the maximum concurrent jobs such as in the Director, Job, or Storage resources will also apply in addition to any limit specified here. - The default is set to 1, but you may set it to a larger number. We strongly - recommend that you read the WARNING documented under - \ilink{ Maximum Concurrent Jobs}{DirMaxConJobs} in the Director's - resource. + The default is set to 1, but you may set it to a larger number. \item [Priority = \lt{}number\gt{}] \index[dir]{Priority} @@ -2246,7 +2401,7 @@ the Director. check so that you don't try to write data for a DLT onto an 8mm device. \label{Autochanger1} -\item [Autochanger = \lt{}yes|no\gt{}] +\item [Autochanger = \lt{}yes\vb{}no\gt{}] \index[dir]{Autochanger} \index[dir]{Directive!Autochanger} If you specify {\bf yes} for this command (the default is {\bf no}), @@ -2287,6 +2442,17 @@ the Director. turn data spooling on as documented in the \ilink{Data Spooling}{SpoolingChapter} chapter of this manual. +\item [AllowCompression = \lt{}yes\vb{}no\gt{}] + \label{AllowCompression} + \index[dir]{AllowCompression} + \index[dir]{Directive!AllowCompression} + + This directive is optional, and if you specify {\bf No} (the default is {\bf + Yes}), it will cause backups jobs running on this storage resource to run + without client File Daemon compression. This effectively overrides + compression options in FileSets used by jobs which use this storage + resource. + \item [Heartbeat Interval = \lt{}time-interval\gt{}] \index[dir]{Heartbeat Interval} \index[dir]{Directive!Heartbeat} @@ -2444,7 +2610,7 @@ The Pool Resource defined in the Director's configuration file the Job resource or in the Pool, but it must be specified in one or the other. If not configuration error will result. -\item [Use Volume Once = \lt{}yes|no\gt{}] +\item [Use Volume Once = \lt{}yes\vb{}no\gt{}] \index[dir]{Use Volume Once} \index[dir]{Directive!Use Volume Once} This directive if set to {\bf yes} specifies that each volume is to be @@ -2574,7 +2740,7 @@ The Pool Resource defined in the Director's configuration file must use the \ilink{\bf update volume}{UpdateCommand} command in the Console. -\item [Catalog Files = \lt{}yes|no\gt{}] +\item [Catalog Files = \lt{}yes\vb{}no\gt{}] \index[dir]{Catalog Files} \index[dir]{Directive!Catalog Files} This directive defines whether or not you want the names of the files @@ -2587,7 +2753,7 @@ The Pool Resource defined in the Director's configuration file restore} command nor any other command that references File entries. \label{PoolAutoPrune} -\item [AutoPrune = \lt{}yes|no\gt{}] +\item [AutoPrune = \lt{}yes\vb{}no\gt{}] \index[dir]{AutoPrune} \index[dir]{Directive!AutoPrune} If AutoPrune is set to {\bf yes} (default), Bacula (version 1.20 or @@ -2625,7 +2791,6 @@ The Pool Resource defined in the Director's configuration file Bacula does not automatically recycle a Volume. It attempts to keep the Volume data intact as long as possible before over writing the Volume. - By defining multiple Pools with different Volume Retention periods, you may effectively have a set of tapes that is recycled weekly, another Pool of tapes that is recycled monthly and so on. However, one must @@ -2645,11 +2810,37 @@ The Pool Resource defined in the Director's configuration file what is stored for the Volume. To change the value for an existing Volume you must use the {\bf update} command in the Console. +\item [Action On Purge = \lt{Truncate}] +\index[dir]{actiononpurge} + +This directive \textbf{ActionOnPurge=Truncate} instructs Bacula to truncate +the volume when it is purged. It is useful to prevent disk based volumes from +consuming too much space. + +\begin{verbatim} +Pool { + Name = Default + Action On Purge = Truncate + ... +} +\end{verbatim} + +\label{PoolScratchPool} +\item [ScratchPool = \lt{}pool-resource-name\gt{}] + \index[dir]{ScrachPool} + \index[dir]{Directive!ScrachPool} + This directive permits to specify a dedicate \textsl{Scratch} for the + current pool. This pool will replace the special pool named \textsl{Scrach} + for volume selection. For more information about \textsl{Scratch} see + \ilink{Scratch Pool}{TheScratchPool} section of this manual. This is useful + when using multiple storage sharing the same mediatype or when you want to + dedicate volumes to a particular set of pool. + \label{PoolRecyclePool} \item [RecyclePool = \lt{}pool-resource-name\gt{}] \index[dir]{RecyclePool} \index[dir]{Directive!RecyclePool} - On versions 2.1.4 or greater, this directive defines to which pool + This directive defines to which pool the Volume will be placed (moved) when it is recycled. Without this directive, a Volume will remain in the same pool when it is recycled. With this directive, it can be moved automatically to any @@ -2666,7 +2857,7 @@ The Pool Resource defined in the Director's configuration file \label{PoolRecycle} -\item [Recycle = \lt{}yes|no\gt{}] +\item [Recycle = \lt{}yes\vb{}no\gt{}] \index[dir]{Recycle} \index[dir]{Directive!Recycle} This directive specifies whether or not Purged Volumes may be recycled. @@ -2695,7 +2886,7 @@ The Pool Resource defined in the Director's configuration file \label{RecycleOldest} -\item [Recycle Oldest Volume = \lt{}yes|no\gt{}] +\item [Recycle Oldest Volume = \lt{}yes\vb{}no\gt{}] \index[dir]{Recycle Oldest Volume} \index[dir]{Directive!Recycle Oldest Volume} This directive instructs the Director to search for the oldest used @@ -2719,7 +2910,7 @@ The Pool Resource defined in the Director's configuration file \label{RecycleCurrent} -\item [Recycle Current Volume = \lt{}yes|no\gt{}] +\item [Recycle Current Volume = \lt{}yes\vb{}no\gt{}] \index[dir]{Recycle Current Volume} \index[dir]{Directive!Recycle Current Volume} If Bacula needs a new Volume, this directive instructs Bacula to Prune @@ -2742,7 +2933,7 @@ The Pool Resource defined in the Director's configuration file \label{PurgeOldest} -\item [Purge Oldest Volume = \lt{}yes|no\gt{}] +\item [Purge Oldest Volume = \lt{}yes\vb{}no\gt{}] \index[dir]{Purge Oldest Volume} \index[dir]{Directive!Purge Oldest Volume} This directive instructs the Director to search for the oldest used @@ -2808,7 +2999,9 @@ The Pool Resource defined in the Director's configuration file If no variable expansion characters are found in the string, the Volume name will be formed from the {\bf format} string appended with the - number of volumes in the pool plus one, which will be edited as four + a unique number that increases. If you do not remove volumes from the + pool, this number should be the number of volumes plus one, but this + is not guaranteed. The unique number will be edited as four digits with leading zeros. For example, with a {\bf Label Format = "File-"}, the first volumes will be named {\bf File-0001}, {\bf File-0002}, ... @@ -2940,7 +3133,7 @@ defined. by MySQL and PostgreSQL and is ignored by SQLite if provided. This directive is optional. -%% \item [Multiple Connections = \lt{}yes|no\gt{}] +%% \item [Multiple Connections = \lt{}yes\vb{}no\gt{}] %% \index[dir]{Multiple Connections} %% \index[dir]{Directive!Multiple Connections} %% By default, this directive is set to no. In that case, each job that uses diff --git a/docs/manuals/fr/concepts/disk.tex b/docs/manuals/es/main/disk.tex similarity index 100% rename from docs/manuals/fr/concepts/disk.tex rename to docs/manuals/es/main/disk.tex diff --git a/docs/manuals/es/main/do_echo b/docs/manuals/es/main/do_echo new file mode 100644 index 00000000..04b9f79a --- /dev/null +++ b/docs/manuals/es/main/do_echo @@ -0,0 +1,6 @@ +# +# Avoid that @VERSION@ and @DATE@ are changed by configure +# This file is sourced by update_version +# +echo "s%@VERSION@%${VERSION}%g" >${out} +echo "s%@DATE@%${DATE}%g" >>${out} diff --git a/docs/manuals/es/main/fdl.tex b/docs/manuals/es/main/fdl.tex new file mode 100644 index 00000000..b46cd990 --- /dev/null +++ b/docs/manuals/es/main/fdl.tex @@ -0,0 +1,485 @@ +% TODO: maybe get rid of centering + +\chapter{GNU Free Documentation License} +\index[general]{GNU Free Documentation License} +\index[general]{License!GNU Free Documentation} + +\label{label_fdl} + + \begin{center} + + Version 1.2, November 2002 + + + Copyright \copyright 2000,2001,2002 Free Software Foundation, Inc. + + \bigskip + + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + \bigskip + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. +\end{center} + + +\begin{center} +{\bf\large Preamble} +\end{center} + +The purpose of this License is to make a manual, textbook, or other +functional and useful document "free" in the sense of freedom: to +assure everyone the effective freedom to copy and redistribute it, +with or without modifying it, either commercially or noncommercially. +Secondarily, this License preserves for the author and publisher a way +to get credit for their work, while not being considered responsible +for modifications made by others. + +This License is a kind of "copyleft", which means that derivative +works of the document must themselves be free in the same sense. It +complements the GNU General Public License, which is a copyleft +license designed for free software. + +We have designed this License in order to use it for manuals for free +software, because free software needs free documentation: a free +program should come with manuals providing the same freedoms that the +software does. But this License is not limited to software manuals; +it can be used for any textual work, regardless of subject matter or +whether it is published as a printed book. We recommend this License +principally for works whose purpose is instruction or reference. + + +\begin{center} +{\Large\bf 1. APPLICABILITY AND DEFINITIONS} +\end{center} + +This License applies to any manual or other work, in any medium, that +contains a notice placed by the copyright holder saying it can be +distributed under the terms of this License. Such a notice grants a +world-wide, royalty-free license, unlimited in duration, to use that +work under the conditions stated herein. The \textbf{"Document"}, below, +refers to any such manual or work. Any member of the public is a +licensee, and is addressed as \textbf{"you"}. You accept the license if you +copy, modify or distribute the work in a way requiring permission +under copyright law. + +A \textbf{"Modified Version"} of the Document means any work containing the +Document or a portion of it, either copied verbatim, or with +modifications and/or translated into another language. + +A \textbf{"Secondary Section"} is a named appendix or a front-matter section of +the Document that deals exclusively with the relationship of the +publishers or authors of the Document to the Document's overall subject +(or to related matters) and contains nothing that could fall directly +within that overall subject. (Thus, if the Document is in part a +textbook of mathematics, a Secondary Section may not explain any +mathematics.) The relationship could be a matter of historical +connection with the subject or with related matters, or of legal, +commercial, philosophical, ethical or political position regarding +them. + +The \textbf{"Invariant Sections"} are certain Secondary Sections whose titles +are designated, as being those of Invariant Sections, in the notice +that says that the Document is released under this License. If a +section does not fit the above definition of Secondary then it is not +allowed to be designated as Invariant. The Document may contain zero +Invariant Sections. If the Document does not identify any Invariant +Sections then there are none. + +The \textbf{"Cover Texts"} are certain short passages of text that are listed, +as Front-Cover Texts or Back-Cover Texts, in the notice that says that +the Document is released under this License. A Front-Cover Text may +be at most 5 words, and a Back-Cover Text may be at most 25 words. + +A \textbf{"Transparent"} copy of the Document means a machine-readable copy, +represented in a format whose specification is available to the +general public, that is suitable for revising the document +straightforwardly with generic text editors or (for images composed of +pixels) generic paint programs or (for drawings) some widely available +drawing editor, and that is suitable for input to text formatters or +for automatic translation to a variety of formats suitable for input +to text formatters. A copy made in an otherwise Transparent file +format whose markup, or absence of markup, has been arranged to thwart +or discourage subsequent modification by readers is not Transparent. +An image format is not Transparent if used for any substantial amount +of text. A copy that is not "Transparent" is called \textbf{"Opaque"}. + +Examples of suitable formats for Transparent copies include plain +ASCII without markup, Texinfo input format, LaTeX input format, SGML +or XML using a publicly available DTD, and standard-conforming simple +HTML, PostScript or PDF designed for human modification. Examples of +transparent image formats include PNG, XCF and JPG. Opaque formats +include proprietary formats that can be read and edited only by +proprietary word processors, SGML or XML for which the DTD and/or +processing tools are not generally available, and the +machine-generated HTML, PostScript or PDF produced by some word +processors for output purposes only. + +The \textbf{"Title Page"} means, for a printed book, the title page itself, +plus such following pages as are needed to hold, legibly, the material +this License requires to appear in the title page. For works in +formats which do not have any title page as such, "Title Page" means +the text near the most prominent appearance of the work's title, +preceding the beginning of the body of the text. + +A section \textbf{"Entitled XYZ"} means a named subunit of the Document whose +title either is precisely XYZ or contains XYZ in parentheses following +text that translates XYZ in another language. (Here XYZ stands for a +specific section name mentioned below, such as \textbf{"Acknowledgements"}, +\textbf{"Dedications"}, \textbf{"Endorsements"}, or \textbf{"History"}.) +To \textbf{"Preserve the Title"} +of such a section when you modify the Document means that it remains a +section "Entitled XYZ" according to this definition. + +The Document may include Warranty Disclaimers next to the notice which +states that this License applies to the Document. These Warranty +Disclaimers are considered to be included by reference in this +License, but only as regards disclaiming warranties: any other +implication that these Warranty Disclaimers may have is void and has +no effect on the meaning of this License. + + +\begin{center} +{\Large\bf 2. VERBATIM COPYING} +\end{center} + +You may copy and distribute the Document in any medium, either +commercially or noncommercially, provided that this License, the +copyright notices, and the license notice saying this License applies +to the Document are reproduced in all copies, and that you add no other +conditions whatsoever to those of this License. You may not use +technical measures to obstruct or control the reading or further +copying of the copies you make or distribute. However, you may accept +compensation in exchange for copies. If you distribute a large enough +number of copies you must also follow the conditions in section 3. + +You may also lend copies, under the same conditions stated above, and +you may publicly display copies. + + +\begin{center} +{\Large\bf 3. COPYING IN QUANTITY} +\end{center} + + +If you publish printed copies (or copies in media that commonly have +printed covers) of the Document, numbering more than 100, and the +Document's license notice requires Cover Texts, you must enclose the +copies in covers that carry, clearly and legibly, all these Cover +Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on +the back cover. Both covers must also clearly and legibly identify +you as the publisher of these copies. The front cover must present +the full title with all words of the title equally prominent and +visible. You may add other material on the covers in addition. +Copying with changes limited to the covers, as long as they preserve +the title of the Document and satisfy these conditions, can be treated +as verbatim copying in other respects. + +If the required texts for either cover are too voluminous to fit +legibly, you should put the first ones listed (as many as fit +reasonably) on the actual cover, and continue the rest onto adjacent +pages. + +If you publish or distribute Opaque copies of the Document numbering +more than 100, you must either include a machine-readable Transparent +copy along with each Opaque copy, or state in or with each Opaque copy +a computer-network location from which the general network-using +public has access to download using public-standard network protocols +a complete Transparent copy of the Document, free of added material. +If you use the latter option, you must take reasonably prudent steps, +when you begin distribution of Opaque copies in quantity, to ensure +that this Transparent copy will remain thus accessible at the stated +location until at least one year after the last time you distribute an +Opaque copy (directly or through your agents or retailers) of that +edition to the public. + +It is requested, but not required, that you contact the authors of the +Document well before redistributing any large number of copies, to give +them a chance to provide you with an updated version of the Document. + + +\begin{center} +{\Large\bf 4. MODIFICATIONS} +\end{center} + +You may copy and distribute a Modified Version of the Document under +the conditions of sections 2 and 3 above, provided that you release +the Modified Version under precisely this License, with the Modified +Version filling the role of the Document, thus licensing distribution +and modification of the Modified Version to whoever possesses a copy +of it. In addition, you must do these things in the Modified Version: + +\begin{itemize} +\item[A.] + Use in the Title Page (and on the covers, if any) a title distinct + from that of the Document, and from those of previous versions + (which should, if there were any, be listed in the History section + of the Document). You may use the same title as a previous version + if the original publisher of that version gives permission. + +\item[B.] + List on the Title Page, as authors, one or more persons or entities + responsible for authorship of the modifications in the Modified + Version, together with at least five of the principal authors of the + Document (all of its principal authors, if it has fewer than five), + unless they release you from this requirement. + +\item[C.] + State on the Title page the name of the publisher of the + Modified Version, as the publisher. + +\item[D.] + Preserve all the copyright notices of the Document. + +\item[E.] + Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. + +\item[F.] + Include, immediately after the copyright notices, a license notice + giving the public permission to use the Modified Version under the + terms of this License, in the form shown in the Addendum below. + +\item[G.] + Preserve in that license notice the full lists of Invariant Sections + and required Cover Texts given in the Document's license notice. + +\item[H.] + Include an unaltered copy of this License. + +\item[I.] + Preserve the section Entitled "History", Preserve its Title, and add + to it an item stating at least the title, year, new authors, and + publisher of the Modified Version as given on the Title Page. If + there is no section Entitled "History" in the Document, create one + stating the title, year, authors, and publisher of the Document as + given on its Title Page, then add an item describing the Modified + Version as stated in the previous sentence. + +\item[J.] + Preserve the network location, if any, given in the Document for + public access to a Transparent copy of the Document, and likewise + the network locations given in the Document for previous versions + it was based on. These may be placed in the "History" section. + You may omit a network location for a work that was published at + least four years before the Document itself, or if the original + publisher of the version it refers to gives permission. + +\item[K.] + For any section Entitled "Acknowledgements" or "Dedications", + Preserve the Title of the section, and preserve in the section all + the substance and tone of each of the contributor acknowledgements + and/or dedications given therein. + +\item[L.] + Preserve all the Invariant Sections of the Document, + unaltered in their text and in their titles. Section numbers + or the equivalent are not considered part of the section titles. + +\item[M.] + Delete any section Entitled "Endorsements". Such a section + may not be included in the Modified Version. + +\item[N.] + Do not retitle any existing section to be Entitled "Endorsements" + or to conflict in title with any Invariant Section. + +\item[O.] + Preserve any Warranty Disclaimers. +\end{itemize} + +If the Modified Version includes new front-matter sections or +appendices that qualify as Secondary Sections and contain no material +copied from the Document, you may at your option designate some or all +of these sections as invariant. To do this, add their titles to the +list of Invariant Sections in the Modified Version's license notice. +These titles must be distinct from any other section titles. + +You may add a section Entitled "Endorsements", provided it contains +nothing but endorsements of your Modified Version by various +parties--for example, statements of peer review or that the text has +been approved by an organization as the authoritative definition of a +standard. + +You may add a passage of up to five words as a Front-Cover Text, and a +passage of up to 25 words as a Back-Cover Text, to the end of the list +of Cover Texts in the Modified Version. Only one passage of +Front-Cover Text and one of Back-Cover Text may be added by (or +through arrangements made by) any one entity. If the Document already +includes a cover text for the same cover, previously added by you or +by arrangement made by the same entity you are acting on behalf of, +you may not add another; but you may replace the old one, on explicit +permission from the previous publisher that added the old one. + +The author(s) and publisher(s) of the Document do not by this License +give permission to use their names for publicity for or to assert or +imply endorsement of any Modified Version. + + +\begin{center} +{\Large\bf 5. COMBINING DOCUMENTS} +\end{center} + + +You may combine the Document with other documents released under this +License, under the terms defined in section 4 above for modified +versions, provided that you include in the combination all of the +Invariant Sections of all of the original documents, unmodified, and +list them all as Invariant Sections of your combined work in its +license notice, and that you preserve all their Warranty Disclaimers. + +The combined work need only contain one copy of this License, and +multiple identical Invariant Sections may be replaced with a single +copy. If there are multiple Invariant Sections with the same name but +different contents, make the title of each such section unique by +adding at the end of it, in parentheses, the name of the original +author or publisher of that section if known, or else a unique number. +Make the same adjustment to the section titles in the list of +Invariant Sections in the license notice of the combined work. + +In the combination, you must combine any sections Entitled "History" +in the various original documents, forming one section Entitled +"History"; likewise combine any sections Entitled "Acknowledgements", +and any sections Entitled "Dedications". You must delete all sections +Entitled "Endorsements". + +\begin{center} +{\Large\bf 6. COLLECTIONS OF DOCUMENTS} +\end{center} + +You may make a collection consisting of the Document and other documents +released under this License, and replace the individual copies of this +License in the various documents with a single copy that is included in +the collection, provided that you follow the rules of this License for +verbatim copying of each of the documents in all other respects. + +You may extract a single document from such a collection, and distribute +it individually under this License, provided you insert a copy of this +License into the extracted document, and follow this License in all +other respects regarding verbatim copying of that document. + + +\begin{center} +{\Large\bf 7. AGGREGATION WITH INDEPENDENT WORKS} +\end{center} + + +A compilation of the Document or its derivatives with other separate +and independent documents or works, in or on a volume of a storage or +distribution medium, is called an "aggregate" if the copyright +resulting from the compilation is not used to limit the legal rights +of the compilation's users beyond what the individual works permit. +When the Document is included in an aggregate, this License does not +apply to the other works in the aggregate which are not themselves +derivative works of the Document. + +If the Cover Text requirement of section 3 is applicable to these +copies of the Document, then if the Document is less than one half of +the entire aggregate, the Document's Cover Texts may be placed on +covers that bracket the Document within the aggregate, or the +electronic equivalent of covers if the Document is in electronic form. +Otherwise they must appear on printed covers that bracket the whole +aggregate. + + +\begin{center} +{\Large\bf 8. TRANSLATION} +\end{center} + + +Translation is considered a kind of modification, so you may +distribute translations of the Document under the terms of section 4. +Replacing Invariant Sections with translations requires special +permission from their copyright holders, but you may include +translations of some or all Invariant Sections in addition to the +original versions of these Invariant Sections. You may include a +translation of this License, and all the license notices in the +Document, and any Warranty Disclaimers, provided that you also include +the original English version of this License and the original versions +of those notices and disclaimers. In case of a disagreement between +the translation and the original version of this License or a notice +or disclaimer, the original version will prevail. + +If a section in the Document is Entitled "Acknowledgements", +"Dedications", or "History", the requirement (section 4) to Preserve +its Title (section 1) will typically require changing the actual +title. + + +\begin{center} +{\Large\bf 9. TERMINATION} +\end{center} + + +You may not copy, modify, sublicense, or distribute the Document except +as expressly provided for under this License. Any other attempt to +copy, modify, sublicense or distribute the Document is void, and will +automatically terminate your rights under this License. However, +parties who have received copies, or rights, from you under this +License will not have their licenses terminated so long as such +parties remain in full compliance. + + +\begin{center} +{\Large\bf 10. FUTURE REVISIONS OF THIS LICENSE} +\end{center} + + +The Free Software Foundation may publish new, revised versions +of the GNU Free Documentation License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. See +http://www.gnu.org/copyleft/. + +Each version of the License is given a distinguishing version number. +If the Document specifies that a particular numbered version of this +License "or any later version" applies to it, you have the option of +following the terms and conditions either of that specified version or +of any later version that has been published (not as a draft) by the +Free Software Foundation. If the Document does not specify a version +number of this License, you may choose any version ever published (not +as a draft) by the Free Software Foundation. + + +\begin{center} +{\Large\bf ADDENDUM: How to use this License for your documents} +% TODO: this is too long for table of contents +\end{center} + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and +license notices just after the title page: + +\bigskip +\begin{quote} + Copyright \copyright YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. + A copy of the license is included in the section entitled "GNU + Free Documentation License". +\end{quote} +\bigskip + +If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, +replace the "with...Texts." line with this: + +\bigskip +\begin{quote} + with the Invariant Sections being LIST THEIR TITLES, with the + Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. +\end{quote} +\bigskip + +If you have Invariant Sections without Cover Texts, or some other +combination of the three, merge those two alternatives to suit the +situation. + +If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of +free software license, such as the GNU General Public License, +to permit their use in free software. + +%--------------------------------------------------------------------- diff --git a/docs/manuals/fr/install/filedconf.tex b/docs/manuals/es/main/filedconf.tex similarity index 95% rename from docs/manuals/fr/install/filedconf.tex rename to docs/manuals/es/main/filedconf.tex index 121db89f..f7a8921b 100644 --- a/docs/manuals/fr/install/filedconf.tex +++ b/docs/manuals/es/main/filedconf.tex @@ -91,7 +91,7 @@ Director connections. \index[general]{Broken pipe} \index[general]{slow} \index[general]{Backups!slow} - This record defines an interval of time. For each heartbeat that the + This record defines an interval of time in seconds. For each heartbeat that the File daemon receives from the Storage daemon, it will forward it to the Director. In addition, if no heartbeat has been received from the Storage daemon and thus forwarded the File daemon will send a heartbeat @@ -186,6 +186,15 @@ only IPv4 resolutions will be permitted, and likewise with ip6. dotted quadruple. If this record is not specified, the File daemon will bind to any available address (the default). +\item [FDSourceAddress = \lt{}IP-Address\gt{}] + \index[fd]{FDSourceAddress} + \index[fd]{Directive!FDSourceAddress} + This record is optional, and if it is specified, it will cause the File + daemon server (for Storage connections) to bind to the specified {\bf + IP-Address}, which is either a domain name or an IP address specified as a + dotted quadruple. If this record is not specified, the kernel will choose + the best address according to the routing table (the default). + \item [SDConnectTimeout = \lt{}time-interval\gt{}] \index[fd]{SDConnectTimeout} \index[fd]{Directive!SDConnectTimeout} @@ -278,7 +287,7 @@ permitted to contact this Client. This password must be the same as the password specified in the Client resource in the Director's configuration file. This directive is required. -\item [Monitor = \lt{}yes|no\gt{}] +\item [Monitor = \lt{}yes\vb{}no\gt{}] \index[fd]{Monitor} \index[fd]{Directive!Monitor} If Monitor is set to {\bf no} (default), this director will have full access diff --git a/docs/manuals/fr/install/fileset.tex b/docs/manuals/es/main/fileset.tex similarity index 89% rename from docs/manuals/fr/install/fileset.tex rename to docs/manuals/es/main/fileset.tex index 05bb444d..357621d5 100644 --- a/docs/manuals/fr/install/fileset.tex +++ b/docs/manuals/es/main/fileset.tex @@ -52,7 +52,7 @@ defined for each Backup job. \index[dir]{Directive!Name} The name of the FileSet resource. This directive is required. -\item [Ignore FileSet Changes = \lt{}yes|no\gt{}] +\item [Ignore FileSet Changes = \lt{}yes\vb{}no\gt{}] \index[dir]{Ignore FileSet Changes} \index[dir]{Directive!Ignore FileSet Changes} Normally, if you modify the FileSet Include or Exclude lists, @@ -70,7 +70,7 @@ defined for each Backup job. Exclude, Bacula will force a Full backup to ensure that everything is properly backed up. -\item [Enable VSS = \lt{}yes|no\gt{}] +\item [Enable VSS = \lt{}yes\vb{}no\gt{}] \index[dir]{Enable VSS} \index[dir]{Directive!Enable VSS} If this directive is set to {\bf yes} the File daemon will be notified @@ -82,6 +82,7 @@ defined for each Backup job. For more information, please see the \ilink{Windows}{VSS} chapter of this manual. + \item [Include \{ Options \{\lt{}file-options\gt{}\} ...; \lt{}file-list\gt{} \} ] \index[dir]{Include \{ [ Options \{\lt{}file-options\gt{}\} ...] @@ -95,12 +96,13 @@ defined for each Backup job. \index[dir]{Exclude \{ \lt{}file-list\gt{} \} } \index[dir]{Directive!Exclude} + \end{description} The Include resource must contain a list of directories and/or files to be processed in the backup job. Normally, all files found in all subdirectories of any directory in the Include File list will be backed up. -Note, see below for the definition of \lt{}file-list\gt{}. +Note, see below for the definition of \lt{}file-list\gt{}. The Include resource may also contain one or more Options resources that specify options such as compression to be applied to all or any subset of the files found when processing the file-list for backup. Please see @@ -121,9 +123,10 @@ appears as itself). You should always specify a full path for every directory and file that you list in the FileSet. In addition, on Windows machines, you should {\bf -always} prefix the directory or filename with the drive specification in -lower case (e.g. {\bf c:/xxx}) using Unix directory name separators -(forward slash). +always} prefix the directory or filename with the drive specification +(e.g. {\bf c:/xxx}) using Unix directory name separators +(forward slash). The drive letter itself can be upper or lower case (e.g. +c:/xxx or C:/xxx). Bacula's default for processing directories is to recursively descend in the directory saving all files and subdirectories. Bacula will not by @@ -212,6 +215,10 @@ double quotes to prevent conf file scanning problems. This is perhaps a bit overwhelming, so there are a number of examples included below to illustrate how this works. +You find yourself using a lot of Regex statements, which will cost quite a lot +of CPU time, we recommend you simplify them if you can, or better yet +convert them to Wild statements which are much more efficient. + The directives within an Options resource may be one of the following: \begin{description} @@ -245,6 +252,9 @@ The directives within an Options resource may be one of the following: compression levels greater than six generally give very little extra compression and are rather CPU intensive. + You can overwrite this option per Storage resource with + \ilink{AllowCompression}{AllowCompression} option. + \item [signature=SHA1] \index[dir]{signature} \index[dir]{SHA1} @@ -268,6 +278,22 @@ The directives within an Options resource may be one of the following: bytes per file to your catalog. We strongly recommend that this option or the SHA1 option be specified as a default for all files. + +\item[basejob=\lt{}options\gt{}] +\index[dir]{basejob} +\index[dir]{Directive!basejob} + +The options letters specified are used when running a {\bf Backup Level=Full} +with BaseJobs. The options letters are the same than in the \textbf{verify=} +option below. + +\item[accurate=\lt{}options\gt{}] +\index[dir]{accurate} +\index[dir]{Directive!accurate} + The options letters specified are used when running a {\bf Backup + Level=Incremental/Differential} in Accurate mode. The options + letters are the same than in the \textbf{verify=} option below. + \item [verify=\lt{}options\gt{}] \index[dir]{verify} \index[dir]{Directive!verify} @@ -318,7 +344,7 @@ The directives within an Options resource may be one of the following: Level=DiskToCatalog} verify is {\bf pins5} i.e. compare permission bits, inodes, number of links, size, and MD5 changes. -\item [onefs=yes|no] +\item [onefs=yes\vb{}no] \index[dir]{onefs} \index[dir]{Directive!onefs} If set to {\bf yes} (the default), {\bf Bacula} will remain on a single @@ -425,10 +451,22 @@ Change: 2005-11-06 12:36:48.000000000 +0100 that it did not specify {\bf /var}, then {\bf /var} will not be backed up. +\item [honor nodump flag=\lt{}yes\vb{}no\gt{}] +\index[dir]{honornodumpflag} +\index[dir]{Directive!honornodumpflag} + If your file system supports the {\bf nodump} flag (e. g. most + BSD-derived systems) Bacula will honor the setting of the flag + when this option is set to {\bf yes}. Files having this flag set + will not be included in the backup and will not show up in the + catalog. For directories with the {\bf nodump} flag set recursion + is turned off and the directory will be listed in the catalog. + If the {\bf honor nodump flag} option is not defined + or set to {\bf no} every file and directory will be eligible for + backup. \label{portable} -\item [portable=yes|no] +\item [portable=yes\vb{}no] \index[dir]{portable} \index[dir]{Directive!portable} If set to {\bf yes} (default is {\bf no}), the Bacula File daemon will @@ -443,7 +481,7 @@ Change: 2005-11-06 12:36:48.000000000 +0100 default ({\bf no}) so that the maximum information concerning your files is saved. -\item [recurse=yes|no] +\item [recurse=yes\vb{}no] \index[dir]{recurse} \index[dir]{Directive!recurse} If set to {\bf yes} (the default), Bacula will recurse (or descend) into @@ -454,7 +492,7 @@ Change: 2005-11-06 12:36:48.000000000 +0100 contained in the subdirectories. Normally, you will want the default ({\bf yes}). -\item [sparse=yes|no] +\item [sparse=yes\vb{}no] \index[dir]{sparse} \index[dir]{Directive!sparse} Enable special code that checks for sparse files such as created by @@ -492,7 +530,7 @@ Change: 2005-11-06 12:36:48.000000000 +0100 really sparse. \label{readfifo} -\item [readfifo=yes|no] +\item [readfifo=yes\vb{}no] \index[dir]{readfifo} \index[dir]{Directive!readfifo} If enabled, tells the Client to read the data on a backup and write the @@ -515,7 +553,7 @@ Change: 2005-11-06 12:36:48.000000000 +0100 exec > /dev/null \end{verbatim} -\item [noatime=yes|no] +\item [noatime=yes\vb{}no] \index[dir]{noatime} \index[dir]{Directive!noatime} If enabled, and if your Operating System supports the O\_NOATIME file @@ -535,7 +573,7 @@ Change: 2005-11-06 12:36:48.000000000 +0100 silently ignored by Bacula. -\item [mtimeonly=yes|no] +\item [mtimeonly=yes\vb{}no] \index[dir]{mtimeonly} \index[dir]{Directive!mtimeonly} If enabled, tells the Client that the selection of files during @@ -545,7 +583,7 @@ Change: 2005-11-06 12:36:48.000000000 +0100 st\_mtime and the st\_ctime values. In general, it is not recommended to use this option. -\item [keepatime=yes|no] +\item [keepatime=yes\vb{}no] \index[dir]{keepatime} \index[dir]{Directive!keepatime} The default is {\bf no}. When enabled, Bacula will reset the st\_atime @@ -565,7 +603,7 @@ Change: 2005-11-06 12:36:48.000000000 +0100 to use {\bf mtimeonly = yes} as well as keepatime (thanks to Rudolf Cejka for this tip). -\item [checkfilechanges=yes|no] +\item [checkfilechanges=yes\vb{}no] \index[dir]{checkfilechanges} \index[dir]{Directive!checkfilechanges} On versions 2.0.4 or greater, @@ -579,7 +617,7 @@ Change: 2005-11-06 12:36:48.000000000 +0100 In general, it is recommended to use this option. -\item [hardlinks=yes|no] +\item [hardlinks=yes\vb{}no] \index[dir]{hardlinks} \index[dir]{Directive!hardlinks} When enabled (default), this directive will cause hard links to be @@ -686,6 +724,10 @@ Change: 2005-11-06 12:36:48.000000000 +0100 the \ilink{estimate}{estimate} command in the Console chapter of this manual. + You find yourself using a lot of Regex statements, which will cost quite a lot + of CPU time, we recommend you simplify them if you can, or better yet + convert them to Wild statements which are much more efficient. + \item [regexfile=\lt{}string\gt{}] \index[dir]{regexfile} @@ -733,14 +775,14 @@ Change: 2005-11-06 12:36:48.000000000 +0100 more. -\item [exclude=yes|no] +\item [exclude=yes\vb{}no] \index[dir]{exclude} \index[dir]{Directive!exclude} The default is {\bf no}. When enabled, any files matched within the Options will be excluded from the backup. \label{ACLSupport} -\item [aclsupport=yes|no] +\item [aclsupport=yes\vb{}no] \index[dir]{aclsupport} \index[dir]{Directive!aclsupport} The default is {\bf no}. If this option is set to yes, and you have the @@ -756,7 +798,7 @@ Change: 2005-11-06 12:36:48.000000000 +0100 filesystem with ACLs, then you restore them to a different filesystem (perhaps reiserfs) that does not have ACLs, the ACLs will be ignored. -\item [ignore case=yes|no] +\item [ignore case=yes\vb{}no] \index[dir]{ignore case} \index[dir]{Directive!ignore case} The default is {\bf no}. On Windows systems, you will almost surely @@ -783,8 +825,31 @@ Change: 2005-11-06 12:36:48.000000000 +0100 This option is not implemented in Win32 systems. +\item [DriveType=Windows-drive-type] +\index[dir]{DriveType} +\index[dir]{Directive!DriveType} + This option is effective only on Windows machines and is + somewhat similar to the Unix/Linux {\bf fstype} described + above, except that it allows you to select what Windows + drive types you want to allow. By default all drive + types are accepted. + + The permitted drivetype names are: + + removable, fixed, remote, cdrom, ramdisk + + You may have multiple Driveype directives, and thus permit matching + of multiple drive types within a single Options resource. If + the type specified on the drivetype directive does not match the + filesystem for a particular directive, that directory will not be + backed up. This directive can be used to prevent backing up + non-local filesystems. Normally, when you use this directive, you + would also set {\bf onefs=no} so that Bacula will traverse filesystems. + + This option is not implemented in Unix/Linux systems. + -\item [hfsplussupport=yes|no] +\item [hfsplussupport=yes\vb{}no] \index[dir]{hfsplussupport} \index[dir]{Directive!hfsplussupport} This option allows you to turn on support for Mac OSX HFS plus @@ -829,11 +894,13 @@ Include { \end{verbatim} \normalsize -\item Any name beginning with a vertical bar (|) is assumed to be the name of +\item Any name beginning with a vertical bar (\vb) is assumed to be the name of a program. This program will be executed on the Director's machine at the time the Job starts (not when the Director reads the configuration file), and any output from that program will be assumed to be a list of - files or directories, one per line, to be included. + files or directories, one per line, to be included. Before submitting the + specified command bacula will performe + \ilink{character substitution}{character substitution}. This allows you to have a job that, for example, includes all the local partitions even if you change the partitioning by adding a disk. The @@ -992,7 +1059,10 @@ Include { \end{verbatim} \normalsize - will backup the data in device /dev/hd6. + will backup the data in device /dev/hd6. Note, the {bf /dev/hd6} must be + the raw partition itself. Bacula will not back it up as a raw device if + you specify a symbolic link to a raw device such as my be created by the + LVM Snapshot utilities. Ludovic Strappazon has pointed out that this feature can be used to backup a full Microsoft Windows disk. Simply boot into the system using a Linux Rescue @@ -1042,6 +1112,50 @@ Include { \item A file-list may not contain wild-cards. Use directives in the Options resource if you wish to specify wild-cards or regular expression matching. + +\item +\index[general]{IgnoreDir} +The {\bf ExcludeDirContaining = \lt{}filename\gt{}} is a directive that +can be added to the Include section of the FileSet resource. If the specified +filename ({\bf filename-string}) is found on the Client in any directory to be +backed up, the whole directory will be ignored (not backed up). For example: + +\begin{verbatim} + # List of files to be backed up + FileSet { + Name = "MyFileSet" + Include { + Options { + signature = MD5 + } + File = /home + Exclude Dir Containing = .excludeme + } + } +\end{verbatim} + +But in /home, there may be hundreds of directories of users and some +people want to indicate that they don't want to have certain +directories backed up. For example, with the above FileSet, if +the user or sysadmin creates a file named {\bf .excludeme} in +specific directories, such as + +\begin{verbatim} + /home/user/www/cache/.excludeme + /home/user/temp/.excludeme +\end{verbatim} + +then Bacula will not backup the two directories named: + +\begin{verbatim} + /home/user/www/cache + /home/user/temp +\end{verbatim} + +NOTE: subdirectories will not be backed up. That is, the directive +applies to the two directories in question and any children (be they +files, directories, etc). + \end{itemize} \section{FileSet Examples} @@ -1335,6 +1449,70 @@ FileSet { \end{verbatim} \normalsize + +The following example shows how to back up only the My Pictures directory inside +the My Documents directory for all users in C:/Documents and Settings, i.e. +everything matching the pattern: + +C:/Documents and Settings/*/My Documents/My Pictures/* + +To understand how this can be achieved, there are two important points to +remember: + +Firstly, Bacula walks over the filesystem depth-first starting from the File = +lines. It stops descending when a directory is excluded, so you must include +all ancestor directories of each directory containing files to be included. + +Secondly, each directory and file is compared to the Options clauses in the +order they appear in the FileSet. When a match is found, no further clauses +are compared and the directory or file is either included or excluded. + +The FileSet resource definition below implements this by including specifc +directories and files and excluding everything else. + +\footnotesize +\begin{verbatim} +FileSet { + Name = "AllPictures" + + Include { + + File = "C:/Documents and Settings" + + Options { + signature = SHA1 + verify = s1 + IgnoreCase = yes + + # Include all users' directories so we reach the inner ones. Unlike a + # WildDir pattern ending in *, this RegExDir only matches the top-level + # directories and not any inner ones. + RegExDir = "^C:/Documents and Settings/[^/]+$" + + # Ditto all users' My Documents directories. + WildDir = "C:/Documents and Settings/*/My Documents" + + # Ditto all users' My Documents/My Pictures directories. + WildDir = "C:/Documents and Settings/*/My Documents/My Pictures" + + # Include the contents of the My Documents/My Pictures directories and + # any subdirectories. + Wild = "C:/Documents and Settings/*/My Documents/My Pictures/*" + } + + Options { + Exclude = yes + IgnoreCase = yes + + # Exclude everything else, in particular any files at the top level and + # any other directories or files in the users' directories. + Wild = "C:/Documents and Settings/*" + } + } +} +\end{verbatim} +\normalsize + \section{Backing up Raw Partitions} \index[general]{Backing up!Partitions } \index[general]{Backing up Raw Partitions } @@ -1425,9 +1603,9 @@ rules: \begin{itemize} \item Filenames are case sensitive, so you must use the correct case. -\item To 2~exclude a directory, you must not have a trailing slash on the +\item To exclude a directory, you must not have a trailing slash on the directory name. -\item I2~f you have spaces in your filename, you must enclose the entire name +\item If you have spaces in your filename, you must enclose the entire name in double-quote characters ("). Trying to use a backslash before the space will not work. \item If you are using the old Exclude syntax (noted below), you may not diff --git a/docs/manuals/fr/install/fix_tex.pl b/docs/manuals/es/main/fix_tex.pl similarity index 100% rename from docs/manuals/fr/install/fix_tex.pl rename to docs/manuals/es/main/fix_tex.pl diff --git a/docs/manuals/es/main/general.tex b/docs/manuals/es/main/general.tex new file mode 100644 index 00000000..ab0f100b --- /dev/null +++ b/docs/manuals/es/main/general.tex @@ -0,0 +1,522 @@ +%% +%% + +\chapter{What is Bacula?} +\label{GeneralChapter} +\index[general]{Bacula!What is } +\index[general]{What is Bacula? } + +Bacula is a set of computer programs that permits the system +administrator to manage backup, recovery, and verification of computer data +across a network of computers of different kinds. Bacula can also run entirely +upon a single computer and can backup to various types of media, including tape +and disk. + +In technical terms, it is a +network Client/Server based backup program. Bacula is relatively easy to use +and efficient, while offering many advanced storage management features that +make it easy to find and recover lost or damaged files. Due to its modular +design, Bacula is scalable from small single computer systems to systems +consisting of hundreds of computers located over a large network. + +\section{Who Needs Bacula?} +\index[general]{Who Needs Bacula? } +\index[general]{Bacula!Who Needs } + +If you are currently using a program such as tar, dump, or +bru to backup your computer data, and you would like a network solution, more +flexibility, or catalog services, Bacula will most likely provide the +additional features you want. However, if you are new to Unix systems or do +not have offsetting experience with a sophisticated backup package, the Bacula project does not +recommend using Bacula as it is much more difficult to setup and use than +tar or dump. + +If you want Bacula to behave like the above mentioned simple +programs and write over any tape that you put in the drive, then you will find +working with Bacula difficult. Bacula is designed to protect your data +following the rules you specify, and this means reusing a tape only +as the last resort. It is possible to "force" Bacula to write +over any tape in the drive, but it is easier and more efficient to use a +simpler program for that kind of operation. + +If you would like a backup program that can write +to multiple volumes (i.e. is not limited by your tape drive capacity), Bacula +can most likely fill your needs. In addition, quite a number of Bacula users +report that Bacula is simpler to setup and use than other equivalent programs. + +If you are currently using a sophisticated commercial package such as Legato +Networker. ARCserveIT, Arkeia, or PerfectBackup+, you may be interested in +Bacula, which provides many of the same features and is free software +available under the GNU Version 2 software license. + +\section{Bacula Components or Services} +\index[general]{Bacula Components or Services } +\index[general]{Services!Bacula Components or } + +Bacula is made up of the following five major components or services: +Director, Console, File, Storage, and Monitor services. + + +\addcontentsline{lof}{figure}{Bacula Applications} +\includegraphics{\idir bacula-applications.eps} +(thanks to Aristedes Maniatis for this graphic and the one below) +% TODO: move the thanks to Credits section in preface + +\subsection*{Bacula Director} + \label{DirDef} + The Bacula Director service is the program that supervises + all the backup, restore, verify and archive operations. The system + administrator uses the Bacula Director to schedule backups and to + recover files. For more details see the Director Services Daemon Design + Document in the Bacula Developer's Guide. The Director runs as a daemon + (or service) in the background. +% TODO: tell reader where this Developer's Guide is at? + \label{UADef} + +\subsection*{Bacula Console} + + The Bacula Console service is the program that allows the + administrator or user to communicate with the Bacula Director + Currently, the Bacula Console is available in three versions: + text-based console interface, GNOME-based interface, and a + wxWidgets graphical interface. + The first and simplest is to run the Console program in a shell window + (i.e. TTY interface). Most system administrators will find this + completely adequate. The second version is a GNOME GUI interface that + is far from complete, but quite functional as it has most the + capabilities of the shell Console. The third version is a wxWidgets GUI + with an interactive file restore. It also has most of the capabilities + of the shell console, allows command completion with tabulation, and + gives you instant help about the command you are typing. For more + details see the \ilink{Bacula Console Design Document}{_ConsoleChapter}. + +\subsection*{Bacula File} + \label{FDDef} + The Bacula File service (also known as the Client program) is the software + program that is installed on the machine to be backed up. + It is specific to the + operating system on which it runs and is responsible for providing the + file attributes and data when requested by the Director. The File + services are also responsible for the file system dependent part of + restoring the file attributes and data during a recovery operation. For + more details see the File Services Daemon Design Document in the Bacula + Developer's Guide. This program runs as a daemon on the machine to be + backed up. + In addition to Unix/Linux File daemons, there is a Windows File daemon + (normally distributed in binary format). The Windows File daemon runs + on current Windows versions (NT, 2000, XP, 2003, and possibly Me and + 98). +% TODO: maybe do not list Windows here as that is listed elsewhere +% TODO: remove "possibly"? +% TODO: mention Vista? + +\subsection*{Bacula Storage} + \label{SDDef} + The Bacula Storage services consist of the software programs that + perform the storage and recovery of the file attributes and data to the + physical backup media or volumes. In other words, the Storage daemon is + responsible for reading and writing your tapes (or other storage media, + e.g. files). For more details see the Storage Services Daemon Design + Document in the Bacula Developer's Guide. The Storage services runs as + a daemon on the machine that has the backup device (usually a tape + drive). +% TODO: may switch e.g. to "for example" or "such as" as appropriate +% TODO: is "usually" correct? Maybe "such as" instead? + +\subsection*{Catalog} + \label{DBDefinition} + The Catalog services are comprised of the software programs + responsible for maintaining the file indexes and volume databases for + all files backed up. The Catalog services permit the system + administrator or user to quickly locate and restore any desired file. + The Catalog services sets Bacula apart from simple backup programs like + tar and bru, because the catalog maintains a record of all Volumes used, + all Jobs run, and all Files saved, permitting efficient restoration and + Volume management. Bacula currently supports three different databases, + MySQL, PostgreSQL, and SQLite, one of which must be chosen when building + Bacula. + + The three SQL databases currently supported (MySQL, PostgreSQL or + SQLite) provide quite a number of features, including rapid indexing, + arbitrary queries, and security. Although the Bacula project plans to support other + major SQL databases, the current Bacula implementation interfaces only + to MySQL, PostgreSQL and SQLite. For the technical and porting details + see the Catalog Services Design Document in the developer's documented. + + The packages for MySQL and PostgreSQL are available for several operating + systems. + Alternatively, installing from the + source is quite easy, see the \ilink{ Installing and Configuring + MySQL}{MySqlChapter} chapter of this document for the details. For + more information on MySQL, please see: + \elink{www.mysql.com}{http://www.mysql.com}. Or see the \ilink{ + Installing and Configuring PostgreSQL}{PostgreSqlChapter} chapter of this + document for the details. For more information on PostgreSQL, please + see: \elink{www.postgresql.org}{http://www.postgresql.org}. + + Configuring and building SQLite is even easier. For the details of + configuring SQLite, please see the \ilink{ Installing and Configuring + SQLite}{SqlLiteChapter} chapter of this document. + +\subsection*{Bacula Monitor} + \label{MonDef} + A Bacula Monitor service is the program that allows the + administrator or user to watch current status of Bacula Directors, + Bacula File Daemons and Bacula Storage Daemons. + Currently, only a GTK+ version is available, which works with GNOME, + KDE, or any window manager that supports the FreeDesktop.org system tray + standard. + + To perform a successful save or restore, the following four daemons must be + configured and running: the Director daemon, the File daemon, the Storage + daemon, and the Catalog service (MySQL, PostgreSQL or SQLite). + +\section{Bacula Configuration} +\index[general]{Configuration!Bacula } +\index[general]{Bacula Configuration } + +In order for Bacula to understand your system, what clients you want backed +up and how, you must create a number of configuration files containing +resources (or objects). The following presents an overall picture of this: + +\addcontentsline{lof}{figure}{Bacula Objects} +\includegraphics{\idir bacula-objects.eps} + +\section{Conventions Used in this Document} +\index[general]{Conventions Used in this Document } +\index[general]{Document!Conventions Used in this } + +Bacula is in a state of evolution, and as a consequence, this manual +will not always agree with the code. If an item in this manual is preceded by +an asterisk (*), it indicates that the particular feature is not implemented. +If it is preceded by a plus sign (+), it indicates that the feature may be +partially implemented. +% TODO: search for plus sign and asterisk and "IMPLEMENTED" and fix for printed book + +If you are reading this manual as supplied in a released version of the +software, the above paragraph holds true. If you are reading the online +version of the manual, +\elink{ www.bacula.org}{http://www.bacula.org}, please bear in +mind that this version describes the current version in development (in the +CVS) that may contain features not in the released version. Just the same, it +generally lags behind the code a bit. +% TODO: is this still true? there are separate websites + +\section{Quick Start} +\index[general]{Quick Start } +\index[general]{Start!Quick } + +To get Bacula up and running quickly, the author recommends +that you first scan the +Terminology section below, then quickly review the next chapter entitled +\ilink{The Current State of Bacula}{StateChapter}, then the +\ilink{Getting Started with Bacula}{QuickStartChapter}, which will +give you a quick overview of getting Bacula running. After which, you should +proceed to the chapter on +\ilink{Installing Bacula}{InstallChapter}, then +\ilink{How to Configure Bacula}{ConfigureChapter}, and finally the +chapter on +\ilink{ Running Bacula}{TutorialChapter}. + +\section{Terminology} +\index[general]{Terminology } + +\begin{description} + +\item [Administrator] + \index[fd]{Administrator } + The person or persons responsible for administrating the Bacula system. + +\item [Backup] + \index[fd]{Backup } + The term Backup refers to a Bacula Job that saves files. + +\item [Bootstrap File] + \index[fd]{Bootstrap File } + The bootstrap file is an ASCII file containing a compact form of + commands that allow Bacula or the stand-alone file extraction utility + (bextract) to restore the contents of one or more Volumes, for + example, the current state of a system just backed up. With a bootstrap + file, Bacula can restore your system without a Catalog. You can create + a bootstrap file from a Catalog to extract any file or files you wish. + +\item [Catalog] + \index[fd]{Catalog } + The Catalog is used to store summary information about the Jobs, + Clients, and Files that were backed up and on what Volume or Volumes. + The information saved in the Catalog permits the administrator or user + to determine what jobs were run, their status as well as the important + characteristics of each file that was backed up, and most importantly, + it permits you to choose what files to restore. + The Catalog is an + online resource, but does not contain the data for the files backed up. + Most of the information stored in the catalog is also stored on the + backup volumes (i.e. tapes). Of course, the tapes will also have a + copy of the file data in addition to the File Attributes (see below). + + The catalog feature is one part of Bacula that distinguishes it from + simple backup and archive programs such as dump and tar. + +\item [Client] + \index[fd]{Client } + In Bacula's terminology, the word Client refers to the machine being + backed up, and it is synonymous with the File services or File daemon, + and quite often, it is referred to it as the FD. A Client is defined in a + configuration file resource. + +\item [Console] + \index[fd]{Console } + The program that interfaces to the Director allowing the user or system + administrator to control Bacula. + +\item [Daemon] + \index[fd]{Daemon } + Unix terminology for a program that is always present in the background to + carry out a designated task. On Windows systems, as well as some Unix + systems, daemons are called Services. + +\item [Directive] + \index[fd]{Directive } + The term directive is used to refer to a statement or a record within a + Resource in a configuration file that defines one specific setting. For + example, the {\bf Name} directive defines the name of the Resource. + +\item [Director] + \index[fd]{Director } + The main Bacula server daemon that schedules and directs all Bacula + operations. Occasionally, the project refers to the Director as DIR. + +\item [Differential] + \index[fd]{Differential } + A backup that includes all files changed since the last Full save started. + Note, other backup programs may define this differently. + +\item [File Attributes] + \index[fd]{File Attributes } + The File Attributes are all the information necessary about a file to + identify it and all its properties such as size, creation date, modification + date, permissions, etc. Normally, the attributes are handled entirely by + Bacula so that the user never needs to be concerned about them. The + attributes do not include the file's data. + +\item [File Daemon] + \index[fd]{File Daemon } + The daemon running on the client computer to be backed up. This is also + referred to as the File services, and sometimes as the Client services or the + FD. + +\label{FileSetDef} +\item [FileSet] +\index[fd]{a name } + A FileSet is a Resource contained in a configuration file that defines + the files to be backed up. It consists of a list of included files or + directories, a list of excluded files, and how the file is to be stored + (compression, encryption, signatures). For more details, see the + \ilink{FileSet Resource definition}{FileSetResource} in the Director + chapter of this document. + +\item [Incremental] + \index[fd]{Incremental } + A backup that includes all files changed since the last Full, Differential, + or Incremental backup started. It is normally specified on the {\bf Level} + directive within the Job resource definition, or in a Schedule resource. + +\label{JobDef} +\item [Job] +\index[fd]{a name } + A Bacula Job is a configuration resource that defines the work that + Bacula must perform to backup or restore a particular Client. It + consists of the {\bf Type} (backup, restore, verify, etc), the {\bf + Level} (full, incremental,...), the {\bf FileSet}, and {\bf Storage} the + files are to be backed up (Storage device, Media Pool). For more + details, see the \ilink{Job Resource definition}{JobResource} in the + Director chapter of this document. +% TODO: clean up "..." for book + +\item [Monitor] + \index[fd]{Monitor } + The program that interfaces to all the daemons allowing the user or + system administrator to monitor Bacula status. + +\item [Resource] + \index[fd]{Resource } + A resource is a part of a configuration file that defines a specific + unit of information that is available to Bacula. It consists of several + directives (individual configuration statements). For example, the {\bf + Job} resource defines all the properties of a specific Job: name, + schedule, Volume pool, backup type, backup level, ... +% TODO: clean up "..." for book + +\item [Restore] + \index[fd]{Restore } + A restore is a configuration resource that describes the operation of + recovering a file from backup media. It is the inverse of a save, + except that in most cases, a restore will normally have a small set of + files to restore, while normally a Save backs up all the files on the + system. Of course, after a disk crash, Bacula can be called upon to do + a full Restore of all files that were on the system. +% TODO: Why? Why say "Of course"?? + +% TODO: define "Save" +% TODO: define "Full" + +\item [Schedule] + \index[fd]{Schedule } + A Schedule is a configuration resource that defines when the Bacula Job + will be scheduled for execution. To use the Schedule, the Job resource + will refer to the name of the Schedule. For more details, see the + \ilink{Schedule Resource definition}{ScheduleResource} in the Director + chapter of this document. + +\item [Service] + \index[fd]{Service } + This is a program that remains permanently in memory awaiting + instructions. In Unix environments, services are also known as + {\bf daemons}. + +\item [Storage Coordinates] + \index[fd]{Storage Coordinates } + The information returned from the Storage Services that uniquely locates + a file on a backup medium. It consists of two parts: one part pertains + to each file saved, and the other part pertains to the whole Job. + Normally, this information is saved in the Catalog so that the user + doesn't need specific knowledge of the Storage Coordinates. The Storage + Coordinates include the File Attributes (see above) plus the unique + location of the information on the backup Volume. + +\item [Storage Daemon] + \index[fd]{Storage Daemon } + The Storage daemon, sometimes referred to as the SD, is the code that + writes the attributes and data to a storage Volume (usually a tape or + disk). + +\item [Session] + \index[sd]{Session } + Normally refers to the internal conversation between the File daemon and + the Storage daemon. The File daemon opens a {\bf session} with the + Storage daemon to save a FileSet or to restore it. A session has a + one-to-one correspondence to a Bacula Job (see above). + +\item [Verify] + \index[sd]{Verify } + A verify is a job that compares the current file attributes to the + attributes that have previously been stored in the Bacula Catalog. This + feature can be used for detecting changes to critical system files + similar to what a file integrity checker like Tripwire does. + One of the major advantages of + using Bacula to do this is that on the machine you want protected such + as a server, you can run just the File daemon, and the Director, Storage + daemon, and Catalog reside on a different machine. As a consequence, if + your server is ever compromised, it is unlikely that your verification + database will be tampered with. + + Verify can also be used to check that the most recent Job data written + to a Volume agrees with what is stored in the Catalog (i.e. it compares + the file attributes), *or it can check the Volume contents against the + original files on disk. + +\item [*Archive] + \index[fd]{*Archive } + An Archive operation is done after a Save, and it consists of removing the + Volumes on which data is saved from active use. These Volumes are marked as + Archived, and may no longer be used to save files. All the files contained + on an Archived Volume are removed from the Catalog. NOT YET IMPLEMENTED. + +\item [Retention Period] + \index[fd]{Retention Period } + There are various kinds of retention periods that Bacula recognizes. + The most important are the {\bf File} Retention Period, {\bf Job} + Retention Period, and the {\bf Volume} Retention Period. Each of these + retention periods applies to the time that specific records will be kept + in the Catalog database. This should not be confused with the time that + the data saved to a Volume is valid. + + The File Retention Period determines the time that File records are kept + in the catalog database. This period is important for two reasons: the + first is that as long as File records remain in the database, you + can "browse" the database with a console program and restore any + individual file. Once the File records are removed or pruned from the + database, the individual files of a backup job can no longer be + "browsed". The second reason for carefully choosing the File Retention + Period is because the volume of + the database File records use the most storage space in the + database. As a consequence, you must ensure that regular "pruning" of + the database file records is done to keep your database from growing + too large. (See the Console {\bf prune} + command for more details on this subject). + + The Job Retention Period is the length of time that Job records will be + kept in the database. Note, all the File records are tied to the Job + that saved those files. The File records can be purged leaving the Job + records. In this case, information will be available about the jobs + that ran, but not the details of the files that were backed up. + Normally, when a Job record is purged, all its File records will also be + purged. + + The Volume Retention Period is the minimum of time that a Volume will be + kept before it is reused. Bacula will normally never overwrite a Volume + that contains the only backup copy of a file. Under ideal conditions, + the Catalog would retain entries for all files backed up for all current + Volumes. Once a Volume is overwritten, the files that were backed up on + that Volume are automatically removed from the Catalog. However, if + there is a very large pool of Volumes or a Volume is never overwritten, + the Catalog database may become enormous. To keep the Catalog to a + manageable size, the backup information should be removed from the + Catalog after the defined File Retention Period. Bacula provides the + mechanisms for the catalog to be automatically pruned according to the + retention periods defined. + +\item [Scan] + \index[sd]{Scan } + A Scan operation causes the contents of a Volume or a series of Volumes + to be scanned. These Volumes with the information on which files they + contain are restored to the Bacula Catalog. Once the information is + restored to the Catalog, the files contained on those Volumes may be + easily restored. This function is particularly useful if certain + Volumes or Jobs have exceeded their retention period and have been + pruned or purged from the Catalog. Scanning data from Volumes into the + Catalog is done by using the {\bf bscan} program. See the \ilink{ bscan + section}{bscan} of the Bacula Utilities Chapter of this manual for more + details. + +\item [Volume] + \index[sd]{Volume } + A Volume is an archive unit, normally a tape or a named disk file where + Bacula stores the data from one or more backup jobs. All Bacula Volumes + have a software label written to the Volume by Bacula so that it + identifies what Volume it is really reading. (Normally there should be + no confusion with disk files, but with tapes, it is easy to mount the + wrong one.) +\end{description} + +\section{What Bacula is Not} +\index[general]{What Bacula is Not} + +Bacula is a backup, restore and verification program and is not a +complete disaster recovery system in itself, but it can be a key part of one +if you plan carefully and follow the instructions included in the +\ilink{ Disaster Recovery}{RescueChapter} Chapter of this manual. + +With proper planning, as mentioned in the Disaster Recovery chapter, +Bacula can be a central component of your disaster recovery system. For +example, if you have created an emergency boot disk, and/or a Bacula Rescue disk to +save the current partitioning information of your hard disk, and maintain a +complete Bacula backup, it is possible to completely recover your system from +"bare metal" that is starting from an empty disk. + +If you have used the {\bf WriteBootstrap} record in your job or some other +means to save a valid bootstrap file, you will be able to use it to extract +the necessary files (without using the catalog or manually searching for the +files to restore). + +\section{Interactions Between the Bacula Services} +\index[general]{Interactions Between the Bacula Services} +\index[general]{Services!Interactions Between the Bacula} + +The following block diagram shows the typical interactions between the Bacula +Services for a backup job. Each block represents in general a separate process +(normally a daemon). In general, the Director oversees the flow of +information. It also maintains the Catalog. + +\addcontentsline{lof}{figure}{Interactions between Bacula Services} +\includegraphics{\idir flow.eps} diff --git a/docs/manuals/es/main/gpl.tex b/docs/manuals/es/main/gpl.tex new file mode 100644 index 00000000..a368afc7 --- /dev/null +++ b/docs/manuals/es/main/gpl.tex @@ -0,0 +1,420 @@ +%% +%% + +\section*{GNU General Public License} +\label{GplChapter} +\index[general]{GNU General Public License } +\index[general]{License!GNU General Public } + +\elink{image of a Philosophical +GNU}{http://www.gnu.org/graphics/philosophicalgnu.html} + +\begin{itemize} +\item + \elink{What to do if you see a possible GPL + violation}{http://www.gnu.org/copyleft/gpl-violation.html} +\item + \elink{Translations of the + GPL}{http://www.gnu.org/copyleft/copyleft.html\#translations} +\end{itemize} + + +\section{Table of Contents} +\index[general]{Table of Contents } +\index[general]{Contents!Table of } + +\begin{itemize} +\item + \label{TOC1} + \ilink{GNU GENERAL PUBLIC LICENSE}{SEC1} + +\begin{itemize} +\item + \label{TOC2} + \ilink{Preamble}{SEC2} +\item + \label{TOC3} + \ilink{TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND +MODIFICATION}{SEC3} +\item + \label{TOC4} + \ilink{How to Apply These Terms to Your New Programs}{SEC4} +\end{itemize} + +\end{itemize} + + +\section{GNU GENERAL PUBLIC LICENSE} +\label{SEC1} +\index[general]{GNU GENERAL PUBLIC LICENSE } +\index[general]{LICENSE!GNU GENERAL PUBLIC } + +Version 2, June 1991 + +\footnotesize +\begin{verbatim} +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. +\end{verbatim} +\normalsize + +\section{Preamble} +\label{SEC2} +\index[general]{Preamble } + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software\verb:--:to make sure the +software is free for all its users. This General Public License applies to +most of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Library General Public License instead.) You can apply it +to your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you +can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to +deny you these rights or to ask you to surrender the rights. These +restrictions translate to certain responsibilities for you if you distribute +copies of the software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for +a fee, you must give the recipients all the rights that you have. You must +make sure that they, too, receive or can get the source code. And you must +show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) +offer you this license which gives you legal permission to copy, distribute +and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced +by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We +wish to avoid the danger that redistributors of a free program will +individually obtain patent licenses, in effect making the program proprietary. +To prevent this, we have made it clear that any patent must be licensed for +everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + +\section{TERMS AND CONDITIONS} +\label{SEC3} +\index[general]{CONDITIONS!TERMS AND } +\index[general]{TERMS AND CONDITIONS } + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +{\bf 0.} This License applies to any program or other work which contains a +notice placed by the copyright holder saying it may be distributed under the +terms of this General Public License. The "Program", below, refers to any +such program or work, and a "work based on the Program" means either the +Program or any derivative work under copyright law: that is to say, a work +containing the Program or a portion of it, either verbatim or with +modifications and/or translated into another language. (Hereinafter, +translation is included without limitation in the term "modification".) Each +licensee is addressed as "you". + +Activities other than copying, distribution and modification are not covered +by this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its +contents constitute a work based on the Program (independent of having been +made by running the Program). Whether that is true depends on what the Program +does. + +{\bf 1.} You may copy and distribute verbatim copies of the Program's source +code as you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +{\bf 2.} You may modify your copy or copies of the Program or any portion of +it, thus forming a work based on the Program, and copy and distribute such +modifications or work under the terms of Section 1 above, provided that you +also meet all of these conditions: + +\begin{itemize} +\item {\bf a)} You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + +\item {\bf b)} You must cause any work that you distribute or publish, that + in whole or in part contains or is derived from the Program or any part + thereof, to be licensed as a whole at no charge to all third parties under + the terms of this License. + +\item {\bf c)} If the modified program normally reads commands interactively + when run, you must cause it, when started running for such interactive use in + the most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or else, + saying that you provide a warranty) and that users may redistribute the + program under these conditions, and telling the user how to view a copy of + this License. (Exception: if the Program itself is interactive but does not + normally print such an announcement, your work based on the Program is not + required to print an announcement.) +\end{itemize} + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, +and its terms, do not apply to those sections when you distribute them as +separate works. But when you distribute the same sections as part of a whole +which is a work based on the Program, the distribution of the whole must be on +the terms of this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with +the Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +{\bf 3.} You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + +\begin{itemize} +\item {\bf a)} Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections 1 and 2 + above on a medium customarily used for software interchange; or, + +\item {\bf b)} Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your cost of + physically performing source distribution, a complete machine-readable copy of + the corresponding source code, to be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + +\item {\bf c)} Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in object + code or executable form with such an offer, in accord with Subsection b + above.) +\end{itemize} + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and +installation of the executable. However, as a special exception, the source +code distributed need not include anything that is normally distributed (in +either source or binary form) with the major components (compiler, kernel, and +so on) of the operating system on which the executable runs, unless that +component itself accompanies the executable. + +If distribution of executable or object code is made by offering access to +copy from a designated place, then offering equivalent access to copy the +source code from the same place counts as distribution of the source code, +even though third parties are not compelled to copy the source along with the +object code. + +{\bf 4.} You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt otherwise to +copy, modify, sublicense or distribute the Program is void, and will +automatically terminate your rights under this License. However, parties who +have received copies, or rights, from you under this License will not have +their licenses terminated so long as such parties remain in full compliance. + +{\bf 5.} You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or distribute +the Program or its derivative works. These actions are prohibited by law if +you do not accept this License. Therefore, by modifying or distributing the +Program (or any work based on the Program), you indicate your acceptance of +this License to do so, and all its terms and conditions for copying, +distributing or modifying the Program or works based on it. + +{\bf 6.} Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the original +licensor to copy, distribute or modify the Program subject to these terms and +conditions. You may not impose any further restrictions on the recipients' +exercise of the rights granted herein. You are not responsible for enforcing +compliance by third parties to this License. + +{\bf 7.} If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or otherwise) +that contradict the conditions of this License, they do not excuse you from +the conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +{\bf 8.} If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +{\bf 9.} The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will be +similar in spirit to the present version, but may differ in detail to address +new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of this License, +you may choose any version ever published by the Free Software Foundation. + +{\bf 10.} If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author to +ask for permission. For software which is copyrighted by the Free Software +Foundation, write to the Free Software Foundation; we sometimes make +exceptions for this. Our decision will be guided by the two goals of +preserving the free status of all derivatives of our free software and of +promoting the sharing and reuse of software generally. + +{\bf NO WARRANTY} + +{\bf 11.} BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE +THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR +IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO +THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM +PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR +CORRECTION. + +{\bf 12.} IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO +LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR +THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + +END OF TERMS AND CONDITIONS + +\section{How to Apply These Terms to Your New Programs} +\label{SEC4} +\index[general]{Programs!How to Apply These Terms to Your New } +\index[general]{How to Apply These Terms to Your New Programs } + +If you develop a new program, and you want it to be of the greatest possible +use to the public, the best way to achieve this is to make it free software +which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + +\footnotesize +\begin{verbatim} +{\em one line to give the program's name and an idea of what it does.} +Copyright (C) {\em yyyy} {\em name of author} +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +02110-1301 USA +\end{verbatim} +\normalsize + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + +\footnotesize +\begin{verbatim} +Gnomovision version 69, Copyright (C) {\em year} {\em name of author} +Gnomovision comes with ABSOLUTELY NO WARRANTY; for details +type `show w'. This is free software, and you are welcome +to redistribute it under certain conditions; type `show c' +for details. +\end{verbatim} +\normalsize + +The hypothetical commands {\tt `show w'} and {\tt `show c'} should show the +appropriate parts of the General Public License. Of course, the commands you +use may be called something other than {\tt `show w'} and {\tt `show c'}; they +could even be mouse-clicks or menu items\verb:--:whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + +\footnotesize +\begin{verbatim} +Yoyodyne, Inc., hereby disclaims all copyright +interest in the program `Gnomovision' +(which makes passes at compilers) written +by James Hacker. +{\em signature of Ty Coon}, 1 April 1989 +Ty Coon, President of Vice +\end{verbatim} +\normalsize + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General Public +License instead of this License. +Return to +\elink{GNU's home page}{http://www.gnu.org/home.html}. + +FSF \& GNU inquiries \& questions to +\elink{gnu@gnu.org}{mailto:gnu@gnu.org}. Other +\elink{ways to contact}{http://www.gnu.org/home.html\#ContactInfo} the FSF. + +Comments on these web pages to +\elink{webmasters@www.gnu.org}{mailto:webmasters@www.gnu.org}, send other +questions to +\elink{gnu@gnu.org}{mailto:gnu@gnu.org}. + +Copyright notice above. +Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, +Boston, MA 02110-1301 USA + +Updated: 3 Jan 2000 rms diff --git a/docs/manuals/fr/install/index.perl b/docs/manuals/es/main/index.perl similarity index 100% rename from docs/manuals/fr/install/index.perl rename to docs/manuals/es/main/index.perl diff --git a/docs/manuals/es/main/install.tex b/docs/manuals/es/main/install.tex new file mode 100644 index 00000000..83b62a96 --- /dev/null +++ b/docs/manuals/es/main/install.tex @@ -0,0 +1,1745 @@ +%% +%% + +\chapter{Installing Bacula} +\label{InstallChapter} +\index[general]{Bacula!Installing} +\index[general]{Installing Bacula} + +In general, you will need the Bacula source release, and if you want to run +a Windows client, you will need the Bacula Windows binary release. +However, Bacula needs certain third party packages (such as {\bf MySQL}, +{\bf PostgreSQL}, or {\bf SQLite} to build and run +properly depending on the +options you specify. Normally, {\bf MySQL} and {\bf PostgreSQL} are +packages that can be installed on your distribution. However, if you do +not have them, to simplify your task, we have combined a number of these +packages into three {\bf depkgs} releases (Dependency Packages). This can +vastly simplify your life by providing you with all the necessary packages +rather than requiring you to find them on the Web, load them, and install +them. + +\section{Source Release Files} +\index[general]{Source Files} +\index[general]{Release Files} + Beginning with Bacula 1.38.0, the source code has been broken into + four separate tar files each corresponding to a different module in + the Bacula SVN. The released files are: + +\begin{description} +\item [bacula-3.0.3.tar.gz] + This is the primary source code release for Bacula. On each + release the version number (3.0.3) will be updated. + +\item [bacula-docs-3.0.3.tar.gz] + This file contains a copy of the docs directory with the + documents prebuild. English HTML directory, single HTML + file, and pdf file. The French and German translations + are in progress, but are not built. + +\item [bacula-gui-3.0.3.tar.gz] + This file contains the non-core GUI programs. Currently, + it contains bacula-web, a PHP program for producing management + viewing of your Bacula job status in a browser; and bimagemgr + a browser program for burning CDROM images with Bacula Volumes. + +\item [bacula-rescue-3.0.3.tar.gz] + This is the Bacula Rescue CDROM code. Note, the version number + of this package is not tied to the Bacula release version, so + it will be different. Using this code, you can burn a CDROM + with your system configuration and containing a statically + linked version of the File daemon. This can permit you to easily + repartition and reformat your hard disks and reload your + system with Bacula in the case of a hard disk failure. + Unfortunately this rescue disk does not properly boot for + all Linux distributions. The problem is that the boot procedure + can vary significantly between distributions, and even within + a distribution, they are a moving target. + + This package evolves slower than the Bacula source code, + so there may not always be a new release of the rescue package when + making minor updates to the Bacula code. For example, when releasing + Bacula version 3.0.3, the rescue package may still be at a prior + version if there were no updates. + +\item [winbacula-3.0.3.exe] + This file is the 32 bit Windows installer for installing + the Windows client (File daemon) on a Windows machine. + This client will also run on 64 bit Windows machines. + Beginning with Bacula version 1.39.20, this executable will + also optionally load the Win32 Director and the Win32 + Storage daemon. + +\item [win64bacula-3.0.3.exe] + This file is the 64 bit Windows installer for installing + the Windows client (File daemon) on a Windows machine. + This client will only run on 64 bit Windows OS machines. + It will not run on 32 bit machines or 32 bit Windows OSes. + The win64bacula release is necessary for Volume Shadow + Copy (VSS) to work on Win64 OSes. This installer + installs only the FD, the Director and Storage daemon + are not included. + +\end{description} + +\label{upgrading1} +\section{Upgrading Bacula} +\index[general]{Bacula!Upgrading} +\index[general]{Upgrading Bacula} +\index[general]{Upgrading} + +If you are upgrading from one Bacula version to another, you should first +carefully read the ReleaseNotes of all major versions between your current +version and the version to which you are upgrading. In many upgrades, +especially for minor patch upgrades (e.g. between 3.0.0 and 3.0.1) there +will be no database upgrade, and hence the process is rather simple. + +With version 3.0.0 and later, you {\bf must} ensure that on any one +machine that all components of Bacula are running on exactly the +same version. Prior to version 3.0.0, it was possible to run a +lower level FD with a newer Director and SD. This is no longer the +case. + +As always, we attempt to support older File daemons. This avoids the +need to do a simultaneous upgrade of many machines. For exactly what +older versions of the FD are supported, please see the ReleaseNotes +for the new version. In any case, you must always upgrade both the +Director and the Storage daemon at the same time, and you must also +upgrade any File daemon that is running on the same machine as a Director +or a Storage daemon (see the prior paragraph). + +If the Bacula catalog +database has been upgraded (as it is almost every major release), you will +either need to reinitialize your database starting from scratch (not +normally a good idea), or save an ASCII copy of your database, then proceed +to upgrade it. If you are upgrading two major versions (e.g. 1.36 to 2.0) +then life will be more complicated because you must do two database +upgrades. See below for more on this. + +Upgrading the catalog is normally done after Bacula is build and installed +by: + +\begin{verbatim} +cd (default /etc/bacula) +./update_bacula_tables +\end{verbatim} + +This update script can also be find in the Bacula source src/cats +directory. + +If there are several database upgrades between your version and the +version to which you are upgrading, you will need to apply each database +upgrade script. For your convenience, you can find all the old upgrade scripts +in the {\bf upgradedb} directory of the source code. You will need to edit the +scripts to correspond to your system configuration. The final upgrade script, +if any, can be applied as noted above. + +If you are upgrading from one major version to another, you will need to +replace all your components at the same time as generally the inter-daemon +protocol will change. However, within any particular release (e.g. version +1.32.x) unless there is an oversight or bug, the daemon protocol will not +change. If this is confusing, simply read the ReleaseNotes very carefully as +they will note if all daemons must be upgraded at the same time. + +Finally, please note that in general it is not necessary or desirable +to do a {\bf make uninstall} before doing an upgrade providing you are careful +not to change the installation directories. In fact, if you do so, you will +most likely delete all your conf files, which could be disastrous. +The normal procedure during an upgrade is simply: + +\begin{verbatim} +./configure (your options) +make +make install +\end{verbatim} + +In general none of your existing .conf or .sql files will be overwritten, +and you must do both the {\bf make} and {\bf make install} commands, a +{\bf make install} without the preceding {\bf make} will not work. + +For additional information on upgrading, please see the \ilink{Upgrading Bacula +Versions}{upgrading} in the Tips chapter of this manual. + +\section{Releases Numbering} +\index[general]{Release Numbering} +\index[general]{Version Numbering} +Every Bacula release whether beta or production has a different number +as well as the date of the release build. The numbering system follows +traditional Open Source conventions in that it is of the form. + +\begin{verbatim} +major.minor.release +\end{verbatim} + +For example: +\begin{verbatim} +1.38.11 +\end{verbatim} + +where each component (major, minor, patch) is a number. +The major number is currently 1 and normally does not change +very frequently. The minor number starts at 0 and increases +each for each production release by 2 (i.e. it is always an +even number for a production release), and the patch number is +starts at zero each time the minor number changes. The patch +number is increased each time a bug fix (or fixes) is released +to production. + +So, as of this date (10 September 2006), the current production Bacula +release is version 1.38.11. If there are bug fixes, the next release +will be 1.38.12 (i.e. the patch number has increased by one). + +For all patch releases where the minor version number does not change, +the database and all the daemons will be compatible. That means that +you can safely run a 1.38.0 Director with a 1.38.11 Client. Of course, +in this case, the Director may have bugs that are not fixed. Generally, +within a minor release (some minor releases are not so minor), all +patch numbers are officially released to production. This means that while +the current Bacula version is 1.38.11, versions 1.38.0, 1.38.1, ... 1.38.10 +have all been previously released. + +When the minor number is odd, it indicates that the package is under +development and thus may not be stable. For example, while the current +production release of Bacula is currently 1.38.11, the current development +version is 1.39.22. All patch versions of the development code are +available in the SVN (source repository). However, not all patch versions +of the development code (odd minor version) are officially released. When +they are released, they are released as beta versions (see below for a +definition of what beta means for Bacula releases). + +In general when the minor number increases from one production release +to the next (i.e. 1.38.x to 1.40.0), the catalog database must be upgraded, +the Director and Storage daemon must always be on the same minor release +number, and often (not always), the Clients must also be on the same minor +release. As often as possible, we attempt to make new releases that are +downwards compatible with prior clients, but this is not always possible. +You must check the release notes. In general, you will have fewer problems +if you always run all the components on the same minor version number (i.e. +all either 1.38.x or 1.40.x but not mixed). + + +\label{BetaReleases} +\section*{Beta Releases} +\index[general]{Beta Releases} +Towards the end of the development cycle, which typically runs +one year from a major release to another, there will be several beta +releases of the development code prior to a production release. +As noted above, beta versions always have odd minor version numbers +(e.g 1.37.x or 1.39.x). +The purpose of the beta releases is to allow early adopter users to test +the new code. Beta releases are made with the following considerations: + +\begin{itemize} +\item The code passes the regression testing on FreeBSD, Linux, and Solaris + machines. + +\item There are no known major bugs, or on the rare occasion that + there are, they will be documented or already in the bugs database. + +\item Some of the new code/features may not yet be tested. + +\item Bugs are expected to be found, especially in the new + code before the final production release. + +\item The code will have been run in production in at least one small + site (mine). + +\item The Win32 client will have been run in production at least + one night at that small site. + +\item The documentation in the manual is unlikely to be complete especially + for the new features, and the Release Notes may not be fully + organized. + +\item Beta code is not generally recommended for everyone, but + rather for early adopters. +\end{itemize} + + +\label{Dependency} +\section{Dependency Packages} +\index[general]{Dependency Packages} +\index[general]{Packages!Dependency} + +As discussed above, we have combined a number of third party packages that +Bacula might need into the {\bf depkgs} release. You can, +of course, get the latest packages from the original authors or +from your operating system supplier. The locations of +where we obtained the packages are in the README file in each package. +However, be aware that the packages in the depkgs files have been tested by us +for compatibility with Bacula. + +Typically, a dependency package will be named {\bf depkgs-ddMMMyy.tar.gz} +where {\bf dd} is the day we release it, {\bf MMM} +is the abbreviated month (e.g. Jan), and {\bf yy} is the year. An actual +example is: {\bf depkgs-24Jul09.tar.gz}. To install and build this package (if +needed), you do the following: + +\begin{enumerate} +\item Create a {\bf bacula} directory, into which you will place both the + Bacula source as well as the dependency package. +\item Detar the {\bf depkgs} into the {\bf bacula} directory. +\item cd bacula/depkgs +\item make +\end{enumerate} + +Although the exact composition of the dependency packages may change from time +to time, the current makeup is the following: + +\addcontentsline{lot}{table}{Dependency Packages} +\begin{longtable}{|l|l|l|} + \hline +\multicolumn{1}{|c| }{\bf 3rd Party Package} & \multicolumn{1}{c| }{\bf depkgs} + & \multicolumn{1}{c| }{\bf depkgs-qt} \\ + \hline {SQLite } & \multicolumn{1}{c| }{X } & \multicolumn{1}{c| }{ }\\ + \hline {SQLite3 } & \multicolumn{1}{c| }{X } & \multicolumn{1}{c| }{ }\\ + \hline {mtx } & \multicolumn{1}{c| }{X } & \multicolumn{1}{c| }{ } \\ + \hline {qt4 } & \multicolumn{1}{c| }{ } & \multicolumn{1}{c| }{X } \\ + \hline {qwt } & \multicolumn{1}{c| }{ } & \multicolumn{1}{c| }{X } \\ + \hline +\end{longtable} + +Note, some of these packages are quite large, so that building them can be a +bit time consuming. The above instructions will build all the packages +contained in the directory. However, when building Bacula, it will take only +those pieces that it actually needs. + +Alternatively, you can make just the packages that are needed. For example, + +\footnotesize +\begin{verbatim} +cd bacula/depkgs +make sqlite +\end{verbatim} +\normalsize + +will configure and build only the SQLite package. + +You should build the packages that you will require in {\bf depkgs} a +prior to configuring and building Bacula, since Bacula will need +them during the build process. + +For more information on the {\bf depkgs-qt} package, please read the +INSTALL file in the main directory of that package. If you are going to +build Qt4 using {\bf depkgs-qt}, you must source the {\bf qt4-paths} file +included in the package prior to building Bacula. Please read the INSTALL +file for more details. + +Even if you do not use SQLite, you might find it worthwhile to build {\bf mtx} +because the {\bf tapeinfo} program that comes with it can often provide you +with valuable information about your SCSI tape drive (e.g. compression, +min/max block sizes, ...). Note, most distros provide {\bf mtx} as part of +their release. + +The {\bf depkgs1} package is depreciated and previously contained +readline, which should be available on all operating systems. + +The {\bf depkgs-win32} package is deprecated and no longer used in +Bacula version 1.39.x and later. It was previously used to build +the native Win32 client program, but this program is now built on Linux +systems using cross-compiling. All the tools and third party libraries +are automatically downloaded by executing the appropriate scripts. See +src/win32/README.mingw32 for more details. + +\section{Supported Operating Systems} +\label{Systems} +\index[general]{Systems!Supported Operating} +\index[general]{Supported Operating Systems} + +Please see the +\ilink{ Supported Operating Systems}{SupportedOSes} section +of the QuickStart chapter of this manual. + +\section{Building Bacula from Source} +\label{Building} +\index[general]{Source!Building Bacula from} +\index[general]{Building Bacula from Source} + +The basic installation is rather simple. + +\begin{enumerate} +\item Install and build any {\bf depkgs} as noted above. This + should be unnecessary on most modern Operating Systems. + +\item Configure and install MySQL or PostgreSQL (if desired). + \ilink{Installing and Configuring MySQL Phase I}{MySqlChapter} or + \ilink{Installing and Configuring PostgreSQL Phase + I}{PostgreSqlChapter}. If you are installing from rpms, and are + using MySQL, please be sure to install {\bf mysql-devel}, so that the MySQL + header files are available while compiling Bacula. In addition, the MySQL + client library {\bf mysqlclient} requires the gzip compression library {\bf + libz.a} or {\bf libz.so}. If you are using rpm packages, these libraries are + in the {\bf libz-devel} package. On Debian systems, you will need to load the + {\bf zlib1g-dev} package. If you are not using rpms or debs, you will need to + find the appropriate package for your system. + + Note, if you already have a running MySQL or PostgreSQL on your system, you + can skip this phase provided that you have built the thread safe libraries. + And you have already installed the additional rpms noted above. + + SQLite is not supported on Solaris. This is because it + frequently fails with bus errors. However SQLite3 may work. + +\item Detar the Bacula source code preferably into the {\bf bacula} directory + discussed above. + +\item {\bf cd} to the directory containing the source code. + +\item ./configure (with appropriate options as described below). Any + path names you specify as options on the ./configure command line + must be absolute paths and not relative. + +\item Check the output of ./configure very carefully, especially the Install + binaries and Install config directories. If they are not correct, + please rerun ./configure until they are. The output from ./configure is + stored in {\bf config.out} and can be re-displayed at any time without + rerunning the ./configure by doing {\bf cat config.out}. + +\item If after running ./configure once, you decide to change options and + re-run it, that is perfectly fine, but before re-running it, you should run: + +\footnotesize +\begin{verbatim} + make distclean +\end{verbatim} +\normalsize + +so that you are sure to start from scratch and not have a mixture of the two +options. This is because ./configure caches much of the information. The {\bf +make distclean} is also critical if you move the source directory from one +machine to another. If the {\bf make distclean} fails, just ignore it and +continue on. + +\item make + If you get errors while linking in the Storage daemon directory + (src/stored), it is probably because you have not loaded the static + libraries on your system. I noticed this problem on a Solaris system. + To correct it, make sure that you have not added {\bf + {-}{-}enable-static-tools} to the {\bf ./configure} command. + + If you skip this step ({\bf make}) and proceed immediately to the {\bf + make install} you are making two serious errors: 1. your install will + fail because Bacula requires a {\bf make} before a {\bf make install}. + 2. you are depriving yourself of the chance to make sure there are no + errors before beginning to write files to your system directories. + + +\item make install + Please be sure you have done a {\bf make} before entering this command, + and that everything has properly compiled and linked without errors. + + +\item If you are new to Bacula, we {\bf strongly} recommend that you skip + the next step and use the default configuration files, then run the + example program in the next chapter, then come back and modify your + configuration files to suit your particular needs. + +\item Customize the configuration files for each of the three daemons + (Directory, File, Storage) and for the Console program. For the details + of how to do this, please see \ilink{Setting Up Bacula Configuration + Files}{ConfigureChapter} in the Configuration chapter of this manual. We + recommend that you start by modifying the default configuration files + supplied, making the minimum changes necessary. Complete customization + can be done after you have Bacula up and running. Please take care when + modifying passwords, which were randomly generated, and the {\bf Name}s + as the passwords and names must agree between the configuration files + for security reasons. + +\label{CreateDatabase} +\item Create the Bacula MySQL database and tables + (if using MySQL) + \ilink{Installing and Configuring MySQL Phase II}{mysql_phase2} or + create the Bacula PostgreSQL database and tables + \ilink{Configuring PostgreSQL + II}{PostgreSQL_configure} or alternatively if you are using + SQLite \ilink{Installing and Configuring SQLite Phase II}{phase2}. + +\item Start Bacula ({\bf ./bacula start}) Note. the next chapter shows you + how to do this in detail. + +\item Interface with Bacula using the Console program + +\item For the previous two items, please follow the instructions in the + \ilink{Running Bacula}{TutorialChapter} chapter of this manual, + where you will run a simple backup and do a restore. Do this before you make + heavy modifications to the configuration files so that you are sure that + Bacula works and are familiar with it. After that changing the conf files + will be easier. + +\item If after installing Bacula, you decide to "move it", that is to + install it in a different set of directories, proceed as follows: + +\footnotesize +\begin{verbatim} + make uninstall + make distclean + ./configure (your-new-options) + make + make install + +\end{verbatim} +\normalsize + +\end{enumerate} + +If all goes well, the {\bf ./configure} will correctly determine which +operating system you are running and configure the source code appropriately. +Currently, FreeBSD, Linux (Red Hat), and Solaris are supported. The Bacula +client (File daemon) is reported to work with MacOS X 10.3 is if +readline support is not enabled (default) when building the client. + +If you install Bacula on more than one system, and they are identical, you can +simply transfer the source tree to that other system and do a "make +install". However, if there are differences in the libraries or OS versions, +or you wish to install on a different OS, you should start from the original +compress tar file. If you do transfer the source tree, and you have previously +done a ./configure command, you MUST do: + +\footnotesize +\begin{verbatim} +make distclean +\end{verbatim} +\normalsize + +prior to doing your new ./configure. This is because the GNU autoconf tools +cache the configuration, and if you re-use a configuration for a Linux machine +on a Solaris, you can be sure your build will fail. To avoid this, as +mentioned above, either start from the tar file, or do a "make distclean". + +In general, you will probably want to supply a more complicated {\bf +configure} statement to ensure that the modules you want are built and that +everything is placed into the correct directories. + +For example, on Fedora, Red Hat, or SuSE one could use the following: + +\footnotesize +\begin{verbatim} +CFLAGS="-g -Wall" \ + ./configure \ + --sbindir=$HOME/bacula/bin \ + --sysconfdir=$HOME/bacula/bin \ + --with-pid-dir=$HOME/bacula/bin/working \ + --with-subsys-dir=$HOME/bacula/bin/working \ + --with-mysql \ + --with-working-dir=$HOME/bacula/bin/working \ + --with-dump-email=$USER +\end{verbatim} +\normalsize + +The advantage of using the above configuration to start is that +everything will be put into a single directory, which you can later delete +once you have run the examples in the next chapter and learned how Bacula +works. In addition, the above can be installed and run as non-root. + +For the developer's convenience, I have added a {\bf defaultconfig} script to +the {\bf examples} directory. This script contains the statements that you +would normally use, and each developer/user may modify them to suit his needs. +You should find additional useful examples in this directory as well. + +The {\bf \verb:--:enable-conio} or {\bf \verb:--:enable-readline} options are useful because +they provide a command line history and editing capability for the Console +program. If you have included either option in the build, either the {\bf +termcap} or the {\bf ncurses} package will be needed to link. On most +systems, including Red Hat and SuSE, you should include the ncurses package. +If Bacula's configure process finds the ncurses libraries, it will use +those rather than the termcap library. +On some systems, such as SuSE, the termcap library is not in the standard +library directory. As a consequence, the option may be disabled or you may +get an error message such as: + +\footnotesize +\begin{verbatim} +/usr/lib/gcc-lib/i586-suse-linux/3.3.1/.../ld: +cannot find -ltermcap +collect2: ld returned 1 exit status +\end{verbatim} +\normalsize + +while building the Bacula Console. In that case, you will need to set the {\bf +LDFLAGS} environment variable prior to building. + +\footnotesize +\begin{verbatim} +export LDFLAGS="-L/usr/lib/termcap" +\end{verbatim} +\normalsize + +The same library requirements apply if you wish to use the readline +subroutines for command line editing and history or +if you are using a MySQL library that requires encryption. If you need encryption, +you can either export the appropriate additional library options as shown +above or, alternatively, you can include them directly on the ./configure line +as in: + +\footnotesize +\begin{verbatim} +LDFLAGS="-lssl -lcyrpto" \ + ./configure +\end{verbatim} +\normalsize + +On some systems such as Mandriva, readline tends to +gobble up prompts, which makes it totally useless. If this happens to you, use +the disable option, or if you are using version 1.33 and above try using {\bf +\verb:--:enable-conio} to use a built-in readline replacement. You will still need +either the termcap or the ncurses library, but it is unlikely that the {\bf conio} +package will gobble up prompts. + +readline is no longer supported after version 1.34. The code within Bacula +remains, so it should be usable, and if users submit patches for it, we will +be happy to apply them. However, due to the fact that each version of +readline seems to be incompatible with previous versions, and that there +are significant differences between systems, we can no longer afford to +support it. + +\section{What Database to Use?} +\label{DB} +\index[general]{What Database to Use?} +\index[general]{Use!What Database to} + +Before building Bacula you need to decide if you want to use SQLite, MySQL, or +PostgreSQL. If you are not already running MySQL or PostgreSQL, you might +want to start by testing with SQLite (not supported on Solaris). +This will greatly simplify the setup for you +because SQLite is compiled into Bacula an requires no administration. It +performs well and is suitable for small to medium sized installations (maximum +10-20 machines). However, we should note that a number of users have +had unexplained database corruption with SQLite. For that reason, we +recommend that you install either MySQL or PostgreSQL for production +work. + +If you wish to use MySQL as the Bacula catalog, please see the +\ilink{Installing and Configuring MySQL}{MySqlChapter} chapter of +this manual. You will need to install MySQL prior to continuing with the +configuration of Bacula. MySQL is a high quality database that is very +efficient and is suitable for any sized installation. It is slightly more +complicated than SQLite to setup and administer because it has a number of +sophisticated features such as userids and passwords. It runs as a separate +process, is truly professional and can manage a database of any size. + +If you wish to use PostgreSQL as the Bacula catalog, please see the +\ilink{Installing and Configuring PostgreSQL}{PostgreSqlChapter} +chapter of this manual. You will need to install PostgreSQL prior to +continuing with the configuration of Bacula. PostgreSQL is very similar to +MySQL, though it tends to be slightly more SQL92 compliant and has many more +advanced features such as transactions, stored procedures, and the such. It +requires a certain knowledge to install and maintain. + +If you wish to use SQLite as the Bacula catalog, please see +\ilink{Installing and Configuring SQLite}{SqlLiteChapter} chapter of +this manual. SQLite is not supported on Solaris. + +\section{Quick Start} +\index[general]{Quick Start} +\index[general]{Start!Quick} + +There are a number of options and important considerations given below +that you can skip for the moment if you have not had any problems building +Bacula with a simplified configuration as shown above. + +If the ./configure process is unable to find specific libraries (e.g. +libintl, you should ensure that the appropriate package is installed on +your system. Alternatively, if the package is installed in a non-standard +location (as far as Bacula is concerned), then there is generally an +option listed below (or listed with "./configure {-}{-}help" that will +permit you to specify the directory that should be searched. In other +cases, there are options that will permit you to disable to feature +(e.g. {-}{-}disable-nls). + +If you want to dive right into it, we recommend you skip to the next chapter, +and run the example program. It will teach you a lot about Bacula and as an +example can be installed into a single directory (for easy removal) and run as +non-root. If you have any problems or when you want to do a real installation, +come back to this chapter and read the details presented below. + +\section{Configure Options} +\label{Options} +\index[general]{Options!Configure} +\index[general]{Configure Options} + +The following command line options are available for {\bf configure} to +customize your installation. + +\begin{description} +\item [ {-}prefix=\lt{}patch\gt{}] + \index[general]{{-}prefix} + This option is meant to allow you to direct where the architecture + independent files should be placed. However, we find this a somewhat + vague concept, and so we have not implemented this option other than + what ./configure does by default. As a consequence, we suggest that + you avoid it. We have provided options that allow you to explicitly + specify the directories for each of the major categories of installation + files. +\item [ {-}{-}sbindir=\lt{}binary-path\gt{}] + \index[general]{{-}{-}sbindir} + Defines where the Bacula binary (executable) files will be placed during a + {\bf make install} command. + +\item [ {-}{-}sysconfdir=\lt{}config-path\gt{}] + \index[general]{{-}{-}sysconfdir} + Defines where the Bacula configuration files should be placed during a + {\bf make install} command. + +\item [ {-}{-}mandir=\lt{}path\gt{}] + \index[general]{{-}{-}mandir} + Note, as of Bacula version 1.39.14, the meaning of any path + specified on this option is change from prior versions. It + now specifies the top level man directory. + Previously the mandir specified the full path to where you + wanted the man files installed. + The man files will be installed in gzip'ed format under + mandir/man1 and mandir/man8 as appropriate. + For the install to succeed you must have {\bf gzip} installed + on your system. + + By default, Bacula will install the Unix man pages in + /usr/share/man/man1 and /usr/share/man/man8. + If you wish the man page to be installed in + a different location, use this option to specify the path. + Note, the main HTML and PDF Bacula documents are in a separate + tar file that is not part of the source distribution. + +\item [ {-}{-}datadir=\lt{}path\gt{} ] + \index[general]{{-}{-}datadir} + If you translate Bacula or parts of Bacula into a different language + you may specify the location of the po files using the {\bf + {-}{-}datadir} option. You must manually install any po files as + Bacula does not (yet) automatically do so. + +\item [ {-}{-}disable-ipv6 ] + \index[general]{{-}{-}disable-ipv6} + +\item [ {-}{-}enable-smartalloc ] + \index[general]{{-}{-}enable-smartalloc} + This enables the inclusion of the Smartalloc orphaned buffer detection + code. This option is highly recommended. Because we never build + without this option, you may experience problems if it is not enabled. + In this case, simply re-enable the option. We strongly recommend + keeping this option enabled as it helps detect memory leaks. This + configuration parameter is used while building Bacula + +\item [ {-}{-}enable-bat ] + \label{enablebat} + \index[general]{{-}{-}enable-bat} + If you have Qt4 >= 4.3 installed on your computer including the + libqt4 and libqt4-devel (libqt4-dev on Debian) libraries, and you want + to use the Bacula Administration Tool (bat) GUI Console interface to + Bacula, you must specify this option. Doing so will build everything in + the {\bf src/qt-console} directory. The build with enable-bat will work + only with a full Bacula build (i.e. it will not work with a client-only + build). + + Qt4 is available on OpenSUSE 10.2, CentOS 5, Fedora, and Debian. If it + is not available on your system, you can download the {\bf depkgs-qt} + package from the Bacula Source Forge download area and build it and + the qwt package, both of which are needed to build bat. See the + INSTALL file in that package for more details. In particular to use + the Qt4 built by {\bf depkgs-qt} you {bf must} source the file + {\bf qt4-paths}. + +\item [ {-}{-}with-qwt=\lt{}path\gt{} ] + \index[general]{{-}{-}with-qwt} + The qwt package is a graphics library for Qt. If it is included + during the building of bat, you will get one extra graphical function. + At the current time, we recommend not including this option when + building bat. The path specified must be an absolute path and + not relative. + + The qwt package is available for download from + the qwt project on Source Forge. If you wish, you may build and + install it on your system (by default in /usr/lib). + If you have done so, you would specify: + +\begin{verbatim} + --with-qwt=/usr/lib/qwt-5.0.2 +\end{verbatim} + + Alternatively, you can download the Bacula depkgs-qt package (currently + version 28Jul09) and build it, then assuming that you have put it + into a directory named bacula, you would specify: + +\begin{verbatim} + --with-qwt=$HOME/bacula/depkgs-qt/qwt +\end{verbatim} + + Some packages such as Debian do not adhere to the standard of + naming the library libqwt.a or libqwt.so, and you will either need + to manually add a soft link to the name they use or use the + depkgs version, which handles the naming correctly. + + +\item [ {-}{-}enable-batch-insert ] + \index[general]{{-}{-}enable-batch-insert} + This option enables batch inserts of the attribute records (default) in + the catalog database, which is much faster (10 times or more) than + without this option for large numbers of files. However, this option + will automatically be disabled if your SQL libraries are not + thread safe. If you find that batch mode is not enabled on your Bacula + installation, then your database most likely does not support threads. + + SQLite2 is not thread safe. Batch insert cannot be enabled when using + SQLite2 + + On most systems, MySQL, PostgreSQL and SQLite3 are thread safe. + + To verify that your PostgreSQL is thread safe, you can try this + (change the path to point to your particular installed libpq.a; + these commands were issued on FreeBSD 6.2): + +\begin{verbatim} +$ nm /usr/local/lib/libpq.a | grep PQputCopyData +00001b08 T PQputCopyData +$ nm /usr/local/lib/libpq.a | grep mutex + U pthread_mutex_lock + U pthread_mutex_unlock + U pthread_mutex_init + U pthread_mutex_lock + U pthread_mutex_unlock +\end{verbatim} + + The above example shows a libpq that contains the required function + PQputCopyData and is thread enabled (i.e. the pthread\_mutex* entries). + If you do not see PQputCopyData, your version of PostgreSQL is too old + to allow batch insert. If you do not see the mutex entries, then thread + support has not been enabled. Our tests indicate you usually need to + change the configuration options and recompile/reinstall the PostgreSQL + client software to get thread support. + + Bacula always links to the thread safe MySQL libraries. + + As a default, Bacula runs SQLite3 with {\bf PRAGMA synchronous=OFF} + because it improves performance by more than 30 times. However, it + increases the possibility of a corrupted database. If you want more + security, please modify src/version.h appropriately (it should be + obvious when you look at the file). + + Running with Batch Insert turned on is recommended because it can + significantly improve attribute insertion times. However, it does + put a significantly larger part of the work on your SQL engine, so + you may need to pay more attention to tuning it. In particular, + Batch Insert can require large temporary table space, and consequently, + the default location (often /tmp) may run out of space causing errors. + For MySQL, the location is set in my.conf with "tmpdir". You may also + want to increase the memory available to your SQL engine to further + improve performance during Batch Inserts. + +\item [ {-}{-}enable-gnome ] + \index[general]{{-}{-}enable-gnome} + If you have GNOME installed on your computer including the + GNOME development libraries, and you want to use the + GNOME GUI Console interface to Bacula, you must specify this option. + Doing so will build everything in the {\bf src/gnome2-console} directory. + +\item [ {-}{-}enable-bwx-console ] + \index[general]{{-}{-}enable-bwx-console} + If you have wxWidgets installed on your computer and you want to use the + wxWidgets GUI Console interface to Bacula, you must specify this option. + Doing so will build everything in the {\bf src/wx-console} directory. + This could also be useful to users who want a GUI Console and don't want + to install GNOME, as wxWidgets can work with GTK+, Motif or even X11 + libraries. + +\item [ {-}{-}enable-tray-monitor ] + \index[general]{{-}{-}enable-tray-monitor} + If you have GTK installed on your computer, you run a graphical + environment or a window manager compatible with the FreeDesktop system + tray standard (like KDE and GNOME) and you want to use a GUI to monitor + Bacula daemons, you must specify this option. Doing so will build + everything in the {\bf src/tray-monitor} directory. Note, due to + restrictions on what can be linked with GPLed code, we were forced to + remove the egg code that dealt with the tray icons and replace it by + calls to the GTK+ API, and unfortunately, the tray icon API necessary + was not implemented until GTK version 2.10 or later. + +\item [ {-}{-}enable-static-tools] + \index[general]{{-}{-}enable-static-tools} + This option causes the linker to link the Storage daemon utility tools + ({\bf bls}, {\bf bextract}, and {\bf bscan}) statically. This permits + using them without having the shared libraries loaded. If you have + problems linking in the {\bf src/stored} directory, make sure you have + not enabled this option, or explicitly disable static linking by adding + {\bf \verb:--:disable-static-tools}. + +\item [ {-}{-}enable-static-fd] + \index[general]{{-}{-}enable-static-fd} + This option causes the make process to build a {\bf static-bacula-fd} in + addition to the standard File daemon. This static version will include + statically linked libraries and is required for the Bare Metal recovery. + This option is largely superseded by using {\bf make static-bacula-fd} + from with in the {\bf src/filed} directory. Also, the {\bf + \verb:--:enable-client-only} option described below is useful for just + building a client so that all the other parts of the program are not + compiled. + + When linking a static binary, the linker needs the static versions + of all the libraries that are used, so frequently users will + experience linking errors when this option is used. The first + thing to do is to make sure you have the static glibc library + installed on your system. The second thing to do is the make sure + you do not specify {\bf {-}{-}openssl} or {\bf {-}{-}with-python} + on your ./configure statement as these options require additional + libraries. You may be able to enable those options, but you will + need to load additional static libraries. + + +\item [ {-}{-}enable-static-sd] + \index[general]{{-}{-}enable-static-sd} + This option causes the make process to build a {\bf static-bacula-sd} in + addition to the standard Storage daemon. This static version will + include statically linked libraries and could be useful during a Bare + Metal recovery. + + When linking a static binary, the linker needs the static versions + of all the libraries that are used, so frequently users will + experience linking errors when this option is used. The first + thing to do is to make sure you have the static glibc library + installed on your system. The second thing to do is the make sure + you do not specify {\bf {-}{-}openssl} or {\bf {-}{-}with-python} + on your ./configure statement as these options require additional + libraries. You may be able to enable those options, but you will + need to load additional static libraries. + + +\item [ {-}{-}enable-static-dir] + \index[general]{{-}{-}enable-static-dir} + This option causes the make process to build a {\bf static-bacula-dir} + in addition to the standard Director. This static version will include + statically linked libraries and could be useful during a Bare Metal + recovery. + + When linking a static binary, the linker needs the static versions + of all the libraries that are used, so frequently users will + experience linking errors when this option is used. The first + thing to do is to make sure you have the static glibc library + installed on your system. The second thing to do is the make sure + you do not specify {\bf {-}{-}openssl} or {\bf {-}{-}with-python} + on your ./configure statement as these options require additional + libraries. You may be able to enable those options, but you will + need to load additional static libraries. + + +\item [ {-}{-}enable-static-cons] + \index[general]{{-}{-}enable-static-cons} + This option causes the make process to build a {\bf static-console} and + a {\bf static-gnome-console} in addition to the standard console. This + static version will include statically linked libraries and could be + useful during a Bare Metal recovery. + + When linking a static binary, the linker needs the static versions + of all the libraries that are used, so frequently users will + experience linking errors when this option is used. The first + thing to do is to make sure you have the static glibc library + installed on your system. The second thing to do is the make sure + you do not specify {\bf {-}{-}openssl} or {\bf {-}{-}with-python} + on your ./configure statement as these options require additional + libraries. You may be able to enable those options, but you will + need to load additional static libraries. + + +\item [ {-}{-}enable-client-only] + \index[general]{{-}{-}enable-client-only} + This option causes the make process to build only the File daemon and + the libraries that it needs. None of the other daemons, storage tools, + nor the console will be built. Likewise a {\bf make install} will then + only install the File daemon. To cause all daemons to be built, you + will need to do a configuration without this option. This option + greatly facilitates building a Client on a client only machine. + + When linking a static binary, the linker needs the static versions + of all the libraries that are used, so frequently users will + experience linking errors when this option is used. The first + thing to do is to make sure you have the static glibc library + installed on your system. The second thing to do is the make sure + you do not specify {\bf {-}{-}openssl} or {\bf {-}{-}with-python} + on your ./configure statement as these options require additional + libraries. You may be able to enable those options, but you will + need to load additional static libraries. + +\item [ {-}{-}enable-build-dird] + \index[general]{{-}{-}enable-build-dird} + This option causes the make process to build the Director and the + Director's tools. By default, this option is on, but you may turn + it off by using {\bf {-}{-}disable-build-dird} to prevent the + Director from being built. + +\item [ {-}{-}enable-build-stored] + \index[general]{{-}{-}enable-build-stored} + This option causes the make process to build the Storage daemon. + By default, this option is on, but you may turn + it off by using {\bf {-}{-}disable-build-stored} to prevent the + Storage daemon from being built. + + +\item [ {-}{-}enable-largefile] + \index[general]{{-}{-}enable-largefile} + This option (default) causes Bacula to be built with 64 bit file address + support if it is available on your system. This permits Bacula to read and + write files greater than 2 GBytes in size. You may disable this feature and + revert to 32 bit file addresses by using {\bf \verb:--:disable-largefile}. + +\item [ {-}{-}disable-nls] + \index[general]{{-}{-}disable-nls} + By default, Bacula uses the GNU Native Language Support (NLS) libraries. On + some machines, these libraries may not be present or may not function + correctly (especially on non-Linux implementations). In such cases, you + may specify {\bf {-}{-}disable-nls} to disable use of those libraries. + In such a case, Bacula will revert to using English. + +\item [ {-}{-}disable-ipv6 ] + \index[general]{{-}{-}disable-ipv6} + By default, Bacula enables IPv6 protocol. On some systems, the files + for IPv6 may exist, but the functionality could be turned off in the + kernel. In that case, in order to correctly build Bacula, you will + explicitly need to use this option so that Bacula does not attempt + to reference OS function calls that do not exist. + +\item [ {-}{-}with-sqlite=\lt{}sqlite-path\gt{}] + \index[general]{{-}{-}with-sqlite} + This enables use of the SQLite version 2.8.x database. The {\bf + sqlite-path} is not normally specified as Bacula looks for the necessary + components in a standard location ({\bf depkgs/sqlite}). See + \ilink{Installing and Configuring SQLite}{SqlLiteChapter} chapter of + this manual for more details. SQLite is not supported on Solaris. + + See the note below under the {-}{-}with-postgresql item. + +\item [ {-}{-}with-sqlite3=\lt{}sqlite3-path\gt{}] + \index[general]{{-}{-}with-sqlite3} + This enables use of the SQLite version 3.x database. The {\bf + sqlite3-path} is not normally specified as Bacula looks for the + necessary components in a standard location ({\bf depkgs/sqlite3}). See + \ilink{Installing and Configuring SQLite}{SqlLiteChapter} chapter of + this manual for more details. SQLite3 is not supported on Solaris. + +\item [ {-}{-}with-mysql=\lt{}mysql-path\gt{}] + \index[general]{{-}{-}with-mysql} + This enables building of the Catalog services for Bacula. It assumes + that MySQL is running on your system, and expects it to be installed in + the {\bf mysql-path} that you specify. Normally, if MySQL is installed + in a standard system location, you can simply use {\bf {-}{-}with-mysql} + with no path specification. If you do use this option, please proceed + to installing MySQL in the \ilink{Installing and Configuring + MySQL}{MySqlChapter} chapter before proceeding with the configuration. + + See the note below under the {-}{-}with-postgresql item. + +\item [ {-}{-}with-postgresql=\lt{}path\gt{}] + \index[general]{{-}{-}with-postgresql} + This provides an explicit path to the PostgreSQL libraries if Bacula + cannot find it by default. Normally to build with PostgreSQL, you would + simply use {\bf {-}{-}with-postgresql}. + + Note, for Bacula to be configured properly, you must specify one + of the four database options supported. That is: + {-}{-}with-sqlite, {-}{-}with-sqlite3, {-}{-}with-mysql, or + {-}{-}with-postgresql, otherwise the ./configure will fail. + +\item [ {-}{-}with-openssl=\lt{}path\gt{}] + This configuration option is necessary if you want to enable TLS (ssl), + which encrypts the communications within + Bacula or if you want to use File Daemon PKI data encryption. + Normally, the {\bf path} specification is not necessary since + the configuration searches for the OpenSSL libraries in standard system + locations. Enabling OpenSSL in Bacula permits secure communications + between the daemons and/or data encryption in the File daemon. + For more information on using TLS, please see the + \ilink{Bacula TLS -- Communications Encryption}{CommEncryption} chapter + of this manual. + For more information on using PKI data encryption, please see the + \ilink{Bacula PKI -- Data Encryption}{DataEncryption} + chapter of this manual. + +\item [ {-}{-}with-python=\lt{}path\gt{}] + \index[general]{{-}{-}with-python} + This option enables Bacula support for Python. If no path is supplied, + configure will search the standard library locations for Python 2.2, + 2.3, 2.4, or 2.5. If it cannot find the library, you will need to + supply a path to your Python library directory. Please see the + \ilink{Python chapter}{PythonChapter} for the details of using Python + scripting. + +\item [ {-}{-}with-libintl-prefix=\lt{}DIR\gt{}] + \index[general]{{-}{-}with-libintl-prefix} + This option may be used to tell Bacula to search DIR/include and + DIR/lib for the libintl headers and libraries needed for Native + Language Support (NLS). + +\item [ {-}{-}enable-conio] + \index[general]{{-}{-}enable-conio} + Tells Bacula to enable building the small, light weight readline + replacement routine. It is generally much easier to configure than + readline, although, like readline, it needs either the termcap or + ncurses library. + +\item [ {-}{-}with-readline=\lt{}readline-path\gt{}] + \index[general]{{-}{-}with-readline} + Tells Bacula where {\bf readline} is installed. Normally, Bacula will + find readline if it is in a standard library. If it is not found and no + {-}{-}with-readline is specified, readline will be disabled. This + option affects the Bacula build. Readline provides the Console program + with a command line history and editing capability and is no longer + supported, so you are on your own if you have problems. + +\item [ {-}{-}enable-readline] + \index[general]{{-}{-}enable-readline} + Tells Bacula to enable readline support. It is normally disabled due to the + large number of configuration problems and the fact that the package seems to + change in incompatible ways from version to version. + +\item [ {-}{-}with-tcp-wrappers=\lt{}path\gt{}] + \index[general]{{-}{-}with-tcp-wrappers} + \index[general]{TCP Wrappers} + \index[general]{Wrappers!TCP} + \index[general]{libwrappers} + This specifies that you want TCP wrappers (man hosts\_access(5)) compiled in. + The path is optional since Bacula will normally find the libraries in the + standard locations. This option affects the Bacula build. In specifying your + restrictions in the {\bf /etc/hosts.allow} or {\bf /etc/hosts.deny} files, do + not use the {\bf twist} option (hosts\_options(5)) or the Bacula process will + be terminated. Note, when setting up your {\bf /etc/hosts.allow} + or {\bf /etc/hosts.deny}, you must identify the Bacula daemon in + question with the name you give it in your conf file rather than the + name of the executable. + + For more information on configuring and testing TCP wrappers, please see the + \ilink{Configuring and Testing TCP Wrappers}{wrappers} section + in the Security Chapter. + + On SuSE, the libwrappers libraries needed to link Bacula are + contained in the tcpd-devel package. On Red Hat, the package is named + tcp\_wrappers. + +\item [ {-}{-}with-archivedir=\lt{}path\gt{} ] + \index[general]{{-}{-}with-archivedir} + The directory used for disk-based backups. Default value is /tmp. + This parameter sets the default values in the bacula-dir.conf and bacula-sd.conf + configuration files. For example, it sets the Where directive for the + default restore job and the Archive Device directive for the FileStorage + device. + + This option is designed primarily for use in regression testing. + Most users can safely ignore this option. + +\item [ {-}{-}with-working-dir=\lt{}working-directory-path\gt{} ] + \index[general]{{-}{-}with-working-dir} + This option is mandatory and specifies a directory into which Bacula may + safely place files that will remain between Bacula executions. For example, + if the internal database is used, Bacula will keep those files in this + directory. This option is only used to modify the daemon configuration + files. You may also accomplish the same thing by directly editing them later. + The working directory is not automatically created by the install process, so + you must ensure that it exists before using Bacula for the first time. + +\item [ {-}{-}with-base-port=\lt{}port=number\gt{}] + \index[general]{{-}{-}with-base-port} + In order to run, Bacula needs three TCP/IP ports (one for the Bacula + Console, one for the Storage daemon, and one for the File daemon). The {\bf + \verb:--:with-baseport} option will automatically assign three ports beginning at + the base port address specified. You may also change the port number in the + resulting configuration files. However, you need to take care that the + numbers correspond correctly in each of the three daemon configuration + files. The default base port is 9101, which assigns ports 9101 through 9103. + These ports (9101, 9102, and 9103) have been officially assigned to Bacula by + IANA. This option is only used to modify the daemon configuration files. You + may also accomplish the same thing by directly editing them later. + +\item [ {-}{-}with-dump-email=\lt{}email-address\gt{}] + \index[general]{{-}{-}with-dump-email} + This option specifies the email address where any core dumps should be set. + This option is normally only used by developers. + +\item [ {-}{-}with-pid-dir=\lt{}PATH\gt{} ] + \index[general]{{-}{-}with-pid-dir} + This specifies where Bacula should place the process id file during + execution. The default is: {\bf /var/run}. This directory is not created by + the install process, so you must ensure that it exists before using Bacula + the first time. + +\item [ {-}{-}with-subsys-dir=\lt{}PATH\gt{}] + \index[general]{{-}{-}with-subsys-dir} + This specifies where Bacula should place the subsystem lock file during + execution. The default is {\bf /var/run/subsys}. Please make sure that you do + not specify the same directory for this directory and for the {\bf sbindir} + directory. This directory is used only within the autostart scripts. The + subsys directory is not created by the Bacula install, so you must be sure to + create it before using Bacula. + +\item [ {-}{-}with-dir-password=\lt{}Password\gt{}] + \index[general]{{-}{-}with-dir-password} + This option allows you to specify the password used to access the Director + (normally from the Console program). If it is not specified, configure will + automatically create a random password. + +\item [ {-}{-}with-fd-password=\lt{}Password\gt{} ] + \index[general]{{-}{-}with-fd-password} + This option allows you to specify the password used to access the File daemon + (normally called from the Director). If it is not specified, configure will + automatically create a random password. + +\item [ {-}{-}with-sd-password=\lt{}Password\gt{} ] + \index[general]{{-}{-}with-sd-password} + This option allows you to specify the password used to access the Storage daemon + (normally called from the Director). If it is not specified, configure will + automatically create a random password. + +\item [ {-}{-}with-dir-user=\lt{}User\gt{} ] + \index[general]{{-}{-}with-dir-user} + This option allows you to specify the Userid used to run the Director. The + Director must be started as root, but doesn't need to run as root, and + after doing preliminary initializations, it can "drop" to the UserId + specified on this option. + If you specify this option, you must + create the User prior to running {\bf make install}, because the + working directory owner will be set to {\bf User}. + +\item [ {-}{-}with-dir-group=\lt{}Group\gt{} ] + \index[general]{{-}{-}with-dir-group} + This option allows you to specify the GroupId used to run the Director. The + Director must be started as root, but doesn't need to run as root, and after + doing preliminary initializations, it can "drop" to the GroupId specified + on this option. + If you specify this option, you must + create the Group prior to running {\bf make install}, because the + working directory group will be set to {\bf Group}. + +\item [ {-}{-}with-sd-user=\lt{}User\gt{} ] + \index[general]{{-}{-}with-sd-user} + This option allows you to specify the Userid used to run the Storage daemon. + The Storage daemon must be started as root, but doesn't need to run as root, + and after doing preliminary initializations, it can "drop" to the UserId + specified on this option. If you use this option, you will need to take care + that the Storage daemon has access to all the devices (tape drives, ...) that + it needs. + +\item [ {-}{-}with-sd-group=\lt{}Group\gt{} ] + \index[general]{{-}{-}with-sd-group} + This option allows you to specify the GroupId used to run the Storage daemon. + The Storage daemon must be started as root, but doesn't need to run as root, + and after doing preliminary initializations, it can "drop" to the GroupId + specified on this option. + +\item [ {-}{-}with-fd-user=\lt{}User\gt{} ] + \index[general]{{-}{-}with-fd-user} + This option allows you to specify the Userid used to run the File daemon. The + File daemon must be started as root, and in most cases, it needs to run as + root, so this option is used only in very special cases, after doing + preliminary initializations, it can "drop" to the UserId specified on this + option. + +\item [ {-}{-}with-fd-group=\lt{}Group\gt{} ] + \index[general]{{-}{-}with-fd-group} + This option allows you to specify the GroupId used to run the File daemon. + The File daemon must be started as root, and in most cases, it must be run as + root, however, after doing preliminary initializations, it can "drop" to + the GroupId specified on this option. + +\item [ {-}{-}with-mon-dir-password=\lt{}Password\gt{}] + \index[general]{{-}{-}with-mon-dir-password} + This option allows you to specify the password used to access the Directory + from the monitor. If it is not specified, configure will + automatically create a random password. + +\item [ {-}{-}with-mon-fd-password=\lt{}Password\gt{} ] + \index[general]{{-}{-}with-mon-fd-password} + This option allows you to specify the password used to access the File daemon + from the Monitor. If it is not specified, configure will + automatically create a random password. + +\item [ {-}{-}with-mon-sd-password=\lt{}Password\gt{} ] + \index[general]{{-}{-}with-mon-sd-password} + This option allows you to specify the password used to access the + Storage daemon from the Monitor. If it is not specified, configure will + automatically create a random password. + +\item [ {-}{-}with-db-name=\lt{}database-name\gt{} ] + \index[general]{{-}{-}with-db-name} + This option allows you to specify the database name to be used in + the conf files. The default is bacula. + +\item [ {-}{-}with-db-user=\lt{}database-user\gt{} ] + \index[general]{{-}{-}with-db-user} + This option allows you to specify the database user name to be used in + the conf files. The default is bacula. + +\end{description} + +Note, many other options are presented when you do a {\bf ./configure +\verb:--:help}, but they are not implemented. + +\section{Recommended Options for Most Systems} +\index[general]{Systems!Recommended Options for Most} +\index[general]{Recommended Options for Most Systems} + +For most systems, we recommend starting with the following options: + +\footnotesize +\begin{verbatim} +./configure \ + --enable-smartalloc \ + --sbindir=$HOME/bacula/bin \ + --sysconfdir=$HOME/bacula/bin \ + --with-pid-dir=$HOME/bacula/bin/working \ + --with-subsys-dir=$HOME/bacula/bin/working \ + --with-mysql=$HOME/mysql \ + --with-working-dir=$HOME/bacula/working +\end{verbatim} +\normalsize + +If you want to install Bacula in an installation directory rather than run it +out of the build directory (as developers will do most of the time), you +should also include the \verb:--:sbindir and \verb:--:sysconfdir options with appropriate +paths. Neither are necessary if you do not use "make install" as is the case +for most development work. The install process will create the sbindir and +sysconfdir if they do not exist, but it will not automatically create the +pid-dir, subsys-dir, or working-dir, so you must ensure that they exist before +running Bacula for the first time. + +\section{Red Hat} +\index[general]{Red Hat} + +Using SQLite: + +\footnotesize +\begin{verbatim} + +CFLAGS="-g -Wall" ./configure \ + --sbindir=$HOME/bacula/bin \ + --sysconfdir=$HOME/bacula/bin \ + --enable-smartalloc \ + --with-sqlite=$HOME/bacula/depkgs/sqlite \ + --with-working-dir=$HOME/bacula/working \ + --with-pid-dir=$HOME/bacula/bin/working \ + --with-subsys-dir=$HOME/bacula/bin/working \ + --enable-bat \ + --with-qwt=$HOME/bacula/depkgs/qwt \ + --enable-conio +\end{verbatim} +\normalsize + +or + +\footnotesize +\begin{verbatim} + +CFLAGS="-g -Wall" ./configure \ + --sbindir=$HOME/bacula/bin \ + --sysconfdir=$HOME/bacula/bin \ + --enable-smartalloc \ + --with-mysql=$HOME/mysql \ + --with-working-dir=$HOME/bacula/working + --with-pid-dir=$HOME/bacula/bin/working \ + --with-subsys-dir=$HOME/bacula/bin/working + --enable-gnome \ + --enable-conio +\end{verbatim} +\normalsize + +or finally, a completely traditional Red Hat Linux install: + +\footnotesize +\begin{verbatim} +CFLAGS="-g -Wall" ./configure \ + --sbindir=/usr/sbin \ + --sysconfdir=/etc/bacula \ + --with-scriptdir=/etc/bacula \ + --enable-smartalloc \ + --enable-bat \ + --with-qwt=$HOME/bacula/depkgs/qwt \ + --with-mysql \ + --with-working-dir=/var/bacula \ + --with-pid-dir=/var/run \ + --enable-conio +\end{verbatim} +\normalsize + +Note, Bacula assumes that /var/bacula, /var/run, and /var/lock/subsys exist so +it will not automatically create them during the install process. + +\section{Solaris} +\index[general]{Solaris} + +To build Bacula from source, you will need the following installed on your +system (they are not by default): libiconv, gcc 3.3.2, stdc++, libgcc (for +stdc++ and gcc\_s libraries), make 3.8 or later. + +You will probably also need to: Add /usr/local/bin to PATH and Add +/usr/ccs/bin to PATH for ar. + +It is possible to build Bacula on Solaris with the Solaris compiler, but +we recommend using GNU C++ if possible. + +A typical configuration command might look like: + +\footnotesize +\begin{verbatim} +#!/bin/sh +CFLAGS="-g" ./configure \ + --sbindir=$HOME/bacula/bin \ + --sysconfdir=$HOME/bacula/bin \ + --with-mysql=$HOME/mysql \ + --enable-smartalloc \ + --with-pid-dir=$HOME/bacula/bin/working \ + --with-subsys-dir=$HOME/bacula/bin/working \ + --with-working-dir=$HOME/bacula/working +\end{verbatim} +\normalsize + +As mentioned above, the install process will create the sbindir and sysconfdir +if they do not exist, but it will not automatically create the pid-dir, +subsys-dir, or working-dir, so you must ensure that they exist before running +Bacula for the first time. + +Note, you may need to install the following packages to build Bacula +from source: +\footnotesize +\begin{verbatim} +SUNWbinutils, +SUNWarc, +SUNWhea, +SUNWGcc, +SUNWGnutls +SUNWGnutls-devel +SUNWGmake +SUNWgccruntime +SUNWlibgcrypt +SUNWzlib +SUNWzlibs +SUNWbinutilsS +SUNWGmakeS +SUNWlibm + +export +PATH=/usr/bin::/usr/ccs/bin:/etc:/usr/openwin/bin:/usr/local/bin:/usr/sfw/bin:/opt/sfw/bin:/usr/ucb:/usr/sbin +\end{verbatim} +\normalsize + +If you have installed special software not normally in the Solaris +libraries, such as OpenSSL, or the packages shown above, then you may need +to add {\bf /usr/sfw/lib} to the library search path. Probably the +simplest way to do so is to run: + +\footnotesize +\begin{verbatim} +setenv LDFLAGS "-L/usr/sfw/lib -R/usr/sfw/lib" +\end{verbatim} +\normalsize + +Prior to running the ./configure command. + +Alternatively, you can set the LD\_LIBARY\_PATH and/or the LD\_RUN\_PATH +environment variables appropriately. + +It is also possible to use the {\bf crle} program to set the library +search path. However, this should be used with caution. + +\section{FreeBSD} +\index[general]{FreeBSD} + +Please see: +\elink{The FreeBSD Diary}{http://www.freebsddiary.org/bacula.php} for a +detailed description on how to make Bacula work on your system. In addition, +users of FreeBSD prior to 4.9-STABLE dated Mon Dec 29 15:18:01 2003 UTC who +plan to use tape devices, please see the +\ilink{Tape Testing Chapter}{FreeBSDTapes} of this manual for +{\bf important} information on how to configure your tape drive for +compatibility with Bacula. + +If you are using Bacula with MySQL, you should take care to compile MySQL with +FreeBSD native threads rather than LinuxThreads, since Bacula is normally built +with FreeBSD native threads rather than LinuxTreads. Mixing the two will +probably not work. + +\section{Win32} +\index[general]{Win32} + +To install the binary Win32 version of the File daemon please see the +\ilink{Win32 Installation Chapter}{Win32Chapter} in this document. + +\section{One File Configure Script} +\index[general]{Script!One File Configure} +\index[general]{One Files Configure Script} + +The following script could be used if you want to put everything +in a single file: + +\footnotesize +\begin{verbatim} +#!/bin/sh +CFLAGS="-g -Wall" \ + ./configure \ + --sbindir=$HOME/bacula/bin \ + --sysconfdir=$HOME/bacula/bin \ + --mandir=$HOME/bacula/bin \ + --enable-smartalloc \ + --enable-gnome \ + --enable-bat \ + --with-qwt=$HOME/bacula/depkgs/qwt \ + --enable-bwx-console \ + --enable-tray-monitor \ + --with-pid-dir=$HOME/bacula/bin/working \ + --with-subsys-dir=$HOME/bacula/bin/working \ + --with-mysql \ + --with-working-dir=$HOME/bacula/bin/working \ + --with-dump-email=$USER@your-site.com \ + --with-job-email=$USER@your-site.com \ + --with-smtp-host=mail.your-site.com +exit 0 +\end{verbatim} +\normalsize + +You may also want to put the following entries in your {\bf /etc/services} +file as it will make viewing the connections made by Bacula easier to +recognize (i.e. netstat -a): + +\footnotesize +\begin{verbatim} +bacula-dir 9101/tcp +bacula-fd 9102/tcp +bacula-sd 9103/tcp +\end{verbatim} +\normalsize + +\section{Installing Bacula} +\index[general]{Bacula!Installing} +\index[general]{Installing Bacula} + +Before setting up your configuration files, you will want to install Bacula in +its final location. Simply enter: + +\footnotesize +\begin{verbatim} +make install +\end{verbatim} +\normalsize + +If you have previously installed Bacula, the old binaries will be overwritten, +but the old configuration files will remain unchanged, and the "new" +configuration files will be appended with a {\bf .new}. Generally if you have +previously installed and run Bacula you will want to discard or ignore the +configuration files with the appended {\bf .new}. + +\section{Building a File Daemon or Client} +\index[general]{Client!Building a File Daemon or} +\index[general]{Building a File Daemon or Client} + +If you run the Director and the Storage daemon on one machine and you wish to +back up another machine, you must have a copy of the File daemon for that +machine. If the machine and the Operating System are identical, you can simply +copy the Bacula File daemon binary file {\bf bacula-fd} as well as its +configuration file {\bf bacula-fd.conf} then modify the name and password in +the conf file to be unique. Be sure to make corresponding additions to the +Director's configuration file ({\bf bacula-dir.conf}). + +If the architecture or the OS level are different, you will need to build a +File daemon on the Client machine. To do so, you can use the same {\bf +./configure} command as you did for your main program, starting either from a +fresh copy of the source tree, or using {\bf make\ distclean} before the {\bf +./configure}. + +Since the File daemon does not access the Catalog database, you can remove +the {\bf \verb:--:with-mysql} or {\bf \verb:--:with-sqlite} options, then +add {\bf \verb:--:enable-client-only}. This will compile only the +necessary libraries and the client programs and thus avoids the necessity +of installing one or another of those database programs to build the File +daemon. With the above option, you simply enter {\bf make} and just the +client will be built. + +\label{autostart} +\section{Auto Starting the Daemons} +\index[general]{Daemons!Auto Starting the} +\index[general]{Auto Starting the Daemons} + +If you wish the daemons to be automatically started and stopped when your +system is booted (a good idea), one more step is necessary. First, the +./configure process must recognize your system -- that is it must be a +supported platform and not {\bf unknown}, then you must install the platform +dependent files by doing: + +\footnotesize +\begin{verbatim} +(become root) +make install-autostart +\end{verbatim} +\normalsize + +Please note, that the auto-start feature is implemented only on systems +that we officially support (currently, FreeBSD, Red Hat/Fedora Linux, and +Solaris), and has only been fully tested on Fedora Linux. + +The {\bf make install-autostart} will cause the appropriate startup scripts +to be installed with the necessary symbolic links. On Red Hat/Fedora Linux +systems, these scripts reside in {\bf /etc/rc.d/init.d/bacula-dir} {\bf +/etc/rc.d/init.d/bacula-fd}, and {\bf /etc/rc.d/init.d/bacula-sd}. However +the exact location depends on what operating system you are using. + +If you only wish to install the File daemon, you may do so with: + +\footnotesize +\begin{verbatim} +make install-autostart-fd +\end{verbatim} +\normalsize + +\section{Other Make Notes} +\index[general]{Notes!Other Make} +\index[general]{Other Make Notes} + +To simply build a new executable in any directory, enter: + +\footnotesize +\begin{verbatim} +make +\end{verbatim} +\normalsize + +To clean out all the objects and binaries (including the files named 1, 2, or +3, which are development temporary files), enter: + +\footnotesize +\begin{verbatim} +make clean +\end{verbatim} +\normalsize + +To really clean out everything for distribution, enter: + +\footnotesize +\begin{verbatim} +make distclean +\end{verbatim} +\normalsize + +note, this cleans out the Makefiles and is normally done from the top level +directory to prepare for distribution of the source. To recover from this +state, you must redo the {\bf ./configure} in the top level directory, since +all the Makefiles will be deleted. + +To add a new file in a subdirectory, edit the Makefile.in in that directory, +then simply do a {\bf make}. In most cases, the make will rebuild the Makefile +from the new Makefile.in. In some case, you may need to issue the {\bf make} a +second time. In extreme cases, cd to the top level directory and enter: {\bf +make Makefiles}. + +To add dependencies: + +\footnotesize +\begin{verbatim} +make depend +\end{verbatim} +\normalsize + +The {\bf make depend} appends the header file dependencies for each of the +object files to Makefile and Makefile.in. This command should be done in each +directory where you change the dependencies. Normally, it only needs to be run +when you add or delete source or header files. {\bf make depend} is normally +automatically invoked during the configuration process. + +To install: + +\footnotesize +\begin{verbatim} +make install +\end{verbatim} +\normalsize + +This not normally done if you are developing Bacula, but is used if you are +going to run it to backup your system. + +After doing a {\bf make install} the following files will be installed on your +system (more or less). The exact files and location (directory) for each file +depends on your {\bf ./configure} command (e.g. bgnome-console and +bgnome-console.conf are not installed if you do not configure GNOME. Also, if +you are using SQLite instead of MySQL, some of the files will be different). + +NOTE: it is quite probable that this list is out of date. But it is a +starting point. + +\footnotesize +\begin{verbatim} +bacula +bacula-dir +bacula-dir.conf +bacula-fd +bacula-fd.conf +bacula-sd +bacula-sd.conf +bacula-tray-monitor +tray-monitor.conf +bextract +bls +bscan +btape +btraceback +btraceback.gdb +bconsole +bconsole.conf +create_mysql_database +dbcheck +delete_catalog_backup +drop_bacula_tables +drop_mysql_tables +bgnome-console +bgnome-console.conf +make_bacula_tables +make_catalog_backup +make_mysql_tables +mtx-changer +query.sql +bsmtp +startmysql +stopmysql +bwx-console +bwx-console.conf +9 man pages +\end{verbatim} +\normalsize + +\label{monitor} + +\section{Installing Tray Monitor} +\index[general]{Monitor!Installing Tray} +\index[general]{Installing Tray Monitor} + +The Tray Monitor is already installed if you used the {\bf +\verb:--:enable-tray-monitor} configure option and ran {\bf make install}. + +As you don't run your graphical environment as root (if you do, you should +change that bad habit), don't forget to allow your user to read {\bf +tray-monitor.conf}, and to execute {\bf bacula-tray-monitor} (this is not a +security issue). + +Then log into your graphical environment (KDE, GNOME or something else), run +{\bf bacula-tray-monitor} as your user, and see if a cassette icon appears +somewhere on the screen, usually on the task bar. +If it doesn't, follow the instructions below related to your environment or +window manager. + +\subsection{GNOME} +\index[general]{GNOME} + +System tray, or notification area if you use the GNOME terminology, has been +supported in GNOME since version 2.2. To activate it, right-click on one of +your panels, open the menu {\bf Add to this Panel}, then {\bf Utility} and +finally click on {\bf Notification Area}. + +\subsection{KDE} +\index[general]{KDE} + +System tray has been supported in KDE since version 3.1. To activate it, +right-click on one of your panels, open the menu {\bf Add}, then {\bf Applet} +and finally click on {\bf System Tray}. + +\subsection{Other window managers} +\index[general]{Managers!Other window} +\index[general]{Other window managers} + +Read the documentation to know if the Freedesktop system tray standard is +supported by your window manager, and if applicable, how to activate it. + +\section{Modifying the Bacula Configuration Files} +\index[general]{Modifying the Bacula Configuration Files} +\index[general]{Files!Modifying the Bacula Configuration} + +See the chapter +\ilink{Configuring Bacula}{ConfigureChapter} in this manual for +instructions on how to set Bacula configuration files. diff --git a/docs/manuals/es/main/latex2html-init.pl b/docs/manuals/es/main/latex2html-init.pl new file mode 100644 index 00000000..14b5c319 --- /dev/null +++ b/docs/manuals/es/main/latex2html-init.pl @@ -0,0 +1,10 @@ +# This file serves as a place to put initialization code and constants to +# affect the behavior of latex2html for generating the bacula manuals. + +# $LINKPOINT specifies what filename to use to link to when creating +# index.html. Not that this is a hard link. +$LINKPOINT='"$OVERALL_TITLE"'; + + +# The following must be the last line of this file. +1; diff --git a/docs/manuals/es/main/lesser.tex b/docs/manuals/es/main/lesser.tex new file mode 100644 index 00000000..6fcc81ed --- /dev/null +++ b/docs/manuals/es/main/lesser.tex @@ -0,0 +1,573 @@ +%% +%% + +\section*{GNU Lesser General Public License} +\label{LesserChapter} +\index[general]{GNU Lesser General Public License } +\index[general]{License!GNU Lesser General Public } + +\elink{image of a Philosophical GNU} +{\url{http://www.gnu.org/graphics/philosophicalgnu.html}} [ +\elink{English}{\url{http://www.gnu.org/copyleft/lesser.html}} | +\elink{Japanese}{\url{http://www.gnu.org/copyleft/lesser.ja.html}} ] + +\begin{itemize} +\item + \elink{Why you shouldn't use the Lesser GPL for your next + library}{\url{http://www.gnu.org/philosophy/why-not-lgpl.html}} +\item + \elink{What to do if you see a possible LGPL + violation}{\url{http://www.gnu.org/copyleft/gpl-violation.html}} +\item + \elink{Translations of the LGPL} +{\url{http://www.gnu.org/copyleft/copyleft.html\#translationsLGPL}} +\item The GNU Lesser General Public License as a + \elink{text file}{\url{http://www.gnu.org/copyleft/lesser.txt}} +\item The GNU Lesser General Public License as a + \elink{Texinfo}{\url{http://www.gnu.org/copyleft/lesser.texi}} file + \end{itemize} + + +This GNU Lesser General Public License counts as the successor of the GNU +Library General Public License. For an explanation of why this change was +necessary, read the +\elink{Why you shouldn't use the Lesser GPL for your next +library}{\url{http://www.gnu.org/philosophy/why-not-lgpl.html}} article. + +\section{Table of Contents} +\index[general]{Table of Contents } +\index[general]{Contents!Table of } + +\begin{itemize} +\item + \label{TOC12} + \ilink{GNU LESSER GENERAL PUBLIC LICENSE}{SEC12} + +\begin{itemize} +\item + \label{TOC23} + \ilink{Preamble}{SEC23} +\item + \label{TOC34} + \ilink{TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND +MODIFICATION}{SEC34} +\item + \label{TOC45} + \ilink{How to Apply These Terms to Your New Libraries}{SEC45} +\end{itemize} + +\end{itemize} + + +\section{GNU LESSER GENERAL PUBLIC LICENSE} +\label{SEC12} +\index[general]{LICENSE!GNU LESSER GENERAL PUBLIC } +\index[general]{GNU LESSER GENERAL PUBLIC LICENSE } + +Version 2.1, February 1999 + +\footnotesize +\begin{verbatim} +Copyright (C) 1991, 1999 Free Software Foundation, Inc. +51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] +\end{verbatim} +\normalsize + +\section{Preamble} +\label{SEC23} +\index[general]{Preamble } + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public Licenses are intended to +guarantee your freedom to share and change free software\verb:--:to make sure the +software is free for all its users. + +This license, the Lesser General Public License, applies to some specially +designated software packages\verb:--:typically libraries\verb:--:of the Free Software +Foundation and other authors who decide to use it. You can use it too, but we +suggest you first think carefully about whether this license or the ordinary +General Public License is the better strategy to use in any particular case, +based on the explanations below. + +When we speak of free software, we are referring to freedom of use, not price. +Our General Public Licenses are designed to make sure that you have the +freedom to distribute copies of free software (and charge for this service if +you wish); that you receive source code or can get it if you want it; that you +can change the software and use pieces of it in new free programs; and that +you are informed that you can do these things. + +To protect your rights, we need to make restrictions that forbid distributors +to deny you these rights or to ask you to surrender these rights. These +restrictions translate to certain responsibilities for you if you distribute +copies of the library or if you modify it. + +For example, if you distribute copies of the library, whether gratis or for a +fee, you must give the recipients all the rights that we gave you. You must +make sure that they, too, receive or can get the source code. If you link +other code with the library, you must provide complete object files to the +recipients, so that they can relink them with the library after making changes +to the library and recompiling it. And you must show them these terms so they +know their rights. + +We protect your rights with a two-step method: (1) we copyright the library, +and (2) we offer you this license, which gives you legal permission to copy, +distribute and/or modify the library. + +To protect each distributor, we want to make it very clear that there is no +warranty for the free library. Also, if the library is modified by someone +else and passed on, the recipients should know that what they have is not the +original version, so that the original author's reputation will not be +affected by problems that might be introduced by others. + +Finally, software patents pose a constant threat to the existence of any free +program. We wish to make sure that a company cannot effectively restrict the +users of a free program by obtaining a restrictive license from a patent +holder. Therefore, we insist that any patent license obtained for a version of +the library must be consistent with the full freedom of use specified in this +license. + +Most GNU software, including some libraries, is covered by the ordinary GNU +General Public License. This license, the GNU Lesser General Public License, +applies to certain designated libraries, and is quite different from the +ordinary General Public License. We use this license for certain libraries in +order to permit linking those libraries into non-free programs. + +When a program is linked with a library, whether statically or using a shared +library, the combination of the two is legally speaking a combined work, a +derivative of the original library. The ordinary General Public License +therefore permits such linking only if the entire combination fits its +criteria of freedom. The Lesser General Public License permits more lax +criteria for linking other code with the library. + +We call this license the "Lesser" General Public License because it does +Less to protect the user's freedom than the ordinary General Public License. +It also provides other free software developers Less of an advantage over +competing non-free programs. These disadvantages are the reason we use the +ordinary General Public License for many libraries. However, the Lesser +license provides advantages in certain special circumstances. + +For example, on rare occasions, there may be a special need to encourage the +widest possible use of a certain library, so that it becomes a de-facto +standard. To achieve this, non-free programs must be allowed to use the +library. A more frequent case is that a free library does the same job as +widely used non-free libraries. In this case, there is little to gain by +limiting the free library to free software only, so we use the Lesser General +Public License. + +In other cases, permission to use a particular library in non-free programs +enables a greater number of people to use a large body of free software. For +example, permission to use the GNU C Library in non-free programs enables many +more people to use the whole GNU operating system, as well as its variant, the +GNU/Linux operating system. + +Although the Lesser General Public License is Less protective of the users' +freedom, it does ensure that the user of a program that is linked with the +Library has the freedom and the wherewithal to run that program using a +modified version of the Library. + +The precise terms and conditions for copying, distribution and modification +follow. Pay close attention to the difference between a "work based on the +library" and a "work that uses the library". The former contains code +derived from the library, whereas the latter must be combined with the library +in order to run. + +\section{TERMS AND CONDITIONS} +\label{SEC34} +\index[general]{CONDITIONS!TERMS AND } +\index[general]{TERMS AND CONDITIONS } + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +{\bf 0.} This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or other +authorized party saying it may be distributed under the terms of this Lesser +General Public License (also called "this License"). Each licensee is +addressed as "you". + +A "library" means a collection of software functions and/or data prepared so +as to be conveniently linked with application programs (which use some of +those functions and data) to form executables. + +The "Library", below, refers to any such software library or work which has +been distributed under these terms. A "work based on the Library" means +either the Library or any derivative work under copyright law: that is to say, +a work containing the Library or a portion of it, either verbatim or with +modifications and/or translated straightforwardly into another language. +(Hereinafter, translation is included without limitation in the term +"modification".) + +"Source code" for a work means the preferred form of the work for making +modifications to it. For a library, complete source code means all the source +code for all modules it contains, plus any associated interface definition +files, plus the scripts used to control compilation and installation of the +library. + +Activities other than copying, distribution and modification are not covered +by this License; they are outside its scope. The act of running a program +using the Library is not restricted, and output from such a program is covered +only if its contents constitute a work based on the Library (independent of +the use of the Library in a tool for writing it). Whether that is true depends +on what the Library does and what the program that uses the Library does. + +{\bf 1.} You may copy and distribute verbatim copies of the Library's complete +source code as you receive it, in any medium, provided that you conspicuously +and appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and distribute a copy of this License +along with the Library. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +{\bf 2.} You may modify your copy or copies of the Library or any portion of +it, thus forming a work based on the Library, and copy and distribute such +modifications or work under the terms of Section 1 above, provided that you +also meet all of these conditions: + +\begin{itemize} +\item {\bf a)} The modified work must itself be a software library. +\item {\bf b)} You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. +\item {\bf c)} You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. +\item {\bf d)} If a facility in the modified Library refers to a function or + a table of data to be supplied by an application program that uses the + facility, other than as an argument passed when the facility is invoked, then +you must make a good faith effort to ensure that, in the event an application +does not supply such function or table, the facility still operates, and +performs whatever part of its purpose remains meaningful. + +(For example, a function in a library to compute square roots has a purpose +that is entirely well-defined independent of the application. Therefore, +Subsection 2d requires that any application-supplied function or table used +by this function must be optional: if the application does not supply it, the +square root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Library, and can be reasonably +considered independent and separate works in themselves, then this License, +and its terms, do not apply to those sections when you distribute them as +separate works. But when you distribute the same sections as part of a whole +which is a work based on the Library, the distribution of the whole must be +on the terms of this License, whose permissions for other licensees extend to +the entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Library. + +In addition, mere aggregation of another work not based on the Library with +the Library (or with a work based on the Library) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. +\end{itemize} + +{\bf 3.} You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do this, +you must alter all the notices that refer to this License, so that they refer +to the ordinary GNU General Public License, version 2, instead of to this +License. (If a newer version than version 2 of the ordinary GNU General Public +License has appeared, then you can specify that version instead if you wish.) +Do not make any other change in these notices. + +Once this change is made in a given copy, it is irreversible for that copy, so +the ordinary GNU General Public License applies to all subsequent copies and +derivative works made from that copy. + +This option is useful when you wish to copy part of the code of the Library +into a program that is not a library. + +{\bf 4.} You may copy and distribute the Library (or a portion or derivative +of it, under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you accompany it with the complete +corresponding machine-readable source code, which must be distributed under +the terms of Sections 1 and 2 above on a medium customarily used for software +interchange. + +If distribution of object code is made by offering access to copy from a +designated place, then offering equivalent access to copy the source code from +the same place satisfies the requirement to distribute the source code, even +though third parties are not compelled to copy the source along with the +object code. + +{\bf 5.} A program that contains no derivative of any portion of the Library, +but is designed to work with the Library by being compiled or linked with it, +is called a "work that uses the Library". Such a work, in isolation, is not +a derivative work of the Library, and therefore falls outside the scope of +this License. + +However, linking a "work that uses the Library" with the Library creates an +executable that is a derivative of the Library (because it contains portions +of the Library), rather than a "work that uses the library". The executable +is therefore covered by this License. Section 6 states terms for distribution +of such executables. + +When a "work that uses the Library" uses material from a header file that is +part of the Library, the object code for the work may be a derivative work of +the Library even though the source code is not. Whether this is true is +especially significant if the work can be linked without the Library, or if +the work is itself a library. The threshold for this to be true is not +precisely defined by law. + +If such an object file uses only numerical parameters, data structure layouts +and accessors, and small macros and small inline functions (ten lines or less +in length), then the use of the object file is unrestricted, regardless of +whether it is legally a derivative work. (Executables containing this object +code plus portions of the Library will still fall under Section 6.) + +Otherwise, if the work is a derivative of the Library, you may distribute the +object code for the work under the terms of Section 6. Any executables +containing that work also fall under Section 6, whether or not they are linked +directly with the Library itself. + +{\bf 6.} As an exception to the Sections above, you may also combine or link a +"work that uses the Library" with the Library to produce a work containing +portions of the Library, and distribute that work under terms of your choice, +provided that the terms permit modification of the work for the customer's own +use and reverse engineering for debugging such modifications. + +You must give prominent notice with each copy of the work that the Library is +used in it and that the Library and its use are covered by this License. You +must supply a copy of this License. If the work during execution displays +copyright notices, you must include the copyright notice for the Library among +them, as well as a reference directing the user to the copy of this License. +Also, you must do one of these things: + +\begin{itemize} +\item {\bf a)} Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever changes were + used in the work (which must be distributed under Sections 1 and 2 above); +and, if the work is an executable linked with the Library, with the complete +machine-readable "work that uses the Library", as object code and/or source +code, so that the user can modify the Library and then relink to produce a +modified executable containing the modified Library. (It is understood that +the user who changes the contents of definitions files in the Library will +not necessarily be able to recompile the application to use the modified +definitions.) +\item {\bf b)} Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a copy of the + library already present on the user's computer system, rather than copying +library functions into the executable, and (2) will operate properly with a +modified version of the library, if the user installs one, as long as the +modified version is interface-compatible with the version that the work was +made with. +\item {\bf c)} Accompany the work with a written offer, valid for at least + three years, to give the same user the materials specified in Subsection 6a, + above, for a charge no more than the cost of performing this distribution. +\item {\bf d)} If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above specified + materials from the same place. +\item {\bf e)} Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + \end{itemize} + +For an executable, the required form of the "work that uses the Library" +must include any data and utility programs needed for reproducing the +executable from it. However, as a special exception, the materials to be +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +It may happen that this requirement contradicts the license restrictions of +other proprietary libraries that do not normally accompany the operating +system. Such a contradiction means you cannot use both them and the Library +together in an executable that you distribute. + +{\bf 7.} You may place library facilities that are a work based on the Library +side-by-side in a single library together with other library facilities not +covered by this License, and distribute such a combined library, provided that +the separate distribution of the work based on the Library and of the other +library facilities is otherwise permitted, and provided that you do these two +things: + +\begin{itemize} +\item {\bf a)} Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library facilities. This must + be distributed under the terms of the Sections above. +\item {\bf b)} Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining where to find + the accompanying uncombined form of the same work. +\end{itemize} + +{\bf 8.} You may not copy, modify, sublicense, link with, or distribute the +Library except as expressly provided under this License. Any attempt otherwise +to copy, modify, sublicense, link with, or distribute the Library is void, and +will automatically terminate your rights under this License. However, parties +who have received copies, or rights, from you under this License will not have +their licenses terminated so long as such parties remain in full compliance. + +{\bf 9.} You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or distribute +the Library or its derivative works. These actions are prohibited by law if +you do not accept this License. Therefore, by modifying or distributing the +Library (or any work based on the Library), you indicate your acceptance of +this License to do so, and all its terms and conditions for copying, +distributing or modifying the Library or works based on it. + +{\bf 10.} Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the original +licensor to copy, distribute, link with or modify the Library subject to these +terms and conditions. You may not impose any further restrictions on the +recipients' exercise of the rights granted herein. You are not responsible for +enforcing compliance by third parties with this License. + +{\bf 11.} If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or otherwise) +that contradict the conditions of this License, they do not excuse you from +the conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Library at all. +For example, if a patent license would not permit royalty-free redistribution +of the Library by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +{\bf 12.} If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Library under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +{\bf 13.} The Free Software Foundation may publish revised and/or new versions +of the Lesser General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and "any later +version", you have the option of following the terms and conditions either of +that version or of any later version published by the Free Software +Foundation. If the Library does not specify a license version number, you may +choose any version ever published by the Free Software Foundation. + +{\bf 14.} If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, write to +the author to ask for permission. For software which is copyrighted by the +Free Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals of +preserving the free status of all derivatives of our free software and of +promoting the sharing and reuse of software generally. + +{\bf NO WARRANTY} + +{\bf 15.} BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE +THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR +IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO +THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY +PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR +CORRECTION. + +{\bf 16.} IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO +LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR +THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + +END OF TERMS AND CONDITIONS + +\section{How to Apply These Terms to Your New Libraries} +\label{SEC45} +\index[general]{Libraries!How to Apply These Terms to Your New } +\index[general]{How to Apply These Terms to Your New Libraries } + + +If you develop a new library, and you want it to be of the greatest possible +use to the public, we recommend making it free software that everyone can +redistribute and change. You can do so by permitting redistribution under +these terms (or, alternatively, under the terms of the ordinary General Public +License). + +To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + +\footnotesize +\begin{verbatim} +{\it one line to give the library's name and an idea of what it does.} +Copyright (C) {\it year} {\it name of author} +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 +USA +\end{verbatim} +\normalsize + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + +\footnotesize +\begin{verbatim} +Yoyodyne, Inc., hereby disclaims all copyright interest in +the library "Frob" (a library for tweaking knobs) written +by James Random Hacker. +{\it signature of Ty Coon}, 1 April 1990 +Ty Coon, President of Vice +\end{verbatim} +\normalsize + +That's all there is to it! +Return to +\elink{GNU's home page}{\url{http://www.gnu.org/home.html}}. + +FSF \& GNU inquiries \& questions to +\elink{gnu@gnu.org}{mailto:gnu@gnu.org}. Other +\elink{ways to contact}{\url{http://www.gnu.org/home.html\#ContactInfo}} the FSF. + +Comments on these web pages to +\elink{webmasters@www.gnu.org}{mailto:webmasters@www.gnu.org}, send other +questions to +\elink{gnu@gnu.org}{mailto:gnu@gnu.org}. + +Copyright notice above. +Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, +Boston, MA 02110-1301 USA +USA + +Updated: 27 Nov 2000 paulv diff --git a/docs/manuals/es/main/license.tex b/docs/manuals/es/main/license.tex new file mode 100644 index 00000000..d4b4ff44 --- /dev/null +++ b/docs/manuals/es/main/license.tex @@ -0,0 +1,113 @@ +%% +%% + +\chapter{Bacula Copyright, Trademark, and Licenses} +\label{LicenseChapter} +\index[general]{Licenses!Bacula Copyright Trademark} +\index[general]{Bacula Copyright, Trademark, and Licenses} + +There are a number of different licenses that are used in Bacula. +If you have a printed copy of this manual, the details of each of +the licenses referred to in this chapter can be found in the +online version of the manual at +\elink{http://www.bacula.org}{\url{http://www.bacula.org}}. + +\section{FDL} +\index[general]{FDL } + +The GNU Free Documentation License (FDL) is used for this manual, +which is a free and open license. This means that you may freely +reproduce it and even make changes to it. However, rather than +distribute your own version of this manual, we would much prefer +if you would send any corrections or changes to the Bacula project. + +The most recent version of the manual can always be found online +at \elink{http://www.bacula.org}{\url{http://www.bacula.org}}. + +\section{GPL} +\index[general]{GPL } + +The vast bulk of the source code is released under the +\ilink{GNU General Public License version 2.}{GplChapter}. + +Most of this code is copyrighted: Copyright \copyright 2000-2009 +Free Software Foundation Europe e.V. + +Portions may be copyrighted by other people. These files are released +under different licenses which are compatible with the Bacula GPLv2 license. + +\section{LGPL} +\index[general]{LGPL } + +Some of the Bacula library source code is released under the +\ilink{GNU Lesser General Public License.}{LesserChapter} This +permits third parties to use these parts of our code in their proprietary +programs to interface to Bacula. + +\section{Public Domain} +\index[general]{Domain!Public } +\index[general]{Public Domain } + +Some of the Bacula code, or code that Bacula references, has been released +to the public domain. E.g. md5.c, SQLite. + +\section{Trademark} +\index[general]{Trademark } + +Bacula\raisebox{.6ex}{\textsuperscript{\textregistered}} is a registered +trademark of Kern Sibbald. + +We have trademarked the Bacula name to ensure that any program using the +name Bacula will be exactly compatible with the program that we have +released. The use of the name Bacula is restricted to software systems +that agree exactly with the program presented here. If you have made +modifications to the Bacula source code that alter in any significant +way the way the program functions, you may not distribute it using the +Bacula name. + +\section{Fiduciary License Agreement} +\index[general]{Fiduciary License Agreement } +Developers who have contributed significant changes to the Bacula code +should have signed a Fiduciary License Agreement (FLA), which +guarantees them the right to use the code they have developed, and also +ensures that the Free Software Foundation Europe (and thus the Bacula +project) has the rights to the code. This Fiduciary License Agreement +is found on the Bacula web site at: + +\elink{http://www.bacula.org/en/FLA-bacula.en.pdf}{\url{http://www.bacula.org/en/FLA-bacula.en.pdf}} + +and if you are submitting code, you should fill it out then sent to: + +\begin{quote} + Kern Sibbald \\ + Cotes-de-Montmoiret 9 \\ + 1012 Lausanne \\ + Switzerland \\ +\end{quote} + +When you send in such a +complete document, please notify me: kern at sibbald dot com. + + +\section{Disclaimer} +\index[general]{Disclaimer } + +NO WARRANTY + +BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE +PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY +COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE +OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR +DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR +A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH +HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. diff --git a/docs/manuals/es/main/main.kilepr b/docs/manuals/es/main/main.kilepr new file mode 100644 index 00000000..7b053a4b --- /dev/null +++ b/docs/manuals/es/main/main.kilepr @@ -0,0 +1,358 @@ +[General] +img_extIsRegExp=false +img_extensions=.eps .jpg .jpeg .png .pdf .ps .fig .gif +kileprversion=2 +kileversion=2.0 +lastDocument=version.tex +masterDocument= +name=Concepts +pkg_extIsRegExp=false +pkg_extensions=.cls .sty +src_extIsRegExp=false +src_extensions=.tex .ltx .latex .dtx .ins + +[Tools] +MakeIndex= +QuickBuild= + +[item:ansi-labels.tex] +archive=true +column=0 +encoding= +highlight=LaTeX +line=1 +open=false +order=2 + +[item:autochangerres.tex] +archive=true +column=0 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:autochangers.tex] +archive=true +column=0 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:bootstrap.tex] +archive=true +column=0 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:bugs.tex] +archive=true +column=0 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:concepts.kilepr] +archive=true +column=134217831 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:concepts.tex] +archive=true +column=0 +encoding= +highlight=LaTeX +line=9 +open=false +order=1 + +[item:dataencryption.tex] +archive=true +column=0 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:disk.tex] +archive=true +column=0 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:dvd.tex] +archive=true +column=0 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:fdl.tex] +archive=true +column=0 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:general.tex] +archive=true +column=0 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:gpl.tex] +archive=true +column=0 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:lesser.tex] +archive=true +column=7864421 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:license.tex] +archive=true +column=0 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:migration.tex] +archive=true +column=2147483647 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:newfeatures.tex] +archive=true +column=12 +encoding=UTF-8 +highlight=LaTeX +line=341 +open=true +order=0 + +[item:pools.tex] +archive=true +column=2147483647 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:projects.tex] +archive=true +column=0 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:python.tex] +archive=true +column=0 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:recycling.tex] +archive=true +column=116 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:requirements.tex] +archive=true +column=7864421 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:rescue.tex] +archive=true +column=0 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:restore.tex] +archive=true +column=148292584 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:spooling.tex] +archive=true +column=121 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:state.tex] +archive=true +column=0 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:strategies.tex] +archive=true +column=0 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:stunnel.tex] +archive=true +column=0 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:supportedchangers.tex] +archive=true +column=147888641 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:supporteddrives.tex] +archive=true +column=0 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:supportedoses.tex] +archive=true +column=0 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:thanks.tex] +archive=true +column=0 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:tls.tex] +archive=true +column=25 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:tutorial.tex] +archive=true +column=0 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:vars.tex] +archive=true +column=147634280 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:verify.tex] +archive=true +column=0 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:version.tex] +archive=true +column=0 +encoding= +highlight=LaTeX +line=0 +open=true +order=1 + +[item:win32.tex] +archive=true +column=7864421 +encoding= +highlight= +line=0 +open=false +order=-1 diff --git a/docs/manuals/fr/concepts/concepts.tex b/docs/manuals/es/main/main.tex similarity index 56% rename from docs/manuals/fr/concepts/concepts.tex rename to docs/manuals/es/main/main.tex index c4f4b08c..884539e3 100644 --- a/docs/manuals/fr/concepts/concepts.tex +++ b/docs/manuals/es/main/main.tex @@ -6,7 +6,15 @@ %% # $ % & ~ _ ^ \ { } %% -\documentclass[11pt,a4paper]{book} +\documentclass[10pt,a4paper]{book} + +\topmargin -0.5in +\oddsidemargin 0.0in +\evensidemargin 0.0in +\textheight 10in +\textwidth 6.5in + + \usepackage{html} \usepackage{float} \usepackage{graphicx} @@ -16,9 +24,9 @@ \usepackage{index} \usepackage{setspace} \usepackage{hyperref} +% \usepackage[linkcolor=black,colorlinks=true]{hyperref} \usepackage{url} - \makeindex \newindex{dir}{ddx}{dnd}{Director Index} \newindex{fd}{fdx}{fnd}{File Daemon Index} @@ -31,68 +39,62 @@ \begin{document} \sloppy -\newfont{\bighead}{cmr17 at 36pt} -\parskip 10pt -\parindent 0pt - -\title{\includegraphics{./bacula-logo.eps} \\ \bigskip - \Huge{Bacula Concepts and Overview Guide} - \begin{center} - \large{It comes in the night and sucks - the essence from your computers. } - \end{center} -} - - -\author{Kern Sibbald} -\date{\vspace{1.0in}\today \\ - This manual documents Bacula version \input{version} \\ - \vspace{0.2in} - Copyright \copyright 1999-2007, Free Software Foundation Europe - e.V. \\ - \vspace{0.2in} - Permission is granted to copy, distribute and/or modify this document under the terms of the - GNU Free Documentation License, Version 1.2 published by the Free Software Foundation; - with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. - A copy of the license is included in the section entitled "GNU Free Documentation License". -} - -\maketitle +\include{coverpage} \clearpage \pagenumbering{roman} \tableofcontents \clearpage -\listoffigures -\clearpage -\listoftables -\clearpage -\markboth{Bacula Manual}{} +\pagestyle{myheadings} +\markboth{Bacula Version \version}{Bacula Version \version} \pagenumbering{arabic} \include{general} +\include{newfeatures} \include{state} \include{requirements} \include{supportedoses} \include{supporteddrives} + +\include{quickstart} % install +\include{install} % install +\include{critical} % install + \include{tutorial} + +\include{configure} % install +\include{dirdconf} % install +\include{filedconf} % install +\include{storedconf} % install +\include{messagesres} % install +\include{consoleconf} % install +\include{monitorconf} % install + \include{restore} \include{recycling} \include{disk} -\include{dvd} \include{pools} \include{migration} \include{strategies} \include{autochangers} \include{supportedchangers} \include{spooling} -\include{python} +\include{statistics} \include{ansi-labels} \include{win32} \include{rescue} \include{tls} \include{dataencryption} \include{verify} + +\include{mysql} % catalog +\include{postgresql} % catalog +\include{sqlite} % catalog +\include{catmaintenance} %catalog + +\include{tapetesting} % install +\include{security} % install + \include{bootstrap} \include{license} \include{fdl} @@ -101,8 +103,6 @@ \include{projects} \include{thanks} \include{bugs} -\include{vars} -\include{stunnel} % pull in the index \clearpage diff --git a/docs/manuals/es/main/messagesres.tex b/docs/manuals/es/main/messagesres.tex new file mode 100644 index 00000000..784602c7 --- /dev/null +++ b/docs/manuals/es/main/messagesres.tex @@ -0,0 +1,388 @@ +%% +%% + +\chapter{Messages Resource} +\label{MessagesChapter} +\index[general]{Resource!Messages} +\index[general]{Messages Resource} + +The Messages resource defines how messages are to be handled and destinations +to which they should be sent. + +Even though each daemon has a full message handler, within the File daemon and +the Storage daemon, you will normally choose to send all the appropriate +messages back to the Director. This permits all the messages associated with +a single Job to be combined in the Director and sent as a single email message +to the user, or logged together in a single file. + +Each message that Bacula generates (i.e. that each daemon generates) has an +associated type such as INFO, WARNING, ERROR, FATAL, etc. Using the message +resource, you can specify which message types you wish to see and where they +should be sent. In addition, a message may be sent to multiple destinations. +For example, you may want all error messages both logged as well as sent to +you in an email. By defining multiple messages resources, you can have +different message handling for each type of Job (e.g. Full backups versus +Incremental backups). + +In general, messages are attached to a Job and are included in the Job report. +There are some rare cases, where this is not possible, e.g. when no job is +running, or if a communications error occurs between a daemon and the +director. In those cases, the message may remain in the system, and should be +flushed at the end of the next Job. However, since such messages are not +attached to a Job, any that are mailed will be sent to {\bf +/usr/lib/sendmail}. On some systems, such as FreeBSD, if your sendmail is in a +different place, you may want to link it to the the above location. + +The records contained in a Messages resource consist of a {\bf destination} +specification followed by a list of {\bf message-types} in the format: + +\begin{description} + +\item [destination = message-type1, message-type2, message-type3, ... ] +\index[dir]{destination} +\end{description} + +or for those destinations that need and address specification (e.g. email): + +\begin{description} + +\item [destination = address = message-type1, message-type2, + message-type3, ... ] +\index[dir]{destination} + + Where {\bf destination} is one of a predefined set of keywords that define + where the message is to be sent ({\bf stdout}, {\bf file}, ...), {\bf + message-type} is one of a predefined set of keywords that define the type of + message generated by {\bf Bacula} ({\bf ERROR}, {\bf WARNING}, {\bf FATAL}, + ...), and {\bf address} varies according to the {\bf destination} keyword, but + is typically an email address or a filename. +\end{description} + +The following are the list of the possible record definitions that can be used +in a message resource. + +\begin{description} + +\item [Messages] +\index[dir]{Messages} + Start of the Messages records. + +\item [Name = \lt{}name\gt{}] +\index[dir]{Name} + The name of the Messages resource. The name you specify here will be used to + tie this Messages resource to a Job and/or to the daemon. + +\label{mailcommand} +\item [MailCommand = \lt{}command\gt{}] +\index[dir]{MailCommand} + In the absence of this resource, Bacula will send all mail using the + following command: + +{\bf mail -s "Bacula Message" \lt{}recipients\gt{}} + +In many cases, depending on your machine, this command may not work. +However, by using the {\bf MailCommand}, you can specify exactly how to +send the mail. During the processing of the {\bf command} part, normally +specified as a quoted string, the following substitutions will be used: + +\begin{itemize} +\item \%\% = \% +\item \%c = Client's name +\item \%d = Director's name +\item \%e = Job Exit code (OK, Error, ...) +\item \%i = Job Id +\item \%j = Unique Job name +\item \%l = Job level +\item \%n = Job name +\item \%r = Recipients +\item \%t = Job type (e.g. Backup, ...) +\end{itemize} + +Please note: any {\bf MailCommand} directive must be specified +in the {\bf Messages} resource {\bf before} the desired +{\bf Mail}, {\bf MailOnSuccess}, or {\bf MailOnError} +directive. In fact, each of those directives may be preceded by +a different {\bf MailCommand}. + +The following is the command I (Kern) use. Note, the whole command should +appear on a single line in the configuration file rather than split as is +done here for presentation: + +{\bf mailcommand = "/home/kern/bacula/bin/bsmtp -h mail.example.com -f +\textbackslash{}"\textbackslash{}(Bacula\textbackslash{}) +\%r\textbackslash{}" -s \textbackslash{}"Bacula: \%t \%e of \%c +\%l\textbackslash{}" \%r"} + +The {\bf bsmtp} program is provided as part of {\bf Bacula}. For +additional details, please see the +\ilink{ bsmtp -- Customizing Your Email Messages}{bsmtp} section of +the Bacula Utility Programs chapter of this manual. Please test any {\bf +mailcommand} that you use to ensure that your bsmtp gateway accepts the +addressing form that you use. Certain programs such as Exim can be very +selective as to what forms are permitted particularly in the from part. + +\item [OperatorCommand = \lt{}command\gt{}] +\index[fd]{OperatorCommand} + This resource specification is similar to the {\bf MailCommand} except that + it is used for Operator messages. The substitutions performed for the {\bf + MailCommand} are also done for this command. Normally, you will set this + command to the same value as specified for the {\bf MailCommand}. + The {\bf OperatorCommand} directive must appear in the {\bf Messages} + resource before the {\bf Operator} directive. + +\item [\lt{}destination\gt{} = \lt{}message-type1\gt{}, + \lt{}message-type2\gt{}, ...] + \index[fd]{\lt{}destination\gt{}} + +Where {\bf destination} may be one of the following: + +\begin{description} + +\item [stdout] + \index[fd]{stdout} + Send the message to standard output. + +\item [stderr] + \index[fd]{stderr} + Send the message to standard error. + +\item [console] + \index[console]{console} + Send the message to the console (Bacula Console). These messages are held +until the console program connects to the Director. +\end{description} + +\item {\bf \lt{}destination\gt{} = \lt{}address\gt{} = + \lt{}message-type1\gt{}, \lt{}message-type2\gt{}, ...} + \index[console]{\lt{}destination\gt{}} + +Where {\bf address} depends on the {\bf destination}. + +The {\bf destination} may be one of the following: + +\begin{description} + +\item [director] + \index[dir]{director} + \index[general]{director} + Send the message to the Director whose name is given in the {\bf address} + field. Note, in the current implementation, the Director Name is ignored, and + the message is sent to the Director that started the Job. + +\item [file] +\index[dir]{file} +\index[general]{file} + Send the message to the filename given in the {\bf address} field. If the + file already exists, it will be overwritten. + +\item [append] +\index[dir]{append} +\index[general]{append} + Append the message to the filename given in the {\bf address} field. If the + file already exists, it will be appended to. If the file does not exist, it + will be created. + +\item [syslog] +\index[general]{syslog} + Send the message to the system log (syslog) using the facility specified in + the {\bf address} field. Note, for the moment, the {\bf address} field is + ignored and the message is always sent to the LOG\_DAEMON facility with + level LOG\_ERR. See {\bf man 3 syslog} for more details. Example: + +\begin{verbatim} + syslog = all, !skipped +\end{verbatim} + + Although the {\bf syslog} destination is not used in the default Bacula + config files, in certain cases where Bacula encounters errors in trying + to deliver a message, as a last resort, it will send it to the system + {\bf syslog} to prevent loss of the message, so you might occassionally + check the {\bf syslog} for Bacula output (normally {\bf + /var/log/syslog}). + +\item [mail] + \index[general]{mail} + Send the message to the email addresses that are given as a comma + separated list in the {\bf address} field. Mail messages are grouped + together during a job and then sent as a single email message when the + job terminates. The advantage of this destination is that you are + notified about every Job that runs. However, if you backup five or ten + machines every night, the volume of email messages can be important. + Some users use filter programs such as {\bf procmail} to automatically + file this email based on the Job termination code (see {\bf + mailcommand}). + +\item [mail on error] + \index[general]{mail on error} + Send the message to the email addresses that are given as a comma + separated list in the {\bf address} field if the Job terminates with an + error condition. MailOnError messages are grouped together during a job + and then sent as a single email message when the job terminates. This + destination differs from the {\bf mail} destination in that if the Job + terminates normally, the message is totally discarded (for this + destination). If the Job terminates in error, it is emailed. By using + other destinations such as {\bf append} you can ensure that even if the + Job terminates normally, the output information is saved. + +\item [mail on success] + \index[general]{mail on success} + Send the message to the email addresses that are given as a comma + separated list in the {\bf address} field if the Job terminates + normally (no error condition). MailOnSuccess messages are grouped + together during a job and then sent as a single email message when the + job terminates. This destination differs from the {\bf mail} + destination in that if the Job terminates abnormally, the message is + totally discarded (for this destination). If the Job terminates + normally, it is emailed. + +\item [operator] + \index[general]{operator} + Send the message to the email addresses that are specified as a comma + separated list in the {\bf address} field. This is similar to {\bf + mail} above, except that each message is sent as received. Thus there + is one email per message. This is most useful for {\bf mount} messages + (see below). + +\item [console] + \index[general]{console} + Send the message to the Bacula console. + +\item [stdout] + \index[general]{stdout} + Send the message to the standard output (normally not used). + +\item [stderr] + \index[general]{stderr} + Send the message to the standard error output (normally not used). + +\item [catalog] + \index[general]{catalog} + Send the message to the Catalog database. The message will be + written to the table named {\bf Log} and a timestamp field will + also be added. This permits Job Reports and other messages to + be recorded in the Catalog so that they can be accessed by + reporting software. Bacula will prune the Log records associated + with a Job when the Job records are pruned. Otherwise, Bacula + never uses these records internally, so this destination is only + used for special purpose programs (e.g. {\bf bweb}). + +\end{description} + + For any destination, the {\bf message-type} field is a comma separated + list of the following types or classes of messages: + +\begin{description} + +\item [info] + \index[general]{info} + General information messages. + +\item [warning] + \index[general]{warning} + Warning messages. Generally this is some unusual condition but not expected + to be serious. + +\item [error] + \index[general]{error} + Non-fatal error messages. The job continues running. Any error message should + be investigated as it means that something went wrong. + +\item [fatal] + \index[general]{fatal} + Fatal error messages. Fatal errors cause the job to terminate. + +\item [terminate] + \index[general]{terminate} + Message generated when the daemon shuts down. + +\item [notsaved] + \index[fd]{notsaved} + \index[general]{notsaved} + Files not saved because of some error. Usually because the file cannot be + accessed (i.e. it does not exist or is not mounted). + +\item [skipped] + \index[fd]{skipped} + \index[general]{skipped} + Files that were skipped because of a user supplied option such as an + incremental backup or a file that matches an exclusion pattern. This is + not considered an error condition such as the files listed for the {\bf + notsaved} type because the configuration file explicitly requests these + types of files to be skipped. For example, any unchanged file during an + incremental backup, or any subdirectory if the no recursion option is + specified. + +\item [mount] + \index[dir]{mount} + \index[general]{mount} + Volume mount or intervention requests from the Storage daemon. These + requests require a specific operator intervention for the job to + continue. + +\item [restored] + \index[fd]{restored} + \index[general]{restored} + The {\bf ls} style listing generated for each file restored is sent to + this message class. + +\item [all] + \index[general]{all} + All message types. + +\item [security] + \index[general]{security} + Security info/warning messages principally from unauthorized + connection attempts. + +\item [alert] + \index[general]{alert} + Alert messages. These are messages generated by tape alerts. + +\item [volmgmt] + \index[general]{volmgmt} + Volume management messages. Currently there are no volume mangement + messages generated. +\end{description} + +\end{description} + +The following is an example of a valid Messages resource definition, where +all messages except files explicitly skipped or daemon termination messages +are sent by email to enforcement@sec.com. In addition all mount messages +are sent to the operator (i.e. emailed to enforcement@sec.com). Finally +all messages other than explicitly skipped files and files saved are sent +to the console: + +\footnotesize +\begin{verbatim} +Messages { + Name = Standard + mail = enforcement@sec.com = all, !skipped, !terminate + operator = enforcement@sec.com = mount + console = all, !skipped, !saved +} +\end{verbatim} +\normalsize + +With the exception of the email address (changed to avoid junk mail from +robot's), an example Director's Messages resource is as follows. Note, the {\bf +mailcommand} and {\bf operatorcommand} are on a single line -- they had to be +split for this manual: + +\footnotesize +\begin{verbatim} +Messages { + Name = Standard + mailcommand = "bacula/bin/bsmtp -h mail.example.com \ + -f \"\(Bacula\) %r\" -s \"Bacula: %t %e of %c %l\" %r" + operatorcommand = "bacula/bin/bsmtp -h mail.example.com \ + -f \"\(Bacula\) %r\" -s \"Bacula: Intervention needed \ + for %j\" %r" + MailOnError = security@example.com = all, !skipped, \ + !terminate + append = "bacula/bin/log" = all, !skipped, !terminate + operator = security@example.com = mount + console = all, !skipped, !saved +} +\end{verbatim} +\normalsize diff --git a/docs/manuals/fr/concepts/migration.tex b/docs/manuals/es/main/migration.tex similarity index 88% rename from docs/manuals/fr/concepts/migration.tex rename to docs/manuals/es/main/migration.tex index b0d49df2..25d139a2 100644 --- a/docs/manuals/fr/concepts/migration.tex +++ b/docs/manuals/es/main/migration.tex @@ -1,7 +1,8 @@ -\chapter{Migration} +\chapter{Migration and Copy} \label{MigrationChapter} \index[general]{Migration} +\index[general]{Copy} The term Migration, as used in the context of Bacula, means moving data from one Volume to another. In particular it refers to a Job (similar to a backup @@ -12,6 +13,17 @@ moves Bacula Job data from one Volume to another by reading the Job data from the Volume it is stored on, writing it to a different Volume in a different Pool, and then purging the database records for the first Job. +The Copy process is essentially identical to the Migration feature with the +exception that the Job that is copied is left unchanged. This essentially +creates two identical copies of the same backup. However, the copy is treated +as a copy rather than a backup job, and hence is not directly available for +restore. If bacula founds a copy when a job record is purged (deleted) from the +catalog, it will promote the copy as \textsl{real} backup and will make it +available for automatic restore. + +The Copy and the Migration jobs run without using the File daemon by copying +the data from the old backup Volume to a different Volume in a different Pool. + The section process for which Job or Jobs are migrated can be based on quite a number of different criteria such as: \begin{itemize} @@ -34,9 +46,9 @@ be migrated, with one exception noted below. In addition, the Pool to which the selected Job or Jobs will be migrated is defined by the {\bf Next Pool = ...} in the Pool resource specified for the Migration Job. -Bacula permits pools to contain Volumes with different Media Types. +Bacula permits Pools to contain Volumes with different Media Types. However, when doing migration, this is a very undesirable condition. For -migration to work properly, you should use pools containing only Volumes of +migration to work properly, you should use Pools containing only Volumes of the same Media Type for all migration jobs. The migration job normally is either manually started or starts @@ -72,7 +84,7 @@ a number of volumes for migration, you may have a large number of Jobs that start. Because each job must read the same Volume, they will run consecutively (not simultaneously). -\section{Migration Job Resource Directives} +\section{Migration and Copy Job Resource Directives} The following directives can appear in a Director's Job resource, and they are used to define a Migration job. @@ -80,20 +92,38 @@ are used to define a Migration job. \begin{description} \item [Pool = \lt{}Pool-name\gt{}] The Pool specified in the Migration control Job is not a new directive for the Job resource, but it is - particularly important because it determines what Pool will be examined for - finding JobIds to migrate. The exception to this is when {\bf Selection - Type = SQLQuery}, in which case no Pool is used, unless you - specifically include it in the SQL query. Note, the Pool resource - referenced must contain a {\bf Next Pool = ...} directive to define - the Pool to which the data will be migrated. + particularly important because it determines what Pool will be examined + for finding JobIds to migrate. The exception to this is when {\bf + Selection Type = SQLQuery}, and although a Pool directive must still be + specified, no Pool is used, unless you specifically include it in the + SQL query. Note, in any case, the Pool resource defined by the Pool + directove must contain a {\bf Next Pool = ...} directive to define the + Pool to which the data will be migrated. \item [Type = Migrate] {\bf Migrate} is a new type that defines the job that is run as being a Migration Job. A Migration Job is a sort of control job and does not have any Files associated with it, and in that sense they are more or less like - an Admin job. Migration jobs simply check to see if there is anything to + an Admin job. Migration jobs simply check to see if there is anything to Migrate then possibly start and control new Backup jobs to migrate the data - from the specified Pool to another Pool. + from the specified Pool to another Pool. Note, any original JobId that + is migrated will be marked as having been migrated, and the original + JobId can nolonger be used for restores; all restores will be done from + the new migrated Job. + + +\item [Type = Copy] + {\bf Copy} is a new type that defines the job that is run as being a + Copy Job. A Copy Job is a sort of control job and does not have + any Files associated with it, and in that sense they are more or less like + an Admin job. Copy jobs simply check to see if there is anything to + Copy then possibly start and control new Backup jobs to copy the data + from the specified Pool to another Pool. Note that when a copy is + made, the original JobIds are left unchanged. The new copies can not + be used for restoration unless you specifically choose them by JobId. + If you subsequently delete a JobId that has a copy, the copy will be + automatically upgraded to a Backup rather than a Copy, and it will + subsequently be used for restoration. \item [Selection Type = \lt{}Selection-type-keyword\gt{}] The \lt{}Selection-type-keyword\gt{} determines how the migration job @@ -172,6 +202,10 @@ database look at the time each JobId has been in the Pool since the job ended. All Jobs in the Pool longer than the time specified on {\bf Migration Time} directive in the Pool resource will be migrated. + + \item [PoolUncopiedJobs] This selection which copies all jobs from a pool + to an other pool which were not copied before is available only for copy Jobs. + \end{description} \item [Selection Pattern = \lt{}Quoted-string\gt{}] diff --git a/docs/manuals/fr/install/monitorconf.tex b/docs/manuals/es/main/monitorconf.tex similarity index 100% rename from docs/manuals/fr/install/monitorconf.tex rename to docs/manuals/es/main/monitorconf.tex diff --git a/docs/manuals/fr/concepts/mtx-changer.txt b/docs/manuals/es/main/mtx-changer.txt similarity index 100% rename from docs/manuals/fr/concepts/mtx-changer.txt rename to docs/manuals/es/main/mtx-changer.txt diff --git a/docs/manuals/fr/catalog/mysql.tex b/docs/manuals/es/main/mysql.tex similarity index 96% rename from docs/manuals/fr/catalog/mysql.tex rename to docs/manuals/es/main/mysql.tex index 75cc6f0e..fb937269 100644 --- a/docs/manuals/fr/catalog/mysql.tex +++ b/docs/manuals/es/main/mysql.tex @@ -39,15 +39,28 @@ mysql-server-.rpm mysql-devel-.rpm \end{verbatim} \normalsize + +If you wish to install them from debs, you will probably need the +following: + +\footnotesize +\begin{verbatim} +mysql-server-.deb +mysql-client-.deb +libmysqlclient15-dev-.deb +libmysqlclient15off-.deb +\end{verbatim} +\normalsize + The names of the packages may vary from distribution to -distribution. It is important to have the devel package loaded as +distribution. It is important to have the {\bf devel} or {\bf dev} package loaded as it contains the libraries and header files necessary to build Bacula. There may be additional packages that are required to install the above, for example, zlib and openssl. Once these packages are installed, you will be able to build Bacula (using the files installed with the mysql package, then run MySQL using the -files installed with mysql-server. If you have installed MySQL by rpms, +files installed with mysql-server. If you have installed MySQL by debs or rpms, please skip Phase I below, and return to complete the installation of Bacula, then come back to Phase II of the MySQL installation when indicated to do so. diff --git a/docs/manuals/es/main/newfeatures.tex b/docs/manuals/es/main/newfeatures.tex new file mode 100644 index 00000000..f2c0812b --- /dev/null +++ b/docs/manuals/es/main/newfeatures.tex @@ -0,0 +1,2032 @@ +%% + +%% + +\chapter{New Features in 3.1.4 (Development Version} +\label{NewFeaturesChapter} + +This chapter presents the new features that are currently under development +in the 3.1.x versions to be released as Bacula version 3.2.0 sometime in +late 2009 or early 2010. + +\section{Truncate volume after purge} +\label{sec:actiononpurge} + +The Pool directive \textbf{ActionOnPurge=Truncate} instructs Bacula to truncate +the volume when it is purged. It is useful to prevent disk based volumes from +consuming too much space. + +\begin{verbatim} +Pool { + Name = Default + Action On Purge = Truncate + ... +} +\end{verbatim} + +\section{Maximum Concurent Jobs for Devices} +\label{sec:maximumconcurentjobdevice} + +{\bf Maximum Concurrent Jobs} is a new Device directive in the Storage +Daemon configuration permits setting the maximum number of Jobs that can +run concurrently on a specified Device. Using this directive, it is +possible to have different Jobs using multiple drives, because when the +Maximum Concurrent Jobs limit is reached, the Storage Daemon will start new +Jobs on any other available compatible drive. This facilitates writing to +multiple drives with multiple Jobs that all use the same Pool. + +\section{Restore from Multiple Storage Daemons} +\index[general]{Restore} + +Previously, you were able to restore from multiple devices in a single Storage +Daemon. Now, Bacula is able to restore from multiple Storage Daemons. For +example, if your full backup runs on a Storage Daemon with an autochanger, and +your incremental jobs use another Storage Daemon with lots of disks, Bacula +will switch automatically from one Storage Daemon to an other within the same +Restore job. + +You must upgrade your File Daemon to version 3.1.3 or greater to use this +feature. + +This project was funded by Bacula Systems with the help of Equiinet. + +\section{File Deduplication using Base Jobs} +A base job is sort of like a Full save except that you will want the FileSet to +contain only files that are unlikely to change in the future (i.e. a snapshot +of most of your system after installing it). After the base job has been run, +when you are doing a Full save, you specify one or more Base jobs to be used. +All files that have been backed up in the Base job/jobs but not modified will +then be excluded from the backup. During a restore, the Base jobs will be +automatically pulled in where necessary. + +This is something none of the competition does, as far as we know (except +perhaps BackupPC, which is a Perl program that saves to disk only). It is big +win for the user, it makes Bacula stand out as offering a unique optimization +that immediately saves time and money. Basically, imagine that you have 100 +nearly identical Windows or Linux machine containing the OS and user files. +Now for the OS part, a Base job will be backed up once, and rather than making +100 copies of the OS, there will be only one. If one or more of the systems +have some files updated, no problem, they will be automatically restored. + +A new Job directive \texttt{Base=Jobx, Joby...} permits to specify the list of +files that will be used during Full backup as base. + +\begin{verbatim} +Job { + Name = BackupLinux + Level= Base + ... +} + +Job { + Name = BackupZog4 + Base = BackupZog4, BackupLinux + Accurate = yes + ... +} +\end{verbatim} + +In this example, the job \texttt{BackupZog4} will use the most recent version +of all files contained in \texttt{BackupZog4} and \texttt{BackupLinux} +jobs. Base jobs should have run with \texttt{level=Base} to be used. + +By default, Bacula will compare permissions bits, user and group fields, +modification time, size and the checksum of the file to choose between the +current backup and the BaseJob file list. You can change this behavior with the +\texttt{BaseJob} FileSet option. This option works like the \texttt{verify=} +one, that is described in the \ilink{FileSet}{FileSetResource} chapter. + +\begin{verbatim} +FileSet { + Name = Full + Include = { + Options { + BaseJob = pmugcs5 + Accurate = mcs5 + Verify = pin5 + } + File = / + } +} +\end{verbatim} + + +This project was funded by Bacula Systems. + +\section{AllowCompression = \lt{}yes\vb{}no\gt{}} +\index[dir]{AllowCompression} + +This new directive may be added to Storage resource within the Director's +configuration to allow users to selectively disable the client compression for +any job which writes to this storage resource. + +For example: +\begin{verbatim} +Storage { + Name = UltriumTape + Address = ultrium-tape + Password = storage_password # Password for Storage Daemon + Device = Ultrium + Media Type = LTO 3 + AllowCompression = No # Tape drive has hardware compression +} +\end{verbatim} +The above example would cause any jobs running with the UltriumTape storage +resource to run without compression from the client file daemons. This +effectively overrides any compression settings defined at the FileSet level. + +This feature is probably most useful if you have a tape drive which supports +hardware compression. By setting the \texttt{AllowCompression = No} directive +for your tape drive storage resource, you can avoid additional load on the file +daemon and possibly speed up tape backups. + +This project was funded by Collaborative Fusion, Inc. + +\section{Accurate Fileset Options} +\label{sec:accuratefileset} + +In previous versions, the accurate code used the file creation and modification +times to determine if a file was modified or not. Now you can specify which +attributes to use (time, size, checksum, permission, owner, group, \dots), +similar to the Verify options. + +\begin{verbatim} +FileSet { + Name = Full + Include = { + Options { + Accurate = mcs5 + Verify = pin5 + } + File = / + } +} +\end{verbatim} + +\begin{description} +\item {\bf i} + compare the inodes + +\item {\bf p} + compare the permission bits + +\item {\bf n} + compare the number of links + +\item {\bf u} + compare the user id + +\item {\bf g} + compare the group id + +\item {\bf s} + compare the size + +\item {\bf a} + compare the access time + +\item {\bf m} + compare the modification time (st\_mtime) + +\item {\bf c} + compare the change time (st\_ctime) + +\item {\bf d} + report file size decreases + +\item {\bf 5} + compare the MD5 signature + +\item {\bf 1} + compare the SHA1 signature +\end{description} + +\textbf{Important note:} If you decide to use checksum in Accurate jobs, +the File Daemon will have to read all files even if they normally would not +be saved. This increases the I/O load, but also the accuracy of the +deduplication. By default, Bacula will check modification/creation time +and size. + +\section{Tab-completion for Bconsole} +\label{sec:tabcompletion} + +If you build \texttt{bconsole} with readline support, you will be able to use +the new auto-completion mode. This mode supports all commands, gives help +inside command, and lists resources when required. It works also in the restore +mode. + +To use this feature, you should have readline development package loaded on +your system, and use the following option in configure. +\begin{verbatim} +./configure --with-readline=/usr/include/readline --disable-conio ... +\end{verbatim} + +The new bconsole won't be able to tab-complete with older directors. + +\section{Bvfs API} +\label{sec:bvfs} + +To help developers of restore GUI interfaces, we have added new \textsl{dot + commands} that permit browsing the catalog in a very simple way. + +\begin{itemize} +\item \texttt{.bvfs\_update [jobid=x,y,z]} This command is required to update + the Bvfs cache in the catalog. You need to run it before any access to the + Bvfs layer. + +\item \texttt{.bvfs\_lsdirs jobid=x,y,z path=/path | pathid=101} This command + will list all directories in the specified \texttt{path} or + \texttt{pathid}. Using \texttt{pathid} avoids problems with character + encoding of path/filenames. + +\item \texttt{.bvfs\_lsfiles jobid=x,y,z path=/path | pathid=101} This command + will list all files in the specified \texttt{path} or \texttt{pathid}. Using + \texttt{pathid} avoids problems with character encoding. +\end{itemize} + +You can use \texttt{limit=xxx} and \texttt{offset=yyy} to limit the amount of +data that will be displayed. + +\begin{verbatim} +* .bvfs_update jobid=1,2 +* .bvfs_update +* .bvfs_lsdir path=/ jobid=1,2 +\end{verbatim} + +\section{Testing your Tape Drive} +\label{sec:btapespeed} + +To determine the best configuration of your tape drive, you can run the new +\texttt{speed} command available in the \texttt{btape} program. + +This command can have the following arguments: +\begin{itemize} +\item[\texttt{file\_size=n}] Specify the Maximum File Size for this test + (between 1 and 5GB). This counter is in GB. +\item[\texttt{nb\_file=n}] Specify the number of file to be written. The amount + of data should be greater than your memory ($file\_size*nb\_file$). +\item[\texttt{skip\_zero}] This flag permits to skip tests with constant + data. +\item[\texttt{skip\_random}] This flag permits to skip tests with random + data. +\item[\texttt{skip\_raw}] This flag permits to skip tests with raw access. +\item[\texttt{skip\_block}] This flag permits to skip tests with Bacula block + access. +\end{itemize} + +\begin{verbatim} +*speed file_size=3 skip_raw +btape.c:1078 Test with zero data and bacula block structure. +btape.c:956 Begin writing 3 files of 3.221 GB with blocks of 129024 bytes. +++++++++++++++++++++++++++++++++++++++++++ +btape.c:604 Wrote 1 EOF to "Drive-0" (/dev/nst0) +btape.c:406 Volume bytes=3.221 GB. Write rate = 44.128 MB/s +... +btape.c:383 Total Volume bytes=9.664 GB. Total Write rate = 43.531 MB/s + +btape.c:1090 Test with random data, should give the minimum throughput. +btape.c:956 Begin writing 3 files of 3.221 GB with blocks of 129024 bytes. ++++++++++++++++++++++++++++++++++++++++++++ +btape.c:604 Wrote 1 EOF to "Drive-0" (/dev/nst0) +btape.c:406 Volume bytes=3.221 GB. Write rate = 7.271 MB/s ++++++++++++++++++++++++++++++++++++++++++++ +... +btape.c:383 Total Volume bytes=9.664 GB. Total Write rate = 7.365 MB/s + +\end{verbatim} + +When using compression, the random test will give your the minimum throughput +of your drive . The test using constant string will give you the maximum speed +of your hardware chain. (cpu, memory, scsi card, cable, drive, tape). + +You can change the block size in the Storage Daemon configuration file. + +\section{New {\bf Block Checksum} Device Directive} +You may now turn off the Block Checksum (CRC32) code +that Bacula uses when writing blocks to a Volume. This is +done by adding: + +\begin{verbatim} +Block Checksum = no +\end{verbatim} + +doing so can reduce the Storage daemon CPU usage slightly. It +will also permit Bacula to read a Volume that has corrupted data. + +The default is {\bf yes} -- i.e. the checksum is computed on write +and checked on read. + +We do not recommend to turn this off particularly on older tape +drives or for disk Volumes where doing so may allow corrupted data +to go undetected. + +\section{New Bat Features} + +\subsection{Media List View} + +By clicking on ``Media'', you can see the list of all your volumes. You will be +able to filter by Pool, Media Type, Location,\dots And sort the result directly +in the table. The old ``Media'' view is now known as ``Pool''. +\begin{figure}[htbp] + \centering + \includegraphics[width=13cm]{\idir bat-mediaview.eps} + \label{fig:mediaview} +\end{figure} + + +\subsection{Media Information View} + +By double-clicking on a volume (on the Media list, in the Autochanger content +or in the Job information panel), you can access a detailed overview of your +Volume. (cf \ref{fig:mediainfo}.) +\begin{figure}[htbp] + \centering + \includegraphics[width=13cm]{\idir bat11.eps} + \caption{Media information} + \label{fig:mediainfo} +\end{figure} + +\subsection{Job Information View} + +By double-clicking on a Job record (on the Job run list or in the Media +information panel), you can access a detailed overview of your Job. (cf +\ref{fig:jobinfo}.) +\begin{figure}[htbp] + \centering + \includegraphics[width=13cm]{\idir bat12.eps} + \caption{Job information} + \label{fig:jobinfo} +\end{figure} + +\subsection{Autochanger Content View} + +By double-clicking on a Storage record (on the Storage list panel), you can +access a detailed overview of your Autochanger. (cf \ref{fig:jobinfo}.) +\begin{figure}[htbp] + \centering + \includegraphics[width=13cm]{\idir bat13.eps} + \caption{Autochanger content} + \label{fig:achcontent} +\end{figure} + +\section{Console Timeout Option} +You can now use the -u option of bconsole to set a timeout for each command. + +\chapter{New Features in Released Version 3.0.2} + +This chapter presents the new features added to the +Released Bacula Version 3.0.2. + +\section{Full Restore from a Given JobId} +\index[general]{Restore menu} + +This feature allows selecting a single JobId and having Bacula +automatically select all the other jobs that comprise a full backup up to +and including the selected date (through JobId). + +Assume we start with the following jobs: +\begin{verbatim} ++-------+--------------+---------------------+-------+----------+------------+ +| jobid | client | starttime | level | jobfiles | jobbytes | ++-------+--------------+---------------------+-------+----------+------------ +| 6 | localhost-fd | 2009-07-15 11:45:49 | I | 2 | 0 | +| 5 | localhost-fd | 2009-07-15 11:45:45 | I | 15 | 44143 | +| 3 | localhost-fd | 2009-07-15 11:45:38 | I | 1 | 10 | +| 1 | localhost-fd | 2009-07-15 11:45:30 | F | 1527 | 44143073 | ++-------+--------------+---------------------+-------+----------+------------+ +\end{verbatim} + +Below is an example of this new feature (which is number 12 in the +menu). + +\begin{verbatim} +* restore +To select the JobIds, you have the following choices: + 1: List last 20 Jobs run + 2: List Jobs where a given File is saved +... + 12: Select full restore to a specified Job date + 13: Cancel + +Select item: (1-13): 12 +Enter JobId to get the state to restore: 5 +Selecting jobs to build the Full state at 2009-07-15 11:45:45 +You have selected the following JobIds: 1,3,5 + +Building directory tree for JobId(s) 1,3,5 ... +++++++++++++++++++ +1,444 files inserted into the tree. +\end{verbatim} + +This project was funded by Bacula Systems. + +\section{Source Address} +\index[general]{Source Address} + +A feature has been added which allows the administrator to specify the address +from which the Director and File daemons will establish connections. This +may be used to simplify system configuration overhead when working in complex +networks utilizing multi-homing and policy-routing. + +To accomplish this, two new configuration directives have been implemented: +\begin{verbatim} +FileDaemon { + FDSourceAddress=10.0.1.20 # Always initiate connections from this address +} + +Director { + DirSourceAddress=10.0.1.10 # Always initiate connections from this address +} +\end{verbatim} + +Simply adding specific host routes on the OS +would have an undesirable side-effect: any +application trying to contact the destination host would be forced to use the +more specific route possibly diverting management traffic onto a backup VLAN. +Instead of adding host routes for each client connected to a multi-homed backup +server (for example where there are management and backup VLANs), one can +use the new directives to specify a specific source address at the application +level. + +Additionally, this allows the simplification and abstraction of firewall rules +when dealing with a Hot-Standby director or storage daemon configuration. The +Hot-standby pair may share a CARP address, which connections must be sourced +from, while system services listen and act from the unique interface addresses. + +This project was funded by Collaborative Fusion, Inc. + +\section{Show volume availability when doing restore} + +When doing a restore the selection dialog ends by displaying this +screen: + +\begin{verbatim} + The job will require the following + Volume(s) Storage(s) SD Device(s) + =========================================================================== + *000741L3 LTO-4 LTO3 + *000866L3 LTO-4 LTO3 + *000765L3 LTO-4 LTO3 + *000764L3 LTO-4 LTO3 + *000756L3 LTO-4 LTO3 + *001759L3 LTO-4 LTO3 + *001763L3 LTO-4 LTO3 + 001762L3 LTO-4 LTO3 + 001767L3 LTO-4 LTO3 + +Volumes marked with ``*'' are online (in the autochanger). +\end{verbatim} + +This should help speed up large restores by minimizing the time spent +waiting for the operator to discover that he must change tapes in the library. + +This project was funded by Bacula Systems. + +\section{Accurate estimate command} + +The \texttt{estimate} command can now use the accurate code to detect changes +and give a better estimation. + +You can set the accurate behavior on the command line by using +\texttt{accurate=yes\vb{}no} or use the Job setting as default value. + +\begin{verbatim} +* estimate listing accurate=yes level=incremental job=BackupJob +\end{verbatim} + +This project was funded by Bacula Systems. + +\chapter{New Features in 3.0.0} +\label{NewFeaturesChapter} +\index[general]{New Features} + +This chapter presents the new features added to the development 2.5.x +versions to be released as Bacula version 3.0.0 sometime in April 2009. + +\section{Accurate Backup} +\index[general]{Accurate Backup} + +As with most other backup programs, by default Bacula decides what files to +backup for Incremental and Differental backup by comparing the change +(st\_ctime) and modification (st\_mtime) times of the file to the time the last +backup completed. If one of those two times is later than the last backup +time, then the file will be backed up. This does not, however, permit tracking +what files have been deleted and will miss any file with an old time that may +have been restored to or moved onto the client filesystem. + +\subsection{Accurate = \lt{}yes\vb{}no\gt{}} +If the {\bf Accurate = \lt{}yes\vb{}no\gt{}} directive is enabled (default no) in +the Job resource, the job will be run as an Accurate Job. For a {\bf Full} +backup, there is no difference, but for {\bf Differential} and {\bf + Incremental} backups, the Director will send a list of all previous files +backed up, and the File daemon will use that list to determine if any new files +have been added or or moved and if any files have been deleted. This allows +Bacula to make an accurate backup of your system to that point in time so that +if you do a restore, it will restore your system exactly. + +One note of caution +about using Accurate backup is that it requires more resources (CPU and memory) +on both the Director and the Client machines to create the list of previous +files backed up, to send that list to the File daemon, for the File daemon to +keep the list (possibly very big) in memory, and for the File daemon to do +comparisons between every file in the FileSet and the list. In particular, +if your client has lots of files (more than a few million), you will need +lots of memory on the client machine. + +Accurate must not be enabled when backing up with a plugin that is not +specially designed to work with Accurate. If you enable it, your restores +will probably not work correctly. + +This project was funded by Bacula Systems. + + + +\section{Copy Jobs} +\index[general]{Copy Jobs} + +A new {\bf Copy} job type 'C' has been implemented. It is similar to the +existing Migration feature with the exception that the Job that is copied is +left unchanged. This essentially creates two identical copies of the same +backup. However, the copy is treated as a copy rather than a backup job, and +hence is not directly available for restore. The {\bf restore} command lists +copy jobs and allows selection of copies by using \texttt{jobid=} +option. If the keyword {\bf copies} is present on the command line, Bacula will +display the list of all copies for selected jobs. + +\begin{verbatim} +* restore copies +[...] +These JobIds have copies as follows: ++-------+------------------------------------+-----------+------------------+ +| JobId | Job | CopyJobId | MediaType | ++-------+------------------------------------+-----------+------------------+ +| 2 | CopyJobSave.2009-02-17_16.31.00.11 | 7 | DiskChangerMedia | ++-------+------------------------------------+-----------+------------------+ ++-------+-------+----------+----------+---------------------+------------------+ +| JobId | Level | JobFiles | JobBytes | StartTime | VolumeName | ++-------+-------+----------+----------+---------------------+------------------+ +| 19 | F | 6274 | 76565018 | 2009-02-17 16:30:45 | ChangerVolume002 | +| 2 | I | 1 | 5 | 2009-02-17 16:30:51 | FileVolume001 | ++-------+-------+----------+----------+---------------------+------------------+ +You have selected the following JobIds: 19,2 + +Building directory tree for JobId(s) 19,2 ... ++++++++++++++++++++++++++++++++++++++++++++ +5,611 files inserted into the tree. +... +\end{verbatim} + + +The Copy Job runs without using the File daemon by copying the data from the +old backup Volume to a different Volume in a different Pool. See the Migration +documentation for additional details. For copy Jobs there is a new selection +directive named {\bf PoolUncopiedJobs} which selects all Jobs that were +not already copied to another Pool. + +As with Migration, the Client, Volume, Job, or SQL query, are +other possible ways of selecting the Jobs to be copied. Selection +types like SmallestVolume, OldestVolume, PoolOccupancy and PoolTime also +work, but are probably more suited for Migration Jobs. + +If Bacula finds a Copy of a job record that is purged (deleted) from the catalog, +it will promote the Copy to a \textsl{real} backup job and will make it available for +automatic restore. If more than one Copy is available, it will promote the copy +with the smallest JobId. + +A nice solution which can be built with the new Copy feature is often +called disk-to-disk-to-tape backup (DTDTT). A sample config could +look something like the one below: + +\begin{verbatim} +Pool { + Name = FullBackupsVirtualPool + Pool Type = Backup + Purge Oldest Volume = Yes + Storage = vtl + NextPool = FullBackupsTapePool +} + +Pool { + Name = FullBackupsTapePool + Pool Type = Backup + Recycle = Yes + AutoPrune = Yes + Volume Retention = 365 days + Storage = superloader +} + +# +# Fake fileset for copy jobs +# +Fileset { + Name = None + Include { + Options { + signature = MD5 + } + } +} + +# +# Fake client for copy jobs +# +Client { + Name = None + Address = localhost + Password = "NoNe" + Catalog = MyCatalog +} + +# +# Default template for a CopyDiskToTape Job +# +JobDefs { + Name = CopyDiskToTape + Type = Copy + Messages = StandardCopy + Client = None + FileSet = None + Selection Type = PoolUncopiedJobs + Maximum Concurrent Jobs = 10 + SpoolData = No + Allow Duplicate Jobs = Yes + Allow Higher Duplicates = No + Cancel Queued Duplicates = No + Cancel Running Duplicates = No + Priority = 13 +} + +Schedule { + Name = DaySchedule7:00 + Run = Level=Full daily at 7:00 +} + +Job { + Name = CopyDiskToTapeFullBackups + Enabled = Yes + Schedule = DaySchedule7:00 + Pool = FullBackupsVirtualPool + JobDefs = CopyDiskToTape +} +\end{verbatim} + +The example above had 2 pool which are copied using the PoolUncopiedJobs +selection criteria. Normal Full backups go to the Virtual pool and are copied +to the Tape pool the next morning. + +The command \texttt{list copies [jobid=x,y,z]} lists copies for a given +\textbf{jobid}. + +\begin{verbatim} +*list copies ++-------+------------------------------------+-----------+------------------+ +| JobId | Job | CopyJobId | MediaType | ++-------+------------------------------------+-----------+------------------+ +| 9 | CopyJobSave.2008-12-20_22.26.49.05 | 11 | DiskChangerMedia | ++-------+------------------------------------+-----------+------------------+ +\end{verbatim} + +\section{ACL Updates} +\index[general]{ACL Updates} +The whole ACL code had been overhauled and in this version each platforms has +different streams for each type of acl available on such an platform. As ACLs +between platforms tend to be not that portable (most implement POSIX acls but +some use an other draft or a completely different format) we currently only +allow certain platform specific ACL streams to be decoded and restored on the +same platform that they were created on. The old code allowed to restore ACL +cross platform but the comments already mention that not being to wise. For +backward compatability the new code will accept the two old ACL streams and +handle those with the platform specific handler. But for all new backups it +will save the ACLs using the new streams. + +Currently the following platforms support ACLs: + +\begin{itemize} + \item {\bf AIX} + \item {\bf Darwin/OSX} + \item {\bf FreeBSD} + \item {\bf HPUX} + \item {\bf IRIX} + \item {\bf Linux} + \item {\bf Tru64} + \item {\bf Solaris} +\end{itemize} + +Currently we support the following ACL types (these ACL streams use a reserved +part of the stream numbers): + +\begin{itemize} +\item {\bf STREAM\_ACL\_AIX\_TEXT} 1000 AIX specific string representation from + acl\_get + \item {\bf STREAM\_ACL\_DARWIN\_ACCESS\_ACL} 1001 Darwin (OSX) specific acl\_t + string representation from acl\_to\_text (POSIX acl) + \item {\bf STREAM\_ACL\_FREEBSD\_DEFAULT\_ACL} 1002 FreeBSD specific acl\_t + string representation from acl\_to\_text (POSIX acl) for default acls. + \item {\bf STREAM\_ACL\_FREEBSD\_ACCESS\_ACL} 1003 FreeBSD specific acl\_t + string representation from acl\_to\_text (POSIX acl) for access acls. + \item {\bf STREAM\_ACL\_HPUX\_ACL\_ENTRY} 1004 HPUX specific acl\_entry + string representation from acltostr (POSIX acl) + \item {\bf STREAM\_ACL\_IRIX\_DEFAULT\_ACL} 1005 IRIX specific acl\_t string + representation from acl\_to\_text (POSIX acl) for default acls. + \item {\bf STREAM\_ACL\_IRIX\_ACCESS\_ACL} 1006 IRIX specific acl\_t string + representation from acl\_to\_text (POSIX acl) for access acls. + \item {\bf STREAM\_ACL\_LINUX\_DEFAULT\_ACL} 1007 Linux specific acl\_t + string representation from acl\_to\_text (POSIX acl) for default acls. + \item {\bf STREAM\_ACL\_LINUX\_ACCESS\_ACL} 1008 Linux specific acl\_t string + representation from acl\_to\_text (POSIX acl) for access acls. + \item {\bf STREAM\_ACL\_TRU64\_DEFAULT\_ACL} 1009 Tru64 specific acl\_t + string representation from acl\_to\_text (POSIX acl) for default acls. + \item {\bf STREAM\_ACL\_TRU64\_DEFAULT\_DIR\_ACL} 1010 Tru64 specific acl\_t + string representation from acl\_to\_text (POSIX acl) for default acls. + \item {\bf STREAM\_ACL\_TRU64\_ACCESS\_ACL} 1011 Tru64 specific acl\_t string + representation from acl\_to\_text (POSIX acl) for access acls. + \item {\bf STREAM\_ACL\_SOLARIS\_ACLENT} 1012 Solaris specific aclent\_t + string representation from acltotext or acl\_totext (POSIX acl) + \item {\bf STREAM\_ACL\_SOLARIS\_ACE} 1013 Solaris specific ace\_t string + representation from from acl\_totext (NFSv4 or ZFS acl) +\end{itemize} + +In future versions we might support conversion functions from one type of acl +into an other for types that are either the same or easily convertable. For now +the streams are seperate and restoring them on a platform that doesn't +recognize them will give you a warning. + +\section{Extended Attributes} +\index[general]{Extended Attributes} +Something that was on the project list for some time is now implemented for +platforms that support a similar kind of interface. Its the support for backup +and restore of so called extended attributes. As extended attributes are so +platform specific these attributes are saved in seperate streams for each +platform. Restores of the extended attributes can only be performed on the +same platform the backup was done. There is support for all types of extended +attributes, but restoring from one type of filesystem onto an other type of +filesystem on the same platform may lead to supprises. As extended attributes +can contain any type of data they are stored as a series of so called +value-pairs. This data must be seen as mostly binary and is stored as such. +As security labels from selinux are also extended attributes this option also +stores those labels and no specific code is enabled for handling selinux +security labels. + +Currently the following platforms support extended attributes: +\begin{itemize} + \item {\bf Darwin/OSX} + \item {\bf FreeBSD} + \item {\bf Linux} + \item {\bf NetBSD} +\end{itemize} + +On linux acls are also extended attributes, as such when you enable ACLs on a +Linux platform it will NOT save the same data twice e.g. it will save the ACLs +and not the same exteneded attribute. + +To enable the backup of extended attributes please add the following to your +fileset definition. +\begin{verbatim} + FileSet { + Name = "MyFileSet" + Include { + Options { + signature = MD5 + xattrsupport = yes + } + File = ... + } + } +\end{verbatim} + +\section{Shared objects} +\index[general]{Shared objects} +A default build of Bacula will now create the libraries as shared objects +(.so) rather than static libraries as was previously the case. +The shared libraries are built using {\bf libtool} so it should be quite +portable. + +An important advantage of using shared objects is that on a machine with the +Directory, File daemon, the Storage daemon, and a console, you will have only +one copy of the code in memory rather than four copies. Also the total size of +the binary release is smaller since the library code appears only once rather +than once for every program that uses it; this results in significant reduction +in the size of the binaries particularly for the utility tools. + +In order for the system loader to find the shared objects when loading the +Bacula binaries, the Bacula shared objects must either be in a shared object +directory known to the loader (typically /usr/lib) or they must be in the +directory that may be specified on the {\bf ./configure} line using the {\bf + {-}{-}libdir} option as: + +\begin{verbatim} + ./configure --libdir=/full-path/dir +\end{verbatim} + +the default is /usr/lib. If {-}{-}libdir is specified, there should be +no need to modify your loader configuration provided that +the shared objects are installed in that directory (Bacula +does this with the make install command). The shared objects +that Bacula references are: + +\begin{verbatim} +libbaccfg.so +libbacfind.so +libbacpy.so +libbac.so +\end{verbatim} + +These files are symbolically linked to the real shared object file, +which has a version number to permit running multiple versions of +the libraries if desired (not normally the case). + +If you have problems with libtool or you wish to use the old +way of building static libraries, or you want to build a static +version of Bacula you may disable +libtool on the configure command line with: + +\begin{verbatim} + ./configure --disable-libtool +\end{verbatim} + + +\section{Building Static versions of Bacula} +\index[general]{Static linking} +In order to build static versions of Bacula, in addition +to configuration options that were needed you now must +also add --disable-libtool. Example + +\begin{verbatim} + ./configure --enable-static-client-only --disable-libtool +\end{verbatim} + + +\section{Virtual Backup (Vbackup)} +\index[general]{Virtual Backup} +\index[general]{Vbackup} + +Bacula's virtual backup feature is often called Synthetic Backup or +Consolidation in other backup products. It permits you to consolidate the +previous Full backup plus the most recent Differential backup and any +subsequent Incremental backups into a new Full backup. This new Full +backup will then be considered as the most recent Full for any future +Incremental or Differential backups. The VirtualFull backup is +accomplished without contacting the client by reading the previous backup +data and writing it to a volume in a different pool. + +In some respects the Vbackup feature works similar to a Migration job, in +that Bacula normally reads the data from the pool specified in the +Job resource, and writes it to the {\bf Next Pool} specified in the +Job resource. Note, this means that usually the output from the Virtual +Backup is written into a different pool from where your prior backups +are saved. Doing it this way guarantees that you will not get a deadlock +situation attempting to read and write to the same volume in the Storage +daemon. If you then want to do subsequent backups, you may need to +move the Virtual Full Volume back to your normal backup pool. +Alternatively, you can set your {\bf Next Pool} to point to the current +pool. This will cause Bacula to read and write to Volumes in the +current pool. In general, this will work, because Bacula will +not allow reading and writing on the same Volume. In any case, once +a VirtualFull has been created, and a restore is done involving the +most current Full, it will read the Volume or Volumes by the VirtualFull +regardless of in which Pool the Volume is found. + +The Vbackup is enabled on a Job by Job in the Job resource by specifying +a level of {\bf VirtualFull}. + +A typical Job resource definition might look like the following: + +\begin{verbatim} +Job { + Name = "MyBackup" + Type = Backup + Client=localhost-fd + FileSet = "Full Set" + Storage = File + Messages = Standard + Pool = Default + SpoolData = yes +} + +# Default pool definition +Pool { + Name = Default + Pool Type = Backup + Recycle = yes # Automatically recycle Volumes + AutoPrune = yes # Prune expired volumes + Volume Retention = 365d # one year + NextPool = Full + Storage = File +} + +Pool { + Name = Full + Pool Type = Backup + Recycle = yes # Automatically recycle Volumes + AutoPrune = yes # Prune expired volumes + Volume Retention = 365d # one year + Storage = DiskChanger +} + +# Definition of file storage device +Storage { + Name = File + Address = localhost + Password = "xxx" + Device = FileStorage + Media Type = File + Maximum Concurrent Jobs = 5 +} + +# Definition of DDS Virtual tape disk storage device +Storage { + Name = DiskChanger + Address = localhost # N.B. Use a fully qualified name here + Password = "yyy" + Device = DiskChanger + Media Type = DiskChangerMedia + Maximum Concurrent Jobs = 4 + Autochanger = yes +} +\end{verbatim} + +Then in bconsole or via a Run schedule, you would run the job as: + +\begin{verbatim} +run job=MyBackup level=Full +run job=MyBackup level=Incremental +run job=MyBackup level=Differential +run job=MyBackup level=Incremental +run job=MyBackup level=Incremental +\end{verbatim} + +So providing there were changes between each of those jobs, you would end up +with a Full backup, a Differential, which includes the first Incremental +backup, then two Incremental backups. All the above jobs would be written to +the {\bf Default} pool. + +To consolidate those backups into a new Full backup, you would run the +following: + +\begin{verbatim} +run job=MyBackup level=VirtualFull +\end{verbatim} + +And it would produce a new Full backup without using the client, and the output +would be written to the {\bf Full} Pool which uses the Diskchanger Storage. + +If the Virtual Full is run, and there are no prior Jobs, the Virtual Full will +fail with an error. + +Note, the Start and End time of the Virtual Full backup is set to the +values for the last job included in the Virtual Full (in the above example, +it is an Increment). This is so that if another incremental is done, which +will be based on the Virtual Full, it will backup all files from the +last Job included in the Virtual Full rather than from the time the Virtual +Full was actually run. + + + +\section{Catalog Format} +\index[general]{Catalog Format} +Bacula 3.0 comes with some changes to the catalog format. The upgrade +operation will convert the FileId field of the File table from 32 bits (max 4 +billion table entries) to 64 bits (very large number of items). The +conversion process can take a bit of time and will likely DOUBLE THE SIZE of +your catalog during the conversion. Also you won't be able to run jobs during +this conversion period. For example, a 3 million file catalog will take 2 +minutes to upgrade on a normal machine. Please don't forget to make a valid +backup of your database before executing the upgrade script. See the +ReleaseNotes for additional details. + +\section{64 bit Windows Client} +\index[general]{Win64 Client} +Unfortunately, Microsoft's implementation of Volume Shadown Copy (VSS) on +their 64 bit OS versions is not compatible with a 32 bit Bacula Client. +As a consequence, we are also releasing a 64 bit version of the Bacula +Windows Client (win64bacula-3.0.0.exe) that does work with VSS. +These binaries should only be installed on 64 bit Windows operating systems. +What is important is not your hardware but whether or not you have +a 64 bit version of the Windows OS. + +Compared to the Win32 Bacula Client, the 64 bit release contains a few differences: +\begin{enumerate} +\item Before installing the Win64 Bacula Client, you must totally + deinstall any prior 2.4.x Client installation using the + Bacula deinstallation (see the menu item). You may want + to save your .conf files first. +\item Only the Client (File daemon) is ported to Win64, the Director + and the Storage daemon are not in the 64 bit Windows installer. +\item bwx-console is not yet ported. +\item bconsole is ported but it has not been tested. +\item The documentation is not included in the installer. +\item Due to Vista security restrictions imposed on a default installation + of Vista, before upgrading the Client, you must manually stop + any prior version of Bacula from running, otherwise the install + will fail. +\item Due to Vista security restrictions imposed on a default installation + of Vista, attempting to edit the conf files via the menu items + will fail. You must directly edit the files with appropriate + permissions. Generally double clicking on the appropriate .conf + file will work providing you have sufficient permissions. +\item All Bacula files are now installed in + {\bf C:/Program Files/Bacula} except the main menu items, + which are installed as before. This vastly simplifies the installation. +\item If you are running on a foreign language version of Windows, most + likely {\bf C:/Program Files} does not exist, so you should use the + Custom installation and enter an appropriate location to install + the files. +\item The 3.0.0 Win32 Client continues to install files in the locations used + by prior versions. For the next version we will convert it to use + the same installation conventions as the Win64 version. +\end{enumerate} + +This project was funded by Bacula Systems. + + +\section{Duplicate Job Control} +\index[general]{Duplicate Jobs} +The new version of Bacula provides four new directives that +give additional control over what Bacula does if duplicate jobs +are started. A duplicate job in the sense we use it here means +a second or subsequent job with the same name starts. This +happens most frequently when the first job runs longer than expected because no +tapes are available. + +The four directives each take as an argument a {\bf yes} or {\bf no} value and +are specified in the Job resource. + +They are: + +\subsection{Allow Duplicate Jobs = \lt{}yes\vb{}no\gt{}} +\index[general]{Allow Duplicate Jobs} + If this directive is enabled duplicate jobs will be run. If + the directive is set to {\bf no} (default) then only one job of a given name + may run at one time, and the action that Bacula takes to ensure only + one job runs is determined by the other directives (see below). + + If {\bf Allow Duplicate Jobs} is set to {\bf no} and two jobs + are present and none of the three directives given below permit + cancelling a job, then the current job (the second one started) + will be cancelled. + + +\subsection{Allow Higher Duplicates = \lt{}yes\vb{}no\gt{}} +\index[general]{Allow Higher Duplicates} + If this directive is set to {\bf yes} (default) the job with a higher + priority (lower priority number) will be permitted to run, and + the current job will be cancelled. If the + priorities of the two jobs are the same, the outcome is determined by + other directives (see below). + +\subsection{Cancel Queued Duplicates = \lt{}yes\vb{}no\gt{}} +\index[general]{Cancel Queued Duplicates} + If {\bf Allow Duplicate Jobs} is set to {\bf no} and + if this directive is set to {\bf yes} any job that is + already queued to run but not yet running will be canceled. + The default is {\bf no}. + +\subsection{Cancel Running Duplicates = \lt{}yes\vb{}no\gt{}} +\index[general]{Cancel Running Duplicates} + If {\bf Allow Duplicate Jobs} is set to {\bf no} and + if this directive is set to {\bf yes} any job that is already running + will be canceled. The default is {\bf no}. + + +\section{TLS Authentication} +\index[general]{TLS Authentication} +In Bacula version 2.5.x and later, in addition to the normal Bacula +CRAM-MD5 authentication that is used to authenticate each Bacula +connection, you can specify that you want TLS Authentication as well, +which will provide more secure authentication. + +This new feature uses Bacula's existing TLS code (normally used for +communications encryption) to do authentication. To use it, you must +specify all the TLS directives normally used to enable communications +encryption (TLS Enable, TLS Verify Peer, TLS Certificate, ...) and +a new directive: + +\subsection{TLS Authenticate = yes} +\begin{verbatim} +TLS Authenticate = yes +\end{verbatim} + +in the main daemon configuration resource (Director for the Director, +Client for the File daemon, and Storage for the Storage daemon). + +When {\bf TLS Authenticate} is enabled, after doing the CRAM-MD5 +authentication, Bacula will also do TLS authentication, then TLS +encryption will be turned off, and the rest of the communication between +the two Bacula daemons will be done without encryption. + +If you want to encrypt communications data, use the normal TLS directives +but do not turn on {\bf TLS Authenticate}. + +\section{bextract non-portable Win32 data} +\index[general]{bextract handles Win32 non-portable data} +{\bf bextract} has been enhanced to be able to restore +non-portable Win32 data to any OS. Previous versions were +unable to restore non-portable Win32 data to machines that +did not have the Win32 BackupRead and BackupWrite API calls. + +\section{State File updated at Job Termination} +\index[general]{State File} +In previous versions of Bacula, the state file, which provides a +summary of previous jobs run in the {\bf status} command output was +updated only when Bacula terminated, thus if the daemon crashed, the +state file might not contain all the run data. This version of +the Bacula daemons updates the state file on each job termination. + +\section{MaxFullInterval = \lt{}time-interval\gt{}} +\index[general]{MaxFullInterval} +The new Job resource directive {\bf Max Full Interval = \lt{}time-interval\gt{}} +can be used to specify the maximum time interval between {\bf Full} backup +jobs. When a job starts, if the time since the last Full backup is +greater than the specified interval, and the job would normally be an +{\bf Incremental} or {\bf Differential}, it will be automatically +upgraded to a {\bf Full} backup. + +\section{MaxDiffInterval = \lt{}time-interval\gt{}} +\index[general]{MaxDiffInterval} +The new Job resource directive {\bf Max Diff Interval = \lt{}time-interval\gt{}} +can be used to specify the maximum time interval between {\bf Differential} backup +jobs. When a job starts, if the time since the last Differential backup is +greater than the specified interval, and the job would normally be an +{\bf Incremental}, it will be automatically +upgraded to a {\bf Differential} backup. + +\section{Honor No Dump Flag = \lt{}yes\vb{}no\gt{}} +\index[general]{MaxDiffInterval} +On FreeBSD systems, each file has a {\bf no dump flag} that can be set +by the user, and when it is set it is an indication to backup programs +to not backup that particular file. This version of Bacula contains a +new Options directive within a FileSet resource, which instructs Bacula to +obey this flag. The new directive is: + +\begin{verbatim} + Honor No Dump Flag = yes\vb{}no +\end{verbatim} + +The default value is {\bf no}. + + +\section{Exclude Dir Containing = \lt{}filename-string\gt{}} +\index[general]{IgnoreDir} +The {\bf ExcludeDirContaining = \lt{}filename\gt{}} is a new directive that +can be added to the Include section of the FileSet resource. If the specified +filename ({\bf filename-string}) is found on the Client in any directory to be +backed up, the whole directory will be ignored (not backed up). For example: + +\begin{verbatim} + # List of files to be backed up + FileSet { + Name = "MyFileSet" + Include { + Options { + signature = MD5 + } + File = /home + Exclude Dir Containing = .excludeme + } + } +\end{verbatim} + +But in /home, there may be hundreds of directories of users and some +people want to indicate that they don't want to have certain +directories backed up. For example, with the above FileSet, if +the user or sysadmin creates a file named {\bf .excludeme} in +specific directories, such as + +\begin{verbatim} + /home/user/www/cache/.excludeme + /home/user/temp/.excludeme +\end{verbatim} + +then Bacula will not backup the two directories named: + +\begin{verbatim} + /home/user/www/cache + /home/user/temp +\end{verbatim} + +NOTE: subdirectories will not be backed up. That is, the directive +applies to the two directories in question and any children (be they +files, directories, etc). + + +\section{Bacula Plugins} +\index[general]{Plugin} +Support for shared object plugins has been implemented in the Linux, Unix +and Win32 File daemons. The API will be documented separately in +the Developer's Guide or in a new document. For the moment, there is +a single plugin named {\bf bpipe} that allows an external program to +get control to backup and restore a file. + +Plugins are also planned (partially implemented) in the Director and the +Storage daemon. + +\subsection{Plugin Directory} +\index[general]{Plugin Directory} +Each daemon (DIR, FD, SD) has a new {\bf Plugin Directory} directive that may +be added to the daemon definition resource. The directory takes a quoted +string argument, which is the name of the directory in which the daemon can +find the Bacula plugins. If this directive is not specified, Bacula will not +load any plugins. Since each plugin has a distinctive name, all the daemons +can share the same plugin directory. + +\subsection{Plugin Options} +\index[general]{Plugin Options} +The {\bf Plugin Options} directive takes a quoted string +arguement (after the equal sign) and may be specified in the +Job resource. The options specified will be passed to all plugins +when they are run. This each plugin must know what it is looking +for. The value defined in the Job resource can be modified +by the user when he runs a Job via the {\bf bconsole} command line +prompts. + +Note: this directive may be specified, and there is code to modify +the string in the run command, but the plugin options are not yet passed to +the plugin (i.e. not fully implemented). + +\subsection{Plugin Options ACL} +\index[general]{Plugin Options ACL} +The {\bf Plugin Options ACL} directive may be specified in the +Director's Console resource. It functions as all the other ACL commands +do by permitting users running restricted consoles to specify a +{\bf Plugin Options} that overrides the one specified in the Job +definition. Without this directive restricted consoles may not modify +the Plugin Options. + +\subsection{Plugin = \lt{}plugin-command-string\gt{}} +\index[general]{Plugin} +The {\bf Plugin} directive is specified in the Include section of +a FileSet resource where you put your {\bf File = xxx} directives. +For example: + +\begin{verbatim} + FileSet { + Name = "MyFileSet" + Include { + Options { + signature = MD5 + } + File = /home + Plugin = "bpipe:..." + } + } +\end{verbatim} + +In the above example, when the File daemon is processing the directives +in the Include section, it will first backup all the files in {\bf /home} +then it will load the plugin named {\bf bpipe} (actually bpipe-dir.so) from +the Plugin Directory. The syntax and semantics of the Plugin directive +require the first part of the string up to the colon (:) to be the name +of the plugin. Everything after the first colon is ignored by the File daemon but +is passed to the plugin. Thus the plugin writer may define the meaning of the +rest of the string as he wishes. + +Please see the next section for information about the {\bf bpipe} Bacula +plugin. + +\section{The bpipe Plugin} +\index[general]{The bpipe Plugin} +The {\bf bpipe} plugin is provided in the directory src/plugins/fd/bpipe-fd.c of +the Bacula source distribution. When the plugin is compiled and linking into +the resulting dynamic shared object (DSO), it will have the name {\bf bpipe-fd.so}. + +The purpose of the plugin is to provide an interface to any system program for +backup and restore. As specified above the {\bf bpipe} plugin is specified in +the Include section of your Job's FileSet resource. The full syntax of the +plugin directive as interpreted by the {\bf bpipe} plugin (each plugin is free +to specify the sytax as it wishes) is: + +\begin{verbatim} + Plugin = ":::" +\end{verbatim} + +where +\begin{description} +\item {\bf field1} is the name of the plugin with the trailing {\bf -fd.so} +stripped off, so in this case, we would put {\bf bpipe} in this field. + +\item {\bf field2} specifies the namespace, which for {\bf bpipe} is the +pseudo path and filename under which the backup will be saved. This pseudo +path and filename will be seen by the user in the restore file tree. +For example, if the value is {\bf /MYSQL/regress.sql}, the data +backed up by the plugin will be put under that "pseudo" path and filename. +You must be careful to choose a naming convention that is unique to avoid +a conflict with a path and filename that actually exists on your system. + +\item {\bf field3} for the {\bf bpipe} plugin +specifies the "reader" program that is called by the plugin during +backup to read the data. {\bf bpipe} will call this program by doing a +{\bf popen} on it. + +\item {\bf field4} for the {\bf bpipe} plugin +specifies the "writer" program that is called by the plugin during +restore to write the data back to the filesystem. +\end{description} + +Putting it all together, the full plugin directive line might look +like the following: + +\begin{verbatim} +Plugin = "bpipe:/MYSQL/regress.sql:mysqldump -f + --opt --databases bacula:mysql" +\end{verbatim} + +The directive has been split into two lines, but within the {\bf bacula-dir.conf} file +would be written on a single line. + +This causes the File daemon to call the {\bf bpipe} plugin, which will write +its data into the "pseudo" file {\bf /MYSQL/regress.sql} by calling the +program {\bf mysqldump -f --opt --database bacula} to read the data during +backup. The mysqldump command outputs all the data for the database named +{\bf bacula}, which will be read by the plugin and stored in the backup. +During restore, the data that was backed up will be sent to the program +specified in the last field, which in this case is {\bf mysql}. When +{\bf mysql} is called, it will read the data sent to it by the plugn +then write it back to the same database from which it came ({\bf bacula} +in this case). + +The {\bf bpipe} plugin is a generic pipe program, that simply transmits +the data from a specified program to Bacula for backup, and then from Bacula to +a specified program for restore. + +By using different command lines to {\bf bpipe}, +you can backup any kind of data (ASCII or binary) depending +on the program called. + +\section{Microsoft Exchange Server 2003/2007 Plugin} +\index[general]{Microsoft Exchange Server 2003/2007 Plugin} +\subsection{Background} +The Exchange plugin was made possible by a funded development project +between Equiinet Ltd -- www.equiinet.com (many thanks) and Bacula Systems. +The code for the plugin was written by James Harper, and the Bacula core +code by Kern Sibbald. All the code for this funded development has become +part of the Bacula project. Thanks to everyone who made it happen. + +\subsection{Concepts} +Although it is possible to backup Exchange using Bacula VSS the Exchange +plugin adds a good deal of functionality, because while Bacula VSS +completes a full backup (snapshot) of Exchange, it does +not support Incremental or Differential backups, restoring is more +complicated, and a single database restore is not possible. + +Microsoft Exchange organises its storage into Storage Groups with +Databases inside them. A default installation of Exchange will have a +single Storage Group called 'First Storage Group', with two Databases +inside it, "Mailbox Store (SERVER NAME)" and +"Public Folder Store (SERVER NAME)", +which hold user email and public folders respectively. + +In the default configuration, Exchange logs everything that happens to +log files, such that if you have a backup, and all the log files since, +you can restore to the present time. Each Storage Group has its own set +of log files and operates independently of any other Storage Groups. At +the Storage Group level, the logging can be turned off by enabling a +function called "Enable circular logging". At this time the Exchange +plugin will not function if this option is enabled. + +The plugin allows backing up of entire storage groups, and the restoring +of entire storage groups or individual databases. Backing up and +restoring at the individual mailbox or email item is not supported but +can be simulated by use of the "Recovery" Storage Group (see below). + +\subsection{Installing} +The Exchange plugin requires a DLL that is shipped with Microsoft +Exchanger Server called {\bf esebcli2.dll}. Assuming Exchange is installed +correctly the Exchange plugin should find this automatically and run +without any additional installation. + +If the DLL can not be found automatically it will need to be copied into +the Bacula installation +directory (eg C:\verb+\+Program Files\verb+\+Bacula\verb+\+bin). The Exchange API DLL is +named esebcli2.dll and is found in C:\verb+\+Program Files\verb+\+Exchsrvr\verb+\+bin on a +default Exchange installation. + +\subsection{Backing Up} +To back up an Exchange server the Fileset definition must contain at +least {\bf Plugin = "exchange:/@EXCHANGE/Microsoft Information Store"} for +the backup to work correctly. The 'exchange:' bit tells Bacula to look +for the exchange plugin, the '@EXCHANGE' bit makes sure all the backed +up files are prefixed with something that isn't going to share a name +with something outside the plugin, and the 'Microsoft Information Store' +bit is required also. It is also possible to add the name of a storage +group to the "Plugin =" line, eg \\ +{\bf Plugin = "exchange:/@EXCHANGE/Microsoft Information Store/First Storage Group"} \\ +if you want only a single storage group backed up. + +Additionally, you can suffix the 'Plugin =' directive with +":notrunconfull" which will tell the plugin not to truncate the Exchange +database at the end of a full backup. + +An Incremental or Differential backup will backup only the database logs +for each Storage Group by inspecting the "modified date" on each +physical log file. Because of the way the Exchange API works, the last +logfile backed up on each backup will always be backed up by the next +Incremental or Differential backup too. This adds 5MB to each +Incremental or Differential backup size but otherwise does not cause any +problems. + +By default, a normal VSS fileset containing all the drive letters will +also back up the Exchange databases using VSS. This will interfere with +the plugin and Exchange's shared ideas of when the last full backup was +done, and may also truncate log files incorrectly. It is important, +therefore, that the Exchange database files be excluded from the backup, +although the folders the files are in should be included, or they will +have to be recreated manually if a baremetal restore is done. + +\begin{verbatim} +FileSet { + Include { + File = C:/Program Files/Exchsrvr/mdbdata + Plugin = "exchange:..." + } + Exclude { + File = C:/Program Files/Exchsrvr/mdbdata/E00.chk + File = C:/Program Files/Exchsrvr/mdbdata/E00.log + File = C:/Program Files/Exchsrvr/mdbdata/E000000F.log + File = C:/Program Files/Exchsrvr/mdbdata/E0000010.log + File = C:/Program Files/Exchsrvr/mdbdata/E0000011.log + File = C:/Program Files/Exchsrvr/mdbdata/E00tmp.log + File = C:/Program Files/Exchsrvr/mdbdata/priv1.edb + } +} +\end{verbatim} + +The advantage of excluding the above files is that you can significantly +reduce the size of your backup since all the important Exchange files +will be properly saved by the Plugin. + + +\subsection{Restoring} +The restore operation is much the same as a normal Bacula restore, with +the following provisos: + +\begin{itemize} +\item The {\bf Where} restore option must not be specified +\item Each Database directory must be marked as a whole. You cannot just + select (say) the .edb file and not the others. +\item If a Storage Group is restored, the directory of the Storage Group + must be marked too. +\item It is possible to restore only a subset of the available log files, + but they {\bf must} be contiguous. Exchange will fail to restore correctly + if a log file is missing from the sequence of log files +\item Each database to be restored must be dismounted and marked as "Can be + overwritten by restore" +\item If an entire Storage Group is to be restored (eg all databases and + logs in the Storage Group), then it is best to manually delete the + database files from the server (eg C:\verb+\+Program Files\verb+\+Exchsrvr\verb+\+mdbdata\verb+\+*) + as Exchange can get confused by stray log files lying around. +\end{itemize} + +\subsection{Restoring to the Recovery Storage Group} +The concept of the Recovery Storage Group is well documented by +Microsoft +\elink{http://support.microsoft.com/kb/824126}{http://support.microsoft.com/kb/824126}, +but to briefly summarize... + +Microsoft Exchange allows the creation of an additional Storage Group +called the Recovery Storage Group, which is used to restore an older +copy of a database (e.g. before a mailbox was deleted) into without +messing with the current live data. This is required as the Standard and +Small Business Server versions of Exchange can not ordinarily have more +than one Storage Group. + +To create the Recovery Storage Group, drill down to the Server in Exchange +System Manager, right click, and select +{\bf "New -> Recovery Storage Group..."}. Accept or change the file +locations and click OK. On the Recovery Storage Group, right click and +select {\bf "Add Database to Recover..."} and select the database you will +be restoring. + +Restore only the single database nominated as the database in the +Recovery Storage Group. Exchange will redirect the restore to the +Recovery Storage Group automatically. +Then run the restore. + +\subsection{Restoring on Microsoft Server 2007} +Apparently the {\bf Exmerge} program no longer exists in Microsoft Server +2007, and henc you use a new proceedure for recovering a single mail box. +This procedure is ducomented by Microsoft at: +\elink{http://technet.microsoft.com/en-us/library/aa997694.aspx}{http://technet.microsoft.com/en-us/library/aa997694.aspx}, +and involves using the {\bf Restore-Mailbox} and {\bf +Get-MailboxStatistics} shell commands. + +\subsection{Caveats} +This plugin is still being developed, so you should consider it +currently in BETA test, and thus use in a production environment +should be done only after very careful testing. + +When doing a full backup, the Exchange database logs are truncated by +Exchange as soon as the plugin has completed the backup. If the data +never makes it to the backup medium (eg because of spooling) then the +logs will still be truncated, but they will also not have been backed +up. A solution to this is being worked on. You will have to schedule a +new Full backup to ensure that your next backups will be usable. + +The "Enable Circular Logging" option cannot be enabled or the plugin +will fail. + +Exchange insists that a successful Full backup must have taken place if +an Incremental or Differential backup is desired, and the plugin will +fail if this is not the case. If a restore is done, Exchange will +require that a Full backup be done before an Incremental or Differential +backup is done. + +The plugin will most likely not work well if another backup application +(eg NTBACKUP) is backing up the Exchange database, especially if the +other backup application is truncating the log files. + +The Exchange plugin has not been tested with the {\bf Accurate} option, so +we recommend either carefully testing or that you avoid this option for +the current time. + +The Exchange plugin is not called during processing the bconsole {\bf +estimate} command, and so anything that would be backed up by the plugin +will not be added to the estimate total that is displayed. + + +\section{libdbi Framework} +\index[general]{libdbi Framework} +As a general guideline, Bacula has support for a few catalog database drivers +(MySQL, PostgreSQL, SQLite) +coded natively by the Bacula team. With the libdbi implementation, which is a +Bacula driver that uses libdbi to access the catalog, we have an open field to +use many different kinds database engines following the needs of users. + +The according to libdbi (http://libdbi.sourceforge.net/) project: libdbi +implements a database-independent abstraction layer in C, similar to the +DBI/DBD layer in Perl. Writing one generic set of code, programmers can +leverage the power of multiple databases and multiple simultaneous database +connections by using this framework. + +Currently the libdbi driver in Bacula project only supports the same drivers +natively coded in Bacula. However the libdbi project has support for many +others database engines. You can view the list at +http://libdbi-drivers.sourceforge.net/. In the future all those drivers can be +supported by Bacula, however, they must be tested properly by the Bacula team. + +Some of benefits of using libdbi are: +\begin{itemize} +\item The possibility to use proprietary databases engines in which your + proprietary licenses prevent the Bacula team from developing the driver. + \item The possibility to use the drivers written for the libdbi project. + \item The possibility to use other database engines without recompiling Bacula + to use them. Just change one line in bacula-dir.conf + \item Abstract Database access, this is, unique point to code and profiling + catalog database access. + \end{itemize} + + The following drivers have been tested: + \begin{itemize} + \item PostgreSQL, with and without batch insert + \item Mysql, with and without batch insert + \item SQLite + \item SQLite3 + \end{itemize} + + In the future, we will test and approve to use others databases engines + (proprietary or not) like DB2, Oracle, Microsoft SQL. + + To compile Bacula to support libdbi we need to configure the code with the + --with-dbi and --with-dbi-driver=[database] ./configure options, where + [database] is the database engine to be used with Bacula (of course we can + change the driver in file bacula-dir.conf, see below). We must configure the + access port of the database engine with the option --with-db-port, because the + libdbi framework doesn't know the default access port of each database. + +The next phase is checking (or configuring) the bacula-dir.conf, example: +\begin{verbatim} +Catalog { + Name = MyCatalog + dbdriver = dbi:mysql; dbaddress = 127.0.0.1; dbport = 3306 + dbname = regress; user = regress; password = "" +} +\end{verbatim} + +The parameter {\bf dbdriver} indicates that we will use the driver dbi with a +mysql database. Currently the drivers supported by Bacula are: postgresql, +mysql, sqlite, sqlite3; these are the names that may be added to string "dbi:". + +The following limitations apply when Bacula is set to use the libdbi framework: + - Not tested on the Win32 platform + - A little performance is lost if comparing with native database driver. + The reason is bound with the database driver provided by libdbi and the + simple fact that one more layer of code was added. + +It is important to remember, when compiling Bacula with libdbi, the +following packages are needed: + \begin{itemize} + \item libdbi version 1.0.0, http://libdbi.sourceforge.net/ + \item libdbi-drivers 1.0.0, http://libdbi-drivers.sourceforge.net/ + \end{itemize} + + You can download them and compile them on your system or install the packages + from your OS distribution. + +\section{Console Command Additions and Enhancements} +\index[general]{Console Additions} + +\subsection{Display Autochanger Content} +\index[general]{StatusSlots} + +The {\bf status slots storage=\lt{}storage-name\gt{}} command displays +autochanger content. + +\footnotesize +\begin{verbatim} + Slot | Volume Name | Status | Media Type | Pool | +------+---------------+----------+-------------------+------------| + 1 | 00001 | Append | DiskChangerMedia | Default | + 2 | 00002 | Append | DiskChangerMedia | Default | + 3*| 00003 | Append | DiskChangerMedia | Scratch | + 4 | | | | | +\end{verbatim} +\normalsize + +If you an asterisk ({\bf *}) appears after the slot number, you must run an +{\bf update slots} command to synchronize autochanger content with your +catalog. + +\subsection{list joblog job=xxx or jobid=nnn} +\index[general]{list joblog} +A new list command has been added that allows you to list the contents +of the Job Log stored in the catalog for either a Job Name (fully qualified) +or for a particular JobId. The {\bf llist} command will include a line with +the time and date of the entry. + +Note for the catalog to have Job Log entries, you must have a directive +such as: + +\begin{verbatim} + catalog = all +\end{verbatim} + +In your Director's {\bf Messages} resource. + +\subsection{Use separator for multiple commands} +\index[general]{Command Separator} + When using bconsole with readline, you can set the command separator with + \textbf{@separator} command to one + of those characters to write commands who require multiple input in one line. +\begin{verbatim} + !$%&'()*+,-/:;<>?[]^`{|}~ +\end{verbatim} + +\subsection{Deleting Volumes} +The delete volume bconsole command has been modified to +require an asterisk (*) in front of a MediaId otherwise the +value you enter is a taken to be a Volume name. This is so that +users may delete numeric Volume names. The previous Bacula versions +assumed that all input that started with a number was a MediaId. + +This new behavior is indicated in the prompt if you read it +carefully. + +\section{Bare Metal Recovery} +The old bare metal recovery project is essentially dead. One +of the main features of it was that it would build a recovery +CD based on the kernel on your system. The problem was that +every distribution has a different boot procedure and different +scripts, and worse yet, the boot procedures and scripts change +from one distribution to another. This meant that maintaining +(keeping up with the changes) the rescue CD was too much work. + +To replace it, a new bare metal recovery USB boot stick has been developed +by Bacula Systems. This technology involves remastering a Ubuntu LiveCD to +boot from a USB key. + +Advantages: +\begin{enumerate} +\item Recovery can be done from within graphical environment. +\item Recovery can be done in a shell. +\item Ubuntu boots on a large number of Linux systems. +\item The process of updating the system and adding new + packages is not too difficult. +\item The USB key can easily be upgraded to newer Ubuntu versions. +\item The USB key has writable partitions for modifications to + the OS and for modification to your home directory. +\item You can add new files/directories to the USB key very easily. +\item You can save the environment from multiple machines on + one USB key. +\item Bacula Systems is funding its ongoing development. +\end{enumerate} + +The disadvantages are: +\begin{enumerate} +\item The USB key is usable but currently under development. +\item Not everyone may be familiar with Ubuntu (no worse + than using Knoppix) +\item Some older OSes cannot be booted from USB. This can + be resolved by first booting a Ubuntu LiveCD then plugging + in the USB key. +\item Currently the documentation is sketchy and not yet added + to the main manual. See below ... +\end{enumerate} + +The documentation and the code can be found in the {\bf rescue} package +in the directory {\bf linux/usb}. + +\section{Miscellaneous} +\index[general]{Misc New Features} + +\subsection{Allow Mixed Priority = \lt{}yes\vb{}no\gt{}} +\index[general]{Allow Mixed Priority} + This directive is only implemented in version 2.5 and later. When + set to {\bf yes} (default {\bf no}), this job may run even if lower + priority jobs are already running. This means a high priority job + will not have to wait for other jobs to finish before starting. + The scheduler will only mix priorities when all running jobs have + this set to true. + + Note that only higher priority jobs will start early. Suppose the + director will allow two concurrent jobs, and that two jobs with + priority 10 are running, with two more in the queue. If a job with + priority 5 is added to the queue, it will be run as soon as one of + the running jobs finishes. However, new priority 10 jobs will not + be run until the priority 5 job has finished. + +\subsection{Bootstrap File Directive -- FileRegex} +\index[general]{Bootstrap File Directive} + {\bf FileRegex} is a new command that can be added to the bootstrap + (.bsr) file. The value is a regular expression. When specified, only + matching filenames will be restored. + + During a restore, if all File records are pruned from the catalog + for a Job, normally Bacula can restore only all files saved. That + is there is no way using the catalog to select individual files. + With this new feature, Bacula will ask if you want to specify a Regex + expression for extracting only a part of the full backup. + +\begin{verbatim} + Building directory tree for JobId(s) 1,3 ... + There were no files inserted into the tree, so file selection + is not possible.Most likely your retention policy pruned the files + + Do you want to restore all the files? (yes\vb{}no): no + + Regexp matching files to restore? (empty to abort): /tmp/regress/(bin|tests)/ + Bootstrap records written to /tmp/regress/working/zog4-dir.restore.1.bsr +\end{verbatim} + +\subsection{Bootstrap File Optimization Changes} +In order to permit proper seeking on disk files, we have extended the bootstrap +file format to include a {\bf VolStartAddr} and {\bf VolEndAddr} records. Each +takes a 64 bit unsigned integer range (i.e. nnn-mmm) which defines the start +address range and end address range respectively. These two directives replace +the {\bf VolStartFile}, {\bf VolEndFile}, {\bf VolStartBlock} and {\bf + VolEndBlock} directives. Bootstrap files containing the old directives will +still work, but will not properly take advantage of proper disk seeking, and +may read completely to the end of a disk volume during a restore. With the new +format (automatically generated by the new Director), restores will seek +properly and stop reading the volume when all the files have been restored. + +\subsection{Solaris ZFS/NFSv4 ACLs} +This is an upgrade of the previous Solaris ACL backup code +to the new library format, which will backup both the old +POSIX(UFS) ACLs as well as the ZFS ACLs. + +The new code can also restore POSIX(UFS) ACLs to a ZFS filesystem +(it will translate the POSIX(UFS)) ACL into a ZFS/NFSv4 one) it can also +be used to transfer from UFS to ZFS filesystems. + + +\subsection{Virtual Tape Emulation} +\index[general]{Virtual Tape Emulation} +We now have a Virtual Tape emulator that allows us to run though 99.9\% of +the tape code but actually reading and writing to a disk file. Used with the +\textbf{disk-changer} script, you can now emulate an autochanger with 10 drives +and 700 slots. This feature is most useful in testing. It is enabled +by using {\bf Device Type = vtape} in the Storage daemon's Device +directive. This feature is only implemented on Linux machines and should not be +used for production. + +\subsection{Bat Enhancements} +\index[general]{Bat Enhancements} +Bat (the Bacula Administration Tool) GUI program has been significantly +enhanced and stabilized. In particular, there are new table based status +commands; it can now be easily localized using Qt4 Linguist. + +The Bat communications protocol has been significantly enhanced to improve +GUI handling. Note, you {\bf must} use a the bat that is distributed with +the Director you are using otherwise the communications protocol will not +work. + +\subsection{RunScript Enhancements} +\index[general]{RunScript Enhancements} +The {\bf RunScript} resource has been enhanced to permit multiple +commands per RunScript. Simply specify multiple {\bf Command} directives +in your RunScript. + +\begin{verbatim} +Job { + Name = aJob + RunScript { + Command = "/bin/echo test" + Command = "/bin/echo an other test" + Command = "/bin/echo 3 commands in the same runscript" + RunsWhen = Before + } + ... +} +\end{verbatim} + +A new Client RunScript {\bf RunsWhen} keyword of {\bf AfterVSS} has been +implemented, which runs the command after the Volume Shadow Copy has been made. + +Console commands can be specified within a RunScript by using: +{\bf Console = \lt{}command\gt{}}, however, this command has not been +carefully tested and debugged and is known to easily crash the Director. +We would appreciate feedback. Due to the recursive nature of this command, we +may remove it before the final release. + +\subsection{Status Enhancements} +\index[general]{Status Enhancements} +The bconsole {\bf status dir} output has been enhanced to indicate +Storage daemon job spooling and despooling activity. + +\subsection{Connect Timeout} +\index[general]{Connect Timeout} +The default connect timeout to the File +daemon has been set to 3 minutes. Previously it was 30 minutes. + +\subsection{ftruncate for NFS Volumes} +\index[general]{ftruncate for NFS Volumes} +If you write to a Volume mounted by NFS (say on a local file server), +in previous Bacula versions, when the Volume was recycled, it was not +properly truncated because NFS does not implement ftruncate (file +truncate). This is now corrected in the new version because we have +written code (actually a kind user) that deletes and recreates the Volume, +thus accomplishing the same thing as a truncate. + +\subsection{Support for Ubuntu} +The new version of Bacula now recognizes the Ubuntu (and Kubuntu) +version of Linux, and thus now provides correct autostart routines. +Since Ubuntu officially supports Bacula, you can also obtain any +recent release of Bacula from the Ubuntu repositories. + +\subsection{Recycle Pool = \lt{}pool-name\gt{}} +\index[general]{Recycle Pool} +The new \textbf{RecyclePool} directive defines to which pool the Volume will +be placed (moved) when it is recycled. Without this directive, a Volume will +remain in the same pool when it is recycled. With this directive, it can be +moved automatically to any existing pool during a recycle. This directive is +probably most useful when defined in the Scratch pool, so that volumes will +be recycled back into the Scratch pool. + +\subsection{FD Version} +\index[general]{FD Version} +The File daemon to Director protocol now includes a version +number, which although there is no visible change for users, +will help us in future versions automatically determine +if a File daemon is not compatible. + +\subsection{Max Run Sched Time = \lt{}time-period-in-seconds\gt{}} +\index[general]{Max Run Sched Time} +The time specifies the maximum allowed time that a job may run, counted from +when the job was scheduled. This can be useful to prevent jobs from running +during working hours. We can see it like \texttt{Max Start Delay + Max Run + Time}. + +\subsection{Max Wait Time = \lt{}time-period-in-seconds\gt{}} +\index[general]{Max Wait Time} +Previous \textbf{MaxWaitTime} directives aren't working as expected, instead +of checking the maximum allowed time that a job may block for a resource, +those directives worked like \textbf{MaxRunTime}. Some users are reporting to +use \textbf{Incr/Diff/Full Max Wait Time} to control the maximum run time of +their job depending on the level. Now, they have to use +\textbf{Incr/Diff/Full Max Run Time}. \textbf{Incr/Diff/Full Max Wait Time} +directives are now deprecated. + +\subsection{Incremental|Differential Max Wait Time = \lt{}time-period-in-seconds\gt{}} +\index[general]{Incremental Max Wait Time} +\index[general]{Differential Max Wait Time} + +These directives have been deprecated in favor of +\texttt{Incremental|Differential Max Run Time}. + +\subsection{Max Run Time directives} +\index[general]{Max Run Time directives} +Using \textbf{Full/Diff/Incr Max Run Time}, it's now possible to specify the +maximum allowed time that a job can run depending on the level. + +\addcontentsline{lof}{figure}{Job time control directives} +\includegraphics{\idir different_time.eps} + +\subsection{Statistics Enhancements} +\index[general]{Statistics Enhancements} +If you (or probably your boss) want to have statistics on your backups to +provide some \textit{Service Level Agreement} indicators, you could use a few +SQL queries on the Job table to report how many: + +\begin{itemize} +\item jobs have run +\item jobs have been successful +\item files have been backed up +\item ... +\end{itemize} + +However, these statistics are accurate only if your job retention is greater +than your statistics period. Ie, if jobs are purged from the catalog, you won't +be able to use them. + +Now, you can use the \textbf{update stats [days=num]} console command to fill +the JobHistory table with new Job records. If you want to be sure to take in +account only \textbf{good jobs}, ie if one of your important job has failed but +you have fixed the problem and restarted it on time, you probably want to +delete the first \textit{bad} job record and keep only the successful one. For +that simply let your staff do the job, and update JobHistory table after two or +three days depending on your organization using the \textbf{[days=num]} option. + +These statistics records aren't used for restoring, but mainly for +capacity planning, billings, etc. + +The Bweb interface provides a statistics module that can use this feature. You +can also use tools like Talend or extract information by yourself. + +The \textbf{Statistics Retention = \lt{}time\gt{}} director directive defines +the length of time that Bacula will keep statistics job records in the Catalog +database after the Job End time. (In \texttt{JobHistory} table) When this time +period expires, and if user runs \texttt{prune stats} command, Bacula will +prune (remove) Job records that are older than the specified period. + +You can use the following Job resource in your nightly \textbf{BackupCatalog} +job to maintain statistics. +\begin{verbatim} +Job { + Name = BackupCatalog + ... + RunScript { + Console = "update stats days=3" + Console = "prune stats yes" + RunsWhen = After + RunsOnClient = no + } +} +\end{verbatim} + +\subsection{ScratchPool = \lt{}pool-resource-name\gt{}} +\index[general]{ScratchPool} +This directive permits to specify a specific \textsl{Scratch} pool for the +current pool. This is useful when using multiple storage sharing the same +mediatype or when you want to dedicate volumes to a particular set of pool. + +\subsection{Enhanced Attribute Despooling} +\index[general]{Attribute Despooling} +If the storage daemon and the Director are on the same machine, the spool file +that contains attributes is read directly by the Director instead of being +transmitted across the network. That should reduce load and speedup insertion. + +\subsection{SpoolSize = \lt{}size-specification-in-bytes\gt{}} +\index[general]{SpoolSize} +A new Job directive permits to specify the spool size per job. This is used +in advanced job tunning. {\bf SpoolSize={\it bytes}} + +\subsection{MaxConsoleConnections = \lt{}number\gt{}} +\index[general]{MaxConsoleConnections} +A new director directive permits to specify the maximum number of Console +Connections that could run concurrently. The default is set to 20, but you may +set it to a larger number. + +\subsection{VerId = \lt{}string\gt{}} +\index[general]{VerId} +A new director directive permits to specify a personnal identifier that will be +displayed in the \texttt{version} command. + +\subsection{dbcheck enhancements} +\index[general]{dbcheck enhancements} +If you are using Mysql, dbcheck will now ask you if you want to create +temporary indexes to speed up orphaned Path and Filename elimination. + +A new \texttt{-B} option allows you to print catalog information in a simple +text based format. This is useful to backup it in a secure way. + +\begin{verbatim} + $ dbcheck -B + catalog=MyCatalog + db_type=SQLite + db_name=regress + db_driver= + db_user=regress + db_password= + db_address= + db_port=0 + db_socket= +\end{verbatim} %$ + +You can now specify the database connection port in the command line. + +\subsection{{-}{-}docdir configure option} +\index[general]{{-}{-}docdir configure option} +You can use {-}{-}docdir= on the ./configure command to +specify the directory where you want Bacula to install the +LICENSE, ReleaseNotes, ChangeLog, ... files. The default is +{\bf /usr/share/doc/bacula}. + +\subsection{{-}{-}htmldir configure option} +\index[general]{{-}{-}htmldir configure option} +You can use {-}{-}htmldir= on the ./configure command to +specify the directory where you want Bacula to install the bat html help +files. The default is {\bf /usr/share/doc/bacula/html} + +\subsection{{-}{-}with-plugindir configure option} +\index[general]{{-}{-}plugindir configure option} +You can use {-}{-}plugindir= on the ./configure command to +specify the directory where you want Bacula to install +the plugins (currently only bpipe-fd). The default is +/usr/lib. diff --git a/docs/manuals/fr/concepts/pools.tex b/docs/manuals/es/main/pools.tex similarity index 100% rename from docs/manuals/fr/concepts/pools.tex rename to docs/manuals/es/main/pools.tex diff --git a/docs/manuals/es/main/postgresql.tex b/docs/manuals/es/main/postgresql.tex new file mode 100644 index 00000000..0d22a7be --- /dev/null +++ b/docs/manuals/es/main/postgresql.tex @@ -0,0 +1,499 @@ +%% +%% + +\chapter{Installing and Configuring PostgreSQL} +\label{PostgreSqlChapter} +\index[general]{PostgreSQL!Installing and Configuring } +\index[general]{Installing and Configuring PostgreSQL } +\index[general]{Upgrading} + +If you are considering using PostreSQL, you should be aware +of their philosophy of upgrades, which could be +destabilizing for a production shop. Basically at every major version +upgrade, you are required to dump your database in an ASCII format, +do the upgrade, and then reload your database (or databases). This is +because they frequently update the "data format" from version to +version, and they supply no tools to automatically do the conversion. +If you forget to do the ASCII dump, your database may become totally +useless because none of the new tools can access it due to the format +change, and the PostgreSQL server will not be able to start. + +If you are building PostgreSQL from source, please be sure to add +the {\bf \verb:--:enable-thread-safety} option when doing the ./configure +for PostgreSQL. + +\section{Installing PostgreSQL} +\index[general]{PostgreSQL!Installing } + +If you use the {\bf ./configure \verb:--:with-postgresql=PostgreSQL-Directory} +statement for configuring {\bf Bacula}, you will need PostgreSQL version 7.4 +or later installed. NOTE! PostgreSQL versions earlier than 7.4 do not work +with Bacula. If PostgreSQL is installed in the standard system location, you +need only enter {\bf \verb:--:with-postgresql} since the configure program will +search all the standard locations. If you install PostgreSQL in your home +directory or some other non-standard directory, you will need to provide the +full path with the {\bf \verb:--:with-postgresql} option. + +Installing and configuring PostgreSQL is not difficult but can be confusing +the first time. If you prefer, you may want to use a package provided by your +chosen operating system. Binary packages are available on most PostgreSQL +mirrors. + +If you prefer to install from source, we recommend following the instructions +found in the +\elink{PostgreSQL documentation}{http://www.postgresql.org/docs/}. + +If you are using FreeBSD, +\elink{this FreeBSD Diary article}{http://www.freebsddiary.org/postgresql.php} +will be useful. Even if you are not using FreeBSD, the article will contain +useful configuration and setup information. + +If you configure the Batch Insert code in Bacula (attribute inserts are +10 times faster), you {\bf must} be using a PostgreSQL that was built with +the {\bf \verb:--:enable-thread-safety} option, otherwise you will get +data corruption. Most major Linux distros have thread safety turned on, but +it is better to check. One way is to see if the PostgreSQL library that +Bacula will be linked against references pthreads. This can be done +with a command such as: + +\footnotesize +\begin{verbatim} + nm /usr/lib/libpq.a | grep pthread_mutex_lock +\end{verbatim} +\normalsize + +The above command should print a line that looks like: + +\footnotesize +\begin{verbatim} + U pthread_mutex_lock +\end{verbatim} +\normalsize + +if does, then everything is OK. If it prints nothing, do not enable batch +inserts when building Bacula. + +After installing PostgreSQL, you should return to completing the installation +of {\bf Bacula}. Later, after Bacula is installed, come back to this chapter +to complete the installation. Please note, the installation files used in the +second phase of the PostgreSQL installation are created during the Bacula +Installation. You must still come back to complete the second phase of the +PostgreSQL installation even if you installed binaries (e.g. rpm, deb, +...). + + +\label{PostgreSQL_configure} +\section{Configuring PostgreSQL} +\index[general]{PostgreSQL!Configuring PostgreSQL -- } + +At this point, you should have built and installed PostgreSQL, or already have +a running PostgreSQL, and you should have configured, built and installed {\bf +Bacula}. If not, please complete these items before proceeding. + +Please note that the {\bf ./configure} used to build {\bf Bacula} will need to +include {\bf \verb:--:with-postgresql=PostgreSQL-directory}, where {\bf +PostgreSQL-directory} is the directory name that you specified on the +./configure command for configuring PostgreSQL (if you didn't specify a +directory or PostgreSQL is installed in a default location, you do not need to +specify the directory). This is needed so that Bacula can find the necessary +include headers and library files for interfacing to PostgreSQL. + +An important thing to note here is that {\bf Bacula} makes two connections +to the PostgreSQL server for each backup job that is currently running. If +you are intending to run a large number of concurrent jobs, check the value +of {\bf max\_connections} in your PostgreSQL configuration file to ensure +that it is larger than the setting {\bf Maximum Concurrent Jobs} +in your director configuration. {\bf Setting this too low will result in +some backup jobs failing to run correctly!} + +{\bf Bacula} will install scripts for manipulating the database (create, +delete, make tables etc) into the main installation directory. These files +will be of the form *\_bacula\_* (e.g. create\_bacula\_database). These files +are also available in the \lt{}bacula-src\gt{}/src/cats directory after +running ./configure. If you inspect create\_bacula\_database, you will see +that it calls create\_postgresql\_database. The *\_bacula\_* files are +provided for convenience. It doesn't matter what database you have chosen; +create\_bacula\_database will always create your database. + +Now you will create the Bacula PostgreSQL database and the tables that Bacula +uses. These instructions assume that you already have PostgreSQL running. You +will need to perform these steps as a user that is able to create new +databases. This can be the PostgreSQL user (on most systems, this is the pgsql +user). + +\begin{enumerate} +\item cd \lt{}install-directory\gt{} + + This directory contains the Bacula catalog interface routines. + +\item Create the database owner ({\bf bacula}) + On many systems, the PostreSQL master + owner is {\bf pgsql} and on others such as Red Hat and Fedora it is {\bf + postgres}. You can find out which it is by examining your /etc/passwd + file. To create a new user under either your name or with say the name + {\bf bacula}, you can do the following: + +\begin{verbatim} + su + (enter root password) + su pgsql (or postgres) + createuser bacula + Shall the new user be allowed to create databases? (y/n) y + Shall the new user be allowed to create more new users? (y/n) (choose + what you want) + exit +\end{verbatim} + Normally the {\bf bacula} user must be able to create new databases, + if you use the script in the next item, + or you will have to create one for it, but it does not need to + create new users. + +\item ./create\_bacula\_database + + This script creates the PostgreSQL {\bf bacula} database. + Before running this command, you should carefully think about + what encoding sequence you want for the text fields (paths, files, ...). + We strongly recommend that you use the default value of SQL\_ASCII + that is in the create\_bacula\_database script. Please be warned + that if you change this value, your backups may fail. After running + the script, you can check with the command: + +\begin{verbatim} + psql -l +\end{verbatim} + + and the column marked {\bf Encoding} should be {\bf SQL\_ASCII} for + all your Bacula databases (normally {\bf bacula}). + +\item ./make\_bacula\_tables + + This script creates the PostgreSQL tables used by {\bf Bacula}. +\item ./grant\_bacula\_privileges + + This script creates the database user {\bf bacula} with restricted access +rights. You may want to modify it to suit your situation. Please note that +this database is not password protected. + +\end{enumerate} + +Each of the three scripts (create\_bacula\_database, make\_bacula\_tables, and +grant\_bacula\_privileges) allows the addition of a command line argument. +This can be useful for specifying the user name. For example, you might need +to add {\bf -h hostname} to the command line to specify a remote database +server. + +To take a closer look at the access privileges that you have setup with the +above, you can do: + +\footnotesize +\begin{verbatim} +PostgreSQL-directory/bin/psql --command \\dp bacula +\end{verbatim} +\normalsize + +Also, I had an authorization problem with the password. In the end, +I had to modify my {\bf pg\_hba.conf} file (in /var/lib/pgsql/data on my machine +in /var/lib/postgresql/8.x on others, and in /etc/postgres/8.x/main on +still others -- what a mess!) from: + +\footnotesize +\begin{verbatim} + local all all ident sameuser +to + local all all trust +\end{verbatim} +\normalsize + +This solved the problem for me, but it is not always a good thing +to do from a security standpoint. However, it allowed me to run +my regression scripts without having a password. + +A more secure way to perform database authentication is with md5 +password hashes. Begin by editing the {\bf pg\_hba.conf} file, and +above the existing ``local'' and ``host'' lines, add the line: + +\footnotesize +\begin{verbatim} + local bacula bacula md5 +\end{verbatim} +\normalsize + +then restart the Postgres database server (frequently, this can be done +using "/etc/init.d/postgresql restart" or "service postgresql restart") to +put this new authentication rule into effect. + +Next, become the Postgres administrator, postgres, either by logging +on as the postgres user, or by using su to become root and then using +{\bf su - postgres} or {\bf su - pgsql} to become postgres. +Add a password to the {\bf bacula} database for the {\bf bacula} user using: + +\footnotesize +\begin{verbatim} + \$ psql bacula + bacula=# alter user bacula with password 'secret'; + ALTER USER + bacula=# \\q +\end{verbatim} +\normalsize + +You'll have to add this password to two locations in the +bacula-dir.conf file: once to the Catalog resource and once to the +RunBeforeJob entry in the BackupCatalog Job resource. With the +password in place, these two lines should look something like: + +\footnotesize +\begin{verbatim} + dbname = bacula; user = bacula; password = "secret" + ... and ... + # WARNING!!! Passing the password via the command line is insecure. + # see comments in make_catalog_backup for details. + RunBeforeJob = "/etc/make_catalog_backup bacula bacula secret" +\end{verbatim} +\normalsize + +Naturally, you should choose your own significantly more random +password, and ensure that the bacula-dir.conf file containing this +password is readable only by the root. + +Even with the files containing the database password properly +restricted, there is still a security problem with this approach: on +some platforms, the environment variable that is used to supply the +password to Postgres is available to all users of the +local system. To eliminate this problem, the Postgres team have +deprecated the use of the environment variable password-passing +mechanism and recommend the use of a .pgpass file instead. To use +this mechanism, create a file named .pgpass containing the single +line: + +\footnotesize +\begin{verbatim} + localhost:5432:bacula:bacula:secret +\end{verbatim} +\normalsize + +This file should be copied into the home directory of all accounts +that will need to gain access to the database: typically, root, +bacula, and any users who will make use of any of the console +programs. The files must then have the owner and group set to match +the user (so root:root for the copy in ~root, and so on), and the mode +set to 600, limiting access to the owner of the file. + +\section{Re-initializing the Catalog Database} +\index[general]{Database!Re-initializing the Catalog } +\index[general]{Re-initializing the Catalog Database } + +After you have done some initial testing with {\bf Bacula}, you will probably +want to re-initialize the catalog database and throw away all the test Jobs +that you ran. To do so, you can do the following: + +\footnotesize +\begin{verbatim} + cd + ./drop_bacula_tables + ./make_bacula_tables + ./grant_bacula_privileges +\end{verbatim} +\normalsize + +Please note that all information in the database will be lost and you will be +starting from scratch. If you have written on any Volumes, you must write an +end of file mark on the volume so that Bacula can reuse it. Do so with: + +\footnotesize +\begin{verbatim} + (stop Bacula or unmount the drive) + mt -f /dev/nst0 rewind + mt -f /dev/nst0 weof +\end{verbatim} +\normalsize + +Where you should replace {\bf /dev/nst0} with the appropriate tape drive +device name for your machine. + +\section{Installing PostgreSQL from RPMs} +\index[general]{PostgreSQL!Installing from RPMs} +\index[general]{Installing PostgreSQL from RPMs} +If you are installing PostgreSQL from RPMs, you will need to install +both the PostgreSQL binaries and the client libraries. The client +libraries are usually found in a {\bf devel} or {\bf dev} package, so you must +install the following for rpms: + +\footnotesize +\begin{verbatim} + postgresql + postgresql-devel + postgresql-server + postgresql-libs +\end{verbatim} +\normalsize + + +and the following for debs: + +\footnotesize +\begin{verbatim} + postgresql + postgresql-common + postgresql-client + postgresql-client-common + libpq5 + libpq-dev +\end{verbatim} +\normalsize + + +These will be similar with most other package managers too. After +installing from rpms, you will still need to run the scripts that set up +the database and create the tables as described above. + + +\section{Converting from MySQL to PostgreSQL} +\index[general]{PostgreSQL!Converting from MySQL to } +\index[general]{Converting from MySQL to PostgreSQL } + +The conversion procedure presented here was worked out by Norm Dressler +\lt{}ndressler at dinmar dot com\gt{} + +This process was tested using the following software versions: + +\begin{itemize} +\item Linux Mandrake 10/Kernel 2.4.22-10 SMP +\item Mysql Ver 12.21 Distrib 4.0.15, for mandrake-linux-gnu (i586) +\item PostgreSQL 7.3.4 +\item Bacula 1.34.5 + \end{itemize} + +WARNING: Always as a precaution, take a complete backup of your databases +before proceeding with this process! + +\begin{enumerate} +\item Shutdown bacula (cd /etc/bacula;./bacula stop) +\item Run the following command to dump your Mysql database: + + \footnotesize +\begin{verbatim} + mysqldump -f -t -n >bacula-backup.dmp + +\end{verbatim} +\normalsize + +\item Make a backup of your /etc/bacula directory (but leave the original in + place). +\item Go to your Bacula source directory and rebuild it to include PostgreSQL + support rather then Mysql support. Check the config.log file for your + original configure command and replace enable-mysql with enable-postgresql. +\item Recompile Bacula with a make and if everything compiles completely, + perform a make install. +\item Shutdown Mysql. +\item Start PostgreSQL on your system. +\item Create a bacula user in Postgres with the createuser command. Depending on + your Postgres install, you may have to SU to the user who has privileges to + create a user. +\item Verify your pg\_hba.conf file contains sufficient permissions to allow + bacula to access the server. Mine has the following since it's on a secure + network: + +\footnotesize +\begin{verbatim} +local all all trust + +host all all 127.0.0.1 255.255.255.255 trust + +NOTE: you should restart your postgres server if you + made changes + +\end{verbatim} +\normalsize + +\item Change into the /etc/bacula directory and prepare the database and + tables with the following commands: + +\footnotesize +\begin{verbatim} +./create_postgresql_database + +./make_postgresql_tables + +./grant_postgresql_privileges + +\end{verbatim} +\normalsize + +\item Verify you have access to the database: + + \footnotesize +\begin{verbatim} + +psql -Ubacula bacula + +\end{verbatim} +\normalsize + +You should not get any errors. +\item Load your database from the Mysql database dump with: + + \footnotesize +\begin{verbatim} +psql -Ubacula bacula + +\end{verbatim} +\normalsize + +\item Resequence your tables with the following commands: + + \footnotesize +\begin{verbatim} +psql -Ubacula bacula + +SELECT SETVAL('basefiles_baseid_seq', (SELECT +MAX(baseid) FROM basefiles)); +SELECT SETVAL('client_clientid_seq', (SELECT +MAX(clientid) FROM client)); +SELECT SETVAL('file_fileid_seq', (SELECT MAX(fileid) +FROM file)); +SELECT SETVAL('filename_filenameid_seq', (SELECT +MAX(filenameid) FROM filename)); + +SELECT SETVAL('fileset_filesetid_seq', (SELECT +MAX(filesetid) FROM fileset)); + +SELECT SETVAL('job_jobid_seq', (SELECT MAX(jobid) FROM job)); +SELECT SETVAL('jobmedia_jobmediaid_seq', (SELECT +MAX(jobmediaid) FROM jobmedia)); +SELECT SETVAL('media_mediaid_seq', (SELECT MAX(mediaid) FROM media)); +SELECT SETVAL('path_pathid_seq', (SELECT MAX(pathid) FROM path)); + +SELECT SETVAL('pool_poolid_seq', (SELECT MAX(poolid) FROM pool)); + +\end{verbatim} +\normalsize + +\item At this point, start up Bacula, verify your volume library and perform + a test backup to make sure everything is working properly. +\end{enumerate} + +\section{Upgrading PostgreSQL} +\index[general]{Upgrading PostgreSQL } +\index[general]{Upgrading!PostgreSQL } +\index[general]{Upgrading} +If you upgrade PostgreSQL, you must reconfigure, rebuild, and re-install +Bacula otherwise you are likely to get bizarre failures. If you +to modify the bacula.spec file to account for the new PostgreSQL version. +You can do so by rebuilding from the source rpm. To do so, you may need +install from rpms and you upgrade PostgreSQL, you must also rebuild Bacula. + +\section{Tuning PostgreSQL} +\index[general]{Tuning} + +If you despool attributes for many jobs at the same time, you can tune the +sequence object for the \texttt{FileId} field. +\begin{verbatim} +psql -Ubacula bacula + +ALTER SEQUENCE file_fileid_seq CACHE 1000; +\end{verbatim} + +\section{Credits} +\index[general]{Credits } +Many thanks to Dan Langille for writing the PostgreSQL driver. This will +surely become the most popular database that Bacula supports. diff --git a/docs/manuals/es/main/quickstart.tex b/docs/manuals/es/main/quickstart.tex new file mode 100644 index 00000000..e99a0189 --- /dev/null +++ b/docs/manuals/es/main/quickstart.tex @@ -0,0 +1,389 @@ +%% +%% + +\chapter{Getting Started with Bacula} +\label{QuickStartChapter} +\index[general]{Getting Started with Bacula } + +If you are like me, you want to get Bacula running immediately to get a feel +for it, then later you want to go back and read about all the details. This +chapter attempts to accomplish just that: get you going quickly without all +the details. If you want to skip the section on Pools, Volumes and Labels, you +can always come back to it, but please read to the end of this chapter, and in +particular follow the instructions for testing your tape drive. + +We assume that you have managed to build and install Bacula, if not, you might +want to first look at the +\ilink{System Requirements}{SysReqs} then at the +\ilink{Compiling and Installing Bacula}{InstallChapter} chapter of +this manual. + +\label{JobsandSchedules} +\section{Understanding Jobs and Schedules} +\index[general]{Jobs!Understanding} +\index[general]{Schedules!Understanding} + +In order to make Bacula as flexible as possible, the directions given +to Bacula are specified in several pieces. The main instruction is the +job resource, which defines a job. A backup job generally consists of a +FileSet, a Client, a Schedule for one or several levels or times of backups, +a Pool, as well as additional instructions. Another way of looking +at it is the FileSet is what to backup; the Client is who to backup; the +Schedule defines when, and the Pool defines where (i.e. what Volume). + +Typically one FileSet/Client combination will have one corresponding job. +Most of the directives, such as FileSets, Pools, Schedules, can be mixed +and matched among the jobs. So you might have two different Job +definitions (resources) backing up different servers using the same +Schedule, the same Fileset (backing up the same directories on two machines) +and maybe even the same Pools. The Schedule will define what type of +backup will run when (e.g. Full on Monday, incremental the rest of the +week), and when more than one job uses the same schedule, the job priority +determines which actually runs first. If you have a lot of jobs, you might +want to use JobDefs, where you can set defaults for the jobs, which can +then be changed in the job resource, but this saves rewriting the +identical parameters for each job. In addition to the FileSets you want to +back up, you should also have a job that backs up your catalog. + +Finally, be aware that in addition to the backup jobs there are +restore, verify, and admin jobs, which have different requirements. + +\label{PoolsVolsLabels} +\section{Understanding Pools, Volumes and Labels} +\index[general]{Labels!Understanding Pools Volumes and } +\index[general]{Understanding Pools, Volumes and Labels } + +If you have been using a program such as {\bf tar} to backup your system, +Pools, Volumes, and labeling may be a bit confusing at first. A Volume is a +single physical tape (or possibly a single file) on which Bacula will write +your backup data. Pools group together Volumes so that a backup is not +restricted to the length of a single Volume (tape). Consequently, rather than +explicitly naming Volumes in your Job, you specify a Pool, and Bacula will +select the next appendable Volume from the Pool and request you to mount it. +% TODO: can't it mount it itself if already available? + +Although the basic Pool options are specified in the Director's Pool resource, +the {\bf real} Pool is maintained in the Bacula Catalog. It contains +information taken from the Pool resource (bacula-dir.conf) as well as +information on all the Volumes that have been added to the Pool. Adding +Volumes to a Pool is usually done manually with the Console program using the +{\bf label} command. + +For each Volume, Bacula maintains a fair amount of catalog information such as +the first write date/time, the last write date/time, the number of files on +the Volume, the number of bytes on the Volume, the number of Mounts, etc. + +Before Bacula will read or write a Volume, the physical Volume must have a +Bacula software label so that Bacula can be sure the correct Volume is +mounted. This is usually done using the {\bf label} command in the Console +program. + +The steps for creating a Pool, adding Volumes to it, and writing software +labels to the Volumes, may seem tedious at first, but in fact, they are quite +simple to do, and they allow you to use multiple Volumes (rather than being +limited to the size of a single tape). Pools also give you significant +flexibility in your backup process. For example, you can have a "Daily" Pool +of Volumes for Incremental backups and a "Weekly" Pool of Volumes for Full +backups. By specifying the appropriate Pool in the daily and weekly backup +Jobs, you thereby insure that no daily Job ever writes to a Volume in the +Weekly Pool and vice versa, and Bacula will tell you what tape is needed and +when. + +For more on Pools, see the +\ilink{Pool Resource}{PoolResource} section of the Director +Configuration chapter, or simply read on, and we will come back to this +subject later. + +\section{Setting Up Bacula Configuration Files} +\label{config} +\index[general]{Setting Up Bacula Configuration Files } +\index[general]{Files!Setting Up Bacula Configuration } + +% TODO: this assumes installation from source: +After running the appropriate {\bf ./configure} command and doing +a {\bf make}, and a {\bf make install}, if this is the first time +you are running Bacula, you must create valid configuration files +for the Director, the File daemon, the Storage daemon, and the +Console programs. If you have followed our recommendations, +default configuration files as well as the daemon binaries will +be located in your installation directory. In any case, the +binaries are found in the directory you specified on the {\bf +\verb:--:sbindir} option to the {\bf ./configure} command, and +the configuration files are found in the directory you specified +on the {\bf \verb:--:sysconfdir} option. + +When initially setting up Bacula you will need to invest a bit of time in +modifying the default configuration files to suit your environment. This may +entail starting and stopping Bacula a number of times until you get everything +right. Please do not despair. Once you have created your configuration files, +you will rarely need to change them nor will you stop and start Bacula very +often. Most of the work will simply be in changing the tape when it is full. + +\subsection{Configuring the Console Program} +\index[general]{Configuring the Console Program } +\index[general]{Program!Configuring the Console } + +The Console program is used by the administrator to interact with the Director +and to manually start/stop Jobs or to obtain Job status information. + +The Console configuration file is found in the directory specified on the +{\bf \verb:--:sysconfdir} option that you specified on the {\bf +./configure} command and by default is named {\bf bconsole.conf}. + +If you choose to build the GNOME console with the {\bf +\verb:--:enable-gnome} option, you also find a default configuration file +for it, named {\bf bgnome-console.conf}. + +The same applies to the wxWidgets console, which is build with the {\bf +\verb:--:enable-bwx-console} option, and the name of the default +configuration file is, in this case, {\bf bwx-console.conf}. + +Normally, for first time users, no change is needed to these files. Reasonable +defaults are set. + +Further details are in the +\ilink{Console configuration}{ConsoleConfChapter} chapter. + +\subsection{Configuring the Monitor Program} +\index[general]{Program!Configuring the Monitor } +\index[general]{Configuring the Monitor Program } + +The Monitor program is typically an icon in the system tray. However, once the +icon is expanded into a full window, the administrator or user can obtain +status information about the Director or the backup status on the local +workstation or any other Bacula daemon that is configured. + +\addcontentsline{lof}{figure}{Bacula Tray Monitor} +\includegraphics{\idir Bacula-tray-monitor.eps} + +% TODO: image may be too wide for 6" wide printed page. +The image shows a tray-monitor configured for three daemons. By clicking on +the radio buttons in the upper left corner of the image, you can see the +status for each of the daemons. The image shows the status for the Storage +daemon (MainSD) that is currently selected. + +The Monitor configuration file is found in the directory specified on the {\bf +\verb:--:sysconfdir} option that you specified on the {\bf ./configure} command +and +by default is named {\bf tray-monitor.conf}. Normally, for first time users, +you just need to change the permission of this file to allow non-root users to +run the Monitor, as this application must run as the same user as the +graphical environment (don't forget to allow non-root users to execute {\bf +bacula-tray-monitor}). This is not a security problem as long as you use the +default settings. + +More information is in the +\ilink{Monitor configuration}{_MonitorChapter} chapter. + +\subsection{Configuring the File daemon} +\index[general]{Daemon!Configuring the File } +\index[general]{Configuring the File daemon } + +The File daemon is a program that runs on each (Client) machine. At the +request of the Director, finds the files to be backed up and sends them (their +data) to the Storage daemon. + +The File daemon configuration file is found in the directory specified on +the {\bf \verb:--:sysconfdir} option that you specified on the {\bf ./configure} +command. By default, the File daemon's configuration file is named {\bf +bacula-fd.conf}. Normally, for first time users, no change is needed to this +file. Reasonable defaults are set. However, if you are going to back up more +than one machine, you will need to install the File daemon with a unique +configuration file on each machine to be backed up. The information about each +File daemon must appear in the Director's configuration file. +% TODO: point to section about how to install just the File daemon +% TODO: and creating the unique configuration file. + +Further details are in the +\ilink{File daemon configuration}{FiledConfChapter} chapter. + +\subsection{Configuring the Director} +\index[general]{Director!Configuring the } +\index[general]{Configuring the Director } + +The Director is the central control program for all the other daemons. It +schedules and monitors all jobs to be backed up. + +The Director configuration file is found in the directory specified on the +{\bf \verb:--:sysconfdir} option that you specified on the {\bf ./configure} +command. Normally the Director's configuration file is named {\bf bacula-dir.conf}. + +In general, the only change you must make is modify the FileSet resource so +that the {\bf Include} configuration directive contains at least one line with +a valid name of a directory (or file) to be saved. + +% TODO: is DLT still the default config? +If you do not have a DLT tape drive, you will probably want to edit the +Storage resource to contain names that are more representative of your actual +storage device. You can always use the existing names as you are free to +arbitrarily assign them, but they must agree with the corresponding names in +the Storage daemon's configuration file. + +You may also want to change the email address for notification from the +default {\bf root} to your email address. + +Finally, if you have multiple systems to be backed up, you will need a +separate File daemon or Client specification for each system, specifying its +% TODO: I don't see any example "File" configuraton in the default +% TODO: bacula-dir.conf; I do see FileDaemon config in the default +% TODO: bacula-fd.conf. Be more clear about this or point to explanation +% TODO: about this. +name, address, and password. We have found that giving your daemons the same +% TODO: what passwords should I use? I have different ones in the +% TODO: different configs on different systems. Point to explanation of +% this. +name as your system but post fixed with {\bf -fd} helps a lot in debugging. +That is, if your system name is {\bf foobaz}, you would give the File daemon +the name {\bf foobaz-fd}. For the Director, you should use {\bf foobaz-dir}, +and for the storage daemon, you might use {\bf foobaz-sd}. +Each of your Bacula components {\bf must} have a unique name. If you +make them all the same, aside from the fact that you will not +know what daemon is sending what message, if they share the same +working directory, the daemons temporary file names will not +be unique, and you will get many strange failures. +% TODO: why not check for that and not allow sharing working directory? + +More information is in the +\ilink{Director configuration}{DirectorChapter} chapter. + +\subsection{Configuring the Storage daemon} +\index[general]{Daemon!Configuring the Storage } +\index[general]{Configuring the Storage daemon } + +The Storage daemon is responsible, at the Director's request, for accepting +data from a File daemon and placing it on Storage media, or in the case of a +restore request, to find the data and send it to the File daemon. + +The Storage daemon's configuration file is found in the directory specified on +the {\bf \verb:--:sysconfdir} option that you specified on the {\bf ./configure} +command. By default, the Storage daemon's file is named {\bf bacula-sd.conf}. +Edit this file to contain the correct Archive device names for any tape +devices that you have. If the configuration process properly detected your +system, they will already be correctly set. These Storage resource name and +Media Type must be the same as the corresponding ones in the Director's +configuration file {\bf bacula-dir.conf}. If you want to backup to a file +instead of a tape, the Archive device must point to a directory in which the +Volumes will be created as files when you label the Volume. +\label{ConfigTesting} + +Further information is in the +\ilink{Storage daemon configuration}{StoredConfChapter} chapter. + +\section{Testing your Configuration Files} +\index[general]{Testing your Configuration Files } +\index[general]{Files!Testing your Configuration } + +You can test if your configuration file is syntactically correct by running +the appropriate daemon with the {\bf -t} option. The daemon will process the +configuration file and print any error messages then terminate. For example, +assuming you have installed your binaries and configuration files in the same +directory. +% TODO: why assume that? common default install has the executable +% TODO: is in ./sbin and the configs are in ./etc. So maybe just have +% TODO: example correct or change default install to be same. + +\footnotesize +\begin{verbatim} +cd +./bacula-dir -t -c bacula-dir.conf +./bacula-fd -t -c bacula-fd.conf +./bacula-sd -t -c bacula-sd.conf +./bconsole -t -c bconsole.conf +./bgnome-console -t -c bgnome-console.conf +./bwx-console -t -c bwx-console.conf +./bat -t -c bat.conf +su -c "./bacula-tray-monitor -t -c tray-monitor.conf" +\end{verbatim} +\normalsize + +will test the configuration files of each of the main programs. If the +configuration file is OK, the program will terminate without printing +anything. Please note that, depending on the configure options you choose, +some, or even all, of the three last commands will not be available on your +system. If you have installed the binaries in traditional Unix locations +rather than a single file, you will need to modify the above commands +appropriately (no ./ in front of the command name, and a path in front of the +conf file name). +\label{TapeTesting} + +\section{Testing Compatibility with Your Tape Drive} +\index[general]{Drive!Testing Bacula Compatibility with Your Tape} +\index[general]{Testing Bacula Compatibility with Your Tape Drive} + +Before spending a lot of time on Bacula only to find that it doesn't work +with your tape drive, please read the {\bf Testing Your Tape +Drive} chapter of this manual. If you have a modern +standard SCSI tape drive on a Linux or Solaris, most likely it will work, +but better test than be sorry. For FreeBSD (and probably other xBSD +flavors), reading the above mentioned tape testing chapter is a must. +Also, for FreeBSD, please see \elink{The FreeBSD +Diary}{\url{http://www.freebsddiary.org/bacula.php}} for a detailed description +%TODO: fix elink so it shows URL in PDF +on how to make Bacula work on your system. In addition, users of FreeBSD +prior to 4.9-STABLE dated Mon Dec 29 15:18:01 2003 UTC who plan to use tape +devices, please see the file {\bf platforms/freebsd/pthreads-fix.txt} in +the main Bacula directory concerning important information concerning +compatibility of Bacula and your system. \label{notls} + +\section{Get Rid of the /lib/tls Directory} +\index[general]{Directory!Get Rid of the /lib/tls } +\index[general]{Get Rid of the /lib/tls Directory } +The new pthreads library {\bf /lib/tls} installed by default on recent Red +Hat systems running Linux kernel 2.4.x is defective. You must remove it or +rename it, then reboot your system before running Bacula otherwise after a +week or so of running, Bacula will either block for long periods or +deadlock entirely. You may want to use the loader environment variable +override rather than removing /lib/tls. Please see \ilink{ Supported +Operating Systems}{SupportedOSes} for more information on this problem. + +This problem does not occur on systems running Linux 2.6.x kernels. + +\label{Running1} + +\section{Running Bacula} +\index[general]{Bacula!Running } +\index[general]{Running Bacula } + +Probably the most important part of running Bacula is being able to restore +files. If you haven't tried recovering files at least once, when you actually +have to do it, you will be under a lot more pressure, and prone to make +errors, than if you had already tried it once. + +To get a good idea how to use Bacula in a short time, we {\bf strongly} +recommend that you follow the example in the +\ilink{Running Bacula Chapter}{TutorialChapter} of this manual where +you will get detailed instructions on how to run Bacula. + +\section{Log Rotation} +\index[general]{Rotation!Log } +\index[general]{Log Rotation } +If you use the default {\bf bacula-dir.conf} or some variation of it, you will +note that it logs all the Bacula output to a file. To avoid that this file +grows without limit, we recommend that you copy the file {\bf logrotate} from +the {\bf scripts/logrotate} to {\bf /etc/logrotate.d/bacula}. This will cause +the log file to be rotated once a month and kept for a maximum of five months. +You may want to edit this file to change the default log rotation preferences. + +\section{Log Watch} +\index[general]{Watch!Log} +\index[general]{Log Watch} +Some systems such as Red Hat and Fedora run the logwatch program +every night, which does an analysis of your log file and sends an +email report. If you wish to include the output from your Bacula +jobs in that report, please look in the {\bf scripts/logwatch} +directory. The {\bf README} file in that directory gives a brief +explanation on how to install it and what kind of output to expect. + + +\section{Disaster Recovery} +\index[general]{Recovery!Disaster } +\index[general]{Disaster Recovery } + +If you intend to use Bacula as a disaster recovery tool rather than simply a +program to restore lost or damaged files, you will want to read the +\ilink{Disaster Recovery Using Bacula Chapter}{RescueChapter} of +this manual. + +In any case, you are strongly urged to carefully test restoring some files +that you have saved rather than wait until disaster strikes. This way, you +will be prepared. diff --git a/docs/manuals/fr/concepts/recycling.tex b/docs/manuals/es/main/recycling.tex similarity index 97% rename from docs/manuals/fr/concepts/recycling.tex rename to docs/manuals/es/main/recycling.tex index c2962d51..f2cdfed5 100644 --- a/docs/manuals/fr/concepts/recycling.tex +++ b/docs/manuals/es/main/recycling.tex @@ -57,16 +57,22 @@ of this manual for more complete examples. Automatic recycling of Volumes is performed by Bacula only when it wants a new Volume and no appendable Volumes are available in the Pool. It will then -search the Pool for any Volumes with the {\bf Recycle} flag set and whose -Volume Status is {\bf Full}. At that point, the recycling occurs in two steps. -The first is that the Catalog for a Volume must be purged of all Jobs and -Files contained on that Volume, and the second step is the actual recycling of -the Volume. The Volume will be purged if the VolumeRetention period has -expired. When a Volume is marked as Purged, it means that no Catalog records -reference that Volume, and the Volume can be recycled. Until recycling -actually occurs, the Volume data remains intact. If no Volumes can be found -for recycling for any of the reasons stated above, Bacula will request -operator intervention (i.e. it will ask you to label a new volume). +search the Pool for any Volumes with the {\bf Recycle} flag set and the +Volume Status is {\bf Purged}. At that point, it will choose the oldest +purged volume and recycle it. + +If there are no volumes with Status {\bf Purged}, then +the recycling occurs in two steps: +The first is that the Catalog for a Volume must be pruned of all Jobs (i.e. +Purged). Files contained on that Volume, and the second step is the actual +recycling of the Volume. Only Volumes marked {\bf Full} or {\bf Used} will +be considerd for pruning. The Volume will be purged if the VolumeRetention +period has expired. When a Volume is marked as Purged, it means that no +Catalog records reference that Volume, and the Volume can be recycled. +Until recycling actually occurs, the Volume data remains intact. If no +Volumes can be found for recycling for any of the reasons stated above, +Bacula will request operator intervention (i.e. it will ask you to label a +new volume). A key point mentioned above, that can be a source of frustration, is that Bacula will only recycle purged Volumes if there is no other appendable Volume @@ -253,7 +259,7 @@ items. \begin{itemize} \item If the request is for an Autochanger device, look only - for Volumes in the Autochanger (i.e. with InChanger set and that have + for Volumes in the Autochanger (i.e. with InChanger set and that have the correct Storage device). \item Search the Pool for a Volume with VolStatus=Append (if there is more than one, the Volume with the oldest date last written is chosen. If diff --git a/docs/manuals/es/main/requirements.tex b/docs/manuals/es/main/requirements.tex new file mode 100644 index 00000000..9dbeed98 --- /dev/null +++ b/docs/manuals/es/main/requirements.tex @@ -0,0 +1,67 @@ +%% +%% + +\chapter{System Requirements} +\label{SysReqs} +\index[general]{System Requirements } +\index[general]{Requirements!System } + +\begin{itemize} +\item {\bf Bacula} has been compiled and run on OpenSuSE Linux, FreeBSD, and + Solaris systems. +\item It requires GNU C++ version 2.95 or higher to compile. You can try with + other compilers and older versions, but you are on your own. We have + successfully compiled and used Bacula using GNU C++ version 4.1.3. + Note, in general GNU C++ is a separate package (e.g. RPM) from GNU C, so you + need them both loaded. On Red Hat systems, the C++ compiler is part of the + {\bf gcc-c++} rpm package. +\item There are certain third party packages that Bacula may need. Except for + MySQL and PostgreSQL, they can all be found in the {\bf depkgs} and {\bf + depkgs1} releases. However, most current Linux and FreeBSD systems + provide these as system packages. +\item The minimum versions for each of the databases supported by Bacula + are: + + \begin{itemize} + \item MySQL 4.1 + \item PostgreSQL 7.4 + \item SQLite 2.8.16 or SQLite 3 + \end{itemize} + +\item If you want to build the Win32 binaries, please see the + README.mingw32 file in the src/win32 directory. We cross-compile the + Win32 release on Linux. We provide documentation on building the Win32 + version, but due to the complexity, you are pretty much on your own + if you want to build it yourself. +\item {\bf Bacula} requires a good implementation of pthreads to work. This + is not the case on some of the BSD systems. +\item The source code has been written with portability in mind and is mostly + POSIX compatible. Thus porting to any POSIX compatible operating system + should be relatively easy. +\item The GNOME Console program is developed and tested under GNOME 2.x. + GNOME 1.4 is no longer supported. +\item The wxWidgets Console program is developed and tested with the latest + stable ANSI or Unicode version of + \elink{wxWidgets}{\url{http://www.wxwidgets.org/}} (2.6.1). It works fine with the + Windows and GTK+-2.x version of wxWidgets, and should also work on other + platforms supported by wxWidgets. +\item The Tray Monitor program is developed for GTK+-2.x. It needs GNOME less + or equal to 2.2, KDE greater or equal to 3.1 or any window manager supporting + the + \elink{ FreeDesktop system tray + standard}{\url{http://www.freedesktop.org/Standards/systemtray-spec}}. +\item If you want to enable command line editing and history, you will need + to have /usr/include/termcap.h and either the termcap or the ncurses library + loaded (libtermcap-devel or ncurses-devel). +\item If you want to use DVD as backup medium, you will need to download the + \elink{dvd+rw-tools 5.21.4.10.8}{\url{http://fy.chalmers.se/~appro/linux/DVD+RW/}}, + apply the patch that is in the {\bf patches} directory of the main + source tree + to make these tools compatible with Bacula, then compile and install them. + There is also a patch for dvd+rw-tools version 6.1, and we hope that the + patch is integrated into a later version. + Do not use the dvd+rw-tools provided by your distribution, unless you + are sure it contains the patch. dvd+rw-tools without the patch will not + work with Bacula. DVD media is not recommended for serious or important + backups because of its low reliability. +\end{itemize} diff --git a/docs/manuals/es/main/rescue.tex b/docs/manuals/es/main/rescue.tex new file mode 100644 index 00000000..573bf015 --- /dev/null +++ b/docs/manuals/es/main/rescue.tex @@ -0,0 +1,804 @@ +%% +%% + +\chapter{Disaster Recovery Using Bacula} +\label{RescueChapter} +\index[general]{Disaster Recovery Using Bacula} +\index[general]{Bacula!Disaster Recovery Using} +\index[general]{Recovery!Disaster Recovery} +\index[general]{Rescue!Disaster Recovery} + +\section{General} +\index[general]{General} + +When disaster strikes, you must have a plan, and you must have prepared in +advance otherwise the work of recovering your system and your files will be +considerably greater. For example, if you have not previously saved the +partitioning information for your hard disk, how can you properly rebuild +it if the disk must be replaced? + +Unfortunately, many of the steps one must take before and immediately after +a disaster are very operating system dependent. As a consequence, this +chapter will discuss in detail disaster recovery (also called Bare Metal +Recovery) for {\bf Linux} and {\bf Solaris}. For Solaris, the procedures +are still quite manual. For FreeBSD the same procedures may be used but +they are not yet developed. For Win32, a number of Bacula users have +reported success using BartPE. + + +\label{considerations1} +\section{Important Considerations} +\index[general]{Important Considerations} +\index[general]{Considerations!Important} + +Here are a few important considerations concerning disaster recovery that +you should take into account before a disaster strikes. + +\begin{itemize} +\item If the building which houses your computers burns down or is otherwise + destroyed, do you have off-site backup data? +\item Disaster recovery is much easier if you have several machines. If you + have a single machine, how will you handle unforeseen events if your only + machine is down? +\item Do you want to protect your whole system and use Bacula to recover + everything? or do you want to try to restore your system from the original + installation disks and apply any other updates and only restore user files? +\end{itemize} + +\label{steps1} +\section{Steps to Take Before Disaster Strikes} +\index[general]{Steps to Take Before Disaster Strikes} +\index[general]{Strikes!Steps to Take Before Disaster} + +\begin{itemize} +\item Create a rescue or CDROM for each of your Linux systems. Generally, + they are offered by each distribution, and there are many good + rescue disks on the Web (Knoppix, sysrescuecd, PLD Linux rescue CD, + tomsrtbt, RIP ... + +\item Create a bacula-hostname directory on + each machine and save it somewhere -- possibly on a USB key. +\item Ensure that you always have a valid bootstrap file for your backup and + that it is saved to an alternate machine. This will permit you to + easily do a full restore of your system. +\item If possible copy your catalog nightly to an alternate machine. If you + have a valid bootstrap file, this is not necessary, but can be very useful if + you do not want to reload everything. . +\item Ensure that you always have a valid bootstrap file for your catalog + backup that is saved to an alternate machine. This will permit you to restore + your catalog more easily if needed. +\item Test using the Rescue CDROM before you are forced to use it in + an emergency situation. +\item Make a copy of your Bacula .conf files, particularly your + bacula-dir.conf, and your bacula-sd.conf files, because if your server + goes down, these files will be needed to get it back up and running, + and they can be difficult to rebuild from memory. +\end{itemize} + +\label{rescueCDROM} +\section{Bare Metal Recovery on Linux with a Rescue CD} +\index[general]{Bare Metal Recovery on Linux with a Rescue CD} +\index[general]{CDROM!Bare Metal Recovery on Linux with a Rescue} + +As an alternative to creating a Rescue CD, please see the +section below entitled \ilink{Bare Metal Recovery using a LiveCD}{LiveCD}. + +Bacula previously had a Rescue CD. Unfortunately, this CD did not work +on every Linux Distro, and in addition, Linux is evolving with different +boot methods, more and more complex hardware configurations (LVM, RAID, +WiFi, USB, ...). As a consequence, the Bacula Rescue CD as it was +originally envisioned no longer exists. + +However there are many other good rescue disks available. +A so called "Bare Metal" recovery is one where you start with an empty hard +disk and you restore your machine. There are also cases where you may lose a +file or a directory and want it restored. Please see the previous chapter for +more details for those cases. + +Bare Metal Recovery assumes that you have the following items for your system: + +\begin{itemize} +\item A Rescue CDROM containing a copy of your OS. +\item Perhaps a copy of your + hard disk information, as well as a statically linked version of the + Bacula File daemon. +\item A full Bacula backup of your system possibly including Incremental or + Differential backups since the last Full backup +\item A second system running the Bacula Director, the Catalog, and the + Storage daemon. (this is not an absolute requirement, but how to get + around it is not yet documented here) +\end{itemize} + +\section{Requirements} +\index[general]{Requirements} + + +\label{restore_client} +\section{Restoring a Client System} +\index[general]{Restoring a Client System} +\index[general]{System!Restoring a Client} + +Now, let's assume that your hard disk has just died and that you have replaced +it with an new identical drive. In addition, we assume that you have: + +\begin{enumerate} +\item A recent Bacula backup (Full plus Incrementals) +\item A Rescue CDROM. +\item Your Bacula Director, Catalog, and Storage daemon running on another + machine on your local network. +\end{enumerate} + +This is a relatively simple case, and later in this chapter, as time permits, +we will discuss how you might recover from a situation where the machine that +crashes is your main Bacula server (i.e. has the Director, the Catalog, and +the Storage daemon). + +You will take the following steps to get your system back up and running: + +\begin{enumerate} +\item Boot with your Rescue CDROM. +\item Start the Network (local network) +\item Re-partition your hard disk(s) as it was before +\item Re-format your partitions +\item Restore the Bacula File daemon (static version) +\item Perform a Bacula restore of all your files +\item Re-install your boot loader +\item Reboot +\end{enumerate} + +Now for the details ... + +\section{Boot with your Rescue CDROM} +\index[general]{CDROM!Boot with your Rescue} +\index[general]{Boot with your Rescue CDROM} + +Each rescue disk boots somewhat differently. Please see the +instructions that go with your CDROM. + + +\paragraph*{Start the Network:} + +\normalsize + +You can test it by pinging another machine, or pinging your broken machine +machine from another machine. Do not proceed until your network is up. + +\paragraph*{Partition Your Hard Disk(s):} + +\paragraph*{Format Your Hard Disk(s):} + +\paragraph*{Mount the Newly Formatted Disks:} + + +\paragraph*{Somehow get the static File daemon loaded on your system} +Put the static file daemon and its conf file in /tmp. + +\paragraph*{Restore and Start the File Daemon:} +\footnotesize +\begin{verbatim} +chroot /mnt/disk /tmp/bacula-fd -c /tmp/bacula-fd.conf +\end{verbatim} +\normalsize + +The above command starts the Bacula File daemon with the proper root disk +location (i.e. {\bf /mnt/disk/tmp}. If Bacula does not start, correct the +problem and start it. You can check if it is running by entering: + +\footnotesize +\begin{verbatim} +ps fax +\end{verbatim} +\normalsize + +You can kill Bacula by entering: + +\footnotesize +\begin{verbatim} +kill -TERM +\end{verbatim} +\normalsize + +where {\bf pid} is the first number printed in front of the first occurrence +of {\bf bacula-fd} in the {\bf ps fax} command. + +Now, you should be able to use another computer with Bacula installed to check +the status by entering: + +\footnotesize +\begin{verbatim} +status client=xxxx +\end{verbatim} +\normalsize + +into the Console program, where xxxx is the name of the client you are +restoring. + +One common problem is that your {\bf bacula-dir.conf} may contain machine +addresses that are not properly resolved on the stripped down system to be +restored because it is not running DNS. This is particularly true for the +address in the Storage resource of the Director, which may be very well +resolved on the Director's machine, but not on the machine being restored and +running the File daemon. In that case, be prepared to edit {\bf +bacula-dir.conf} to replace the name of the Storage daemon's domain name with +its IP address. + +\paragraph*{Restore Your Files:} + +On the computer that is running the Director, you now run a {\bf restore} +command and select the files to be restored (normally everything), but before +starting the restore, there is one final change you must make using the {\bf +mod} option. You must change the {\bf Where} directory to be the root by using +the {\bf mod} option just before running the job and selecting {\bf Where}. +Set it to: + +\footnotesize +\begin{verbatim} +/ +\end{verbatim} +\normalsize + +then run the restore. + +You might be tempted to avoid using {\bf chroot} and running Bacula directly +and then using a {\bf Where} to specify a destination of {\bf /mnt/disk}. This +is possible, however, the current version of Bacula always restores files to +the new location, and thus any soft links that have been specified with +absolute paths will end up with {\bf /mnt/disk} prefixed to them. In general +this is not fatal to getting your system running, but be aware that you will +have to fix these links if you do not use {\bf chroot}. + +\paragraph*{Final Step:} + + + +\footnotesize +\begin{verbatim} +/sbin/grub-install --root-directory=/mnt/disk /dev/hda +\end{verbatim} +\normalsize + +Note, in this case, you omit the chroot command, and you must +replace /dev/hda with your boot device. If you don't know what your +boot device is, run the ./run\_grub script once and it will tell +you. + +Finally, I've even run into a case where grub-install was unable to +rewrite the boot block. In my case, it produced the following error +message: + +\footnotesize +\begin{verbatim} +/dev/hdx does not have any corresponding BIOS drive. +\end{verbatim} +\normalsize + +The solution is to insure that all your disks are properly mounted on +/mnt/disk, then do the following: + +\footnotesize +\begin{verbatim} +chroot /mnt/disk +mount /dev/pts +\end{verbatim} +\normalsize + +Then edit the file {\bf /boot/grub/grub.conf} and uncomment the line +that reads: + +\footnotesize +\begin{verbatim} +#boot=/dev/hda +\end{verbatim} +\normalsize + +So that it reads: + +\footnotesize +\begin{verbatim} +boot=/dev/hda +\end{verbatim} +\normalsize + +Note, the /dev/hda may be /dev/sda or possibly some other drive depending +on your configuration, but in any case, it is the same as the one that +you previously tried with {\bf grub-install}. + +Then, enter the following commands: + +\footnotesize +\begin{verbatim} +grub --batch --device-map=/boot/grub/device.map \ + --config-file=/boot/grub/grub.conf --no-floppy +root (hd0,0) +setup (hd0) +quit +\end{verbatim} +\normalsize + +If the {\bf grub} call worked, you will get a prompt of {\bf grub\gt{}} +before the {\bf root}, {\bf setup}, and {\bf quit} commands, and after +entering the {\bf setup} command, it should indicate that it successfully +wrote the MBR (master boot record). + + +\paragraph*{Reboot:} + +First unmount all your hard disks, otherwise they will not be cleanly +shutdown, then reboot your machine by entering {\bf exit} until you get to the +main prompt then enter {\bf Ctrl-d}. Once back to the main CDROM prompt, you +will need to turn the power off, then back on to your machine to get it to +reboot. + +If everything went well, you should now be back up and running. If not, +re-insert the emergency boot CDROM, boot, and figure out what is wrong. + +\label{restore_server} +\section{Restoring a Server} +\index[general]{Restoring a Server} +\index[general]{Server!Restoring a} + +Above, we considered how to recover a client machine where a valid Bacula +server was running on another machine. However, what happens if your server +goes down and you no longer have a running Director, Catalog, or Storage +daemon? There are several solutions: + +\begin{enumerate} +\item Bring up static versions of your Director, Catalog, and Storage daemon + on the damaged machine. + +\item Move your server to another machine. + +\item Use a Hot Spare Server on another Machine. +\end{enumerate} + +The first option, is very difficult because it requires you to have created a +static version of the Director and the Storage daemon as well as the Catalog. +If the Catalog uses MySQL or PostgreSQL, this may or may not be possible. In +addition, to loading all these programs on a bare system (quite possible), you +will need to make sure you have a valid driver for your tape drive. + +The second suggestion is probably a much simpler solution, and one I have done +myself. To do so, you might want to consider the following steps: + +\begin{itemize} +\item If you are using MySQL or PostgreSQL, configure, build and install it + from source (or use rpms) on your new system. +\item Load the Bacula source code onto your new system, configure, install + it, and create the Bacula database. +\item Ideally, you will have a copy of all the Bacula conf files that + were being used on your server. If not, you will at a minimum need + create a bacula-dir.conf that has the same Client resource that + was used to backup your system. +\item If you have a valid saved Bootstrap file as created for your damaged + machine with WriteBootstrap, use it to restore the files to the damaged + machine, where you have loaded a static Bacula File daemon using the + Rescue disk). This is done by using the restore command and at + the yes/mod/no prompt, selecting {\bf mod} then specifying the path to + the bootstrap file. +\item If you have the Bootstrap file, you should now be back up and running, + if you do not have a Bootstrap file, continue with the suggestions below. +\item Using {\bf bscan} scan the last set of backup tapes into your MySQL, + PostgreSQL or SQLite database. +\item Start Bacula, and using the Console {\bf restore} command, restore the + last valid copy of the Bacula database and the Bacula configuration + files. +\item Move the database to the correct location. +\item Start the database, and restart Bacula. Then use the Console {\bf + restore} command, restore all the files on the damaged machine, where you + have loaded a Bacula File daemon using the Rescue disk. +\end{itemize} + +For additional details of restoring your database, please see the +\ilink{Restoring When Things Go Wrong}{database_restore} section +of the Console Restore Command chapter of this manual. + + +\label{problems2} +\section{Linux Problems or Bugs} +\index[general]{Bugs!Linux Problems or} +\index[general]{Linux Problems or Bugs} + +Since every flavor and every release of Linux is different, there are likely +to be some small difficulties with the scripts, so please be prepared to edit +them in a minimal environment. A rudimentary knowledge of {\bf vi} is very +useful. Also, these scripts do not do everything. You will need to reformat +Windows partitions by hand, for example. + +Getting the boot loader back can be a problem if you are using {\bf grub} +because it is so complicated. If all else fails, reboot your system from your +floppy but using the restored disk image, then proceed to a reinstallation of +grub (looking at the run-grub script can help). By contrast, lilo is a piece +of cake. + +\label{LiveCD} +\section{Bare Metal Recovery using a LiveCD} +\index[general]{Bare Metal Recovery using a LiveCD} +\index[general]{Recovery!Bare Metal Recovery using a LiveCD} +\index[general]{Rescue!Bare Metal Recovery using a LiveCD} +\index[general]{LiveCD!Bare Metal Recovery using a LiveCD} + +As an alternative to the old now defunct Bacula Rescue CDROM, you can use any +system rescue or LiveCD to recover your system. The big problem +with most rescue or LiveCDs is that they are not designed to +capture the current state of your system, so when you boot them on +a damaged system, you might be somewhat lost -- e.g. how many of +you remember your exact hard disk partitioning. + +This lack can be easily corrected by running the part of the +Bacula Rescue code that creates a directory containing a +static-bacula-fd, a snapshot of your current system disk +configuration, and scripts that help restoring it. + +Before a disaster strikes: +\begin{enumerate} +\item Run only the {\bf make bacula} part of the + Bacula Rescue procedure to create the static Bacula + File daemon, and system disk snapshot. +\item Save the directory generated (more details below) + preferrably on a CDROM or alternatively to some other + system. +\item Possibly run {\bf make bacula} every night as + part of your backup process to ensure that you have + a current snapshot of your system. +\end{enumerate} + +Then when disaster strikes, do the following: + +\begin{enumerate} +\item Boot with your system rescue disk or LiveCD + (e.g. Knoppix). +\item Start the Network (local network). +\item Copy the Bacula recovery directory to the + damaged system using ftp, scp, wget or if your + boot disk permits it reading it directly from a + CDROM. +\item Continue as documented above. +\item Re-partition your hard disk(s) as it was before, + if necessary. +\item Re-format your partitions, if necessary. +\item Restore the Bacula File daemon (static version). +\item Perform a Bacula restore of all your files. +\item Re-install your boot loader. +\item Reboot. +\end{enumerate} + +In order to create the Bacula recovery directory, you need +a copy of the Bacula Rescue code as described above, and +you must first configure that directory. + +Once the configuration is done, you can do the following +to create the Bacula recovery directory: + +\footnotesize +\begin{verbatim} +cd /linux/cdrom +su (become root) +make bacula +\end{verbatim} +\normalsize + +The directory you want to save will be created in +the current directory with the name {\bf bacula}. You +need only save that directory either as a directory or +possibly as a compressed tar file. If you run this procedure +on multiple machines, you will probably want to rename this directory +to something like {\bf bacula-hostname}. + + + +\label{FreeBSD1} +\section{FreeBSD Bare Metal Recovery} +\index[general]{Recovery!FreeBSD Bare Metal} +\index[general]{Rescue!FreeBSD Bare Metal} +\index[general]{FreeBSD Bare Metal Recovery} + +The same basic techniques described above also apply to FreeBSD. Although we +don't yet have a fully automated procedure, Alex Torres Molina has provided us +with the following instructions with a few additions from Jesse Guardiani and +Dan Langille: + +\begin{enumerate} +\item Boot with the FreeBSD installation disk +\item Go to Custom, Partition and create your slices and go to Label and + create the partitions that you want. Apply changes. +\item Go to Fixit to start an emergency console. +\item Create devs ad0 .. .. if they don't exist under /mnt2/dev (in my situation) + with MAKEDEV. The device or devices you create depend on what hard drives you + have. ad0 is your first ATA drive. da0 would by your first SCSI drive. Under +OS version 5 and greater, your device files are most likely automatically +created for you. +\item mkdir /mnt/disk + this is the root of the new disk +\item mount /mnt2/dev/ad0s1a /mnt/disk + mount /mnt2/dev/ad0s1c /mnt/disk/var + mount /mnt2/dev/ad0s1d /mnt/disk/usr +..... +The same hard drive issues as above apply here too. Note, under OS version 5 +or higher, your disk devices may be in /dev not /mnt2/dev. +\item Network configuration (ifconfig xl0 ip/mask + route add default + ip-gateway) +\item mkdir /mnt/disk/tmp +\item cd /mnt/disk/tmp +\item Copy bacula-fd and bacula-fd.conf to this path +\item If you need to, use sftp to copy files, after which you must do this: + ln -s /mnt2/usr/bin /usr/bin +\item chmod u+x bacula-fd +\item Modify bacula-fd.conf to fit this machine +\item Copy /bin/sh to /mnt/disk, necessary for chroot +\item Don't forget to put your bacula-dir's IP address and domain name in + /mnt/disk/etc/hosts if it's not on a public net. Otherwise the FD on the + machine you are restoring to won't be able to contact the SD and DIR on the +remote machine. +\item mkdir -p /mnt/disk/var/db/bacula +\item chroot /mnt/disk /tmp/bacula-fd -c /tmp/bacula-fd.conf + to start bacula-fd +\item Now you can go to bacula-dir and restore the job with the entire + contents of the broken server. +\item You must create /proc +\end{enumerate} + +\label{solaris} +\section{Solaris Bare Metal Recovery} +\index[general]{Solaris Bare Metal Recovery} +\index[general]{Recovery!Solaris Bare Metal} + +The same basic techniques described above apply to Solaris: + +\begin{itemize} +\item the same restrictions as those given for Linux apply +\item you will need to create a Rescue disk + \end{itemize} + +However, during the recovery phase, the boot and disk preparation procedures +are different: + +\begin{itemize} +\item there is no need to create an emergency boot disk since it is an + integrated part of the Solaris boot. +\item you must partition and format your hard disk by hand following manual + procedures as described in W. Curtis Preston's book "Unix Backup \& + Recovery" +\end{itemize} + +Once the disk is partitioned, formatted and mounted, you can continue with +bringing up the network and reloading Bacula. + +\section{Preparing Solaris Before a Disaster} +\index[general]{Preparing Solaris Before a Disaster} +\index[general]{Disaster!Preparing Solaris Before a} + +As mentioned above, before a disaster strikes, you should prepare the +information needed in the case of problems. To do so, in the {\bf +rescue/solaris} subdirectory enter: + +\footnotesize +\begin{verbatim} +su +./getdiskinfo +./make_rescue_disk +\end{verbatim} +\normalsize + +The {\bf getdiskinfo} script will, as in the case of Linux described above, +create a subdirectory {\bf diskinfo} containing the output from several system +utilities. In addition, it will contain the output from the {\bf SysAudit} +program as described in Curtis Preston's book. This file {\bf +diskinfo/sysaudit.bsi} will contain the disk partitioning information that +will allow you to manually follow the procedures in the "Unix Backup \& +Recovery" book to repartition and format your hard disk. In addition, the +{\bf getdiskinfo} script will create a {\bf start\_network} script. + +Once you have your disks repartitioned and formatted, do the following: + +\begin{itemize} +\item Start Your Network with the {\bf start\_network} script +\item Restore the Bacula File daemon as documented above +\item Perform a Bacula restore of all your files using the same commands as + described above for Linux +\item Re-install your boot loader using the instructions outlined in the + "Unix Backup \& Recovery" book using installboot +\end{itemize} + +\label{genbugs} + +\section{Bugs and Other Considerations} +\index[general]{Considerations!Bugs and Other} +\index[general]{Bugs and Other Considerations} + +\paragraph*{Directory Modification and Access Times are Modified on pre-1.30 +Baculas :} + +When a pre-1.30 version of Bacula restores a directory, it first must create +the directory, then it populates the directory with its files and +subdirectories. The act of creating the files and subdirectories updates both +the modification and access times associated with the directory itself. As a +consequence, all modification and access times of all directories will be +updated to the time of the restore. + +This has been corrected in Bacula version 1.30 and later. The directory +modification and access times are reset to the value saved in the backup after +all the files and subdirectories have been restored. This has been tested and +verified on normal restore operations, but not verified during a bare metal +recovery. + +\paragraph*{Strange Bootstrap Files:} + +If any of you look closely at the bootstrap file that is produced and used for +the restore (I sure do), you will probably notice that the FileIndex item does +not include all the files saved to the tape. This is because in some instances +there are duplicates (especially in the case of an Incremental save), and in +such circumstances, {\bf Bacula} restores only the last of multiple copies of +a file or directory. + +\label{Win3233} +\section{Disaster Recovery of Win32 Systems} +\index[general]{Systems!Disaster Recovery of Win32} +\index[general]{Disaster Recovery of Win32 Systems} + +Due to open system files, and registry problems, Bacula cannot save and +restore a complete Win2K/XP/NT environment. + +A suggestion by Damian Coutts using Microsoft's NTBackup utility in +conjunction with Bacula should permit a Full bare metal restore of Win2K/XP +(and possibly NT systems). His suggestion is to do an NTBackup of the critical +system state prior to running a Bacula backup with the following command: + +\footnotesize +\begin{verbatim} +ntbackup backup systemstate /F c:\systemstate.bkf +\end{verbatim} +\normalsize + +The {\bf backup} is the command, the {\bf systemstate} says to backup only the +system state and not all the user files, and the {\bf /F +c:\textbackslash{}systemstate.bkf} specifies where to write the state file. +this file must then be saved and restored by Bacula. This command +can be put in a Client Run Before Job directive so that it is automatically +run during each backup, and thus saved to a Bacula Volume. + +To restore the system state, you first reload a base operating system, then +you would use Bacula to restore all the users files and to recover the {\bf +c:\textbackslash{}systemstate.bkf} file, and finally, run {\bf NTBackup} and +{\bf catalogue} the system statefile, and then select it for restore. The +documentation says you can't run a command line restore of the systemstate. + +This procedure has been confirmed to work by Ludovic Strappazon -- many +thanks! + +A new tool is provided in the form of a bacula plugin for the BartPE rescue +CD. BartPE is a self-contained WindowsXP boot CD which you can make using the +PeBuilder tools available at +\elink{http://www.nu2.nu/pebuilder/}{\url{http://www.nu2.nu/pebuilder/}} and a valid +Windows XP SP1 CDROM. The plugin is provided as a zip archive. Unzip the file +and copy the bacula directory into the plugin directory of your BartPE +installation. Edit the configuration files to suit your installation and build +your CD according to the instructions at Bart's site. This will permit you to +boot from the cd, configure and start networking, start the bacula file client +and access your director with the console program. The programs menu on the +booted CD contains entries to install the file client service, start the file +client service, and start the WX-Console. You can also open a command line +window and CD Programs\textbackslash{}Bacula and run the command line console +bconsole. + +\section{Ownership and Permissions on Win32 Systems} +\index[general]{Systems!Resetting Directory and File Ownership and Permissions +on Win32} +\index[general]{Resetting Directory and File Ownership and Permissions on +Win32 Systems} +% TODO: should this be in the win32 chapter? + +Bacula versions after 1.31 should properly restore ownership and permissions +on all WinNT/XP/2K systems. If you do experience problems, generally in +restores to alternate directories because higher level directories were not +backed up by Bacula, you can correct any problems with the {\bf SetACL} +available under the GPL license at: +\elink{http://sourceforge.net/projects/setacl/}{\url{http://sourceforge.net/project% +s/setacl/}}. + +\section{Alternate Disaster Recovery Suggestion for Win32 Systems} +\index[general]{Systems!Alternate Disaster Recovery Suggestion for Win32} +\index[general]{Alternate Disaster Recovery Suggestion for Win32 Systems} +% TODO: should this be in the win32 chapter?? + +Ludovic Strappazon has suggested an interesting way to backup and restore +complete Win32 partitions. Simply boot your Win32 system with a Linux Rescue +disk as described above for Linux, install a statically linked Bacula, and +backup any of the raw partitions you want. Then to restore the system, you +simply restore the raw partition or partitions. Here is the email that Ludovic +recently sent on that subject: + +\footnotesize +\begin{verbatim} +I've just finished testing my brand new cd LFS/Bacula +with a raw Bacula backup and restore of my portable. +I can't resist sending you the results: look at the rates !!! +hunt-dir: Start Backup JobId 100, Job=HuntBackup.2003-04-17_12.58.26 +hunt-dir: Bacula 1.30 (14Apr03): 17-Apr-2003 13:14 +JobId: 100 +Job: HuntBackup.2003-04-17_12.58.26 +FileSet: RawPartition +Backup Level: Full +Client: sauvegarde-fd +Start time: 17-Apr-2003 12:58 +End time: 17-Apr-2003 13:14 +Files Written: 1 +Bytes Written: 10,058,586,272 +Rate: 10734.9 KB/s +Software Compression: None +Volume names(s): 000103 +Volume Session Id: 2 +Volume Session Time: 1050576790 +Last Volume Bytes: 10,080,883,520 +FD termination status: OK +SD termination status: OK +Termination: Backup OK +hunt-dir: Begin pruning Jobs. +hunt-dir: No Jobs found to prune. +hunt-dir: Begin pruning Files. +hunt-dir: No Files found to prune. +hunt-dir: End auto prune. +hunt-dir: Start Restore Job RestoreFilesHunt.2003-04-17_13.21.44 +hunt-sd: Forward spacing to file 1. +hunt-dir: Bacula 1.30 (14Apr03): 17-Apr-2003 13:54 +JobId: 101 +Job: RestoreFilesHunt.2003-04-17_13.21.44 +Client: sauvegarde-fd +Start time: 17-Apr-2003 13:21 +End time: 17-Apr-2003 13:54 +Files Restored: 1 +Bytes Restored: 10,056,130,560 +Rate: 5073.7 KB/s +FD termination status: OK +Termination: Restore OK +hunt-dir: Begin pruning Jobs. +hunt-dir: No Jobs found to prune. +hunt-dir: Begin pruning Files. +hunt-dir: No Files found to prune. +hunt-dir: End auto prune. +\end{verbatim} +\normalsize + +\label{running} + +\section{Restoring to a Running System} +\index[general]{System!Restoring to a Running} +\index[general]{Restoring to a Running System} + +If for some reason you want to do a Full restore to a system that has a +working kernel (not recommended), you will need to take care not to +overwrite the following files: + +\footnotesize +\begin{verbatim} +/etc/grub.conf +/etc/X11/Conf +/etc/fstab +/etc/mtab +/lib/modules +/usr/modules +/usr/X11R6 +/etc/modules.conf +\end{verbatim} +\normalsize + +\label{Resources} + +\section{Additional Resources} +\index[general]{Additional Resources} +\index[general]{Resources!Additional} + +Many thanks to Charles Curley who wrote +\elink{Linux Complete Backup and Recovery HOWTO} +{\url{http://www.tldp.org/HOWTO/Linux-Complete-Backup-and-Recovery-HOWTO/index.html% +}} for the +\elink{The Linux Documentation Project}{\url{http://www.tldp.org/}}. This is an +excellent document on how to do Bare Metal Recovery on Linux systems, and it +was this document that made me realize that Bacula could do the same thing. + +You can find quite a few additional resources, both commercial and free at +\elink{Storage Mountain}{\url{http://www.backupcentral.com}}, formerly known as +Backup Central. + +And finally, the O'Reilly book, "Unix Backup \& Recovery" by W. Curtis +Preston covers virtually every backup and recovery topic including bare metal +recovery for a large range of Unix systems. diff --git a/docs/manuals/es/main/restore.tex b/docs/manuals/es/main/restore.tex new file mode 100644 index 00000000..4f2083c3 --- /dev/null +++ b/docs/manuals/es/main/restore.tex @@ -0,0 +1,1470 @@ +%% +%% +\chapter{The Restore Command} +\label{RestoreChapter} +\index[general]{Command!Console Restore} +\index[general]{Console Restore Command} + +\section{General} +\index[general]{General } + +Below, we will discuss restoring files with the Console {\bf restore} command, +which is the recommended way of doing restoring files. It is not possible +to restore files by automatically starting a job as you do with Backup, +Verify, ... jobs. However, in addition to the console restore command, +there is a standalone program named {\bf bextract}, which also permits +restoring files. For more information on this program, please see the +\ilink{Bacula Utility Programs}{bextract} chapter of this manual. We +don't particularly recommend the {\bf bextract} program because it +lacks many of the features of the normal Bacula restore, such as the +ability to restore Win32 files to Unix systems, and the ability to +restore access control lists (ACL). As a consequence, we recommend, +wherever possible to use Bacula itself for restores as described below. + +You may also want to look at the {\bf bls} program in the same chapter, +which allows you to list the contents of your Volumes. Finally, if you +have an old Volume that is no longer in the catalog, you can restore the +catalog entries using the program named {\bf bscan}, documented in the same +\ilink{Bacula Utility Programs}{bscan} chapter. + +In general, to restore a file or a set of files, you must run a {\bf restore} +job. That is a job with {\bf Type = Restore}. As a consequence, you will need +a predefined {\bf restore} job in your {\bf bacula-dir.conf} (Director's +config) file. The exact parameters (Client, FileSet, ...) that you define are +not important as you can either modify them manually before running the job or +if you use the {\bf restore} command, explained below, Bacula will +automatically set them for you. In fact, you can no longer simply run a restore +job. You must use the restore command. + +Since Bacula is a network backup program, you must be aware that when you +restore files, it is up to you to ensure that you or Bacula have selected the +correct Client and the correct hard disk location for restoring those files. +{\bf Bacula} will quite willingly backup client A, and restore it by sending +the files to a different directory on client B. Normally, you will want to +avoid this, but assuming the operating systems are not too different in their +file structures, this should work perfectly well, if so desired. +By default, Bacula will restore data to the same Client that was backed +up, and those data will be restored not to the original places but to +{\bf /tmp/bacula-restores}. You may modify any of these defaults when the +restore command prompts you to run the job by selecting the {\bf mod} +option. + +\label{Example1} +\section{The Restore Command} +\index[general]{Command!Restore} +\index[general]{Restore Command} + +Since Bacula maintains a catalog of your files and on which Volumes (disk or +tape), they are stored, it can do most of the bookkeeping work, allowing you +simply to specify what kind of restore you want (current, before a particular +date), and what files to restore. Bacula will then do the rest. + +This is accomplished using the {\bf restore} command in the Console. First you +select the kind of restore you want, then the JobIds are selected, +the File records for those Jobs are placed in an internal Bacula directory +tree, and the restore enters a file selection mode that allows you to +interactively walk up and down the file tree selecting individual files to be +restored. This mode is somewhat similar to the standard Unix {\bf restore} +program's interactive file selection mode. + +If a Job's file records have been pruned from the catalog, the {\bf restore} +command will be unable to find any files to restore. Bacula will ask if you +want to restore all of them or if you want to use a regular expression to +restore only a selection while reading media. See \ilink{FileRegex + option}{FileRegex} and below for more details on this. + +Within the Console program, after entering the {\bf restore} command, you are +presented with the following selection prompt: + +\footnotesize +\begin{verbatim} +First you select one or more JobIds that contain files +to be restored. You will be presented several methods +of specifying the JobIds. Then you will be allowed to +select which files from those JobIds are to be restored. +To select the JobIds, you have the following choices: + 1: List last 20 Jobs run + 2: List Jobs where a given File is saved + 3: Enter list of comma separated JobIds to select + 4: Enter SQL list command + 5: Select the most recent backup for a client + 6: Select backup for a client before a specified time + 7: Enter a list of files to restore + 8: Enter a list of files to restore before a specified time + 9: Find the JobIds of the most recent backup for a client + 10: Find the JobIds for a backup for a client before a specified time + 11: Enter a list of directories to restore for found JobIds + 12: Cancel +Select item: (1-12): +\end{verbatim} +\normalsize + +There are a lot of options, and as a point of reference, most people will +want to slect item 5 (the most recent backup for a client). The details +of the above options are: + +\begin{itemize} +\item Item 1 will list the last 20 jobs run. If you find the Job you want, + you can then select item 3 and enter its JobId(s). + +\item Item 2 will list all the Jobs where a specified file is saved. If you + find the Job you want, you can then select item 3 and enter the JobId. + +\item Item 3 allows you the enter a list of comma separated JobIds whose + files will be put into the directory tree. You may then select which + files from those JobIds to restore. Normally, you would use this option + if you have a particular version of a file that you want to restore and + you know its JobId. The most common options (5 and 6) will not select + a job that did not terminate normally, so if you know a file is + backed up by a Job that failed (possibly because of a system crash), you + can access it through this option by specifying the JobId. + +\item Item 4 allows you to enter any arbitrary SQL command. This is + probably the most primitive way of finding the desired JobIds, but at + the same time, the most flexible. Once you have found the JobId(s), you + can select item 3 and enter them. + +\item Item 5 will automatically select the most recent Full backup and all + subsequent incremental and differential backups for a specified Client. + These are the Jobs and Files which, if reloaded, will restore your + system to the most current saved state. It automatically enters the + JobIds found into the directory tree in an optimal way such that only + the most recent copy of any particular file found in the set of Jobs + will be restored. This is probably the most convenient of all the above + options to use if you wish to restore a selected Client to its most + recent state. + + There are two important things to note. First, this automatic selection + will never select a job that failed (terminated with an error status). + If you have such a job and want to recover one or more files from it, + you will need to explicitly enter the JobId in item 3, then choose the + files to restore. + + If some of the Jobs that are needed to do the restore have had their + File records pruned, the restore will be incomplete. Bacula currently + does not correctly detect this condition. You can however, check for + this by looking carefully at the list of Jobs that Bacula selects and + prints. If you find Jobs with the JobFiles column set to zero, when + files should have been backed up, then you should expect problems. + + If all the File records have been pruned, Bacula will realize that there + are no file records in any of the JobIds chosen and will inform you. It + will then propose doing a full restore (non-selective) of those JobIds. + This is possible because Bacula still knows where the beginning of the + Job data is on the Volumes, even if it does not know where particular + files are located or what their names are. + +\item Item 6 allows you to specify a date and time, after which Bacula will + automatically select the most recent Full backup and all subsequent + incremental and differential backups that started before the specified date + and time. + +\item Item 7 allows you to specify one or more filenames (complete path + required) to be restored. Each filename is entered one at a time or if you + prefix a filename with the less-than symbol (\lt{}) Bacula will read that + file and assume it is a list of filenames to be restored. If you + prefix the filename with a question mark (?), then the filename will + be interpreted as an SQL table name, and Bacula will include the rows + of that table in the list to be restored. The table must contain the + JobId in the first column and the FileIndex in the second column. + This table feature is intended for external programs that want to build + their own list of files to be restored. + The filename entry mode is terminated by entering a blank line. + +\item Item 8 allows you to specify a date and time before entering the + filenames. See Item 7 above for more details. + +\item Item 9 allows you find the JobIds of the most recent backup for + a client. This is much like option 5 (it uses the same code), but + those JobIds are retained internally as if you had entered them + manually. You may then select item 11 (see below) to restore one + or more directories. + +\item Item 10 is the same as item 9, except that it allows you to enter + a before date (as with item 6). These JobIds will then be retained + internally. + +\index[general]{Restore Directories} +\item Item 11 allows you to enter a list of JobIds from which you can + select directories to be restored. The list of JobIds can have been + previously created by using either item 9 or 10 on the menu. You + may then enter a full path to a directory name or a filename preceded + by a less than sign (\lt{}). The filename should contain a list + of directories to be restored. All files in those directories will + be restored, but if the directory contains subdirectories, nothing + will be restored in the subdirectory unless you explicitly enter its + name. + +\item Item 12 allows you to cancel the restore command. +\end{itemize} + +As an example, suppose that we select item 5 (restore to most recent state). +If you have not specified a client=xxx on the command line, it +it will then ask for the desired Client, which on my system, will print all +the Clients found in the database as follows: + +\footnotesize +\begin{verbatim} +Defined clients: + 1: Rufus + 2: Matou + 3: Polymatou + 4: Minimatou + 5: Minou + 6: MatouVerify + 7: PmatouVerify + 8: RufusVerify + 9: Watchdog +Select Client (File daemon) resource (1-9): +\end{verbatim} +\normalsize + +You will probably have far fewer Clients than this example, and if you have +only one Client, it will be automatically selected. In this case, I enter +{\bf Rufus} to select the Client. Then Bacula needs to know what FileSet is +to be restored, so it prompts with: + +\footnotesize +\begin{verbatim} +The defined FileSet resources are: + 1: Full Set + 2: Other Files +Select FileSet resource (1-2): +\end{verbatim} +\normalsize + +If you have only one FileSet defined for the Client, it will be selected +automatically. I choose item 1, which is my full backup. Normally, you +will only have a single FileSet for each Job, and if your machines are +similar (all Linux) you may only have one FileSet for all your Clients. + +At this point, {\bf Bacula} has all the information it needs to find the most +recent set of backups. It will then query the database, which may take a bit +of time, and it will come up with something like the following. Note, some of +the columns are truncated here for presentation: + +\footnotesize +\begin{verbatim} ++-------+------+----------+-------------+-------------+------+-------+------------+ +| JobId | Levl | JobFiles | StartTime | VolumeName | File | SesId |VolSesTime | ++-------+------+----------+-------------+-------------+------+-------+------------+ +| 1,792 | F | 128,374 | 08-03 01:58 | DLT-19Jul02 | 67 | 18 | 1028042998 | +| 1,792 | F | 128,374 | 08-03 01:58 | DLT-04Aug02 | 0 | 18 | 1028042998 | +| 1,797 | I | 254 | 08-04 13:53 | DLT-04Aug02 | 5 | 23 | 1028042998 | +| 1,798 | I | 15 | 08-05 01:05 | DLT-04Aug02 | 6 | 24 | 1028042998 | ++-------+------+----------+-------------+-------------+------+-------+------------+ +You have selected the following JobId: 1792,1792,1797 +Building directory tree for JobId 1792 ... +Building directory tree for JobId 1797 ... +Building directory tree for JobId 1798 ... +cwd is: / +$ +\end{verbatim} +\normalsize + +Depending on the number of {\bf JobFiles} for each JobId, the {\bf Building +directory tree ..."} can take a bit of time. If you notice ath all the +JobFiles are zero, your Files have probably been pruned and you will not be +able to select any individual files -- it will be restore everything or +nothing. + +In our example, Bacula found four Jobs that comprise the most recent backup of +the specified Client and FileSet. Two of the Jobs have the same JobId because +that Job wrote on two different Volumes. The third Job was an incremental +backup to the previous Full backup, and it only saved 254 Files compared to +128,374 for the Full backup. The fourth Job was also an incremental backup +that saved 15 files. + +Next Bacula entered those Jobs into the directory tree, with no files marked +to be restored as a default, tells you how many files are in the tree, and +tells you that the current working directory ({\bf cwd}) is /. Finally, Bacula +prompts with the dollar sign (\$) to indicate that you may enter commands to +move around the directory tree and to select files. + +If you want all the files to automatically be marked when the directory +tree is built, you could have entered the command {\bf restore all}, or +at the \$ prompt, you can simply enter {\bf mark *}. + +Instead of choosing item 5 on the first menu (Select the most recent backup +for a client), if we had chosen item 3 (Enter list of JobIds to select) and we +had entered the JobIds {\bf 1792,1797,1798} we would have arrived at the same +point. + +One point to note, if you are manually entering JobIds, is that you must enter +them in the order they were run (generally in increasing JobId order). If you +enter them out of order and the same file was saved in two or more of the +Jobs, you may end up with an old version of that file (i.e. not the most +recent). + +Directly entering the JobIds can also permit you to recover data from +a Job that wrote files to tape but that terminated with an error status. + +While in file selection mode, you can enter {\bf help} or a question mark (?) +to produce a summary of the available commands: + +\footnotesize +\begin{verbatim} + Command Description + ======= =========== + cd change current directory + count count marked files in and below the cd + dir long list current directory, wildcards allowed + done leave file selection mode + estimate estimate restore size + exit same as done command + find find files, wildcards allowed + help print help + ls list current directory, wildcards allowed + lsmark list the marked files in and below the cd + mark mark dir/file to be restored recursively in dirs + markdir mark directory name to be restored (no files) + pwd print current working directory + unmark unmark dir/file to be restored recursively in dir + unmarkdir unmark directory name only no recursion + quit quit and do not do restore + ? print help +\end{verbatim} +\normalsize + +As a default no files have been selected for restore (unless you +added {\bf all} to the command line. If you want to restore +everything, at this point, you should enter {\bf mark *}, and then {\bf done} +and {\bf Bacula} will write the bootstrap records to a file and request your +approval to start a restore job. + +If you do not enter the above mentioned {\bf mark *} command, you will start +with an empty slate. Now you can simply start looking at the tree and {\bf +mark} particular files or directories you want restored. It is easy to make +a mistake in specifying a file to mark or unmark, and Bacula's error handling +is not perfect, so please check your work by using the {\bf ls} or {\bf dir} +commands to see what files are actually selected. Any selected file has its +name preceded by an asterisk. + +To check what is marked or not marked, enter the {\bf count} command, which +displays: + +\footnotesize +\begin{verbatim} +128401 total files. 128401 marked to be restored. + +\end{verbatim} +\normalsize + +Each of the above commands will be described in more detail in the next +section. We continue with the above example, having accepted to restore all +files as Bacula set by default. On entering the {\bf done} command, Bacula +prints: + +\footnotesize +\begin{verbatim} +Bootstrap records written to /home/kern/bacula/working/restore.bsr +The job will require the following + Volume(s) Storage(s) SD Device(s) +=========================================================================== + + DLT-19Jul02 Tape DLT8000 + DLT-04Aug02 Tape DLT8000 + +128401 files selected to restore. +Run Restore job +JobName: kernsrestore +Bootstrap: /home/kern/bacula/working/restore.bsr +Where: /tmp/bacula-restores +Replace: always +FileSet: Other Files +Client: Rufus +Storage: Tape +When: 2006-12-11 18:20:33 +Catalog: MyCatalog +Priority: 10 +OK to run? (yes/mod/no): + +\end{verbatim} +\normalsize + +Please examine each of the items very carefully to make sure that they are +correct. In particular, look at {\bf Where}, which tells you where in the +directory structure the files will be restored, and {\bf Client}, which +tells you which client will receive the files. Note that by default the +Client which will receive the files is the Client that was backed up. +These items will not always be completed with the correct values depending +on which of the restore options you chose. You can change any of these +default items by entering {\bf mod} and responding to the prompts. + +The above assumes that you have defined a {\bf Restore} Job resource in your +Director's configuration file. Normally, you will only need one Restore Job +resource definition because by its nature, restoring is a manual operation, +and using the Console interface, you will be able to modify the Restore Job to +do what you want. + +An example Restore Job resource definition is given below. + +Returning to the above example, you should verify that the Client name is +correct before running the Job. However, you may want to modify some of the +parameters of the restore job. For example, in addition to checking the Client +it is wise to check that the Storage device chosen by Bacula is indeed +correct. Although the {\bf FileSet} is shown, it will be ignored in restore. +The restore will choose the files to be restored either by reading the {\bf +Bootstrap} file, or if not specified, it will restore all files associated +with the specified backup {\bf JobId} (i.e. the JobId of the Job that +originally backed up the files). + +Finally before running the job, please note that the default location for +restoring files is {\bf not} their original locations, but rather the directory +{\bf /tmp/bacula-restores}. You can change this default by modifying your {\bf +bacula-dir.conf} file, or you can modify it using the {\bf mod} option. If you +want to restore the files to their original location, you must have {\bf +Where} set to nothing or to the root, i.e. {\bf /}. + +If you now enter {\bf yes}, Bacula will run the restore Job. The Storage +daemon will first request Volume {\bf DLT-19Jul02} and after the appropriate +files have been restored from that volume, it will request Volume {\bf +DLT-04Aug02}. + +\subsection{Restore a pruned job using a pattern} + During a restore, if all File records are pruned from the catalog + for a Job, normally Bacula can restore only all files saved. That + is there is no way using the catalog to select individual files. + With this new feature, Bacula will ask if you want to specify a Regex + expression for extracting only a part of the full backup. + +\begin{verbatim} + Building directory tree for JobId(s) 1,3 ... + There were no files inserted into the tree, so file selection + is not possible.Most likely your retention policy pruned the files + + Do you want to restore all the files? (yes|no): no + + Regexp matching files to restore? (empty to abort): /tmp/regress/(bin|tests)/ + Bootstrap records written to /tmp/regress/working/zog4-dir.restore.1.bsr +\end{verbatim} + + See also \ilink{FileRegex bsr option}{FileRegex} for more information. + +\section{Selecting Files by Filename} +\index[general]{Selecting Files by Filename } +\index[general]{Filename!Selecting Files by } + +If you have a small number of files to restore, and you know the filenames, +you can either put the list of filenames in a file to be read by Bacula, or +you can enter the names one at a time. The filenames must include the full +path and filename. No wild cards are used. + +To enter the files, after the {\bf restore}, you select item number 7 from the +prompt list: + +\footnotesize +\begin{verbatim} +To select the JobIds, you have the following choices: + 1: List last 20 Jobs run + 2: List Jobs where a given File is saved + 3: Enter list of comma separated JobIds to select + 4: Enter SQL list command + 5: Select the most recent backup for a client + 6: Select backup for a client before a specified time + 7: Enter a list of files to restore + 8: Enter a list of files to restore before a specified time + 9: Find the JobIds of the most recent backup for a client + 10: Find the JobIds for a backup for a client before a specified time + 11: Enter a list of directories to restore for found JobIds + 12: Cancel +Select item: (1-12): +\end{verbatim} +\normalsize + +which then prompts you for the client name: + +\footnotesize +\begin{verbatim} +Defined Clients: + 1: Timmy + 2: Tibs + 3: Rufus +Select the Client (1-3): 3 +\end{verbatim} +\normalsize + +Of course, your client list will be different, and if you have only one +client, it will be automatically selected. And finally, Bacula requests you to +enter a filename: + +\footnotesize +\begin{verbatim} +Enter filename: +\end{verbatim} +\normalsize + +At this point, you can enter the full path and filename + +\footnotesize +\begin{verbatim} +Enter filename: /home/kern/bacula/k/Makefile.in +Enter filename: +\end{verbatim} +\normalsize + +as you can see, it took the filename. If Bacula cannot find a copy of the +file, it prints the following: + +\footnotesize +\begin{verbatim} +Enter filename: junk filename +No database record found for: junk filename +Enter filename: +\end{verbatim} +\normalsize + +If you want Bacula to read the filenames from a file, you simply precede the +filename with a less-than symbol (\lt{}). When you have entered all the +filenames, you enter a blank line, and Bacula will write the bootstrap file, +tells you what tapes will be used, and proposes a Restore job to be run: + +\footnotesize +\begin{verbatim} +Enter filename: +Automatically selected Storage: DDS-4 +Bootstrap records written to /home/kern/bacula/working/restore.bsr +The restore job will require the following Volumes: + + test1 +1 file selected to restore. +Run Restore job +JobName: kernsrestore +Bootstrap: /home/kern/bacula/working/restore.bsr +Where: /tmp/bacula-restores +Replace: always +FileSet: Other Files +Client: Rufus +Storage: DDS-4 +When: 2003-09-11 10:20:53 +Priority: 10 +OK to run? (yes/mod/no): +\end{verbatim} +\normalsize + +It is possible to automate the selection by file by putting your list of files +in say {\bf /tmp/file-list}, then using the following command: + +\footnotesize +\begin{verbatim} +restore client=Rufus file= = / ! ; % : , ~ # = & +\end{verbatim} + +You can use several expressions separated by a commas. + +\subsection*{Examples} + +\begin{tabular}{|c|c|c|l|} +\hline +Orignal filename & New filename & RegexWhere & Comments \\ +\hline +\hline +\texttt{c:/system.ini} & \texttt{c:/system.old.ini} & \texttt{/.ini\$/.old.ini/} & \$ matches end of name\\ +\hline +\texttt{/prod/u01/pdata/} & \texttt{/rect/u01/rdata} & \texttt{/prod/rect/,/pdata/rdata/} & uses two regexp\\ +\hline +\texttt{/prod/u01/pdata/} & \texttt{/rect/u01/rdata} & \texttt{!/prod/!/rect/!,/pdata/rdata/} & use \texttt{!} as separator\\ +\hline +\texttt{C:/WINNT} & \texttt{d:/WINNT} & \texttt{/c:/d:/i} & case insensitive pattern match \\ +\hline + +\end{tabular} + +%\subsubsection{Using group} +% +%Like with Perl or Sed, you can make submatch with \texttt{()}, +% +%\subsubsection*{Examples} + + +%\subsubsection{Options} +% +% i Do case-insensitive pattern matching. + +\section{Restoring Directory Attributes} +\index[general]{Attributes!Restoring Directory } +\index[general]{Restoring Directory Attributes } + +Depending how you do the restore, you may or may not get the directory entries +back to their original state. Here are a few of the problems you can +encounter, and for same machine restores, how to avoid them. + +\begin{itemize} +\item You backed up on one machine and are restoring to another that is + either a different OS or doesn't have the same users/groups defined. Bacula + does the best it can in these situations. Note, Bacula has saved the + user/groups in numeric form, which means on a different machine, they + may map to different user/group names. + +\item You are restoring into a directory that is already created and has + file creation restrictions. Bacula tries to reset everything but + without walking up the full chain of directories and modifying them all + during the restore, which Bacula does and will not do, getting + permissions back correctly in this situation depends to a large extent + on your OS. + +\item You are doing a recursive restore of a directory tree. In this case + Bacula will restore a file before restoring the file's parent directory + entry. In the process of restoring the file Bacula will create the + parent directory with open permissions and ownership of the file being + restored. Then when Bacula tries to restore the parent directory Bacula + sees that it already exists (Similar to the previous situation). If you + had set the Restore job's "Replace" property to "never" then Bacula will + not change the directory's permissions and ownerships to match what it + backed up, you should also notice that the actual number of files + restored is less then the expected number. If you had set the Restore + job's "Replace" property to "always" then Bacula will change the + Directory's ownership and permissions to match what it backed up, also + the actual number of files restored should be equal to the expected + number. + +\item You selected one or more files in a directory, but did not select the + directory entry to be restored. In that case, if the directory is not + on disk Bacula simply creates the directory with some default attributes + which may not be the same as the original. If you do not select a + directory and all its contents to be restored, you can still select + items within the directory to be restored by individually marking those + files, but in that case, you should individually use the "markdir" + command to select all higher level directory entries (one at a time) to + be restored if you want the directory entries properly restored. + +\item The {\bf bextract} program does not restore access control lists + (ACLs), nor will it restore non-portable Win32 data (default) to Unix + machines. +\end{itemize} + +\label{Windows} +\section{Restoring on Windows} +\index[general]{Restoring on Windows } +\index[general]{Windows!Restoring on } + +If you are restoring on WinNT/2K/XP systems, Bacula will restore the files +with the original ownerships and permissions as would be expected. This is +also true if you are restoring those files to an alternate directory (using +the Where option in restore). However, if the alternate directory does not +already exist, the Bacula File daemon (Client) will try to create it. In +some cases, it may not create the directories, and if it does since the +File daemon runs under the SYSTEM account, the directory will be created +with SYSTEM ownership and permissions. In this case, you may have problems +accessing the newly restored files. + +To avoid this problem, you should create any alternate directory before +doing the restore. Bacula will not change the ownership and permissions of +the directory if it is already created as long as it is not one of the +directories being restored (i.e. written to tape). + +The default restore location is {\bf /tmp/bacula-restores/} and if you are +restoring from drive {\bf E:}, the default will be +{\bf /tmp/bacula-restores/e/}, so you should ensure that this directory +exists before doing the restore, or use the {\bf mod} option to +select a different {\bf where} directory that does exist. + +Some users have experienced problems restoring files that participate in +the Active Directory. They also report that changing the userid under which +Bacula (bacula-fd.exe) runs, from SYSTEM to a Domain Admin userid, resolves +the problem. + + +\section{Restoring Files Can Be Slow} +\index[general]{Slow!Restoring Files Can Be } +\index[general]{Restoring Files Can Be Slow } + +Restoring files is generally {\bf much} slower than backing them up for several +reasons. The first is that during a backup the tape is normally already +positioned and Bacula only needs to write. On the other hand, because restoring +files is done so rarely, Bacula keeps only the start file and block on the +tape for the whole job rather than on a file by file basis which would use +quite a lot of space in the catalog. + +Bacula will forward space to the correct file mark on the tape for the Job, +then forward space to the correct block, and finally sequentially read each +record until it gets to the correct one(s) for the file or files you want to +restore. Once the desired files are restored, Bacula will stop reading the +tape. + +Finally, instead of just reading a file for backup, during the restore, Bacula +must create the file, and the operating system must allocate disk space for +the file as Bacula is restoring it. + +For all the above reasons the restore process is generally much slower than +backing up (sometimes it takes three times as long). + +\section{Problems Restoring Files} +\index[general]{Files!Problems Restoring } +\index[general]{Problems Restoring Files } + +The most frequent problems users have restoring files are error messages such +as: + +\footnotesize +\begin{verbatim} +04-Jan 00:33 z217-sd: RestoreFiles.2005-01-04_00.31.04 Error: +block.c:868 Volume data error at 20:0! Short block of 512 bytes on +device /dev/tape discarded. +\end{verbatim} +\normalsize + +or + +\footnotesize +\begin{verbatim} +04-Jan 00:33 z217-sd: RestoreFiles.2005-01-04_00.31.04 Error: +block.c:264 Volume data error at 20:0! Wanted ID: "BB02", got ".". +Buffer discarded. +\end{verbatim} +\normalsize + +Both these kinds of messages indicate that you were probably running your tape +drive in fixed block mode rather than variable block mode. Fixed block mode +will work with any program that reads tapes sequentially such as tar, but +Bacula repositions the tape on a block basis when restoring files because this +will speed up the restore by orders of magnitude when only a few files are being +restored. There are several ways that you can attempt to recover from this +unfortunate situation. + +Try the following things, each separately, and reset your Device resource to +what it is now after each individual test: + +\begin{enumerate} +\item Set "Block Positioning = no" in your Device resource and try the + restore. This is a new directive and untested. + +\item Set "Minimum Block Size = 512" and "Maximum Block Size = 512" and + try the restore. If you are able to determine the block size your drive + was previously using, you should try that size if 512 does not work. + This is a really horrible solution, and it is not at all recommended + to continue backing up your data without correcting this condition. + Please see the Tape Testing chapter for more on this. + +\item Try editing the restore.bsr file at the Run xxx yes/mod/no prompt + before starting the restore job and remove all the VolBlock statements. + These are what causes Bacula to reposition the tape, and where problems + occur if you have a fixed block size set for your drive. The VolFile + commands also cause repositioning, but this will work regardless of the + block size. + +\item Use bextract to extract the files you want -- it reads the Volume + sequentially if you use the include list feature, or if you use a .bsr + file, but remove all the VolBlock statements after the .bsr file is + created (at the Run yes/mod/no) prompt but before you start the restore. +\end{enumerate} + +\section{Restore Errors} +\index[general]{Errors!Restore} +\index[general]{Restore Errors} + +There are a number of reasons why there may be restore errors or +warning messages. Some of the more common ones are: + +\begin{description} + +\item [file count mismatch] + This can occur for the following reasons: + \begin{itemize} + \item You requested Bacula not to overwrite existing or newer + files. + \item A Bacula miscount of files/directories. This is an + on-going problem due to the complications of directories, + soft/hard link, and such. Simply check that all the files you + wanted were actually restored. + \end{itemize} + +\item [file size error] + When Bacula restores files, it checks that the size of the + restored file is the same as the file status data it saved + when starting the backup of the file. If the sizes do not + agree, Bacula will print an error message. This size mismatch + most often occurs because the file was being written as Bacula + backed up the file. In this case, the size that Bacula + restored will be greater than the status size. This often + happens with log files. + + If the restored size is smaller, then you should be concerned + about a possible tape error and check the Bacula output as + well as your system logs. +\end{description} + + + +\section{Example Restore Job Resource} +\index[general]{Example Restore Job Resource } +\index[general]{Resource!Example Restore Job } + +\footnotesize +\begin{verbatim} +Job { + Name = "RestoreFiles" + Type = Restore + Client = Any-client + FileSet = "Any-FileSet" + Storage = Any-storage + Where = /tmp/bacula-restores + Messages = Standard + Pool = Default +} +\end{verbatim} +\normalsize + +If {\bf Where} is not specified, the default location for restoring files will +be their original locations. +\label{Selection} + +\section{File Selection Commands} +\index[general]{Commands!File Selection } +\index[general]{File Selection Commands } + +After you have selected the Jobs to be restored and Bacula has created the +in-memory directory tree, you will enter file selection mode as indicated by +the dollar sign ({\bf \$}) prompt. While in this mode, you may use the +commands listed above. The basic idea is to move up and down the in memory +directory structure with the {\bf cd} command much as you normally do on the +system. Once you are in a directory, you may select the files that you want +restored. As a default no files are marked to be restored. If you wish to +start with all files, simply enter: {\bf cd /} and {\bf mark *}. Otherwise +proceed to select the files you wish to restore by marking them with the {\bf +mark} command. The available commands are: + +\begin{description} + +\item [cd] + The {\bf cd} command changes the current directory to the argument + specified. + It operates much like the Unix {\bf cd} command. Wildcard specifications are + not permitted. + + Note, on Windows systems, the various drives (c:, d:, ...) are treated like + a + directory within the file tree while in the file selection mode. As a + consequence, you must do a {\bf cd c:} or possibly in some cases a {\bf cd + C:} (note upper case) to get down to the first directory. + +\item [dir] + \index[dir]{dir } + The {\bf dir} command is similar to the {\bf ls} command, except that it + prints it in long format (all details). This command can be a bit slower + than + the {\bf ls} command because it must access the catalog database for the + detailed information for each file. + +\item [estimate] + \index[dir]{estimate } + The {\bf estimate} command prints a summary of the total files in the tree, + how many are marked to be restored, and an estimate of the number of bytes + to + be restored. This can be useful if you are short on disk space on the + machine + where the files will be restored. + +\item [find] + \index[dir]{find} + The {\bf find} command accepts one or more arguments and displays all files + in the tree that match that argument. The argument may have wildcards. It is + somewhat similar to the Unix command {\bf find / -name arg}. + +\item [ls] + The {\bf ls} command produces a listing of all the files contained in the + current directory much like the Unix {\bf ls} command. You may specify an + argument containing wildcards, in which case only those files will be + listed. + + Any file that is marked to be restored will have its name preceded by an + asterisk ({\bf *}). Directory names will be terminated with a forward slash + ({\bf /}) to distinguish them from filenames. + +\item [lsmark] + \index[fd]{lsmark} + The {\bf lsmark} command is the same as the {\bf ls} except that it will + print only those files marked for extraction. The other distinction is that + it will recursively descend into any directory selected. + +\item [mark] + \index[dir]{mark} + The {\bf mark} command allows you to mark files to be restored. It takes a + single argument which is the filename or directory name in the current + directory to be marked for extraction. The argument may be a wildcard + specification, in which case all files that match in the current directory + are marked to be restored. If the argument matches a directory rather than a + file, then the directory and all the files contained in that directory + (recursively) are marked to be restored. Any marked file will have its name + preceded with an asterisk ({\bf *}) in the output produced by the {\bf ls} +or + {\bf dir} commands. Note, supplying a full path on the mark command does not + work as expected to select a file or directory in the current directory. + Also, the {\bf mark} command works on the current and lower directories but + does not touch higher level directories. + + After executing the {\bf mark} command, it will print a brief summary: + +\footnotesize +\begin{verbatim} + No files marked. + +\end{verbatim} +\normalsize + + If no files were marked, or: + +\footnotesize +\begin{verbatim} + nn files marked. + +\end{verbatim} +\normalsize + + if some files are marked. + +\item [unmark] + \index[dir]{unmark } + The {\bf unmark} is identical to the {\bf mark} command, except that it + unmarks the specified file or files so that they will not be restored. Note: + the {\bf unmark} command works from the current directory, so it does not + unmark any files at a higher level. First do a {\bf cd /} before the {\bf + unmark *} command if you want to unmark everything. + +\item [pwd] + \index[dir]{pwd } + The {\bf pwd} command prints the current working directory. It accepts no + arguments. + +\item [count] + \index[dir]{count } + The {\bf count} command prints the total files in the directory tree and the + number of files marked to be restored. + +\item [done] + \index[dir]{done } + This command terminates file selection mode. + +\item [exit] + \index[fd]{exit } + This command terminates file selection mode (the same as done). + +\item [quit] + \index[fd]{quit } + This command terminates the file selection and does not run the restore +job. + + +\item [help] + \index[fd]{help } + This command prints a summary of the commands available. + +\item [?] + This command is the same as the {\bf help} command. +\end{description} + +\label{database_restore} +\section{Restoring When Things Go Wrong} +\index[general]{Restoring When Things Go Wrong } +\index[general]{Restoring Your Database} +\index[general]{Database!Restoring} + +This and the following sections will try to present a few of the kinds of +problems that can come up making restoring more difficult. We will try to +provide a few ideas how to get out of these problem situations. +In addition to what is presented here, there is more specific information +on restoring a \ilink{Client}{restore_client} and your +\ilink{Server}{restore_server} in the \ilink{Disaster Recovery Using +Bacula}{RescueChapter} chapter of this manual. + +\begin{description} +\item[Problem] + My database is broken. +\item[Solution] + For SQLite, use the vacuum command to try to fix the database. For either + MySQL or PostgreSQL, see the vendor's documentation. They have specific tools + that check and repair databases, see the \ilink{database + repair}{DatabaseRepair} sections of this manual for links to vendor + information. + + Assuming the above does not resolve the problem, you will need to restore + or rebuild your catalog. Note, if it is a matter of some + inconsistencies in the Bacula tables rather than a broken database, then + running \ilink{dbcheck}{dbcheck} might help, but you will need to ensure + that your database indexes are properly setup. Please see + the \ilink{Database Performance Issues}{DatabasePerformance} sections + of this manual for more details. + +\item[Problem] + How do I restore my catalog? +\item[Solution with a Catalog backup] + If you have backed up your database nightly (as you should) and you + have made a bootstrap file, you can immediately load back your + database (or the ASCII SQL output). Make a copy of your current + database, then re-initialize it, by running the following scripts: +\begin{verbatim} + ./drop_bacula_tables + ./make_bacula_tables +\end{verbatim} + After re-initializing the database, you should be able to run + Bacula. If you now try to use the restore command, it will not + work because the database will be empty. However, you can manually + run a restore job and specify your bootstrap file. You do so + by entering the {bf run} command in the console and selecting the + restore job. If you are using the default bacula-dir.conf, this + Job will be named {\bf RestoreFiles}. Most likely it will prompt + you with something such as: + +\footnotesize +\begin{verbatim} +Run Restore job +JobName: RestoreFiles +Bootstrap: /home/kern/bacula/working/restore.bsr +Where: /tmp/bacula-restores +Replace: always +FileSet: Full Set +Client: rufus-fd +Storage: File +When: 2005-07-10 17:33:40 +Catalog: MyCatalog +Priority: 10 +OK to run? (yes/mod/no): +\end{verbatim} +\normalsize + + A number of the items will be different in your case. What you want to + do is: to use the mod option to change the Bootstrap to point to your + saved bootstrap file; and to make sure all the other items such as + Client, Storage, Catalog, and Where are correct. The FileSet is not + used when you specify a bootstrap file. Once you have set all the + correct values, run the Job and it will restore the backup of your + database, which is most likely an ASCII dump. + + You will then need to follow the instructions for your + database type to recreate the database from the ASCII backup file. + See the \ilink {Catalog Maintenance}{CatMaintenanceChapter} chapter of + this manual for examples of the command needed to restore a + database from an ASCII dump (they are shown in the Compacting Your + XXX Database sections). + + Also, please note that after you restore your database from an ASCII + backup, you do NOT want to do a {\bf make\_bacula\_tables} command, or + you will probably erase your newly restored database tables. + + +\item[Solution with a Job listing] + If you did save your database but did not make a bootstrap file, then + recovering the database is more difficult. You will probably need to + use bextract to extract the backup copy. First you should locate the + listing of the job report from the last catalog backup. It has + important information that will allow you to quickly find your database + file. For example, in the job report for the CatalogBackup shown below, + the critical items are the Volume name(s), the Volume Session Id and the + Volume Session Time. If you know those, you can easily restore your + Catalog. + +\footnotesize +\begin{verbatim} +22-Apr 10:22 HeadMan: Start Backup JobId 7510, +Job=CatalogBackup.2005-04-22_01.10.0 +22-Apr 10:23 HeadMan: Bacula 1.37.14 (21Apr05): 22-Apr-2005 10:23:06 + JobId: 7510 + Job: CatalogBackup.2005-04-22_01.10.00 + Backup Level: Full + Client: Polymatou + FileSet: "CatalogFile" 2003-04-10 01:24:01 + Pool: "Default" + Storage: "DLTDrive" + Start time: 22-Apr-2005 10:21:00 + End time: 22-Apr-2005 10:23:06 + FD Files Written: 1 + SD Files Written: 1 + FD Bytes Written: 210,739,395 + SD Bytes Written: 210,739,521 + Rate: 1672.5 KB/s + Software Compression: None + Volume name(s): DLT-22Apr05 + Volume Session Id: 11 + Volume Session Time: 1114075126 + Last Volume Bytes: 1,428,240,465 + Non-fatal FD errors: 0 + SD Errors: 0 + FD termination status: OK + SD termination status: OK + Termination: Backup OK +\end{verbatim} +\normalsize + + From the above information, you can manually create a bootstrap file, + and then follow the instructions given above for restoring your database. + A reconstructed bootstrap file for the above backup Job would look + like the following: + +\footnotesize +\begin{verbatim} +Volume="DLT-22Apr05" +VolSessionId=11 +VolSessionTime=1114075126 +FileIndex=1-1 +\end{verbatim} +\normalsize + + Where we have inserted the Volume name, Volume Session Id, and Volume + Session Time that correspond to the values in the job report. We've also + used a FileIndex of one, which will always be the case providing that + there was only one file backed up in the job. + + The disadvantage of this bootstrap file compared to what is created when + you ask for one to be written, is that there is no File and Block + specified, so the restore code must search all data in the Volume to find + the requested file. A fully specified bootstrap file would have the File + and Blocks specified as follows: + +\footnotesize +\begin{verbatim} +Volume="DLT-22Apr05" +VolSessionId=11 +VolSessionTime=1114075126 +VolFile=118-118 +VolBlock=0-4053 +FileIndex=1-1 +\end{verbatim} +\normalsize + + Once you have restored the ASCII dump of the database, + you will then to follow the instructions for your + database type to recreate the database from the ASCII backup file. + See the \ilink {Catalog Maintenance}{CatMaintenanceChapter} chapter of + this manual for examples of the command needed to restore a + database from an ASCII dump (they are shown in the Compacting Your + XXX Database sections). + + Also, please note that after you restore your database from an ASCII + backup, you do NOT want to do a {\bf make\_bacula\_tables} command, or + you will probably erase your newly restored database tables. + +\item [Solution without a Job Listing] + If you do not have a job listing, then it is a bit more difficult. + Either you use the \ilink{bscan}{bscan} program to scan the contents + of your tape into a database, which can be very time consuming + depending on the size of the tape, or you can use the \ilink{bls}{bls} + program to list everything on the tape, and reconstruct a bootstrap + file from the bls listing for the file or files you want following + the instructions given above. + + There is a specific example of how to use {\bf bls} below. + +\item [Problem] + I try to restore the last known good full backup by specifying + item 3 on the restore menu then the JobId to restore. Bacula + then reports: + +\footnotesize +\begin{verbatim} + 1 Job 0 Files +\end{verbatim} +\normalsize + and restores nothing. + +\item[Solution] + Most likely the File records were pruned from the database either due + to the File Retention period expiring or by explicitly purging the + Job. By using the "llist jobid=nn" command, you can obtain all the + important information about the job: + +\footnotesize +\begin{verbatim} +llist jobid=120 + JobId: 120 + Job: save.2005-12-05_18.27.33 + Job.Name: save + PurgedFiles: 0 + Type: B + Level: F + Job.ClientId: 1 + Client.Name: Rufus + JobStatus: T + SchedTime: 2005-12-05 18:27:32 + StartTime: 2005-12-05 18:27:35 + EndTime: 2005-12-05 18:27:37 + JobTDate: 1133803657 + VolSessionId: 1 + VolSessionTime: 1133803624 + JobFiles: 236 + JobErrors: 0 + JobMissingFiles: 0 + Job.PoolId: 4 + Pool.Name: Full + Job.FileSetId: 1 + FileSet.FileSet: BackupSet +\end{verbatim} +\normalsize + + Then you can find the Volume(s) used by doing: + +\footnotesize +\begin{verbatim} +sql +select VolumeName from JobMedia,Media where JobId=1 and JobMedia.MediaId=Media.MediaId; +\end{verbatim} +\normalsize + + Finally, you can create a bootstrap file as described in the previous + problem above using this information. + + If you are using Bacula version 1.38.0 or greater, when you select + item 3 from the menu and enter the JobId, it will ask you if + you would like to restore all the files in the job, and it will + collect the above information and write the bootstrap file for + you. + +\item [Problem] + You don't have a bootstrap file, and you don't have the Job report for + the backup of your database, but you did backup the database, and you + know the Volume to which it was backed up. + +\item [Solution] + Either bscan the tape (see below for bscanning), or better use {\bf bls} + to find where it is on the tape, then use {\bf bextract} to + restore the database. For example, + + +\footnotesize +\begin{verbatim} +./bls -j -V DLT-22Apr05 /dev/nst0 +\end{verbatim} +\normalsize + Might produce the following output: +\footnotesize +\begin{verbatim} +bls: butil.c:258 Using device: "/dev/nst0" for reading. +21-Jul 18:34 bls: Ready to read from volume "DLT-22Apr05" on device "DLTDrive" +(/dev/nst0). +Volume Record: File:blk=0:0 SessId=11 SessTime=1114075126 JobId=0 DataLen=164 +... +Begin Job Session Record: File:blk=118:0 SessId=11 SessTime=1114075126 +JobId=7510 + Job=CatalogBackup.2005-04-22_01.10.0 Date=22-Apr-2005 10:21:00 Level=F Type=B +End Job Session Record: File:blk=118:4053 SessId=11 SessTime=1114075126 +JobId=7510 + Date=22-Apr-2005 10:23:06 Level=F Type=B Files=1 Bytes=210,739,395 Errors=0 +Status=T +... +21-Jul 18:34 bls: End of Volume at file 201 on device "DLTDrive" (/dev/nst0), +Volume "DLT-22Apr05" +21-Jul 18:34 bls: End of all volumes. +\end{verbatim} +\normalsize + Of course, there will be many more records printed, but we have indicated + the essential lines of output. From the information on the Begin Job and End + Job Session Records, you can reconstruct a bootstrap file such as the one + shown above. + +\item[Problem] + How can I find where a file is stored. +\item[Solution] + Normally, it is not necessary, you just use the {\bf restore} command to + restore the most recently saved version (menu option 5), or a version + saved before a given date (menu option 8). If you know the JobId of the + job in which it was saved, you can use menu option 3 to enter that JobId. + + If you would like to know the JobId where a file was saved, select + restore menu option 2. + + You can also use the {\bf query} command to find information such as: +\footnotesize +\begin{verbatim} +*query +Available queries: + 1: List up to 20 places where a File is saved regardless of the +directory + 2: List where the most recent copies of a file are saved + 3: List last 20 Full Backups for a Client + 4: List all backups for a Client after a specified time + 5: List all backups for a Client + 6: List Volume Attributes for a selected Volume + 7: List Volumes used by selected JobId + 8: List Volumes to Restore All Files + 9: List Pool Attributes for a selected Pool + 10: List total files/bytes by Job + 11: List total files/bytes by Volume + 12: List Files for a selected JobId + 13: List Jobs stored on a selected MediaId + 14: List Jobs stored for a given Volume name + 15: List Volumes Bacula thinks are in changer + 16: List Volumes likely to need replacement from age or errors +Choose a query (1-16): +\end{verbatim} +\normalsize + +\item[Problem] + I didn't backup my database. What do I do now? +\item[Solution] + This is probably the worst of all cases, and you will probably have + to re-create your database from scratch and then bscan in all your + Volumes, which is a very long, painful, and inexact process. + +There are basically three steps to take: + +\begin{enumerate} +\item Ensure that your SQL server is running (MySQL or PostgreSQL) + and that the Bacula database (normally bacula) exists. See the + \ilink{Installation}{CreateDatabase} chapter of the manual. +\item Ensure that the Bacula databases are created. This is also + described at the above link. +\item Start and stop the Bacula Director using the propriate + bacula-dir.conf file so that it can create the Client and + Storage records which are not stored on the Volumes. Without these + records, scanning is unable to connect the Job records to the proper + client. +\end{enumerate} + +When the above is complete, you can begin bscanning your Volumes. Please +see the \ilink{bscan}{bscan} section of the Volume Utility Tools of this +chapter for more details. + +\end{description} diff --git a/docs/manuals/es/main/security.tex b/docs/manuals/es/main/security.tex new file mode 100644 index 00000000..7866410a --- /dev/null +++ b/docs/manuals/es/main/security.tex @@ -0,0 +1,332 @@ +%% +%% + +\chapter{Bacula Security Issues} +\label{SecurityChapter} +\index[general]{Bacula Security Issues} +\index[general]{Security} +\index[general]{Issues!Bacula Security} + +\begin{itemize} +\item Security means being able to restore your files, so read the + \ilink{Critical Items Chapter}{Critical} of this manual. +\item The Clients ({\bf bacula-fd}) must run as root to be able to access all + the system files. +\item It is not necessary to run the Director as root. +\item It is not necessary to run the Storage daemon as root, but you must + ensure that it can open the tape drives, which are often restricted to root + access by default. In addition, if you do not run the Storage daemon as root, + it will not be able to automatically set your tape drive parameters on most + OSes since these functions, unfortunately require root access. +\item You should restrict access to the Bacula configuration files, so that + the passwords are not world-readable. The {\bf Bacula} daemons are password + protected using CRAM-MD5 (i.e. the password is not sent across the network). + This will ensure that not everyone can access the daemons. It is a reasonably + good protection, but can be cracked by experts. +\item If you are using the recommended ports 9101, 9102, and 9103, you will + probably want to protect these ports from external access using a firewall + and/or using tcp wrappers ({\bf etc/hosts.allow}). +\item By default, all data that is sent across the network is unencrypted. + However, Bacula does support TLS (transport layer security) and can + encrypt transmitted data. Please read the + \ilink{TLS (SSL) Communications Encryption}{CommEncryption} + section of this manual. +\item You should ensure that the Bacula working directories are readable and + writable only by the Bacula daemons. +\item If you are using {\bf MySQL} it is not necessary for it to run with + {\bf root} permission. +\item The default Bacula {\bf grant-mysql-permissions} script grants all + permissions to use the MySQL database without a password. If you want + security, please tighten this up! +\item Don't forget that Bacula is a network program, so anyone anywhere on + the network with the console program and the Director's password can access + Bacula and the backed up data. +\item You can restrict what IP addresses Bacula will bind to by using the + appropriate {\bf DirAddress}, {\bf FDAddress}, or {\bf SDAddress} records in + the respective daemon configuration files. +\item Be aware that if you are backing up your database using the default + script, if you have a password on your database, it will be passed as + a command line option to that script, and any user will be able to see + this information. If you want it to be secure, you will need to pass it + by an environment variable or a secure file. + + See also \ilink{Backing Up Your Bacula + Database - Security Considerations }{BackingUpBaculaSecurityConsiderations} + for more information. +\end{itemize} + + +\section{Backward Compatibility} +\index[general]{Backward Compatibility} +One of the major goals of Bacula is to ensure that you can restore +tapes (I'll use the word tape to include disk Volumes) that you wrote years +ago. This means that each new version of Bacula should be able to read old +format tapes. The first problem you will have is to ensure that the +hardware is still working some years down the road, and the second +problem will be to ensure that the media will still be good, then +your OS must be able to interface to the device, and finally Bacula +must be able to recognize old formats. All the problems except the +last are ones that we cannot solve, but by careful planning you can. + +Since the very beginning of Bacula (January 2000) until today (December +2005), there have been two major Bacula tape formats. The second format +was introduced in version 1.27 in November of 2002, and it has not +changed since then. In principle, Bacula can still read the original +format, but I haven't tried it lately so who knows ... + +Though the tape format is fixed, the kinds of data that we can put on the +tapes are extensible, and that is how we added new features +such as ACLs, Win32 data, encrypted data, ... Obviously, an older +version of Bacula would not know how to read these newer data streams, +but each newer version of Bacula should know how to read all the +older streams. + +If you want to be 100% sure that you can read old tapes, you +should: + +1. Try reading old tapes from time to time -- e.g. at least once +a year. + +2. Keep statically linked copies of every version of Bacula that you use +in production then if for some reason, we botch up old tape compatibility, you +can always pull out an old copy of Bacula ... + +The second point is probably overkill but if you want to be sure, it may +save you someday. + + + +\label{wrappers} +\section{Configuring and Testing TCP Wrappers} +\index[general]{Configuring and Testing TCP Wrappers} +\index[general]{TCP Wrappers} +\index[general]{Wrappers!TCP} +\index[general]{libwrappers} + +TCP Wrappers are implemented if you turn them on when configuring +({\bf ./configure \verb:--:with-tcp-wrappers}). +With this code enabled, you may control who may access your +daemons. This control is done by modifying the file: {\bf +/etc/hosts.allow}. The program name that {\bf Bacula} uses when +applying these access restrictions is the name you specify in the +daemon configuration file (see below for examples). +You must not use the {\bf twist} option in your {\bf +/etc/hosts.allow} or it will terminate the Bacula daemon when a +connection is refused. + +The exact name of the package you need loaded to build with TCP wrappers +depends on the system. For example, +on SuSE, the TCP wrappers libraries needed to link Bacula are +contained in the tcpd-devel package. On Red Hat, the package is named +tcp\_wrappers. + +Dan Langille has provided the following information on configuring and +testing TCP wrappers with Bacula. + +If you read hosts\_options(5), you will see an option called twist. This +option replaces the current process by an instance of the specified shell +command. Typically, something like this is used: + +\footnotesize +\begin{verbatim} +ALL : ALL \ + : severity auth.info \ + : twist /bin/echo "You are not welcome to use %d from %h." +\end{verbatim} +\normalsize + +The libwrap code tries to avoid {\bf twist} if it runs in a resident process, +but that test will not protect the first hosts\_access() call. This will +result in the process (e.g. bacula-fd, bacula-sd, bacula-dir) being terminated +if the first connection to their port results in the twist option being +invoked. The potential, and I stress potential, exists for an attacker to +prevent the daemons from running. This situation is eliminated if your +/etc/hosts.allow file contains an appropriate rule set. The following example +is sufficient: + +\footnotesize +\begin{verbatim} +undef-fd : localhost : allow +undef-sd : localhost : allow +undef-dir : localhost : allow +undef-fd : ALL : deny +undef-sd : ALL : deny +undef-dir : ALL : deny +\end{verbatim} +\normalsize + +You must adjust the names to be the same as the Name directives found +in each of the daemon configuration files. They are, in general, not the +same as the binary daemon names. It is not possible to use the +daemon names because multiple daemons may be running on the same machine +but with different configurations. + +In these examples, the Director is undef-dir, the +Storage Daemon is undef-sd, and the File Daemon is undef-fd. Adjust to suit +your situation. The above example rules assume that the SD, FD, and DIR all +reside on the same box. If you have a remote FD client, then the following +rule set on the remote client will suffice: + +\footnotesize +\begin{verbatim} +undef-fd : director.example.org : allow +undef-fd : ALL : deny +\end{verbatim} +\normalsize + +where director.example.org is the host which will be contacting the client +(ie. the box on which the Bacula Director daemon runs). The use of "ALL : +deny" ensures that the twist option (if present) is not invoked. To properly +test your configuration, start the daemon(s), then attempt to connect from an +IP address which should be able to connect. You should see something like +this: + +\footnotesize +\begin{verbatim} +$ telnet undef 9103 +Trying 192.168.0.56... +Connected to undef.example.org. +Escape character is '^]'. +Connection closed by foreign host. +$ +\end{verbatim} +\normalsize + +This is the correct response. If you see this: + +\footnotesize +\begin{verbatim} +$ telnet undef 9103 +Trying 192.168.0.56... +Connected to undef.example.org. +Escape character is '^]'. +You are not welcome to use undef-sd from xeon.example.org. +Connection closed by foreign host. +$ +\end{verbatim} +\normalsize + +then twist has been invoked and your configuration is not correct and you need +to add the deny statement. It is important to note that your testing must +include restarting the daemons after each connection attempt. You can also +tcpdchk(8) and tcpdmatch(8) to validate your /etc/hosts.allow rules. Here is a +simple test using tcpdmatch: + +\footnotesize +\begin{verbatim} +$ tcpdmatch undef-dir xeon.example.org +warning: undef-dir: no such process name in /etc/inetd.conf +client: hostname xeon.example.org +client: address 192.168.0.18 +server: process undef-dir +matched: /etc/hosts.allow line 40 +option: allow +access: granted +\end{verbatim} +\normalsize + +If you are running Bacula as a standalone daemon, the warning above can be +safely ignored. Here is an example which indicates that your rules are missing +a deny statement and the twist option has been invoked. + +\footnotesize +\begin{verbatim} +$ tcpdmatch undef-dir 10.0.0.1 +warning: undef-dir: no such process name in /etc/inetd.conf +client: address 10.0.0.1 +server: process undef-dir +matched: /etc/hosts.allow line 91 +option: severity auth.info +option: twist /bin/echo "You are not welcome to use + undef-dir from 10.0.0.1." +access: delegated +\end{verbatim} +\normalsize + +\section{Running as non-root} +\index[general]{Running as non-root } + +Security advice from Dan Langille: +% TODO: don't use specific name + +% TODO: don't be too specific on operating system + +% TODO: maybe remove personalization? + +It is a good idea to run daemons with the lowest possible privileges. In +other words, if you can, don't run applications as root which do not have to +be root. The Storage Daemon and the Director Daemon do not need to be root. +The File Daemon needs to be root in order to access all files on your system. +In order to run as non-root, you need to create a user and a group. Choosing +{\tt bacula} as both the user name and the group name sounds like a good idea +to me. + +The FreeBSD port creates this user and group for you. +Here is what those entries looked like on my FreeBSD laptop: + +\footnotesize +\begin{verbatim} +bacula:*:1002:1002::0:0:Bacula Daemon:/var/db/bacula:/sbin/nologin +\end{verbatim} +\normalsize + +I used vipw to create this entry. I selected a User ID and Group ID of 1002 +as they were unused on my system. + +I also created a group in /etc/group: + +\footnotesize +\begin{verbatim} +bacula:*:1002: +\end{verbatim} +\normalsize + +The bacula user (as opposed to the Bacula daemon) will have a home directory +of {\tt /var/db/bacula} which is the default location for the Bacula +database. + +Now that you have both a bacula user and a bacula group, you can secure the +bacula home directory by issuing this command: + +\footnotesize +\begin{verbatim} +chown -R bacula:bacula /var/db/bacula/ +\end{verbatim} +\normalsize + +This ensures that only the bacula user can access this directory. It also +means that if we run the Director and the Storage daemon as bacula, those +daemons also have restricted access. This would not be the case if they were +running as root. + +It is important to note that the storage daemon actually needs to be in the +operator group for normal access to tape drives etc (at least on a FreeBSD +system, that's how things are set up by default) Such devices are normally +chown root:operator. It is easier and less error prone to make Bacula a +member of that group than it is to play around with system permissions. + +Starting the Bacula daemons + +To start the bacula daemons on a FreeBSD system, issue the following command: + +\footnotesize +\begin{verbatim} +/usr/local/etc/rc.d/bacula-dir start +/usr/local/etc/rc.d/bacula-sd start +/usr/local/etc/rc.d/bacula-fd start +\end{verbatim} +\normalsize + +To confirm they are all running: + +\footnotesize +\begin{verbatim} +$ ps auwx | grep bacula +root 63418 0.0 0.3 1856 1036 ?? Ss 4:09PM 0:00.00 + /usr/local/sbin/bacula-fd -v -c /usr/local/etc/bacula-fd.conf +bacula 63416 0.0 0.3 2040 1172 ?? Ss 4:09PM 0:00.01 + /usr/local/sbin/bacula-sd -v -c /usr/local/etc/bacula-sd.conf +bacula 63422 0.0 0.4 2360 1440 ?? Ss 4:09PM 0:00.00 + /usr/local/sbin/bacula-dir -v -c /usr/local/etc/bacula-dir.conf +\end{verbatim} +\normalsize diff --git a/docs/manuals/fr/concepts/spooling.tex b/docs/manuals/es/main/spooling.tex similarity index 92% rename from docs/manuals/fr/concepts/spooling.tex rename to docs/manuals/es/main/spooling.tex index 9d1e4a9a..b7d883a3 100644 --- a/docs/manuals/fr/concepts/spooling.tex +++ b/docs/manuals/es/main/spooling.tex @@ -54,12 +54,24 @@ The following directives can be used to control data spooling. \item To turn data spooling on/off at the Job level in the Job resource in the Director's conf file (default {\bf no}). -{\bf SpoolData = yes|no} +{\bf SpoolData = yes\vb{}no} \item To override the Job specification in a Schedule Run directive in the Director's conf file. -{\bf SpoolData = yes|no} +{\bf SpoolData = yes\vb{}no} + +\item To override the Job specification in a bconsole session using the \texttt{run} + command. Please note that this does {\bf not } refer to a configuration + statement, but to an argument for the run command. + +{\bf SpoolData=yes\vb{}no} + +\item To limit the the maximum spool file size for a particular job in the Job + resource + +{\bf Spool Size = size} + Where size is a the maximum spool size for this job specified in bytes. \item To limit the maximum total size of the spooled data for a particular device. Specified in the Device resource of the Storage daemon's conf file diff --git a/docs/manuals/fr/catalog/sqlite.tex b/docs/manuals/es/main/sqlite.tex similarity index 100% rename from docs/manuals/fr/catalog/sqlite.tex rename to docs/manuals/es/main/sqlite.tex diff --git a/docs/manuals/es/main/state.tex b/docs/manuals/es/main/state.tex new file mode 100644 index 00000000..c9291aa5 --- /dev/null +++ b/docs/manuals/es/main/state.tex @@ -0,0 +1,250 @@ +%% +%% + +\chapter{The Current State of Bacula} +\label{StateChapter} +\index[general]{Current State of Bacula } + +In other words, what is and what is not currently implemented and functional. + +\section{What is Implemented} +\index[general]{Implemented!What} +\index[general]{What is Implemented} + +\begin{itemize} +\item Job Control + \begin{itemize} + \item Network backup/restore with centralized Director. + \item Internal scheduler for automatic + \ilink{Job}{JobDef} execution. + \item Scheduling of multiple Jobs at the same time. + \item You may run one Job at a time or multiple simultaneous Jobs + (sometimes called multiplexing). + \item Job sequencing using priorities. + \item \ilink{Console}{UADef} interface to the Director allowing complete + control. A shell, Qt4 GUI, GNOME GUI and wxWidgets GUI versions of + the Console program are available. Note, the Qt4 GUI program called + the Bacula Administration tool or bat, offers many additional + features over the shell program. + \end{itemize} + +\item Security + \begin{itemize} + \item Verification of files previously cataloged, permitting a Tripwire like + capability (system break-in detection). + \item CRAM-MD5 password authentication between each component (daemon). + \item Configurable + \ilink{TLS (SSL) communications encryption}{CommEncryption} between each + component. + \item Configurable + \ilink{Data (on Volume) encryption}{DataEncryption} + on a Client by Client basis. + \item Computation of MD5 or SHA1 signatures of the file data if requested. + \end{itemize} + + +\item Restore Features + \begin{itemize} + \item Restore of one or more files selected interactively either for the + current backup or a backup prior to a specified time and date. + \item Restore of a complete system starting from bare metal. This is mostly + automated for Linux systems and partially automated for Solaris. See + \ilink{Disaster Recovery Using Bacula}{RescueChapter}. This is also + reported to work on Win2K/XP systems. + \item Listing and Restoration of files using stand-alone {\bf bls} and {\bf + bextract} tool programs. Among other things, this permits extraction of files + when Bacula and/or the catalog are not available. Note, the recommended way + to restore files is using the restore command in the Console. These programs + are designed for use as a last resort. + \item Ability to restore the catalog database rapidly by using bootstrap + files (previously saved). + \item Ability to recreate the catalog database by scanning backup Volumes + using the {\bf bscan} program. + \end{itemize} + +\item SQL Catalog + \begin{itemize} + \item Catalog database facility for remembering Volumes, Pools, Jobs, and + Files backed up. + \item Support for MySQL, PostgreSQL, and SQLite Catalog databases. + \item User extensible queries to the MySQL, PostgreSQL and SQLite databases. + \end{itemize} + +\item Advanced Volume and Pool Management + \begin{itemize} + \item Labeled Volumes, preventing accidental overwriting (at least by + Bacula). + \item Any number of Jobs and Clients can be backed up to a single Volume. + That is, you can backup and restore Linux, Unix, Sun, and Windows machines to + the same Volume. + \item Multi-volume saves. When a Volume is full, {\bf Bacula} automatically + requests the next Volume and continues the backup. + \item + \ilink{Pool and Volume}{PoolResource} library management + providing Volume flexibility (e.g. monthly, weekly, daily Volume sets, Volume + sets segregated by Client, ...). + \item Machine independent Volume data format. Linux, Solaris, and Windows + clients can all be backed up to the same Volume if desired. + \item The Volume data format is upwards compatible so that old Volumes + can always be read. + \item A flexible + \ilink{message}{MessagesChapter} handler including routing + of messages from any daemon back to the Director and automatic email + reporting. + \item Data spooling to disk during backup with subsequent write to tape from + the spooled disk files. This prevents tape "shoe shine" during + Incremental/Differential backups. + \end{itemize} + +\item Advanced Support for most Storage Devices + \begin{itemize} + \item Autochanger support using a simple shell interface that can interface + to virtually any autoloader program. A script for {\bf mtx} is provided. + \item Support for autochanger barcodes -- automatic tape labeling from + barcodes. + \item Automatic support for multiple autochanger magazines either using + barcodes or by reading the tapes. + \item Support for multiple drive autochangers. + \item Raw device backup/restore. Restore must be to the same device. + \item All Volume blocks (approximately 64K bytes) contain a data checksum. + \item Migration support -- move data from one Pool to another or + one Volume to another. + \item Supports writing to DVD. + \end{itemize} + +\item Multi-Operating System Support + \begin{itemize} + \item Programmed to handle arbitrarily long filenames and messages. + \item GZIP compression on a file by file basis done by the Client program if + requested before network transit. + \item Saves and restores POSIX ACLs on most OSes if enabled. + \item Access control lists for Consoles that permit restricting user access + to only their data. + \item Support for save/restore of files larger than 2GB. + \item Support for 64 bit machines, e.g. amd64, Sparc. + \item Support ANSI and IBM tape labels. + \item Support for Unicode filenames (e.g. Chinese) on Win32 machines on + version 1.37.28 and greater. + \item Consistent backup of open files on Win32 systems (WinXP, Win2003, + and Vista) + but not Win2000, using Volume Shadow Copy (VSS). + \item Support for path/filename lengths of up to 64K on Win32 machines + (unlimited on Unix/Linux machines). + \end{itemize} + +\item Miscellaneous + \begin{itemize} + \item Multi-threaded implementation. + \item A comprehensive and extensible + \ilink{configuration file}{DirectorChapter} for each daemon. + \end{itemize} +\end{itemize} + +\section{Advantages Over Other Backup Programs} +\index[general]{Advantages of Bacula Over Other Backup Programs } +\index[general]{Programs!Advantages of Bacula Over Other Backup } + +\begin{itemize} +\item Since there is a client for each machine, you can backup + and restore clients of any type ensuring that all attributes + of files are properly saved and restored. +\item It is also possible to backup clients without any client + software by using NFS or Samba. However, if possible, we + recommend running a Client File daemon on each machine to be + backed up. +\item Bacula handles multi-volume backups. +\item A full comprehensive SQL standard database of all files backed up. This + permits online viewing of files saved on any particular Volume. +\item Automatic pruning of the database (removal of old records) thus + simplifying database administration. +\item Any SQL database engine can be used making Bacula very flexible. + Drivers currently exist for MySQL, PostgreSQL, and SQLite. +\item The modular but integrated design makes Bacula very scalable. +\item Since Bacula uses client file servers, any database or + other application can be properly shutdown by Bacula using the + native tools of the system, backed up, then restarted (all + within a Bacula Job). +\item Bacula has a built-in Job scheduler. +\item The Volume format is documented and there are simple C programs to + read/write it. +\item Bacula uses well defined (IANA registered) TCP/IP ports -- no rpcs, no + shared memory. +\item Bacula installation and configuration is relatively simple compared to + other comparable products. +\item According to one user Bacula is as fast as the big major commercial + applications. +\item According to another user Bacula is four times as fast as another + commercial application, probably because that application stores its catalog + information in a large number of individual files rather than an SQL database + as Bacula does. +\item Aside from several GUI administrative interfaces, Bacula has a + comprehensive shell administrative interface, which allows the + administrator to use tools such as ssh to administrate any part of + Bacula from anywhere (even from home). +\item Bacula has a Rescue CD for Linux systems with the following features: + \begin{itemize} + \item You build it on your own system from scratch with one simple command: + make -- well, then make burn. + \item It uses your kernel + \item It captures your current disk parameters and builds scripts that allow + you to automatically repartition a disk and format it to put it back to what + you had before. + \item It has a script that will restart your networking (with the right IP + address) + \item It has a script to automatically mount your hard disks. + \item It has a full Bacula FD statically linked + \item You can easily add additional data/programs, ... to the disk. + \end{itemize} + +\end{itemize} + +\section{Current Implementation Restrictions} +\index[general]{Current Implementation Restrictions } +\index[general]{Restrictions!Current Implementation } + +\begin{itemize} +\item It is very unusual to attempt to restore two Jobs + that ran simultaneously in a single restore, but if + you do, please be aware that unless you had + data spooling turned on and the spool file held the full + contents of both Jobs during the backup, the restore will not + work correctly. In other terms, Bacula cannot restore + two jobs in the same restore if the Jobs' data blocks were + intermixed on the backup medium. The problem is resolved by + simply doing two restores, one for each Job. +\item Bacula can generally restore any backup made from one client + to any other client. However, if the architecture is significantly + different (i.e. 32 bit architecture to 64 bit or Win32 to Unix), + some restrictions may apply (e.g. Solaris door files do not exist + on other Unix/Linux machines; there are reports that Zlib compression + written with 64 bit machines does not always read correctly on a 32 bit + machine). +\end{itemize} + +\section{Design Limitations or Restrictions} +\index[general]{Restrictions!Design Limitations or } +\index[general]{Design Limitations or Restrictions } + +\begin{itemize} +\item Names (resource names, Volume names, and such) defined in Bacula + configuration files are limited to a fixed number of + characters. Currently the limit is defined as 127 characters. Note, + this does not apply to filenames, which may be arbitrarily long. +\item Command line input to some of the stand alone tools -- e.g. btape, + bconsole is restricted to several hundred characters maximum. +\end{itemize} + +\section{Items to Note} +\index[general]{Items to Note} +\begin{itemize} +\item Bacula's Differential and Incremental \textsl{normal} backups are based + on time stamps. Consequently, if you move files into an existing directory + or move a whole directory into the backup fileset after a Full backup, those + files will probably not be backed up by an Incremental save because they will + have old dates. This problem is corrected by using Accurate mode backups + or by explicitly updating the date/time stamp on all moved files. +\item In older versions of Bacula ($<=$ 3.0.x), if you have over 4 billion file + entries stored in your database, the database FileId is likely to overflow. +\item In non \textsl{Accurate} mode, files deleted after a Full save will be + included in a restoration. This is typical for most similar backup programs. +\end{itemize} diff --git a/docs/manuals/es/main/statistics.tex b/docs/manuals/es/main/statistics.tex new file mode 100644 index 00000000..a5732a46 --- /dev/null +++ b/docs/manuals/es/main/statistics.tex @@ -0,0 +1,61 @@ +\chapter{Using Bacula catalog to grab information} +\label{UseBaculaCatalogToExtractInformationChapter} +\index[general]{Statistics} + +Bacula catalog contains lot of information about your IT infrastructure, how +many files, their size, the number of video or music files etc. Using Bacula +catalog during the day to get them permit to save resources on your servers. + +In this chapter, you will find tips and information to measure bacula +efficiency and report statistics. + +\section{Job statistics} +If you (or probably your boss) want to have statistics on your backups to +provide some \textit{Service Level Agreement} indicators, you could use a few +SQL queries on the Job table to report how many: + +\begin{itemize} +\item jobs have run +\item jobs have been successful +\item files have been backed up +\item ... +\end{itemize} + +However, these statistics are accurate only if your job retention is greater +than your statistics period. Ie, if jobs are purged from the catalog, you won't +be able to use them. + +Now, you can use the \textbf{update stats [days=num]} console command to fill +the JobHistory table with new Job records. If you want to be sure to take in +account only \textbf{good jobs}, ie if one of your important job has failed but +you have fixed the problem and restarted it on time, you probably want to +delete the first \textit{bad} job record and keep only the successful one. For +that simply let your staff do the job, and update JobHistory table after two or +three days depending on your organization using the \textbf{[days=num]} option. + +These statistics records aren't used for restoring, but mainly for +capacity planning, billings, etc. + +The Bweb interface provides a statistics module that can use this feature. You +can also use tools like Talend or extract information by yourself. + +The \textbf{Statistics Retention = \lt{}time\gt{}} director directive defines +the length of time that Bacula will keep statistics job records in the Catalog +database after the Job End time. (In \texttt{JobHistory} table) When this time +period expires, and if user runs \texttt{prune stats} command, Bacula will +prune (remove) Job records that are older than the specified period. + +You can use the following Job resource in your nightly \textbf{BackupCatalog} +job to maintain statistics. +\begin{verbatim} +Job { + Name = BackupCatalog + ... + RunScript { + Console = "update stats days=3" + Console = "prune stats yes" + RunsWhen = After + RunsOnClient = no + } +} +\end{verbatim} diff --git a/docs/manuals/es/main/storedconf.tex b/docs/manuals/es/main/storedconf.tex new file mode 100644 index 00000000..5c9e28da --- /dev/null +++ b/docs/manuals/es/main/storedconf.tex @@ -0,0 +1,1448 @@ +%% +%% + +\chapter{Storage Daemon Configuration} +\label{StoredConfChapter} +\index[general]{Storage Daemon Configuration} +\index[general]{Configuration!Storage Daemon} + +The Storage Daemon configuration file has relatively few resource definitions. +However, due to the great variation in backup media and system capabilities, +the storage daemon must be highly configurable. As a consequence, there are +quite a large number of directives in the Device Resource definition that +allow you to define all the characteristics of your Storage device (normally a +tape drive). Fortunately, with modern storage devices, the defaults are +sufficient, and very few directives are actually needed. + +Examples of {\bf Device} resource directives that are known to work for a +number of common tape drives can be found in the {\bf +\lt{}bacula-src\gt{}/examples/devices} directory, and most will also be listed +here. + +For a general discussion of configuration file and resources including the +data types recognized by {\bf Bacula}, please see the +\ilink{Configuration}{ConfigureChapter} chapter of this manual. The +following Storage Resource definitions must be defined: + +\begin{itemize} +\item + \ilink{Storage}{StorageResource} -- to define the name of the + Storage daemon. +\item + \ilink{Director}{DirectorResource1} -- to define the Director's + name and his access password. +\item + \ilink{Device}{DeviceResource} -- to define the + characteristics of your storage device (tape drive). +\item + \ilink{Messages}{MessagesChapter} -- to define where error and + information messages are to be sent. +\end{itemize} + +\section{Storage Resource} +\label{StorageResource} +\index[general]{Resource!Storage} +\index[general]{Storage Resource} + +In general, the properties specified under the Storage resource define global +properties of the Storage daemon. Each Storage daemon configuration file must +have one and only one Storage resource definition. + +\begin{description} + +\item [Name = \lt{}Storage-Daemon-Name\gt{}] + \index[sd]{Name} + \index[sd]{Directive!Name} + Specifies the Name of the Storage daemon. This directive is required. + +\item [Working Directory = \lt{}Directory\gt{}] + \index[sd]{Working Directory} + \index[sd]{Directive!Working Directory} + This directive is mandatory and specifies a directory in which the Storage + daemon may put its status files. This directory should be used only by {\bf + Bacula}, but may be shared by other Bacula daemons provided the names + given to each daemon are unique. This directive is + required + +\item [Pid Directory = \lt{}Directory\gt{}] + \index[sd]{Pid Directory} + \index[sd]{Directive!Pid Directory} + This directive is mandatory and specifies a directory in which the Director + may put its process Id file files. The process Id file is used to shutdown + Bacula and to prevent multiple copies of Bacula from running simultaneously. + This directive is required. Standard shell expansion of the {\bf Directory} + is done when the configuration file is read so that values such as {\bf + \$HOME} will be properly expanded. + + Typically on Linux systems, you will set this to: {\bf /var/run}. If you are + not installing Bacula in the system directories, you can use the {\bf Working + Directory} as defined above. + +\item [Heartbeat Interval = \lt{}time-interval\gt{}] + \index[sd]{Heartbeat Interval} + \index[sd]{Directive!Heartbeat Interval} + \index[general]{Heartbeat Interval} + \index[general]{Broken pipe} + This directive defines an interval of time in seconds. When + the Storage daemon is waiting for the operator to mount a + tape, each time interval, it will send a heartbeat signal to + the File daemon. The default interval is zero which disables + the heartbeat. This feature is particularly useful if you + have a router such as 3Com that does not follow Internet + standards and times out an valid connection after a short + duration despite the fact that keepalive is set. This usually + results in a broken pipe error message. + +\item [Client Connect Wait = \lt{}time-interval\gt{}] + \index[sd]{Connect Wait} + \index[sd]{Directive!Connect Wait} + \index[general]{Client Connect Wait} + This directive defines an interval of time in seconds that + the Storage daemon will wait for a Client (the File daemon) + to connect. The default is 30 minutes. Be aware that the + longer the Storage daemon waits for a Client, the more + resources will be tied up. + +\item [Maximum Concurrent Jobs = \lt{}number\gt{}] + \index[sd]{Maximum Concurrent Jobs} + \index[sd]{Directive!Maximum Concurrent Jobs} + where \lt{}number\gt{} is the maximum number of Jobs that may run + concurrently. The default is set to 10, but you may set it to a larger + number. Each contact from the Director (e.g. status request, job start + request) is considered as a Job, so if you want to be able to do a {\bf + status} request in the console at the same time as a Job is running, you + will need to set this value greater than 1. To run simultaneous Jobs, + you will need to set a number of other directives in the Director's + configuration file. Which ones you set depend on what you want, but you + will almost certainly need to set the {\bf Maximum Concurrent Jobs} in + the Storage resource in the Director's configuration file and possibly + those in the Job and Client resources. + +\item [SDAddresses = \lt{}IP-address-specification\gt{}] + \index[sd]{SDAddresses} + \index[sd]{Directive!SDAddresses} + Specify the ports and addresses on which the Storage daemon will listen + for Director connections. Normally, the default is sufficient and you + do not need to specify this directive. Probably the simplest way to + explain how this directive works is to show an example: + +\footnotesize +\begin{verbatim} + SDAddresses = { ip = { + addr = 1.2.3.4; port = 1205; } + ipv4 = { + addr = 1.2.3.4; port = http; } + ipv6 = { + addr = 1.2.3.4; + port = 1205; + } + ip = { + addr = 1.2.3.4 + port = 1205 + } + ip = { + addr = 1.2.3.4 + } + ip = { + addr = 201:220:222::2 + } + ip = { + addr = bluedot.thun.net + } +} +\end{verbatim} +\normalsize + +where ip, ip4, ip6, addr, and port are all keywords. Note, that the address +can be specified as either a dotted quadruple, or IPv6 colon notation, or as +a symbolic name (only in the ip specification). Also, port can be specified +as a number or as the mnemonic value from the /etc/services file. If a port +is not specified, the default will be used. If an ip section is specified, +the resolution can be made either by IPv4 or IPv6. If ip4 is specified, then +only IPv4 resolutions will be permitted, and likewise with ip6. + +Using this directive, you can replace both the SDPort and SDAddress +directives shown below. + +\item [SDPort = \lt{}port-number\gt{}] + \index[sd]{SDPort} + \index[sd]{Directive!SDPort} + Specifies port number on which the Storage daemon listens for Director + connections. The default is 9103. + +\item [SDAddress = \lt{}IP-Address\gt{}] + \index[sd]{SDAddress} + \index[sd]{Directive!SDAddress} + This directive is optional, and if it is specified, it will cause the + Storage daemon server (for Director and File daemon connections) to bind + to the specified {\bf IP-Address}, which is either a domain name or an + IP address specified as a dotted quadruple. If this directive is not + specified, the Storage daemon will bind to any available address (the + default). + +\end{description} + +The following is a typical Storage daemon Storage definition. + +\footnotesize +\begin{verbatim} +# +# "Global" Storage daemon configuration specifications appear +# under the Storage resource. +# +Storage { + Name = "Storage daemon" + Address = localhost + WorkingDirectory = "~/bacula/working" + Pid Directory = "~/bacula/working" +} +\end{verbatim} +\normalsize + +\section{Director Resource} +\label{DirectorResource1} +\index[general]{Director Resource} +\index[general]{Resource!Director} + +The Director resource specifies the Name of the Director which is permitted +to use the services of the Storage daemon. There may be multiple Director +resources. The Director Name and Password must match the corresponding +values in the Director's configuration file. + +\begin{description} + +\item [Name = \lt{}Director-Name\gt{}] + \index[sd]{Name} + \index[sd]{Directive!Name} + Specifies the Name of the Director allowed to connect to the Storage daemon. + This directive is required. + +\item [Password = \lt{}Director-password\gt{}] + \index[sd]{Password} + \index[sd]{Directive!Password} + Specifies the password that must be supplied by the above named Director. + This directive is required. + +\item [Monitor = \lt{}yes\vb{}no\gt{}] + \index[sd]{Monitor} + \index[sd]{Directive!Monitor} + If Monitor is set to {\bf no} (default), this director will have full + access to this Storage daemon. If Monitor is set to {\bf yes}, this + director will only be able to fetch the current status of this Storage + daemon. + + Please note that if this director is being used by a Monitor, we highly + recommend to set this directive to {\bf yes} to avoid serious security + problems. + +\end{description} + +The following is an example of a valid Director resource definition: + +\footnotesize +\begin{verbatim} +Director { + Name = MainDirector + Password = my_secret_password +} +\end{verbatim} +\normalsize + +\label{DeviceResource} +\section{Device Resource} +\index[general]{Resource!Device} +\index[general]{Device Resource} + +The Device Resource specifies the details of each device (normally a tape +drive) that can be used by the Storage daemon. There may be multiple +Device resources for a single Storage daemon. In general, the properties +specified within the Device resource are specific to the Device. + +\begin{description} + +\item [Name = {\it Device-Name}] + \index[sd]{Name} + \index[sd]{Directive!Name} + Specifies the Name that the Director will use when asking to backup or + restore to or from to this device. This is the logical Device name, and may + be any string up to 127 characters in length. It is generally a good idea to + make it correspond to the English name of the backup device. The physical + name of the device is specified on the {\bf Archive Device} directive + described below. The name you specify here is also used in your Director's + conf file on the + \ilink{Device directive}{StorageResource2} in its Storage + resource. + +\item [Archive Device = {\it name-string}] + \index[sd]{Archive Device} + \index[sd]{Directive!Archive Device} + The specified {\bf name-string} gives the system file name of the storage + device managed by this storage daemon. This will usually be the device file + name of a removable storage device (tape drive), for example "{\bf + /dev/nst0}" or "{\bf /dev/rmt/0mbn}". For a DVD-writer, it will be for + example {\bf /dev/hdc}. It may also be a directory name if you are archiving + to disk storage. In this case, you must supply the full absolute path to the + directory. When specifying a tape device, it is preferable that the + "non-rewind" variant of the device file name be given. In addition, on + systems such as Sun, which have multiple tape access methods, you must be + sure to specify to use Berkeley I/O conventions with the device. The {\bf b} + in the Solaris (Sun) archive specification {\bf /dev/rmt/0mbn} is what is + needed in this case. Bacula does not support SysV tape drive behavior. + + As noted above, normally the Archive Device is the name of a tape drive, but + you may also specify an absolute path to an existing directory. If the + Device is a directory Bacula will write to file storage in the specified + directory, and the filename used will be the Volume name as specified in the + Catalog. If you want to write into more than one directory (i.e. to spread + the load to different disk drives), you will need to define two Device + resources, each containing an Archive Device with a different directory. + \label{SetupFifo} + In addition to a tape device name or a directory name, Bacula will accept the + name of a FIFO. A FIFO is a special kind of file that connects two programs + via kernel memory. If a FIFO device is specified for a backup operation, you + must have a program that reads what Bacula writes into the FIFO. When the + Storage daemon starts the job, it will wait for {\bf MaximumOpenWait} seconds + for the read program to start reading, and then time it out and terminate + the job. As a consequence, it is best to start the read program at the + beginning of the job perhaps with the {\bf RunBeforeJob} directive. For this + kind of device, you never want to specify {\bf AlwaysOpen}, because you want + the Storage daemon to open it only when a job starts, so you must explicitly + set it to {\bf No}. Since a FIFO is a one way device, Bacula will not attempt + to read a label of a FIFO device, but will simply write on it. To create a + FIFO Volume in the catalog, use the {\bf add} command rather than the {\bf + label} command to avoid attempting to write a label. + +\footnotesize +\begin{verbatim} +Device { + Name = FifoStorage + Media Type = Fifo + Device Type = Fifo + Archive Device = /tmp/fifo + LabelMedia = yes + Random Access = no + AutomaticMount = no + RemovableMedia = no + MaximumOpenWait = 60 + AlwaysOpen = no +} +\end{verbatim} +\normalsize + + During a restore operation, if the Archive Device is a FIFO, Bacula will + attempt to read from the FIFO, so you must have an external program that + writes into the FIFO. Bacula will wait {\bf MaximumOpenWait} seconds for the + program to begin writing and will then time it out and terminate the job. As + noted above, you may use the {\bf RunBeforeJob} to start the writer program + at the beginning of the job. + + The Archive Device directive is required. + +\item [Device Type = {\it type-specification}] + \index[sd]{Device Type} + \index[sd]{Directive!Device Type} + The Device Type specification allows you to explicitly tell Bacula + what kind of device you are defining. It the {\it type-specification} + may be one of the following: + \begin{description} + \item [File] + Tells Bacula that the device is a file. It may either be a + file defined on fixed medium or a removable filesystem such as + USB. All files must be random access devices. + \item [Tape] + The device is a tape device and thus is sequential access. Tape devices + are controlled using ioctl() calls. + \item [Fifo] + The device is a first-in-first out sequential access read-only + or write-only device. + \item [DVD] + The device is a DVD. DVDs are sequential access for writing, but + random access for reading. + \end{description} + + The Device Type directive is not required, and if not specified, Bacula + will attempt to guess what kind of device has been specified using the + Archive Device specification supplied. There are several advantages to + explicitly specifying the Device Type. First, on some systems, block and + character devices have the same type, which means that on those systems, + Bacula is unlikely to be able to correctly guess that a device is a DVD. + Secondly, if you explicitly specify the Device Type, the mount point + need not be defined until the device is opened. This is the case with + most removable devices such as USB that are mounted by the HAL daemon. + If the Device Type is not explicitly specified, then the mount point + must exist when the Storage daemon starts. + + This directive was implemented in Bacula version 1.38.6. + + +\item [Media Type = {\it name-string}] + \index[sd]{Media Type} + \index[sd]{Directive!Media Type} + The specified {\bf name-string} names the type of media supported by this + device, for example, "DLT7000". Media type names are arbitrary in that you + set them to anything you want, but they must be known to the volume + database to keep track of which storage daemons can read which volumes. In + general, each different storage type should have a unique Media Type + associated with it. The same {\bf name-string} must appear in the + appropriate Storage resource definition in the Director's configuration + file. + + Even though the names you assign are arbitrary (i.e. you choose the name + you want), you should take care in specifying them because the Media Type + is used to determine which storage device Bacula will select during + restore. Thus you should probably use the same Media Type specification + for all drives where the Media can be freely interchanged. This is not + generally an issue if you have a single Storage daemon, but it is with + multiple Storage daemons, especially if they have incompatible media. + + For example, if you specify a Media Type of "DDS-4" then during the + restore, Bacula will be able to choose any Storage Daemon that handles + "DDS-4". If you have an autochanger, you might want to name the Media Type + in a way that is unique to the autochanger, unless you wish to possibly use + the Volumes in other drives. You should also ensure to have unique Media + Type names if the Media is not compatible between drives. This + specification is required for all devices. + + In addition, if you are using disk storage, each Device resource will + generally have a different mount point or directory. In order for + Bacula to select the correct Device resource, each one must have a + unique Media Type. + +\label{Autochanger} +\item [Autochanger = {\it yes\vb{}no}] + \index[sd]{Autochanger} + \index[sd]{Directive!Autochanger} + If {\bf Yes}, this device belongs to an automatic tape changer, and you + must specify an {\bf Autochanger} resource that points to the {\bf + Device} resources. You must also specify a + {\bf Changer Device}. If the Autochanger directive is set to {\bf + No} (default), the volume must be manually changed. You should also + have an identical directive to the + \ilink{Storage resource}{Autochanger1} in the Director's + configuration file so that when labeling tapes you are prompted for the slot. + +\item [Changer Device = {\it name-string}] + \index[sd]{Changer Device} + \index[sd]{Directive!Changer Device} + The specified {\bf name-string} must be the {\bf generic SCSI} device + name of the autochanger that corresponds to the normal read/write + {\bf Archive Device} specified in the Device resource. This + generic SCSI device name should be specified if you have an autochanger + or if you have a standard tape drive and want to use the + {\bf Alert Command} (see below). For example, on Linux systems, for + an Archive Device name of {\bf /dev/nst0}, you would specify {\bf + /dev/sg0} for the Changer Device name. Depending on your exact + configuration, and the number of autochangers or the type of + autochanger, what you specify here can vary. This directive is + optional. See the \ilink{ Using Autochangers}{AutochangersChapter} chapter + of this manual for more details of using this and the following + autochanger directives. + +\item [Changer Command = {\it name-string}] + \index[sd]{Changer Command} + \index[sd]{Directive!Changer Command} + The {\bf name-string} specifies an external program to be called that will + automatically change volumes as required by {\bf Bacula}. Normally, + this directive will be specified only in the {\bf AutoChanger} resource, + which is then used for all devices. However, you may also specify + the different {\bf Changer Command} in each Device resource. + Most frequently, + you will specify the Bacula supplied {\bf mtx-changer} script as follows: + +\footnotesize +\begin{verbatim} +Changer Command = "/path/mtx-changer %c %o %S %a %d" +\end{verbatim} +\normalsize + + and you will install the {\bf mtx} on your system (found in the {\bf depkgs} + release). An example of this command is in the default bacula-sd.conf file. + For more details on the substitution characters that may be specified to + configure your autochanger please see the + \ilink{Autochangers}{AutochangersChapter} chapter of this manual. + For FreeBSD users, you might want to see one of the several {\bf chio} + scripts in {\bf examples/autochangers}. + +\item [Alert Command = {\it name-string}] + \index[sd]{Alert Command} + The {\bf name-string} specifies an external program to be called at the + completion of each Job after the device is released. The purpose of this + command is to check for Tape Alerts, which are present when something is + wrong with your tape drive (at least for most modern tape drives). The same + substitution characters that may be specified in the Changer Command may + also be used in this string. For more information, please see the + \ilink{Autochangers}{AutochangersChapter} chapter of this manual. + + + Note, it is not necessary to have an autochanger to use this command. The + example below uses the {\bf tapeinfo} program that comes with the {\bf mtx} + package, but it can be used on any tape drive. However, you will need to + specify a {\bf Changer Device} directive in your Device resource (see above) + so that the generic SCSI device name can be edited into the command (with + the \%c). + + An example of the use of this command to print Tape Alerts in the Job report + is: + +\footnotesize +\begin{verbatim} +Alert Command = "sh -c 'tapeinfo -f %c | grep TapeAlert'" + +\end{verbatim} +\normalsize + +and an example output when there is a problem could be: + +\footnotesize +\begin{verbatim} +bacula-sd Alert: TapeAlert[32]: Interface: Problem with SCSI interface + between tape drive and initiator. + +\end{verbatim} +\normalsize + +\item [Drive Index = {\it number}] + \index[sd]{Drive Index} + \index[sd]{Directive!Drive Index} + The {\bf Drive Index} that you specify is passed to the {\bf + mtx-changer} script and is thus passed to the {\bf mtx} program. By + default, the Drive Index is zero, so if you have only one drive in your + autochanger, everything will work normally. However, if you have + multiple drives, you must specify multiple Bacula Device resources (one + for each drive). The first Device should have the Drive Index set to 0, + and the second Device Resource should contain a Drive Index set to 1, + and so on. This will then permit you to use two or more drives in your + autochanger. As of Bacula version 1.38.0, using the {\bf Autochanger} + resource, Bacula will automatically ensure that only one drive at a time + uses the autochanger script, so you no longer need locking scripts as in + the past -- the default mtx-changer script works for any number of + drives. + +\item [Autoselect = {\it yes\vb{}no}] + \index[sd]{Autoselect} + \index[sd]{Directive!Autoselect} + If this directive is set to {\bf yes} (default), and the Device + belongs to an autochanger, then when the Autochanger is referenced + by the Director, this device can automatically be selected. If this + directive is set to {\bf no}, then the Device can only be referenced + by directly using the Device name in the Director. This is useful + for reserving a drive for something special such as a high priority + backup or restore operations. + +\item[Maximum Concurent Jobs = {\it num}] +\index[sd]{MaximumConcurentJobs} + +{\bf Maximum Concurrent Jobs} is a directive that permits setting the maximum +number of Jobs that can run concurrently on a specified Device. Using this +directive, it is possible to have different Jobs using multiple drives, because +when the Maximum Concurrent Jobs limit is reached, the Storage Daemon will +start new Jobs on any other available compatible drive. This facilitates +writing to multiple drives with multiple Jobs that all use the same Pool. + +\item [Maximum Changer Wait = {\it time}] + \index[sd]{Maximum Changer Wait} + \index[sd]{Directive!Maximum Changer Wait} + This directive specifies the maximum time in seconds for Bacula to wait + for an autochanger to change the volume. If this time is exceeded, + Bacula will invalidate the Volume slot number stored in the catalog and + try again. If no additional changer volumes exist, Bacula will ask the + operator to intervene. The default is 5 minutes. +% TODO: if this is the format, then maybe "5 minutes" should be in +% TODO: quotes? define style. see others. + +\item [Maximum Rewind Wait = {\it time}] + \index[sd]{Maximum Rewind Wait} + \index[sd]{Directive!Maximum Rewind Wait} + This directive specifies the maximum time in seconds for Bacula to wait + for a rewind before timing out. If this time is exceeded, + Bacula will cancel the job. The default is 5 minutes. + +\item [Maximum Open Wait = {\it time}] + \index[sd]{Maximum Open Wait} + \index[sd]{Directive!Maximum Open Wait} + This directive specifies the maximum time in seconds for Bacula to wait + for a open before timing out. If this time is exceeded, + Bacula will cancel the job. The default is 5 minutes. + +\item [Always Open = {\it yes\vb{}no}] + \index[sd]{Always Open} + \index[sd]{Directive!Always Open} + If {\bf Yes} (default), Bacula will always keep the device open unless + specifically {\bf unmounted} by the Console program. This permits + Bacula to ensure that the tape drive is always available, and properly + positioned. If you set + {\bf AlwaysOpen} to {\bf no} {\bf Bacula} will only open the drive when + necessary, and at the end of the Job if no other Jobs are using the + drive, it will be freed. The next time Bacula wants to append to a tape + on a drive that was freed, Bacula will rewind the tape and position it to + the end. To avoid unnecessary tape positioning and to minimize + unnecessary operator intervention, it is highly recommended that {\bf + Always Open = yes}. This also ensures that the drive is available when + Bacula needs it. + + If you have {\bf Always Open = yes} (recommended) and you want to use the + drive for something else, simply use the {\bf unmount} command in the + Console program to release the drive. However, don't forget to remount the + drive with {\bf mount} when the drive is available or the next Bacula job + will block. + + For File storage, this directive is ignored. For a FIFO storage device, you + must set this to {\bf No}. + + Please note that if you set this directive to {\bf No} Bacula will release + the tape drive between each job, and thus the next job will rewind the tape + and position it to the end of the data. This can be a very time consuming + operation. In addition, with this directive set to no, certain multiple + drive autochanger operations will fail. We strongly recommend to keep + {\bf Always Open} set to {\bf Yes} + +\item [Volume Poll Interval = {\it time}] + \index[sd]{Volume Poll Interval} + \index[sd]{Directive!Volume Poll Interval} + If the time specified on this directive is non-zero, after asking the + operator to mount a new volume Bacula will periodically poll (or read) the + drive at the specified interval to see if a new volume has been mounted. If + the time interval is zero (the default), no polling will occur. This + directive can be useful if you want to avoid operator intervention via the + console. Instead, the operator can simply remove the old volume and insert + the requested one, and Bacula on the next poll will recognize the new tape + and continue. Please be aware that if you set this interval too small, you + may excessively wear your tape drive if the old tape remains in the drive, + since Bacula will read it on each poll. This can be avoided by ejecting the + tape using the {\bf Offline On Unmount} and the {\bf Close on Poll} + directives. + However, if you are using a Linux 2.6 kernel or other OSes + such as FreeBSD or Solaris, the Offline On Unmount will leave the drive + with no tape, and Bacula will not be able to properly open the drive and + may fail the job. For more information on this problem, please see the + \ilink{description of Offline On Unmount}{NoTapeInDrive} in the Tape + Testing chapter. + +\item [Close on Poll= {\it yes\vb{}no}] + \index[sd]{Close on Poll} + \index[sd]{Directive!Close on Poll} + If {\bf Yes}, Bacula close the device (equivalent to an unmount except no + mount is required) and reopen it at each poll. Normally this is not too + useful unless you have the {\bf Offline on Unmount} directive set, in which + case the drive will be taken offline preventing wear on the tape during any + future polling. Once the operator inserts a new tape, Bacula will recognize + the drive on the next poll and automatically continue with the backup. + Please see above more more details. + +\item [Maximum Open Wait = {\it time}] + \index[sd]{Maximum Open Wait} + \index[sd]{Directive!Maximum Open Wait} + This directive specifies the maximum amount of time in seconds that + Bacula will wait for a device that is busy. The default is 5 minutes. + If the device cannot be obtained, the current Job will be terminated in + error. Bacula will re-attempt to open the drive the next time a Job + starts that needs the the drive. + +\label{removablemedia} +\item [Removable media = {\it yes\vb{}no}] + \index[sd]{Removable media} + \index[sd]{Directive!Removable media} + If {\bf Yes}, this device supports removable media (for example, tapes + or CDs). If {\bf No}, media cannot be removed (for example, an + intermediate backup area on a hard disk). If {\bf Removable media} is + enabled on a File device (as opposed to a tape) the Storage daemon will + assume that device may be something like a USB device that can be + removed or a simply a removable harddisk. When attempting to open + such a device, if the Volume is not found (for File devices, the Volume + name is the same as the Filename), then the Storage daemon will search + the entire device looking for likely Volume names, and for each one + found, it will ask the Director if the Volume can be used. If so, + the Storage daemon will use the first such Volume found. Thus it + acts somewhat like a tape drive -- if the correct Volume is not found, + it looks at what actually is found, and if it is an appendable Volume, + it will use it. + + If the removable medium is not automatically mounted (e.g. udev), then + you might consider using additional Storage daemon device directives + such as {\bf Requires Mount}, {\bf Mount Point}, {\bf Mount Command}, + and {\bf Unmount Command}, all of which can be used in conjunction with + {\bf Removable Media}. + + +\item [Random access = {\it yes\vb{}no}] + \index[sd]{Random access} + \index[sd]{Directive!Random access} + If {\bf Yes}, the archive device is assumed to be a random access medium + which supports the {\bf lseek} (or {\bf lseek64} if Largefile is enabled + during configuration) facility. This should be set to {\bf Yes} for all + file systems such as DVD, USB, and fixed files. It should be set to + {\bf No} for non-random access devices such as tapes and named pipes. + + +\item [Requires Mount = {\it yes\vb{}no}] + \index[sd]{Requires Mount } + When this directive is enabled, the Storage daemon will submit + a {\bf Mount Command} before attempting to open the device. + You must set this directive to {\bf yes} for DVD-writers and removable + file systems such as USB devices that are not automatically mounted + by the operating system when plugged in or opened by Bacula. + It should be set to {\bf no} for + all other devices such as tapes and fixed filesystems. It should also + be set to {\bf no} for any removable device that is automatically + mounted by the operating system when opened (e.g. USB devices mounted + by udev or hotplug). This directive + indicates if the device requires to be mounted using the {\bf Mount + Command}. To be able to write a DVD, the following directives must also + be defined: {\bf Mount Point}, {\bf Mount Command}, {\bf Unmount + Command} and {\bf Write Part Command}. + +\item [Mount Point = {\it directory}] + \index[sd]{Mount Point} + Directory where the device can be mounted. + This directive is used only + for devices that have {\bf Requires Mount} enabled such as DVD or + USB file devices. + +\item [Mount Command = {\it name-string}] + \index[sd]{Mount Command} + This directive specifies the command that must be executed to mount + devices such as DVDs and many USB devices. For DVDs, the + device is written directly, but the mount command is necessary in + order to determine the free space left on the DVD. Before the command is + executed, \%a is replaced with the Archive Device, and \%m with the Mount + Point. + + Most frequently, for a DVD, you will define it as follows: + +\footnotesize +\begin{verbatim} + Mount Command = "/bin/mount -t iso9660 -o ro %a %m" +\end{verbatim} +\normalsize + +However, if you have defined a mount point in /etc/fstab, you might be +able to use a mount command such as: + +\footnotesize +\begin{verbatim} + Mount Command = "/bin/mount /media/dvd" +\end{verbatim} +\normalsize + +See the \ilink {Edit Codes}{mountcodes} section below for more details of +the editing codes that can be used in this directive. + + If you need to specify multiple commands, create a shell script. + +\item [Unmount Command = {\it name-string}] + \index[sd]{Unmount Command} + This directive specifies the command that must be executed to unmount + devices such as DVDs and many USB devices. Before the command is + executed, \%a is replaced with the Archive Device, and \%m with the Mount + Point. + + Most frequently, you will define it as follows: + +\footnotesize +\begin{verbatim} + Unmount Command = "/bin/umount %m" +\end{verbatim} +\normalsize + +See the \ilink {Edit Codes}{mountcodes} section below for more details of +the editing codes that can be used in this directive. + + If you need to specify multiple commands, create a shell script. + +\item[Block Checksum = {\it yes/no}] + + You may turn off the Block Checksum (CRC32) code that Bacula uses when + writing blocks to a Volume. Doing so can reduce the Storage daemon CPU usage + slightly. It will also permit Bacula to read a Volume that has corrupted + data. + + The default is {\bf yes} -- i.e. the checksum is computed on write and + checked on read. + + \textbf{We do not recommend to turn this off} particularly on older tape + drives or for disk Volumes where doing so may allow corrupted data to go + undetected. + +\item [Minimum block size = {\it size-in-bytes}] + \index[sd]{Minimum block size} + \index[sd]{Directive!Minimum block size} + On most modern tape drives, you will not need or want to specify this + directive, and if you do so, it will be to make Bacula use fixed block + sizes. This statement applies only to non-random access devices (e.g. + tape drives). Blocks written by the storage daemon to a non-random + archive device will never be smaller than the given {\bf size-in-bytes}. + The Storage daemon will attempt to efficiently fill blocks with data + received from active sessions but will, if necessary, add padding to a + block to achieve the required minimum size. + + To force the block size to be fixed, as is the case for some non-random + access devices (tape drives), set the {\bf Minimum block size} and the + {\bf Maximum block size} to the same value (zero included). The default + is that both the minimum and maximum block size are zero and the default + block size is 64,512 bytes. + + For example, suppose you want a fixed block size of 100K bytes, then you + would specify: + +\footnotesize +\begin{verbatim} + + Minimum block size = 100K + Maximum block size = 100K + +\end{verbatim} +\normalsize + + Please note that if you specify a fixed block size as shown above, the tape + drive must either be in variable block size mode, or if it is in fixed block + size mode, the block size (generally defined by {\bf mt}) {\bf must} be + identical to the size specified in Bacula -- otherwise when you attempt to + re-read your Volumes, you will get an error. + + If you want the block size to be variable but with a 64K minimum and 200K + maximum (and default as well), you would specify: + +\footnotesize +\begin{verbatim} + + Minimum block size = 64K + Maximum blocksize = 200K + +\end{verbatim} +\normalsize + +\item [Maximum block size = {\it size-in-bytes}] + \index[sd]{Maximum block size} + \index[sd]{Directive!Maximum block size} + On most modern tape drives, you will not need to specify this directive. + If you do so, it will most likely be to use fixed block sizes (see + Minimum block size above). The Storage daemon will always attempt to + write blocks of the specified {\bf size-in-bytes} to the archive device. + As a consequence, this statement specifies both the default block size + and the maximum block size. The size written never exceed the given + {\bf size-in-bytes}. If adding data to a block would cause it to exceed + the given maximum size, the block will be written to the archive device, + and the new data will begin a new block. + + If no value is specified or zero is specified, the Storage daemon will + use a default block size of 64,512 bytes (126 * 512). + + The maximum {\bf size-in-bytes} possible is 2,000,000. + +\item [Hardware End of Medium = {\it yes\vb{}no}] + \index[sd]{Hardware End of Medium} + \index[sd]{Directive!Hardware End of Medium} + If {\bf No}, the archive device is not required to support end of medium + ioctl request, and the storage daemon will use the forward space file + function to find the end of the recorded data. If {\bf Yes}, the archive + device must support the {\tt ioctl} {\tt MTEOM} call, which will position + the tape to the end of the recorded data. In addition, your SCSI driver must + keep track of the file number on the tape and report it back correctly by + the {\bf MTIOCGET} ioctl. Note, some SCSI drivers will correctly forward + space to the end of the recorded data, but they do not keep track of the + file number. On Linux machines, the SCSI driver has a {\bf fast-eod} + option, which if set will cause the driver to lose track of the file + number. You should ensure that this option is always turned off using the + {\bf mt} program. + + Default setting for Hardware End of Medium is {\bf Yes}. This function is + used before appending to a tape to ensure that no previously written data is + lost. We recommend if you have a non-standard or unusual tape drive that you + use the {\bf btape} program to test your drive to see whether or not it + supports this function. All modern (after 1998) tape drives support this + feature. + +\item [Fast Forward Space File = {\it yes\vb{}no}] + \index[sd]{Fast Forward Space File} + \index[sd]{Directive!Fast Forward Space File} + If {\bf No}, the archive device is not required to support keeping track of + the file number ({\bf MTIOCGET} ioctl) during forward space file. If {\bf + Yes}, the archive device must support the {\tt ioctl} {\tt MTFSF} call, which + virtually all drivers support, but in addition, your SCSI driver must keep + track of the file number on the tape and report it back correctly by the + {\bf MTIOCGET} ioctl. Note, some SCSI drivers will correctly forward space, + but they do not keep track of the file number or more seriously, they do not + report end of medium. + + Default setting for Fast Forward Space File is {\bf Yes}. + +\item [Use MTIOCGET = {\it yes\vb{}no}] + \index[sd]{Use MTIOCGET} + \index[sd]{Directive!Use MTIOCGET} + If {\bf No}, the operating system is not required to support keeping track of + the file number and reporting it in the ({\bf MTIOCGET} ioctl). The default + is {\bf Yes}. If you must set this to No, Bacula will do the proper file + position determination, but it is very unfortunate because it means that + tape movement is very inefficient. + Fortunately, this operation system deficiency seems to be the case only + on a few *BSD systems. Operating systems known to work correctly are + Solaris, Linux and FreeBSD. + +\item [BSF at EOM = {\it yes\vb{}no}] + \index[sd]{BSF at EOM} + \index[sd]{Directive!BSF at EOM} + If {\bf No}, the default, no special action is taken by Bacula with the End + of Medium (end of tape) is reached because the tape will be positioned after + the last EOF tape mark, and Bacula can append to the tape as desired. + However, on some systems, such as FreeBSD, when Bacula reads the End of + Medium (end of tape), the tape will be positioned after the second EOF tape + mark (two successive EOF marks indicated End of Medium). If Bacula appends + from that point, all the appended data will be lost. The solution for such + systems is to specify {\bf BSF at EOM} which causes Bacula to backspace over + the second EOF mark. Determination of whether or not you need this directive + is done using the {\bf test} command in the {\bf btape} program. + +\item [TWO EOF = {\it yes\vb{}no}] + \index[sd]{TWO EOF} + \index[sd]{Directive!TWO EOF} + If {\bf Yes}, Bacula will write two end of file marks when terminating a + tape -- i.e. after the last job or at the end of the medium. If {\bf No}, + the default, Bacula will only write one end of file to terminate the tape. + +\item [Backward Space Record = {\it yes\vb{}no}] + \index[sd]{Backward Space Record} + \index[sd]{Directive!Backward Space Record} + If {\it Yes}, the archive device supports the {\tt MTBSR ioctl} to backspace + records. If {\it No}, this call is not used and the device must be rewound + and advanced forward to the desired position. Default is {\bf Yes} for non + random-access devices. This function if enabled is used at the end of a + Volume after writing the end of file and any ANSI/IBM labels to determine + whether or not the last block was written correctly. If you turn this + function off, the test will not be done. This causes no harm as the re-read + process is precautionary rather than required. + +\item [Backward Space File = {\it yes\vb{}no}] + \index[sd]{Backward Space File} + \index[sd]{Directive!Backward Space File} + If {\it Yes}, the archive device supports the {\bf MTBSF} and {\bf MTBSF + ioctl}s to backspace over an end of file mark and to the start of a file. If + {\it No}, these calls are not used and the device must be rewound and + advanced forward to the desired position. Default is {\bf Yes} for non + random-access devices. + +\item [Forward Space Record = {\it yes\vb{}no}] + \index[sd]{Forward Space Record} + \index[sd]{Directive!Forward Space Record} + If {\it Yes}, the archive device must support the {\bf MTFSR ioctl} to + forward space over records. If {\bf No}, data must be read in order to + advance the position on the device. Default is {\bf Yes} for non + random-access devices. + +\item [Forward Space File = {\it yes\vb{}no}] + \index[sd]{Forward Space File} + \index[sd]{Directive!Forward Space File} + If {\bf Yes}, the archive device must support the {\tt MTFSF ioctl} to + forward space by file marks. If {\it No}, data must be read to advance the + position on the device. Default is {\bf Yes} for non random-access devices. + +\item [Offline On Unmount = {\it yes\vb{}no}] + \index[sd]{Offline On Unmount} + \index[sd]{Directive!Offline On Unmount} + The default for this directive is {\bf No}. If {\bf Yes} the archive device + must support the {\tt MTOFFL ioctl} to rewind and take the volume offline. In + this case, Bacula will issue the offline (eject) request before closing the + device during the {\bf unmount} command. If {\bf No} Bacula will not attempt + to offline the device before unmounting it. After an offline is issued, the + cassette will be ejected thus {\bf requiring operator intervention} to + continue, and on some systems require an explicit load command to be issued + ({\bf mt -f /dev/xxx load}) before the system will recognize the tape. If you + are using an autochanger, some devices require an offline to be issued prior + to changing the volume. However, most devices do not and may get very + confused. + + If you are using a Linux 2.6 kernel or other OSes + such as FreeBSD or Solaris, the Offline On Unmount will leave the drive + with no tape, and Bacula will not be able to properly open the drive and + may fail the job. For more information on this problem, please see the + \ilink{description of Offline On Unmount}{NoTapeInDrive} in the Tape + Testing chapter. + +\item [Maximum Concurrent Jobs = \lt{}number\gt{}] + \index[sd]{Device Maximum Concurrent Jobs} + \index[sd]{Directive!Device Maximum Concurrent Jobs} + \index[sd]{Directive!New in 3.0.3} + where \lt{}number\gt{} is the maximum number of Jobs that can run + concurrently on a specified Device. Using this directive, it is possible + to have different Jobs using multiple drives, because when + the Maximum Concurrent Jobs limit is + reached, the Storage Daemon will start new Jobs on any other available + compatible drive. This facilitates writing to multiple drives with + multiple Jobs that all use the same Pool. + +\item [Maximum Volume Size = {\it size}] + \index[sd]{Maximum Volume Size} + \index[sd]{Directive!Maximum Volume Size} + No more than {\bf size} bytes will be written onto a given volume on the + archive device. This directive is used mainly in testing Bacula to + simulate a small Volume. It can also be useful if you wish to limit the + size of a File Volume to say less than 2GB of data. In some rare cases + of really antiquated tape drives that do not properly indicate when the + end of a tape is reached during writing (though I have read about such + drives, I have never personally encountered one). Please note, this + directive is deprecated (being phased out) in favor of the {\bf Maximum + Volume Bytes} defined in the Director's configuration file. + +\item [Maximum File Size = {\it size}] + \index[sd]{Maximum File Size} + \index[sd]{Directive!Maximum File Size} + No more than {\bf size} bytes will be written into a given logical file + on the volume. Once this size is reached, an end of file mark is + written on the volume and subsequent data are written into the next + file. Breaking long sequences of data blocks with file marks permits + quicker positioning to the start of a given stream of data and can + improve recovery from read errors on the volume. The default is one + Gigabyte. This directive creates EOF marks only on tape media. + However, regardless of the medium type (tape, disk, DVD, ...) each time + a the Maximum File Size is exceeded, a record is put into the catalog + database that permits seeking to that position on the medium for + restore operations. If you set this to a small value (e.g. 1MB), + you will generate lots of database records (JobMedia) and may + significantly increase CPU/disk overhead. + + If you are configuring an LTO-3 or LTO-4 tape, you probably will + want to set the {\bf Maximum File Size} to 2GB to avoid making + the drive stop to write an EOF mark. + + Note, this directive does not limit the size of Volumes that Bacula + will create regardless of whether they are tape or disk volumes. It + changes only the number of EOF marks on a tape and the number of + block positioning records (see below) that are generated. If you + want to limit the size of all Volumes for a particular device, use + the {\bf Maximum Volume Size} directive (above), or use the + {\bf Maximum Volume Bytes} directive in the Director's Pool resource, + which does the same thing but on a Pool (Volume) basis. + +\item [Block Positioning = {\it yes\vb{}no}] + \index[sd]{Block Positioning} + \index[sd]{Directive!Block Positioning} + This directive tells Bacula not to use block positioning when doing restores. + Turning this directive off can cause Bacula to be {\bf extremely} slow + when restoring files. You might use this directive if you wrote your + tapes with Bacula in variable block mode (the default), but your drive + was in fixed block mode. The default is {\bf yes}. + +\item [Maximum Network Buffer Size = {\it bytes}] + \index[sd]{Maximum Network Buffer Size} + \index[sd]{Directive!Maximum Network Buffer Size} + where {\it bytes} specifies the initial network buffer size to use with the + File daemon. This size will be adjusted down if it is too large until + it is accepted by the OS. Please use care in setting this value since if + it is too large, it will be trimmed by 512 bytes until the OS is happy, + which may require a large number of system calls. The default value is + 32,768 bytes. + + The default size was chosen to be relatively large but not too big in + the case that you are transmitting data over Internet. It is clear that + on a high speed local network, you can increase this number and improve + performance. For example, some users have found that if you use a value + of 65,536 bytes they get five to ten times the throughput. Larger values for + most users don't seem to improve performance. If you are interested + in improving your backup speeds, this is definitely a place to + experiment. You will probably also want to make the corresponding change + in each of your File daemons conf files. + + +\item [Maximum Spool Size = {\it bytes}] + \index[sd]{Maximum Spool Size} + \index[sd]{Directive!Maximum Spool Size} + where the bytes specify the maximum spool size for all jobs that are + running. The default is no limit. + +\item [Maximum Job Spool Size = {\it bytes}] + \index[sd]{Maximum Job Spool Size} + \index[sd]{Directive!Maximum Job Spool Size} + where the bytes specify the maximum spool size for any one job that is + running. The default is no limit. + This directive is implemented only in version 1.37 and later. + +\item [Spool Directory = {\it directory}] + \index[sd]{Spool Directory} + \index[sd]{Directive!Spool Directory} + specifies the name of the directory to be used to store the spool files for + this device. This directory is also used to store temporary part files when + writing to a device that requires mount (DVD). The default is to use the + working directory. + +\item [Maximum Part Size = {\it bytes}] + \index[sd]{Maximum Part Size} + \index[sd]{Directive!Maximum Part Size} + This is the maximum size of a volume part file. The default is no limit. + This directive is implemented only in version 1.37 and later. + + If the device requires mount, it is transferred to the device when this size + is reached. In this case, you must take care to have enough disk space left + in the spool directory. + + Otherwise, it is left on the hard disk. + + It is ignored for tape and FIFO devices. + + +\end{description} + +\label{mountcodes} +\section{Edit Codes for Mount and Unmount Directives} +\index[general]{Directives!Edit Codes} +\index[general]{Edit Codes for Mount and Unmount Directives } + +Before submitting the {\bf Mount Command}, {\bf Unmount Command}, +{\bf Write Part Command}, or {\bf Free Space Command} directives +to the operating system, Bacula performs character substitution of the +following characters: + +\footnotesize +\begin{verbatim} + %% = % + %a = Archive device name + %e = erase (set if cannot mount and first part) + %n = part number + %m = mount point + %v = last part name (i.e. filename) +\end{verbatim} +\normalsize + + +\section{Devices that require a mount (DVD)} +\index[general]{Devices that require a mount (DVD)} +\index[general]{DVD!Devices that require a mount} + +All the directives in this section are implemented only in +Bacula version 1.37 and later and hence are available in version 1.38.6. + +As of version 1.39.5, the directives +"Requires Mount", "Mount Point", "Mount Command", and "Unmount Command" +apply to removable filesystems such as USB in addition to DVD. + +\begin{description} + +\item [Requires Mount = {\it yes\vb{}no}] + \index[sd]{Requires Mount} + \index[sd]{Directive!Requires Mount} + You must set this directive to {\bf yes} for DVD-writers, and to {\bf no} for + all other devices (tapes/files). This directive indicates if the device + requires to be mounted to be read, and if it must be written in a special way. + If it set, {\bf Mount Point}, {\bf Mount Command}, {\bf Unmount Command} and + {\bf Write Part Command} directives must also be defined. + +\item [Mount Point = {\it directory}] + \index[sd]{Mount Point} + \index[sd]{Directive!Mount Point} + Directory where the device can be mounted. + +\item [Mount Command = {\it name-string}] + \index[sd]{Mount Command} + \index[sd]{Directive!Mount Command} + Command that must be executed to mount the device. Before the command is + executed, \%a is replaced with the Archive Device, and \%m with the Mount + Point. + + Most frequently, you will define it as follows: + +\footnotesize +\begin{verbatim} + Mount Command = "/bin/mount -t iso9660 -o ro %a %m" +\end{verbatim} +\normalsize + +For some media, you may need multiple commands. If so, it is recommended +that you use a shell script instead of putting them all into the Mount +Command. For example, instead of this: + +\footnotesize +\begin{verbatim} + Mount Command = "/usr/local/bin/mymount" +\end{verbatim} +\normalsize + +Where that script contains: + +\footnotesize +\begin{verbatim} +#!/bin/sh +ndasadmin enable -s 1 -o w +sleep 2 +mount /dev/ndas-00323794-0p1 /backup +\end{verbatim} +\normalsize + +Similar consideration should be given to all other Command parameters. + +\item [Unmount Command = {\it name-string}] + \index[sd]{Unmount Command} + \index[sd]{Directive!Unmount Command} + Command that must be executed to unmount the device. Before the command is + executed, \%a is replaced with the Archive Device, and \%m with the Mount + Point. + + Most frequently, you will define it as follows: + +\footnotesize +\begin{verbatim} + Unmount Command = "/bin/umount %m" +\end{verbatim} +\normalsize + + If you need to specify multiple commands, create a shell script. + +\item [Write Part Command = {\it name-string}] + \index[sd]{Write Part Command} + \index[sd]{Directive!Write Part Command} + Command that must be executed to write a part to the device. Before the + command is executed, \%a is replaced with the Archive Device, \%m with the + Mount Point, \%e is replaced with 1 if we are writing the first part, + and with 0 otherwise, and \%v with the current part filename. + + For a DVD, you will most frequently specify the Bacula supplied {\bf + dvd-handler} script as follows: + +\footnotesize +\begin{verbatim} + Write Part Command = "/path/dvd-handler %a write %e %v" +\end{verbatim} +\normalsize + + Where {\bf /path} is the path to your scripts install directory, and + dvd-handler is the Bacula supplied script file. + This command will already be present, but commented out, + in the default bacula-sd.conf file. To use it, simply remove + the comment (\#) symbol. + + If you need to specify multiple commands, create a shell script. + + +\item [Free Space Command = {\it name-string}] + \index[sd]{Free Space Command} + \index[sd]{Directive!Free Space Command} + Command that must be executed to check how much free space is left on the + device. Before the command is executed,\%a is replaced with the Archive + Device, \%m with the Mount Point, \%e is replaced with 1 if we are writing + the first part, and with 0 otherwise, and \%v with the current part filename. + + For a DVD, you will most frequently specify the Bacula supplied {\bf + dvd-handler} script as follows: + +\footnotesize +\begin{verbatim} + Free Space Command = "/path/dvd-handler %a free" +\end{verbatim} +\normalsize + + Where {\bf /path} is the path to your scripts install directory, and + dvd-handler is the Bacula supplied script file. + If you want to specify your own command, please look at the code of + dvd-handler to see what output Bacula expects from this command. + This command will already be present, but commented out, + in the default bacula-sd.conf file. To use it, simply remove + the comment (\#) symbol. + + If you do not set it, Bacula will expect there is always free space on the + device. + + If you need to specify multiple commands, create a shell script. + +\end{description} + +%% This pulls in the Autochanger resource from another file. +\label{AutochangerRes} +\label{AutochangerResource1} +\input{autochangerres} + + + + +\section{Capabilities} +\index[general]{Capabilities} + +\begin{description} + +\item [Label media = {\it yes\vb{}no}] + \index[sd]{Label media} + \index[sd]{Directive!Label media} + If {\bf Yes}, permits this device to automatically label blank media + without an explicit operator command. It does so by using an internal + algorithm as defined on the \ilink{Label Format}{Label} record in each + Pool resource. If this is {\bf No} as by default, Bacula will label + tapes only by specific operator command ({\bf label} in the Console) or + when the tape has been recycled. The automatic labeling feature is most + useful when writing to disk rather than tape volumes. + +\item [Automatic mount = {\it yes\vb{}no}] + \index[sd]{Automatic mount} + \index[sd]{Directive!Automatic mount} + If {\bf Yes} (the default), permits the daemon to examine the device to + determine if it contains a Bacula labeled volume. This is done + initially when the daemon is started, and then at the beginning of each + job. This directive is particularly important if you have set + {\bf Always Open = no} because it permits Bacula to attempt to read the + device before asking the system operator to mount a tape. However, + please note that the tape must be mounted before the job begins. + +\end{description} + +\section{Messages Resource} +\label{MessagesResource1} +\index[general]{Resource!Messages} +\index[general]{Messages Resource} + +For a description of the Messages Resource, please see the +\ilink{Messages Resource}{MessagesChapter} Chapter of this +manual. + +\section{Sample Storage Daemon Configuration File} +\label{SampleConfiguration} +\index[general]{File!Sample Storage Daemon Configuration} +\index[general]{Sample Storage Daemon Configuration File} + +A example Storage Daemon configuration file might be the following: + +\footnotesize +\begin{verbatim} +# +# Default Bacula Storage Daemon Configuration file +# +# For Bacula release 1.37.2 (07 July 2005) -- gentoo 1.4.16 +# +# You may need to change the name of your tape drive +# on the "Archive Device" directive in the Device +# resource. If you change the Name and/or the +# "Media Type" in the Device resource, please ensure +# that bacula-dir.conf has corresponding changes. +# +Storage { # definition of myself + Name = rufus-sd + Address = rufus + WorkingDirectory = "$HOME/bacula/bin/working" + Pid Directory = "$HOME/bacula/bin/working" + Maximum Concurrent Jobs = 20 +} +# +# List Directors who are permitted to contact Storage daemon +# +Director { + Name = rufus-dir + Password = "ZF9Ctf5PQoWCPkmR3s4atCB0usUPg+vWWyIo2VS5ti6k" +} +# +# Restricted Director, used by tray-monitor to get the +# status of the storage daemon +# +Director { + Name = rufus-mon + Password = "9usxgc307dMbe7jbD16v0PXlhD64UVasIDD0DH2WAujcDsc6" + Monitor = yes +} +# +# Devices supported by this Storage daemon +# To connect, the Director's bacula-dir.conf must have the +# same Name and MediaType. +# +Autochanger { + Name = Autochanger + Device = Drive-1 + Device = Drive-2 + Changer Command = "/home/kern/bacula/bin/mtx-changer %c %o %S %a %d" + Changer Device = /dev/sg0 +} + +Device { + Name = Drive-1 # + Drive Index = 0 + Media Type = DLT-8000 + Archive Device = /dev/nst0 + AutomaticMount = yes; # when device opened, read it + AlwaysOpen = yes; + RemovableMedia = yes; + RandomAccess = no; + AutoChanger = yes + Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'" +} + +Device { + Name = Drive-2 # + Drive Index = 1 + Media Type = DLT-8000 + Archive Device = /dev/nst1 + AutomaticMount = yes; # when device opened, read it + AlwaysOpen = yes; + RemovableMedia = yes; + RandomAccess = no; + AutoChanger = yes + Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'" +} + +Device { + Name = "HP DLT 80" + Media Type = DLT8000 + Archive Device = /dev/nst0 + AutomaticMount = yes; # when device opened, read it + AlwaysOpen = yes; + RemovableMedia = yes; +} +#Device { +# Name = SDT-7000 # +# Media Type = DDS-2 +# Archive Device = /dev/nst0 +# AutomaticMount = yes; # when device opened, read it +# AlwaysOpen = yes; +# RemovableMedia = yes; +#} +#Device { +# Name = Floppy +# Media Type = Floppy +# Archive Device = /mnt/floppy +# RemovableMedia = yes; +# Random Access = Yes; +# AutomaticMount = yes; # when device opened, read it +# AlwaysOpen = no; +#} +#Device { +# Name = FileStorage +# Media Type = File +# Archive Device = /tmp +# LabelMedia = yes; # lets Bacula label unlabeled media +# Random Access = Yes; +# AutomaticMount = yes; # when device opened, read it +# RemovableMedia = no; +# AlwaysOpen = no; +#} +#Device { +# Name = "NEC ND-1300A" +# Media Type = DVD +# Archive Device = /dev/hda +# LabelMedia = yes; # lets Bacula label unlabeled media +# Random Access = Yes; +# AutomaticMount = yes; # when device opened, read it +# RemovableMedia = yes; +# AlwaysOpen = no; +# MaximumPartSize = 800M; +# RequiresMount = yes; +# MountPoint = /mnt/cdrom; +# MountCommand = "/bin/mount -t iso9660 -o ro %a %m"; +# UnmountCommand = "/bin/umount %m"; +# SpoolDirectory = /tmp/backup; +# WritePartCommand = "/etc/bacula/dvd-handler %a write %e %v" +# FreeSpaceCommand = "/etc/bacula/dvd-handler %a free" +#} +# +# A very old Exabyte with no end of media detection +# +#Device { +# Name = "Exabyte 8mm" +# Media Type = "8mm" +# Archive Device = /dev/nst0 +# Hardware end of medium = No; +# AutomaticMount = yes; # when device opened, read it +# AlwaysOpen = Yes; +# RemovableMedia = yes; +#} +# +# Send all messages to the Director, +# mount messages also are sent to the email address +# +Messages { + Name = Standard + director = rufus-dir = all + operator = root = mount +} +\end{verbatim} +\normalsize diff --git a/docs/manuals/fr/concepts/strategies.tex b/docs/manuals/es/main/strategies.tex similarity index 100% rename from docs/manuals/fr/concepts/strategies.tex rename to docs/manuals/es/main/strategies.tex diff --git a/docs/manuals/fr/concepts/supportedchangers.tex b/docs/manuals/es/main/supportedchangers.tex similarity index 59% rename from docs/manuals/fr/concepts/supportedchangers.tex rename to docs/manuals/es/main/supportedchangers.tex index ed020497..ebf876bc 100644 --- a/docs/manuals/fr/concepts/supportedchangers.tex +++ b/docs/manuals/es/main/supportedchangers.tex @@ -1,40 +1,48 @@ %% %% -\chapter{Librairies support\'ees} -\label{_ChapterStart21} -\addcontentsline{toc}{section}{Librairies support\'ees} - -\section{Mod\`eles de librairies support\'es} +\chapter{Supported Autochangers} \label{Models} -\index[general]{Mod\`eles de librairies support\'ees} -\index[general]{Librairies!Support\'ees} -\addcontentsline{toc}{section}{Mod\`eles de librairies support\'es} +\index[general]{Supported Autochanger Models} +\index[general]{Autochangers!Supported} + +I hesitate to call these "supported" autochangers because the only +autochangers that I have in my possession and am able to test are the HP +SureStore DAT40X6 and the Overland PowerLoader LTO-2. All the other +autochangers have been reported to work by Bacula users. Note, in the +Capacity/Slot column below, I quote the Compressed capacity per tape (or +Slot). + +Since on most systems (other than FreeBSD), Bacula uses {\bf mtx} +through the {\bf mtx-changer} script, in principle, if {\bf mtx} +will operate your changer correctly, then it is just a question +of adapting the {\bf mtx-changer} script (or selecting one +already adapted) for proper interfacing. You can find a list of +autochangers supported by {\bf mtx} at the following link: +\elink{http://mtx.opensource-sw.net/compatibility.php} +{\url{http://mtx.opensource-sw.net/compatibility.php}}. +The home page for the {\bf mtx} project can be found at: +\elink{http://mtx.opensource-sw.net/}{\url{http://mtx.opensource-sw.net/}}. -J'h\'esite \`a qualifier ces librairies de "support\'ees", car les seules -en ma possession et que je peux tester sont une HP SureStore DAT40X6 et -une Overland PowerLoader LTO-2. Toutes les autres librairies cit\'ees ici -ont \'et\'e raport\'ees comme fonctionnant avec Bacula par des utilisateurs. -Notez que dans la colonne Capacit\'e/Slot, je pr\'ecise la capacit\'e compress\'ee -par cartouche (ou slot). -\addcontentsline{lot}{table}{Librairies connues pour fonctionner avec Bacula} +\addcontentsline{lot}{table}{Autochangers Known to Work with Bacula} \begin{longtable}{|p{0.6in}|p{0.8in}|p{1.9in}|p{0.8in}|p{0.5in}|p{0.75in}|} \hline -\multicolumn{1}{|c| }{\bf OS } & \multicolumn{1}{c| }{\bf Fabr. } & -\multicolumn{1}{c| }{\bf Media } & \multicolumn{1}{c| }{\bf Mod\`ele } & +\multicolumn{1}{|c| }{\bf OS } & \multicolumn{1}{c| }{\bf Man. } & +\multicolumn{1}{c| }{\bf Media } & \multicolumn{1}{c| }{\bf Model } & \multicolumn{1}{c| }{\bf Slots } & \multicolumn{1}{c| }{\bf Cap/Slot } \\ \hline {Linux } & {Adic } & {DDS-3} & {Adic 1200G } & {12} & {-} \\ \hline {Linux } & {Adic } & {DLT} & {FastStore 4000 } & {7} & {20GB} \\ \hline {Linux } & {Adic } & {LTO-1/2, SDLT 320 } & {Adic Scalar 24 } & {24} & {100GB } \\ \hline {Linux } & {Adic } & {LTO-2 } & {Adic FastStor 2, Sun Storedge L8 } & {8} & {200GB } \\ + \hline {Linux } & {BDT } & {AIT } & {BDT ThinStor } & {?} & {200GB } \\ \hline {- } & {CA-VM } & {?? } & {Tape } & {??} & {?? } \\ - \hline {Linux} & {Dell} & {DLT VI,LTO-2} & {PowerVault 122T/132T/136T } & {-} & {100GB } \\ - \hline {Linux } & {Dell} & {LTO-2} & {PowerVault 124T } & {-} & {200GB } \\ + \hline {Linux } & {Dell} & {DLT VI,LTO-2,LTO3} & {PowerVault 122T/132T/136T } & {-} & {100GB } \\ + \hline {Linux } & {Dell} & {LTO-2} & {PowerVault 124T } & {-} & {200GB } \\ \hline {- } & {DFSMS } & {?? } & {VM RMM} & {-} & {?? } \\ \hline {Linux } & {Exabyte } & {VXA2 } & {VXA PacketLoader 1x10 2U } & {10} & {80/160GB } \\ \hline {- } & {Exabyte } & {LTO } & {Magnum 1x7 LTO Tape Auotloader } & {7} & {200/400GB } \\ - \hline {Linux Gentoo 1.4 } & {Exabyte } & {AIT-2 } & {215A } & {15 (2 drives)} & {50GB } \\ + \hline {Linux } & {Exabyte } & {AIT-2 } & {215A } & {15 (2 drives)} & {50GB } \\ \hline {Linux } & {HP } & {DDS-4 } & {SureStore DAT-40X6 } & {6 } & {40GB } \\ \hline {Linux } & {HP } & {Ultrium-2/LTO } & {MSL 6000/ 60030/ 5052 } & {28 } & {200/400GB } \\ \hline {- } & {HP } & {DLT } & {A4853 DLT } & {30} & {40/70GB } \\ @@ -42,13 +50,15 @@ par cartouche (ou slot). \hline {z/VM } & {IBM } & {?? } & {IBM Tape Manager } & {-} & {?? } \\ \hline {z/VM } & {IBM } & {?? } & {native tape } & {-} & {?? } \\ \hline {Linux } & {IBM } & {LTO } & {IBM 3581 Ultrium Tape Loader } & {7} & {200/400GB } \\ - \hline {SuSE 9.0 } & {IBM } & {LTO } & {IBM 3581 Ultrium Tape Loader } & {7} & {200/400GB } \\ \hline {FreeBSD 5.4} & {IBM } & {DLT} & {IBM 3502-R14 -- rebranded ATL L-500} & {14} & {35/70GB } \\ + \hline {Linux} & {IBM } & {???} & {IBM TotalStorage 3582L23} & {??} & {?? } \\ \hline {Debian} & {Overland } & {LTO } & {Overland LoaderXpress LTO/DLT8000 } & {10-19} & {40-100GB } \\ \hline {Fedora} & {Overland } & {LTO } & {Overland PowerLoader LTO-2 } & {10-19} & {200/400GB } \\ \hline {FreeBSD 5.4-Stable} & {Overland} & {LTO-2} & {Overland Powerloader tape} & {17} & {100GB } \\ \hline {- } & {Overland} & {LTO } & {Overland Neo2000 LTO } & {26-30} & {100GB } \\ - \hline {- } & {Quantum } & {?? } & {Super Loader } & {??} & {?? } \\ + \hline {Linux} & {Quantum } & {DLT-S4} & {Superloader 3} & {16} & {800/1600GB } \\ + \hline {Linux} & {Quantum } & {LTO-2} & {Superloader 3} & {16} & {200/400GB } \\ + \hline {Linux} & {Quantum } & {LTO-3 } & {PX502 } & {??} & {?? } \\ \hline {FreeBSD 4.9 } & {QUALSTAR TLS-4210 (Qualstar) } & {AIT1: 36GB, AIT2: 50GB all uncomp } & {QUALSTAR TLS-4210 } & {12} & {AIT1: 36GB, AIT2: 50GB all uncomp }\\ \hline {Linux } & {Skydata } & {DLT } & {ATL-L200 } & {8} & {40/80 } \\ diff --git a/docs/manuals/es/main/supporteddrives.tex b/docs/manuals/es/main/supporteddrives.tex new file mode 100644 index 00000000..005ba405 --- /dev/null +++ b/docs/manuals/es/main/supporteddrives.tex @@ -0,0 +1,158 @@ +%% +%% + +\chapter{Supported Tape Drives} +\label{SupportedDrives} +\index[general]{Drives!Supported Tape } +\index[general]{Supported Tape Drives } + +Bacula uses standard operating system calls (read, write, ioctl) to +interface to tape drives. As a consequence, it relies on having a +correctly written OS tape driver. Bacula is known to work perfectly well +with SCSI tape drivers on FreeBSD, Linux, Solaris, and Windows machines, +and it may work on other *nix machines, but we have not tested it. +Recently there are many new drives that use IDE, ATAPI, or +SATA interfaces rather than SCSI. On Linux the OnStream drive, which uses +the OSST driver is one such +example, and it is known to work with Bacula. In addition a number of such +tape drives (i.e. OS drivers) seem to work on Windows systems. However, +non-SCSI tape drives (other than the OnStream) that use ide-scis, ide-tape, +or other non-scsi drivers do not function correctly with Bacula (or any +other demanding tape application) as of today (April 2007). If you +have purchased a non-SCSI tape drive for use with Bacula on Linux, there +is a good chance that it will not work. We are working with the kernel +developers to rectify this situation, but it will not be resolved in the +near future. + +Even if your drive is on the list below, please check the +\ilink{Tape Testing Chapter}{btape1} of this manual for +procedures that you can use to verify if your tape drive will work with +Bacula. If your drive is in fixed block mode, it may appear to work with +Bacula until you attempt to do a restore and Bacula wants to position the +tape. You can be sure only by following the procedures suggested above and +testing. + +It is very difficult to supply a list of supported tape drives, or drives that +are known to work with Bacula because of limited feedback (so if you use +Bacula on a different drive, please let us know). Based on user feedback, the +following drives are known to work with Bacula. A dash in a column means +unknown: + +\addcontentsline{lot}{table}{Supported Tape Drives} +\begin{longtable}{|p{2.0in}|l|l|p{2.5in}|l|} + \hline +\multicolumn{1}{|c| }{\bf OS } & \multicolumn{1}{c| }{\bf Man. } & +\multicolumn{1}{c| }{\bf Media } & \multicolumn{1}{c| }{\bf Model } & +\multicolumn{1}{c| }{\bf Capacity } \\ + \hline {- } & {ADIC } & {DLT } & {Adic Scalar 100 DLT } & {100GB } \\ + \hline {- } & {ADIC } & {DLT } & {Adic Fastor 22 DLT } & {- } \\ + \hline {FreeBSD 5.4-RELEASE-p1 amd64 } & {Certance} & {LTO } & {AdicCertance CL400 LTO Ultrium 2 } & {200GB } \\ + \hline {- } & {- } & {DDS } & {Compaq DDS 2,3,4 } & {- } \\ + \hline {SuSE 8.1 Pro} & {Compaq} & {AIT } & {Compaq AIT 35 LVD } & {35/70GB } \\ + \hline {- } & {Exabyte } & {- } & {Exabyte drives less than 10 years old } & {- } \\ + \hline {- } & {Exabyte } & {- } & {Exabyte VXA drives } & {- } \\ + \hline {- } & {HP } & {Travan 4 } & {Colorado T4000S } & {- } \\ + \hline {- } & {HP } & {DLT } & {HP DLT drives } & {- } \\ + \hline {- } & {HP } & {LTO } & {HP LTO Ultrium drives } & {- } \\ + \hline {- } & {IBM} & {??} & {3480, 3480XL, 3490, 3490E, 3580 and 3590 drives} & {- } \\ + \hline {FreeBSD 4.10 RELEASE } & {HP } & {DAT } & {HP StorageWorks DAT72i } & {- } \\ + \hline {- } & {Overland } & {LTO } & {LoaderXpress LTO } & {- } \\ + \hline {- } & {Overland } & {- } & {Neo2000 } & {- } \\ + \hline {- } & {OnStream } & {- } & {OnStream drives (see below) } & {- } \\ + \hline {FreeBSD 4.11-Release} & {Quantum } & {SDLT } & {SDLT320 } & {160/320GB } \\ + \hline {- } & {Quantum } & {DLT } & {DLT-8000 } & {40/80GB } \\ + \hline {Linux } & {Seagate } & {DDS-4 } & {Scorpio 40 } & {20/40GB } \\ + \hline {FreeBSD 4.9 STABLE } & {Seagate } & {DDS-4 } & {STA2401LW } & {20/40GB } \\ + \hline {FreeBSD 5.2.1 pthreads patched RELEASE } & {Seagate } & {AIT-1 } & {STA1701W} & {35/70GB } \\ + \hline {Linux } & {Sony } & {DDS-2,3,4 } & {- } & {4-40GB } \\ + \hline {Linux } & {Tandberg } & {- } & {Tandbert MLR3 } & {- } \\ + \hline {FreeBSD } & {Tandberg } & {- } & {Tandberg SLR6 } & {- } \\ + \hline {Solaris } & {Tandberg } & {- } & {Tandberg SLR75 } & {- } \\ + \hline + +\end{longtable} + +There is a list of \ilink{supported autochangers}{Models} in the Supported +Autochangers chapter of this document, where you will find other tape drives +that work with Bacula. + +\section{Unsupported Tape Drives} +\label{UnSupportedDrives} +\index[general]{Unsupported Tape Drives } +\index[general]{Drives!Unsupported Tape } + +Previously OnStream IDE-SCSI tape drives did not work with Bacula. As of +Bacula version 1.33 and the osst kernel driver version 0.9.14 or later, they +now work. Please see the testing chapter as you must set a fixed block size. + +QIC tapes are known to have a number of particularities (fixed block size, and +one EOF rather than two to terminate the tape). As a consequence, you will +need to take a lot of care in configuring them to make them work correctly +with Bacula. + +\section{FreeBSD Users Be Aware!!!} +\index[general]{FreeBSD Users Be Aware } +\index[general]{Aware!FreeBSD Users Be } + +Unless you have patched the pthreads library on FreeBSD 4.11 systems, you will +lose data when Bacula spans tapes. This is because the unpatched pthreads +library fails to return a warning status to Bacula that the end of the tape is +near. This problem is fixed in FreeBSD systems released after 4.11. Please see the +\ilink{Tape Testing Chapter}{FreeBSDTapes} of this manual for +{\bf important} information on how to configure your tape drive for +compatibility with Bacula. + +\section{Supported Autochangers} +\index[general]{Autochangers!Supported } +\index[general]{Supported Autochangers } + +For information on supported autochangers, please see the +\ilink{Autochangers Known to Work with Bacula}{Models} +section of the Supported Autochangers chapter of this manual. + +\section{Tape Specifications} +\index[general]{Specifications!Tape} +\index[general]{Tape Specifications} +If you want to know what tape drive to buy that will work with Bacula, +we really cannot tell you. However, we can say that if you are going +to buy a drive, you should try to avoid DDS drives. The technology is +rather old and DDS tape drives need frequent cleaning. DLT drives are +generally much better (newer technology) and do not need frequent +cleaning. + +Below, you will find a table of DLT and LTO tape specifications that will +give you some idea of the capacity and speed of modern tapes. The +capacities that are listed are the native tape capacity without compression. +All modern drives have hardware compression, and manufacturers often list +compressed capacity using a compression ration of 2:1. The actual compression +ratio will depend mostly on the data you have to backup, but I find that +1.5:1 is a much more reasonable number (i.e. multiply the value shown in +the table by 1.5 to get a rough average of what you will probably see). +The transfer rates are rounded to the nearest GB/hr. All values are provided +by various manufacturers. + +The Media Type is what is designated by the manufacturers and you are not +required to use (but you may) the same name in your Bacula conf resources. + + +\begin{tabular}{|c|c|c|c} +Media Type & Drive Type & Media Capacity & Transfer Rate \\ \hline +DDS-1 & DAT & 2 GB & ?? GB/hr \\ \hline +DDS-2 & DAT & 4 GB & ?? GB/hr \\ \hline +DDS-3 & DAT & 12 GB & 5.4 GB/hr \\ \hline +Travan 40 & Travan & 20 GB & ?? GB/hr \\ \hline +DDS-4 & DAT & 20 GB & 11 GB/hr \\ \hline +VXA-1 & Exabyte & 33 GB & 11 GB/hr \\ \hline +DAT-72 & DAT & 36 GB & 13 GB/hr \\ \hline +DLT IV & DLT8000 & 40 GB & 22 GB/hr \\ \hline +VXA-2 & Exabyte & 80 GB & 22 GB/hr \\ \hline +Half-high Ultrium 1 & LTO 1 & 100 GB & 27 GB/hr \\ \hline +Ultrium 1 & LTO 1 & 100 GB & 54 GB/hr \\ \hline +Super DLT 1 & SDLT 220 & 110 GB & 40 GB/hr \\ \hline +VXA-3 & Exabyte & 160 GB & 43 GB/hr \\ \hline +Super DLT I & SDLT 320 & 160 GB & 58 GB/hr \\ \hline +Ultrium 2 & LTO 2 & 200 GB & 108 GB/hr \\ \hline +Super DLT II & SDLT 600 & 300 GB & 127 GB/hr \\ \hline +VXA-4 & Exabyte & 320 GB & 86 GB/hr \\ \hline +Ultrium 3 & LTO 3 & 400 GB & 216 GB/hr \\ \hline +\end{tabular} diff --git a/docs/manuals/es/main/supportedoses.tex b/docs/manuals/es/main/supportedoses.tex new file mode 100644 index 00000000..bf4d9376 --- /dev/null +++ b/docs/manuals/es/main/supportedoses.tex @@ -0,0 +1,90 @@ +%% +%% + +\chapter{Supported Operating Systems} +\label{SupportedOSes} +\index[general]{Systems!Supported Operating } +\index[general]{Supported Operating Systems } + +\begin{itemize} +\item[X] Fully supported +\item[$\star$] The are reported to work in many cases. However they are NOT + supported by the bacula's project. +\end{itemize} + + +\begin{tabular}[h]{|l|l|c|c|c|} + \hline + Operating Systems & Version & Client \small{Daemon} & Director \small{Daemon} & Storage \small{Daemon} \\ + \hline + \hline + GNU/Linux + & All & X & X & X \\ + \hline + FreeBSD & $\geq$ 5.0 & X & X & X + \\ + \hline + Solaris & $\geq$ 8 & X & X & X \\ + \hline + OpenSolaris & ~ & X & X & X \\ + \hline + \hline + MS Windows 32bit& Win98/Me & X & ~ & ~ \\ + \hline + ~ & WinNT/2K & X & $\star$ & $\star$ \\ + \hline + ~ & XP & X & $\star$ & $\star$ \\ + ~ & 2008/Vista & X & $\star$ & $\star$ \\ + MS Windows 64bit& 2008/Vista & X & ~ & ~ \\ + \hline + \hline + MacOS X/Darwin & ~ & X & ~ & ~ \\ + \hline + OpenBSD & ~ & X & $\star$ & ~ \\ + \hline + NetBSD & ~ & X & $\star$ & ~ \\ + \hline + Irix & ~ & $\star$ & ~ & ~ \\ + \hline + True64 & ~ & $\star$ & ~ & ~ \\ + \hline + AIX & $\geq$ 4.3 & $\star$ & ~ & ~ \\ + \hline + BSDI & ~ & $\star$ & ~ & ~ \\ + \hline + HPUX & ~ & $\star$ & ~ & ~ \\ + \hline +\end{tabular} + +\section*{Important notes} + +\begin{itemize} +\item By GNU/Linux, we mean 32/64bit Gentoo, Red Hat, Fedora, Mandriva, + Debian, OpenSuSE, Ubuntu, Kubuntu, \dots + +\item For FreeBSD older than version 5.0, + please see some {\bf important} considerations in the + \ilink{ Tape Modes on FreeBSD}{FreeBSDTapes} section of the + Tape Testing chapter of this manual. + +\item MS Windows Director and Storage daemon are available + in the binary Client installer + +\item For MacOSX see \elink{http://fink.sourceforge.net/ for obtaining the packages}{http://fink.sourceforge.net/} +\end{itemize} + +See the Porting chapter of the Bacula Developer's Guide for information on +porting to other systems. + +If you have a older Red Hat Linux system running the 2.4.x kernel and you have +the directory {\bf /lib/tls} installed on your system (normally by default), +bacula will {\bf NOT} run. This is the new pthreads library and it is +defective. You must remove this directory prior to running Bacula, or you can +simply change the name to {\bf /lib/tls-broken}) then you must reboot your +machine (one of the few times Linux must be rebooted). If you are not able to +remove/rename /lib/tls, an alternative is to set the environment variable +"LD\_ASSUME\_KERNEL=2.4.19" prior to executing Bacula. For this option, you do +not need to reboot, and all programs other than Bacula will continue to use +/lib/tls. +The above mentioned {\bf /lib/tls} problem does not occur with Linux 2.6 kernels. + diff --git a/docs/manuals/fr/concepts/thanks.tex b/docs/manuals/es/main/thanks.tex similarity index 100% rename from docs/manuals/fr/concepts/thanks.tex rename to docs/manuals/es/main/thanks.tex diff --git a/docs/manuals/fr/concepts/tls.tex b/docs/manuals/es/main/tls.tex similarity index 100% rename from docs/manuals/fr/concepts/tls.tex rename to docs/manuals/es/main/tls.tex diff --git a/docs/manuals/es/main/translate_images.pl b/docs/manuals/es/main/translate_images.pl new file mode 100755 index 00000000..c7225118 --- /dev/null +++ b/docs/manuals/es/main/translate_images.pl @@ -0,0 +1,185 @@ +#!/usr/bin/perl -w +# +use strict; + +# Used to change the names of the image files generated by latex2html from imgxx.png +# to meaningful names. Provision is made to go either from or to the meaningful names. +# The meaningful names are obtained from a file called imagename_translations, which +# is generated by extensions to latex2html in the make_image_file subroutine in +# bacula.perl. + +# Opens the file imagename_translations and reads the contents into a hash. +# The hash is creaed with the imgxx.png files as the key if processing TO +# meaningful filenames, and with the meaningful filenames as the key if +# processing FROM meaningful filenames. +# Then opens the html file(s) indicated in the command-line arguments and +# changes all image references according to the translations described in the +# above file. Finally, it renames the image files. +# +# Original creation: 3-27-05 by Karl Cunningham. +# Modified 5-21-05 to go FROM and TO meaningful filenames. +# +my $TRANSFILE = "imagename_translations"; +my $path; + +# Loads the contents of $TRANSFILE file into the hash referenced in the first +# argument. The hash is loaded to translate old to new if $direction is 0, +# otherwise it is loaded to translate new to old. In this context, the +# 'old' filename is the meaningful name, and the 'new' filename is the +# imgxx.png filename. It is assumed that the old image is the one that +# latex2html has used as the source to create the imgxx.png filename. +# The filename extension is taken from the file +sub read_transfile { + my ($trans,$direction) = @_; + + if (!open IN,"<$path$TRANSFILE") { + print "WARNING: Cannot open image translation file $path$TRANSFILE for reading\n"; + print " Image filename translation aborted\n\n"; + exit 0; + } + + while () { + chomp; + my ($new,$old) = split(/\001/); + + # Old filenames will usually have a leading ./ which we don't need. + $old =~ s/^\.\///; + + # The filename extension of the old filename must be made to match + # the new filename because it indicates the encoding format of the image. + my ($ext) = $new =~ /(\.[^\.]*)$/; + $old =~ s/\.[^\.]*$/$ext/; + if ($direction == 0) { + $trans->{$new} = $old; + } else { + $trans->{$old} = $new; + } + } + close IN; +} + +# Translates the image names in the file given as the first argument, according to +# the translations in the hash that is given as the second argument. +# The file contents are read in entirely into a string, the string is processed, and +# the file contents are then written. No particular care is taken to ensure that the +# file is not lost if a system failure occurs at an inopportune time. It is assumed +# that the html files being processed here can be recreated on demand. +# +# Links to other files are added to the %filelist for processing. That way, +# all linked files will be processed (assuming they are local). +sub translate_html { + my ($filename,$trans,$filelist) = @_; + my ($contents,$out,$this,$img,$dest); + my $cnt = 0; + + # If the filename is an external link ignore it. And drop any file:// from + # the filename. + $filename =~ /^(http|ftp|mailto)\:/ and return 0; + $filename =~ s/^file\:\/\///; + # Load the contents of the html file. + if (!open IF,"<$path$filename") { + print "WARNING: Cannot open $path$filename for reading\n"; + print " Image Filename Translation aborted\n\n"; + exit 0; + } + + while () { + $contents .= $_; + } + close IF; + + # Now do the translation... + # First, search for an image filename. + while ($contents =~ /\<\s*IMG[^\>]*SRC=\"/si) { + $contents = $'; + $out .= $` . $&; + + # The next thing is an image name. Get it and translate it. + $contents =~ /^(.*?)\"/s; + $contents = $'; + $this = $&; + $img = $1; + # If the image is in our list of ones to be translated, do it + # and feed the result to the output. + $cnt += $this =~ s/$img/$trans->{$img}/ if (defined($trans->{$img})); + $out .= $this; + } + $out .= $contents; + + # Now send the translated text to the html file, overwriting what's there. + open OF,">$path$filename" or die "Cannot open $path$filename for writing\n"; + print OF $out; + close OF; + + # Now look for any links to other files and add them to the list of files to do. + while ($out =~ /\<\s*A[^\>]*HREF=\"(.*?)\"/si) { + $out = $'; + $dest = $1; + # Drop an # and anything after it. + $dest =~ s/\#.*//; + $filelist->{$dest} = '' if $dest; + } + return $cnt; +} + +# REnames the image files spefified in the %translate hash. +sub rename_images { + my $translate = shift; + my ($response); + + foreach (keys(%$translate)) { + if (! $translate->{$_}) { + print " WARNING: No destination Filename for $_\n"; + } else { + $response = `mv -f $path$_ $path$translate->{$_} 2>&1`; + $response and print "ERROR from system $response\n"; + } + } +} + +################################################# +############# MAIN ############################# +################################################ + +# %filelist starts out with keys from the @ARGV list. As files are processed, +# any links to other files are added to the %filelist. A hash of processed +# files is kept so we don't do any twice. + +# The first argument must be either --to_meaningful_names or --from_meaningful_names + +my (%translate,$search_regex,%filelist,%completed,$thisfile); +my ($cnt,$direction); + +my $arg0 = shift(@ARGV); +$arg0 =~ /^(--to_meaningful_names|--from_meaningful_names)$/ or + die "ERROR: First argument must be either \'--to_meaningful_names\' or \'--from_meaningful_names\'\n"; + +$direction = ($arg0 eq '--to_meaningful_names') ? 0 : 1; + +(@ARGV) or die "ERROR: Filename(s) to process must be given as arguments\n"; + +# Use the first argument to get the path to the file of translations. +my $tmp = $ARGV[0]; +($path) = $tmp =~ /(.*\/)/; +$path = '' unless $path; + +read_transfile(\%translate,$direction); + +foreach (@ARGV) { + # Strip the path from the filename, and use it later on. + if (s/(.*\/)//) { + $path = $1; + } else { + $path = ''; + } + $filelist{$_} = ''; + + while ($thisfile = (keys(%filelist))[0]) { + $cnt += translate_html($thisfile,\%translate,\%filelist) if (!exists($completed{$thisfile})); + delete($filelist{$thisfile}); + $completed{$thisfile} = ''; + } + print "translate_images.pl: $cnt image filenames translated ",($direction)?"from":"to"," meaningful names\n"; +} + +rename_images(\%translate); diff --git a/docs/manuals/es/main/tutorial.tex b/docs/manuals/es/main/tutorial.tex new file mode 100644 index 00000000..1dd8bd0a --- /dev/null +++ b/docs/manuals/es/main/tutorial.tex @@ -0,0 +1,1357 @@ +%% +%% + +\chapter{A Brief Tutorial} +\label{TutorialChapter} +\index[general]{Brief Tutorial } +\index[general]{Tutorial!Brief } + +This chapter will guide you through running Bacula. To do so, we assume you +have installed Bacula, possibly in a single file as shown in the previous +chapter, in which case, you can run Bacula as non-root for these tests. +However, we assume that you have not changed the .conf files. If you have +modified the .conf files, please go back and uninstall Bacula, then reinstall +it, but do not make any changes. The examples in this chapter use the default +configuration files, and will write the volumes to disk in your {\bf /tmp} +directory, in addition, the data backed up will be the source directory where +you built Bacula. As a consequence, you can run all the Bacula daemons for +these tests as non-root. Please note, in production, your File daemon(s) must +run as root. See the Security chapter for more information on this subject. + +% TODO: use crossreferences above +% TODO: add a section here + +The general flow of running Bacula is: + +\begin{enumerate} +\item cd \lt{}install-directory\gt{} +\item Start the Database (if using MySQL or PostgreSQL) +\item Start the Daemons with {\bf ./bacula start} +\item Start the Console program to interact with the Director +\item Run a job +\item When the Volume fills, unmount the Volume, if it is a tape, label a new + one, and continue running. In this chapter, we will write only to disk files + so you won't need to worry about tapes for the moment. +\item Test recovering some files from the Volume just written to ensure the + backup is good and that you know how to recover. Better test before disaster + strikes +\item Add a second client. + \end{enumerate} + +Each of these steps is described in more detail below. + +\section{Before Running Bacula} +\index[general]{Bacula!Before Running } +\index[general]{Before Running Bacula } + +% TODO: some of this content is already covered once or twice critical +% TODO: or quickstart. Consolidate! + +Before running Bacula for the first time in production, we recommend that you +run the {\bf test} command in the {\bf btape} program as described in the +\ilink{Utility Program Chapter}{btape} of this manual. This will +help ensure that Bacula functions correctly with your tape drive. If you have +a modern HP, Sony, or Quantum DDS or DLT tape drive running on Linux or +Solaris, you can probably skip this test as Bacula is well tested with these +drives and systems. For all other cases, you are {\bf strongly} encouraged to +run the test before continuing. {\bf btape} also has a {\bf fill} command that +attempts to duplicate what Bacula does when filling a tape and writing on the +next tape. You should consider trying this command as well, but be forewarned, +it can take hours (about four hours on my drive) to fill a large capacity tape. + +\section{Starting the Database} +\label{StartDB} +\index[general]{Starting the Database } +\index[general]{Database!Starting the } + +If you are using MySQL or PostgreSQL as the Bacula database, you should start +it before you attempt to run a job to avoid getting error messages from Bacula +when it starts. The scripts {\bf startmysql} and {\bf stopmysql} are what I +(Kern) use to start and stop my local MySQL. Note, if you are using SQLite, +you will not want to use {\bf startmysql} or {\bf stopmysql}. If you are +running this in production, you will probably want to find some way to +automatically start MySQL or PostgreSQL after each system reboot. + +If you are using SQLite (i.e. you specified the {\bf \verb:--:with-sqlite=xxx} option +on the {\bf ./configure} command, you need do nothing. SQLite is automatically +started by {\bf Bacula}. + +\section{Starting the Daemons} +\label{StartDaemon} +\index[general]{Starting the Daemons } +\index[general]{Daemons!Starting the } + +Assuming you have built from source or have installed the rpms, +to start the three daemons, from your installation directory, simply enter: + +./bacula start + +The {\bf bacula} script starts the Storage daemon, the File daemon, and the +Director daemon, which all normally run as daemons in the background. If you +are using the autostart feature of Bacula, your daemons will either be +automatically started on reboot, or you can control them individually with the +files {\bf bacula-dir}, {\bf bacula-fd}, and {\bf bacula-sd}, which are +usually located in {\bf /etc/init.d}, though the actual location is system +dependent. +Some distributions may do this differently. + +Note, on Windows, currently only the File daemon is ported, and it must be +started differently. Please see the +\ilink{Windows Version of Bacula}{Win32Chapter} Chapter of this +manual. + +The rpm packages configure the daemons to run as user=root and group=bacula. +The rpm installation also creates the group bacula if it does not exist on the +system. Any users that you add to the group bacula will have access to files +created by the daemons. To disable or alter this behavior edit the daemon +startup scripts: + +\begin{itemize} +\item /etc/bacula/bacula +\item /etc/init.d/bacula-dir +\item /etc/init.d/bacula-sd +\item /etc/init.d/bacula-fd + \end{itemize} + +and then restart as noted above. + +The +\ilink{installation chapter}{InstallChapter} of this manual +explains how you can install scripts that will automatically restart the +daemons when the system starts. + +\section{Using the Director to Query and Start Jobs} +\index[general]{Jobs!Querying or Starting Jobs} +\index[general]{Querying or starting Jobs} +% TODO: section name is too long; maybe use "Using the Console Program" ?? + +To communicate with the director and to query the state of Bacula or run jobs, +from the top level directory, simply enter: + +./bconsole + +Alternatively to running the command line console, if you have +Qt4 installed and used the {\bf \verb:--:enable-bat} on the configure command, +you may use the Bacula Administration Tool ({\bf bat}): + +./bat + +Which has a graphical interface, and many more features than bconsole. + +Two other possibilities are to run the GNOME console +{\bf bgnome-console} or the wxWidgets program {\bf bwx-console}. + +For simplicity, here we will describe only the {\bf ./bconsole} program. Most +of what is described here applies equally well to {\bf ./bat}, +{\bf ./bgnome-console}, and to {\bf bwx-console}. + +The {\bf ./bconsole} runs the Bacula Console program, which connects to the +Director daemon. Since Bacula is a network program, you can run the Console +program anywhere on your network. Most frequently, however, one runs it on the +same machine as the Director. Normally, the Console program will print +something similar to the following: + +\footnotesize +\begin{verbatim} +[kern@polymatou bin]$ ./bconsole +Connecting to Director lpmatou:9101 +1000 OK: HeadMan Version: 2.1.8 (14 May 2007) +* +\end{verbatim} +\normalsize + +the asterisk is the console command prompt. + +Type {\bf help} to see a list of available commands: + +\footnotesize +\begin{verbatim} +*help + Command Description + ======= =========== + add add media to a pool + autodisplay autodisplay [on|off] -- console messages + automount automount [on|off] -- after label + cancel cancel [ | ] -- cancel a job + create create DB Pool from resource + delete delete [pool= | media volume=] + disable disable -- disable a job + enable enable -- enable a job + estimate performs FileSet estimate, listing gives full listing + exit exit = quit + gui gui [on|off] -- non-interactive gui mode + help print this command + list list [pools | jobs | jobtotals | media | +files ]; from catalog + label label a tape + llist full or long list like list command + memory print current memory usage + messages messages + mount mount + prune prune expired records from catalog + purge purge records from catalog + python python control commands + quit quit + query query catalog + restore restore files + relabel relabel a tape + release release + reload reload conf file + run run + status status [[slots] storage | dir | client]= + setdebug sets debug level + setip sets new client address -- if authorized + show show (resource records) [jobs | pools | ... | all] + sqlquery use SQL to query catalog + time print current time + trace turn on/off trace to file + unmount unmount + umount umount for old-time Unix guys + update update Volume, Pool or slots + use use catalog xxx + var does variable expansion + version print Director version + wait wait until no jobs are running [ | | ] +* +\end{verbatim} +\normalsize + +Details of the console program's commands are explained in the +\ilink{Console Chapter}{_ConsoleChapter} of this manual. + +\section{Running a Job} +\label{Running} +\index[general]{Job!Running a } +\index[general]{Running a Job } + +At this point, we assume you have done the following: + +\begin{itemize} +\item Configured Bacula with {\bf ./configure \verb:--:your-options} +\item Built Bacula using {\bf make} +\item Installed Bacula using {\bf make install} +\item Have created your database with, for example, {\bf + ./create\_sqlite\_database} +\item Have created the Bacula database tables with, {\bf + ./make\_bacula\_tables} +\item Have possibly edited your {\bf bacula-dir.conf} file to personalize it + a bit. BE CAREFUL! if you change the Director's name or password, you will + need to make similar modifications in the other .conf files. For the moment + it is probably better to make no changes. +\item You have started Bacula with {\bf ./bacula start} +\item You have invoked the Console program with {\bf ./bconsole} +\end{itemize} + +Furthermore, we assume for the moment you are using the default configuration +files. + +At this point, enter the following command: + +\footnotesize +\begin{verbatim} +show filesets +\end{verbatim} +\normalsize + +and you should get something similar to: + +\footnotesize +\begin{verbatim} +FileSet: name=Full Set + O M + N + I /home/kern/bacula/regress/build + N + E /proc + E /tmp + E /.journal + E /.fsck + N +FileSet: name=Catalog + O M + N + I /home/kern/bacula/regress/working/bacula.sql + N +\end{verbatim} +\normalsize + +This is a pre-defined {\bf FileSet} that will backup the Bacula source +directory. The actual directory names printed should correspond to your system +configuration. For testing purposes, we have chosen a directory of moderate +size (about 40 Megabytes) and complexity without being too big. The FileSet +{\bf Catalog} is used for backing up Bacula's catalog and is not of interest +to us for the moment. The {\bf I} entries are the files or directories that +will be included in the backup and the {\bf E} are those that will be +excluded, and the {\bf O} entries are the options specified for +the FileSet. You can change what is backed up by editing {\bf bacula-dir.conf} +and changing the {\bf File =} line in the {\bf FileSet} resource. + +Now is the time to run your first backup job. We are going to backup your +Bacula source directory to a File Volume in your {\bf /tmp} directory just to +show you how easy it is. Now enter: + +\footnotesize +\begin{verbatim} +status dir +\end{verbatim} +\normalsize + +and you should get the following output: + +\footnotesize +\begin{verbatim} +rufus-dir Version: 1.30 (28 April 2003) +Daemon started 28-Apr-2003 14:03, 0 Jobs run. +Console connected at 28-Apr-2003 14:03 +No jobs are running. +Level Type Scheduled Name +================================================================= +Incremental Backup 29-Apr-2003 01:05 Client1 +Full Backup 29-Apr-2003 01:10 BackupCatalog +==== +\end{verbatim} +\normalsize + +where the times and the Director's name will be different according to your +setup. This shows that an Incremental job is scheduled to run for the Job {\bf +Client1} at 1:05am and that at 1:10, a {\bf BackupCatalog} is scheduled to +run. Note, you should probably change the name {\bf Client1} to be the name of +your machine, if not, when you add additional clients, it will be very +confusing. For my real machine, I use {\bf Rufus} rather than {\bf Client1} as +in this example. + +Now enter: + +\footnotesize +\begin{verbatim} +status client +\end{verbatim} +\normalsize + +and you should get something like: + +\footnotesize +\begin{verbatim} +The defined Client resources are: + 1: rufus-fd +Item 1 selected automatically. +Connecting to Client rufus-fd at rufus:8102 +rufus-fd Version: 1.30 (28 April 2003) +Daemon started 28-Apr-2003 14:03, 0 Jobs run. +Director connected at: 28-Apr-2003 14:14 +No jobs running. +==== +\end{verbatim} +\normalsize + +In this case, the client is named {\bf rufus-fd} your name will be different, +but the line beginning with {\bf rufus-fd Version ...} is printed by your File +daemon, so we are now sure it is up and running. + +Finally do the same for your Storage daemon with: + +\footnotesize +\begin{verbatim} +status storage +\end{verbatim} +\normalsize + +and you should get: + +\footnotesize +\begin{verbatim} +The defined Storage resources are: + 1: File +Item 1 selected automatically. +Connecting to Storage daemon File at rufus:8103 +rufus-sd Version: 1.30 (28 April 2003) +Daemon started 28-Apr-2003 14:03, 0 Jobs run. +Device /tmp is not open. +No jobs running. +==== +\end{verbatim} +\normalsize + +You will notice that the default Storage daemon device is named {\bf File} and +that it will use device {\bf /tmp}, which is not currently open. + +Now, let's actually run a job with: + +\footnotesize +\begin{verbatim} +run +\end{verbatim} +\normalsize + +you should get the following output: + +\footnotesize +\begin{verbatim} +Using default Catalog name=MyCatalog DB=bacula +A job name must be specified. +The defined Job resources are: + 1: Client1 + 2: BackupCatalog + 3: RestoreFiles +Select Job resource (1-3): +\end{verbatim} +\normalsize + +Here, Bacula has listed the three different Jobs that you can run, and you +should choose number {\bf 1} and type enter, at which point you will get: + +\footnotesize +\begin{verbatim} +Run Backup job +JobName: Client1 +FileSet: Full Set +Level: Incremental +Client: rufus-fd +Storage: File +Pool: Default +When: 2003-04-28 14:18:57 +OK to run? (yes/mod/no): +\end{verbatim} +\normalsize + +At this point, take some time to look carefully at what is printed and +understand it. It is asking you if it is OK to run a job named {\bf Client1} +with FileSet {\bf Full Set} (we listed above) as an Incremental job on your +Client (your client name will be different), and to use Storage {\bf File} and +Pool {\bf Default}, and finally, it wants to run it now (the current time +should be displayed by your console). + +Here we have the choice to run ({\bf yes}), to modify one or more of the above +parameters ({\bf mod}), or to not run the job ({\bf no}). Please enter {\bf +yes}, at which point you should immediately get the command prompt (an +asterisk). If you wait a few seconds, then enter the command {\bf messages} +you will get back something like: + +\footnotesize +\begin{verbatim} +28-Apr-2003 14:22 rufus-dir: Last FULL backup time not found. Doing + FULL backup. +28-Apr-2003 14:22 rufus-dir: Start Backup JobId 1, + Job=Client1.2003-04-28_14.22.33 +28-Apr-2003 14:22 rufus-sd: Job Client1.2003-04-28_14.22.33 waiting. + Cannot find any appendable volumes. +Please use the "label" command to create a new Volume for: + Storage: FileStorage + Media type: File + Pool: Default +\end{verbatim} +\normalsize + +The first message, indicates that no previous Full backup was done, so Bacula +is upgrading our Incremental job to a Full backup (this is normal). The second +message indicates that the job started with JobId 1., and the third message +tells us that Bacula cannot find any Volumes in the Pool for writing the +output. This is normal because we have not yet created (labeled) any Volumes. +Bacula indicates to you all the details of the volume it needs. + +At this point, the job is BLOCKED waiting for a Volume. You can check this if +you want by doing a {\bf status dir}. In order to continue, we must create a +Volume that Bacula can write on. We do so with: + +\footnotesize +\begin{verbatim} +label +\end{verbatim} +\normalsize + +and Bacula will print: + +\footnotesize +\begin{verbatim} +The defined Storage resources are: + 1: File +Item 1 selected automatically. +Enter new Volume name: +\end{verbatim} +\normalsize + +at which point, you should enter some name beginning with a letter and +containing only letters and numbers (period, hyphen, and underscore) are also +permitted. For example, enter {\bf TestVolume001}, and you should get back: + +\footnotesize +\begin{verbatim} +Defined Pools: + 1: Default +Item 1 selected automatically. +Connecting to Storage daemon File at rufus:8103 ... +Sending label command for Volume "TestVolume001" Slot 0 ... +3000 OK label. Volume=TestVolume001 Device=/tmp +Catalog record for Volume "TestVolume002", Slot 0 successfully created. +Requesting mount FileStorage ... +3001 OK mount. Device=/tmp +\end{verbatim} +\normalsize + +Finally, enter {\bf messages} and you should get something like: + +\footnotesize +\begin{verbatim} +28-Apr-2003 14:30 rufus-sd: Wrote label to prelabeled Volume + "TestVolume001" on device /tmp +28-Apr-2003 14:30 rufus-dir: Bacula 1.30 (28Apr03): 28-Apr-2003 14:30 +JobId: 1 +Job: Client1.2003-04-28_14.22.33 +FileSet: Full Set +Backup Level: Full +Client: rufus-fd +Start time: 28-Apr-2003 14:22 +End time: 28-Apr-2003 14:30 +Files Written: 1,444 +Bytes Written: 38,988,877 +Rate: 81.2 KB/s +Software Compression: None +Volume names(s): TestVolume001 +Volume Session Id: 1 +Volume Session Time: 1051531381 +Last Volume Bytes: 39,072,359 +FD termination status: OK +SD termination status: OK +Termination: Backup OK +28-Apr-2003 14:30 rufus-dir: Begin pruning Jobs. +28-Apr-2003 14:30 rufus-dir: No Jobs found to prune. +28-Apr-2003 14:30 rufus-dir: Begin pruning Files. +28-Apr-2003 14:30 rufus-dir: No Files found to prune. +28-Apr-2003 14:30 rufus-dir: End auto prune. +\end{verbatim} +\normalsize + +If you don't see the output immediately, you can keep entering {\bf messages} +until the job terminates, or you can enter, {\bf autodisplay on} and your +messages will automatically be displayed as soon as they are ready. + +If you do an {\bf ls -l} of your {\bf /tmp} directory, you will see that you +have the following item: + +\footnotesize +\begin{verbatim} +-rw-r----- 1 kern kern 39072153 Apr 28 14:30 TestVolume001 +\end{verbatim} +\normalsize + +This is the file Volume that you just wrote and it contains all the data of +the job just run. If you run additional jobs, they will be appended to this +Volume unless you specify otherwise. + +You might ask yourself if you have to label all the Volumes that Bacula is +going to use. The answer for disk Volumes, like the one we used, is no. It is +possible to have Bacula automatically label volumes. For tape Volumes, you +will most likely have to label each of the Volumes you want to use. + +If you would like to stop here, you can simply enter {\bf quit} in the Console +program, and you can stop Bacula with {\bf ./bacula stop}. To clean up, simply +delete the file {\bf /tmp/TestVolume001}, and you should also re-initialize +your database using: + +\footnotesize +\begin{verbatim} +./drop_bacula_tables +./make_bacula_tables +\end{verbatim} +\normalsize + +Please note that this will erase all information about the previous jobs that +have run, and that you might want to do it now while testing but that normally +you will not want to re-initialize your database. + +If you would like to try restoring the files that you just backed up, read the +following section. +\label{restoring} + +\section{Restoring Your Files} +\index[general]{Files!Restoring Your } +\index[general]{Restoring Your Files } + +If you have run the default configuration and the save of the Bacula source +code as demonstrated above, you can restore the backed up files in the Console +program by entering: + +\footnotesize +\begin{verbatim} +restore all +\end{verbatim} +\normalsize + +where you will get: + +\footnotesize +\begin{verbatim} +First you select one or more JobIds that contain files +to be restored. You will be presented several methods +of specifying the JobIds. Then you will be allowed to +select which files from those JobIds are to be restored. + +To select the JobIds, you have the following choices: + 1: List last 20 Jobs run + 2: List Jobs where a given File is saved + 3: Enter list of comma separated JobIds to select + 4: Enter SQL list command + 5: Select the most recent backup for a client + 6: Select backup for a client before a specified time + 7: Enter a list of files to restore + 8: Enter a list of files to restore before a specified time + 9: Find the JobIds of the most recent backup for a client + 10: Find the JobIds for a backup for a client before a specified time + 11: Enter a list of directories to restore for found JobIds + 12: Cancel +Select item: (1-12): +\end{verbatim} +\normalsize + +As you can see, there are a number of options, but for the current +demonstration, please enter {\bf 5} to do a restore of the last backup you +did, and you will get the following output: + +\footnotesize +\begin{verbatim} +Defined Clients: + 1: rufus-fd +Item 1 selected automatically. +The defined FileSet resources are: + 1: 1 Full Set 2003-04-28 14:22:33 +Item 1 selected automatically. ++-------+-------+----------+---------------------+---------------+ +| JobId | Level | JobFiles | StartTime | VolumeName | ++-------+-------+----------+---------------------+---------------+ +| 1 | F | 1444 | 2003-04-28 14:22:33 | TestVolume002 | ++-------+-------+----------+---------------------+---------------+ +You have selected the following JobId: 1 +Building directory tree for JobId 1 ... +1 Job inserted into the tree and marked for extraction. +The defined Storage resources are: + 1: File +Item 1 selected automatically. +You are now entering file selection mode where you add and +remove files to be restored. All files are initially added. +Enter "done" to leave this mode. +cwd is: / +$ +\end{verbatim} +\normalsize + +where I have truncated the listing on the right side to make it more readable. +As you can see by starting at the top of the listing, Bacula knows what client +you have, and since there was only one, it selected it automatically, likewise +for the FileSet. Then Bacula produced a listing containing all the jobs that +form the current backup, in this case, there is only one, and the Storage +daemon was also automatically chosen. Bacula then took all the files that were +in Job number 1 and entered them into a {\bf directory tree} (a sort of in +memory representation of your filesystem). At this point, you can use the {\bf +cd} and {\bf ls} ro {\bf dir} commands to walk up and down the directory tree +and view what files will be restored. For example, if I enter {\bf cd +/home/kern/bacula/bacula-1.30} and then enter {\bf dir} I will get a listing +of all the files in the Bacula source directory. On your system, the path will +be somewhat different. For more information on this, please refer to the +\ilink{Restore Command Chapter}{RestoreChapter} of this manual for +more details. + +To exit this mode, simply enter: + +\footnotesize +\begin{verbatim} +done +\end{verbatim} +\normalsize + +and you will get the following output: + +\footnotesize +\begin{verbatim} +Bootstrap records written to + /home/kern/bacula/testbin/working/restore.bsr +The restore job will require the following Volumes: + + TestVolume001 +1444 files selected to restore. +Run Restore job +JobName: RestoreFiles +Bootstrap: /home/kern/bacula/testbin/working/restore.bsr +Where: /tmp/bacula-restores +Replace: always +FileSet: Full Set +Backup Client: rufus-fd +Restore Client: rufus-fd +Storage: File +JobId: *None* +When: 2005-04-28 14:53:54 +OK to run? (yes/mod/no): +\end{verbatim} +\normalsize + +If you answer {\bf yes} your files will be restored to {\bf +/tmp/bacula-restores}. If you want to restore the files to their original +locations, you must use the {\bf mod} option and explicitly set {\bf Where:} +to nothing (or to /). We recommend you go ahead and answer {\bf yes} and after +a brief moment, enter {\bf messages}, at which point you should get a listing +of all the files that were restored as well as a summary of the job that looks +similar to this: + +\footnotesize +\begin{verbatim} +28-Apr-2005 14:56 rufus-dir: Bacula 2.1.8 (08May07): 08-May-2007 14:56:06 +Build OS: i686-pc-linux-gnu suse 10.2 +JobId: 2 +Job: RestoreFiles.2007-05-08_14.56.06 +Restore Client: rufus-fd +Start time: 08-May-2007 14:56 +End time: 08-May-2007 14:56 +Files Restored: 1,444 +Bytes Restored: 38,816,381 +Rate: 9704.1 KB/s +FD Errors: 0 +FD termination status: OK +SD termination status: OK +Termination: Restore OK +08-May-2007 14:56 rufus-dir: Begin pruning Jobs. +08-May-2007 14:56 rufus-dir: No Jobs found to prune. +08-May-2007 14:56 rufus-dir: Begin pruning Files. +08-May-2007 14:56 rufus-dir: No Files found to prune. +08-May-2007 14:56 rufus-dir: End auto prune. +\end{verbatim} +\normalsize + +After exiting the Console program, you can examine the files in {\bf +/tmp/bacula-restores}, which will contain a small directory tree with all the +files. Be sure to clean up at the end with: + +\footnotesize +\begin{verbatim} +rm -rf /tmp/bacula-restore +\end{verbatim} +\normalsize + +\section{Quitting the Console Program} +\index[general]{Program!Quitting the Console } +\index[general]{Quitting the Console Program } + +Simply enter the command {\bf quit}. +\label{SecondClient} + +\section{Adding a Second Client} +\index[general]{Client!Adding a Second } +\index[general]{Adding a Second Client } + +If you have gotten the example shown above to work on your system, you may be +ready to add a second Client (File daemon). That is you have a second machine +that you would like backed up. The only part you need installed on the other +machine is the binary {\bf bacula-fd} (or {\bf bacula-fd.exe} for Windows) and +its configuration file {\bf bacula-fd.conf}. You can start with the same {\bf +bacula-fd.conf} file that you are currently using and make one minor +modification to it to create the conf file for your second client. Change the +File daemon name from whatever was configured, {\bf rufus-fd} in the example +above, but your system will have a different name. The best is to change it to +the name of your second machine. For example: + +\footnotesize +\begin{verbatim} +... +# +# "Global" File daemon configuration specifications +# +FileDaemon { # this is me + Name = rufus-fd + FDport = 9102 # where we listen for the director + WorkingDirectory = /home/kern/bacula/working + Pid Directory = /var/run +} +... +\end{verbatim} +\normalsize + +would become: + +\footnotesize +\begin{verbatim} +... +# +# "Global" File daemon configuration specifications +# +FileDaemon { # this is me + Name = matou-fd + FDport = 9102 # where we listen for the director + WorkingDirectory = /home/kern/bacula/working + Pid Directory = /var/run +} +... +\end{verbatim} +\normalsize + +where I show just a portion of the file and have changed {\bf rufus-fd} to +{\bf matou-fd}. The names you use are your choice. For the moment, I recommend +you change nothing else. Later, you will want to change the password. + +Now you should install that change on your second machine. Then you need to +make some additions to your Director's configuration file to define the new +File daemon or Client. Starting from our original example which should be +installed on your system, you should add the following lines (essentially +copies of the existing data but with the names changed) to your Director's +configuration file {\bf bacula-dir.conf}. + +\footnotesize +\begin{verbatim} +# +# Define the main nightly save backup job +# By default, this job will back up to disk in /tmp +Job { + Name = "Matou" + Type = Backup + Client = matou-fd + FileSet = "Full Set" + Schedule = "WeeklyCycle" + Storage = File + Messages = Standard + Pool = Default + Write Bootstrap = "/home/kern/bacula/working/matou.bsr" +} +# Client (File Services) to backup +Client { + Name = matou-fd + Address = matou + FDPort = 9102 + Catalog = MyCatalog + Password = "xxxxx" # password for + File Retention = 30d # 30 days + Job Retention = 180d # six months + AutoPrune = yes # Prune expired Jobs/Files +} +\end{verbatim} +\normalsize + +Then make sure that the Address parameter in the Storage resource is set to +the fully qualified domain name and not to something like "localhost". The +address specified is sent to the File daemon (client) and it must be a fully +qualified domain name. If you pass something like "localhost" it will not +resolve correctly and will result in a time out when the File daemon fails to +connect to the Storage daemon. + +That is all that is necessary. I copied the existing resource to create a +second Job (Matou) to backup the second client (matou-fd). It has the name +{\bf Matou}, the Client is named {\bf matou-fd}, and the bootstrap file name +is changed, but everything else is the same. This means that Matou will be +backed up on the same schedule using the same set of tapes. You may want to +change that later, but for now, let's keep it simple. + +The second change was to add a new Client resource that defines {\bf matou-fd} +and has the correct address {\bf matou}, but in real life, you may need a +fully qualified domain name or an IP address. I also kept the password the +same (shown as xxxxx for the example). + +At this point, if you stop Bacula and restart it, and start the Client on the +other machine, everything will be ready, and the prompts that you saw above +will now include the second machine. + +To make this a real production installation, you will possibly want to use +different Pool, or a different schedule. It is up to you to customize. In any +case, you should change the password in both the Director's file and the +Client's file for additional security. + +For some important tips on changing names and passwords, and a diagram of what +names and passwords must match, please see +\ilink{Authorization Errors}{AuthorizationErrors} in the FAQ chapter +of this manual. + +\section{When The Tape Fills} +\label{FullTape} +\index[general]{Fills!When The Tape } +\index[general]{When The Tape Fills } + +If you have scheduled your job, typically nightly, there will come a time when +the tape fills up and {\bf Bacula} cannot continue. In this case, Bacula will +send you a message similar to the following: + +\footnotesize +\begin{verbatim} +rufus-sd: block.c:337 === Write error errno=28: ERR=No space left + on device +\end{verbatim} +\normalsize + +This indicates that Bacula got a write error because the tape is full. Bacula +will then search the Pool specified for your Job looking for an appendable +volume. In the best of all cases, you will have properly set your Retention +Periods and you will have all your tapes marked to be Recycled, and {\bf +Bacula} will automatically recycle the tapes in your pool requesting and +overwriting old Volumes. For more information on recycling, please see the +\ilink{Recycling chapter}{RecyclingChapter} of this manual. If you +find that your Volumes were not properly recycled (usually because of a +configuration error), please see the +\ilink{Manually Recycling Volumes}{manualrecycling} section of +the Recycling chapter. + +If like me, you have a very large set of Volumes and you label them with the +date the Volume was first writing, or you have not set up your Retention +periods, Bacula will not find a tape in the pool, and it will send you a +message similar to the following: + +\footnotesize +\begin{verbatim} +rufus-sd: Job kernsave.2002-09-19.10:50:48 waiting. Cannot find any + appendable volumes. +Please use the "label" command to create a new Volume for: + Storage: SDT-10000 + Media type: DDS-4 + Pool: Default +\end{verbatim} +\normalsize + +Until you create a new Volume, this message will be repeated an hour later, +then two hours later, and so on doubling the interval each time up to a +maximum interval of one day. + +The obvious question at this point is: What do I do now? + +The answer is simple: first, using the Console program, close the tape drive +using the {\bf unmount} command. If you only have a single drive, it will be +automatically selected, otherwise, make sure you release the one specified on +the message (in this case {\bf STD-10000}). + +Next, you remove the tape from the drive and insert a new blank tape. Note, on +some older tape drives, you may need to write an end of file mark ({\bf mt \ +-f \ /dev/nst0 \ weof}) to prevent the drive from running away when Bacula +attempts to read the label. + +Finally, you use the {\bf label} command in the Console to write a label to +the new Volume. The {\bf label} command will contact the Storage daemon to +write the software label, if it is successful, it will add the new Volume to +the Pool, then issue a {\bf mount} command to the Storage daemon. See the +previous sections of this chapter for more details on labeling tapes. + +The result is that Bacula will continue the previous Job writing the backup to +the new Volume. + +If you have a Pool of volumes and Bacula is cycling through them, instead of +the above message "Cannot find any appendable volumes.", Bacula may ask you +to mount a specific volume. In that case, you should attempt to do just that. +If you do not have the volume any more (for any of a number of reasons), you +can simply mount another volume from the same Pool, providing it is +appendable, and Bacula will use it. You can use the {\bf list volumes} command +in the console program to determine which volumes are appendable and which are +not. + +If like me, you have your Volume retention periods set correctly, but you have +no more free Volumes, you can relabel and reuse a Volume as follows: + +\begin{itemize} +\item Do a {\bf list volumes} in the Console and select the oldest Volume for + relabeling. +\item If you have setup your Retention periods correctly, the Volume should + have VolStatus {\bf Purged}. +\item If the VolStatus is not set to Purged, you will need to purge the + database of Jobs that are written on that Volume. Do so by using the command + {\bf purge jobs volume} in the Console. If you have multiple Pools, you will +be prompted for the Pool then enter the VolumeName (or MediaId) when +requested. +\item Then simply use the {\bf relabel} command to relabel the Volume. + \end{itemize} + +To manually relabel the Volume use the following additional steps: + +\begin{itemize} +\item To delete the Volume from the catalog use the {\bf delete volume} + command in the Console and select the VolumeName (or MediaId) to be deleted. + +\item Use the {\bf unmount} command in the Console to unmount the old tape. +\item Physically relabel the old Volume that you deleted so that it can be + reused. +\item Insert the old Volume in the tape drive. +\item From a command line do: {\bf mt \ -f \ /dev/st0 \ rewind} and {\bf mt \ + -f \ /dev/st0 \ weof}, where you need to use the proper tape drive name for + your system in place of {\bf /dev/st0}. +\item Use the {\bf label} command in the Console to write a new Bacula label + on your tape. +\item Use the {\bf mount} command in the Console if it is not automatically + done, so that Bacula starts using your newly labeled tape. + \end{itemize} + +\section{Other Useful Console Commands} +\index[general]{Commands!Other Useful Console } +\index[general]{Other Useful Console Commands } + +\begin{description} + +\item [status dir] + \index[console]{status dir } + Print a status of all running jobs and jobs scheduled in the next 24 hours. + +\item [status] + \index[console]{status } + The console program will prompt you to select a daemon type, then will +request the daemon's status. + +\item [status jobid=nn] + \index[console]{status jobid } + Print a status of JobId nn if it is running. The Storage daemon is contacted +and requested to print a current status of the job as well. + +\item [list pools] + \index[console]{list pools } + List the pools defined in the Catalog (normally only Default is used). + +\item [list media] + \index[console]{list media } + Lists all the media defined in the Catalog. + +\item [list jobs] + \index[console]{list jobs } + Lists all jobs in the Catalog that have run. + +\item [list jobid=nn] + \index[console]{list jobid } + Lists JobId nn from the Catalog. + +\item [list jobtotals] + \index[console]{list jobtotals } + Lists totals for all jobs in the Catalog. + +\item [list files jobid=nn] + \index[console]{list files jobid } + List the files that were saved for JobId nn. + +\item [list jobmedia] + \index[console]{list jobmedia } + List the media information for each Job run. + +\item [messages] + \index[console]{messages } + Prints any messages that have been directed to the console. + +\item [unmount storage=storage-name] + \index[console]{unmount storage } + Unmounts the drive associated with the storage device with the name {\bf +storage-name} if the drive is not currently being used. This command is used +if you wish Bacula to free the drive so that you can use it to label a tape. + + +\item [mount storage=storage-name] + \index[sd]{mount storage } + Causes the drive associated with the storage device to be mounted again. When +Bacula reaches the end of a volume and requests you to mount a new volume, +you must issue this command after you have placed the new volume in the +drive. In effect, it is the signal needed by Bacula to know to start reading +or writing the new volume. + +\item [quit] + \index[sd]{quit } + Exit or quit the console program. +\end{description} + +Most of the commands given above, with the exception of {\bf list}, will +prompt you for the necessary arguments if you simply enter the command name. + +\section{Debug Daemon Output} +\index[general]{Debug Daemon Output } +\index[general]{Output!Debug Daemon } + +If you want debug output from the daemons as they are running, start the +daemons from the install directory as follows: + +\footnotesize +\begin{verbatim} +./bacula start -d100 +\end{verbatim} +\normalsize + +This can be particularly helpful if your daemons do not start correctly, +because direct daemon output to the console is normally directed to the +NULL device, but with the debug level greater than zero, the output +will be sent to the starting terminal. + +To stop the three daemons, enter the following from the install directory: + +\footnotesize +\begin{verbatim} +./bacula stop +\end{verbatim} +\normalsize + +The execution of {\bf bacula stop} may complain about pids not found. This is +OK, especially if one of the daemons has died, which is very rare. + +To do a full system save, each File daemon must be running as root so that it +will have permission to access all the files. None of the other daemons +require root privileges. However, the Storage daemon must be able to open the +tape drives. On many systems, only root can access the tape drives. Either run +the Storage daemon as root, or change the permissions on the tape devices to +permit non-root access. MySQL and PostgreSQL can be installed and run with any +userid; root privilege is not necessary. + +\section{Patience When Starting Daemons or Mounting Blank Tapes} + +When you start the Bacula daemons, the Storage daemon attempts to open all +defined storage devices and verify the currently mounted Volume (if +configured). Until all the storage devices are verified, the Storage daemon +will not accept connections from the Console program. If a tape was previously +used, it will be rewound, and on some devices this can take several minutes. +As a consequence, you may need to have a bit of patience when first contacting +the Storage daemon after starting the daemons. If you can see your tape drive, +once the lights stop flashing, the drive will be ready to be used. + +The same considerations apply if you have just mounted a blank tape in a drive +such as an HP DLT. It can take a minute or two before the drive properly +recognizes that the tape is blank. If you attempt to {\bf mount} the tape with +the Console program during this recognition period, it is quite possible that +you will hang your SCSI driver (at least on my Red Hat Linux system). As a +consequence, you are again urged to have patience when inserting blank tapes. +Let the device settle down before attempting to access it. + +\section{Difficulties Connecting from the FD to the SD} +\index[general]{Difficulties Connecting from the FD to the SD} +\index[general]{SD!Difficulties Connecting from the FD to the SD} + +If you are having difficulties getting one or more of your File daemons to +connect to the Storage daemon, it is most likely because you have not used a +fully qualified domain name on the {\bf Address} directive in the +Director's Storage resource. That is the resolver on the File daemon's machine +(not on the Director's) must be able to resolve the name you supply into an IP +address. An example of an address that is guaranteed not to work: {\bf +localhost}. An example that may work: {\bf megalon}. An example that is more +likely to work: {\bf magalon.mydomain.com}. On Win32 if you don't have a good +resolver (often true on older Win98 systems), you might try using an IP +address in place of a name. + +If your address is correct, then make sure that no other program is using the +port 9103 on the Storage daemon's machine. The Bacula port numbers are +authorized by IANA, and should not be used by other programs, but apparently +some HP printers do use these port numbers. A {\bf netstat -a} on the Storage +daemon's machine can determine who is using the 9103 port (used for FD to SD +communications in Bacula). + +\section{Daemon Command Line Options} +\index[general]{Daemon Command Line Options } +\index[general]{Options!Daemon Command Line } + +Each of the three daemons (Director, File, Storage) accepts a small set of +options on the command line. In general, each of the daemons as well as the +Console program accepts the following options: + +\begin{description} + +\item [-c \lt{}file\gt{}] + \index[sd]{-c \lt{}file\gt{} } + Define the file to use as a configuration file. The default is the daemon + name followed by {\bf .conf} i.e. {\bf bacula-dir.conf} for the Director, + {\bf bacula-fd.conf} for the File daemon, and {\bf bacula-sd} for the Storage + daemon. + +\item [-d nn] + \index[sd]{-d nn } + Set the debug level to {\bf nn}. Higher levels of debug cause more + information to be displayed on STDOUT concerning what the daemon is doing. + +\item [-f] + Run the daemon in the foreground. This option is needed to run the daemon + under the debugger. + +\item [-g ] + Run the daemon under this group. This must be a group name, not a GID. + +\item [-s] + Do not trap signals. This option is needed to run the daemon under the + debugger. + +\item [-t] + Read the configuration file and print any error messages, then immediately + exit. Useful for syntax testing of new configuration files. + +\item [-u ] + Run the daemon as this user. This must be a user name, not a UID. + +\item [-v] + Be more verbose or more complete in printing error and informational + messages. Recommended. + +\item [-?] + Print the version and list of options. + +\end{description} + + +\section{Creating a Pool} +\label{Pool} +\index[general]{Pool!Creating a } +\index[general]{Creating a Pool } + +Creating the Pool is automatically done when {\bf Bacula} starts, so if you +understand Pools, you can skip to the next section. + +When you run a job, one of the things that Bacula must know is what Volumes to +use to backup the FileSet. Instead of specifying a Volume (tape) directly, you +specify which Pool of Volumes you want Bacula to consult when it wants a tape +for writing backups. Bacula will select the first available Volume from the +Pool that is appropriate for the Storage device you have specified for the Job +being run. When a volume has filled up with data, {\bf Bacula} will change its +VolStatus from {\bf Append} to {\bf Full}, and then {\bf Bacula} will use the +next volume and so on. If no appendable Volume exists in the Pool, the +Director will attempt to recycle an old Volume, if there are still no +appendable Volumes available, {\bf Bacula} will send a message requesting the +operator to create an appropriate Volume. + +{\bf Bacula} keeps track of the Pool name, the volumes contained in the Pool, +and a number of attributes of each of those Volumes. + +When Bacula starts, it ensures that all Pool resource definitions have been +recorded in the catalog. You can verify this by entering: + +\footnotesize +\begin{verbatim} +list pools +\end{verbatim} +\normalsize + +to the console program, which should print something like the following: + +\footnotesize +\begin{verbatim} +*list pools +Using default Catalog name=MySQL DB=bacula ++--------+---------+---------+---------+----------+-------------+ +| PoolId | Name | NumVols | MaxVols | PoolType | LabelFormat | ++--------+---------+---------+---------+----------+-------------+ +| 1 | Default | 3 | 0 | Backup | * | +| 2 | File | 12 | 12 | Backup | File | ++--------+---------+---------+---------+----------+-------------+ +* +\end{verbatim} +\normalsize + +If you attempt to create the same Pool name a second time, {\bf Bacula} will +print: + +\footnotesize +\begin{verbatim} +Error: Pool Default already exists. +Once created, you may use the {\bf update} command to +modify many of the values in the Pool record. +\end{verbatim} +\normalsize + +\label{Labeling} + +\section{Labeling Your Volumes} +\index[general]{Volumes!Labeling Your } +\index[general]{Labeling Your Volumes } + +Bacula requires that each Volume contains a software label. There are several +strategies for labeling volumes. The one I use is to label them as they are +needed by {\bf Bacula} using the console program. That is when Bacula needs a +new Volume, and it does not find one in the catalog, it will send me an email +message requesting that I add Volumes to the Pool. I then use the {\bf label} +command in the Console program to label a new Volume and to define it in the +Pool database, after which Bacula will begin writing on the new Volume. +Alternatively, I can use the Console {\bf relabel} command to relabel a Volume +that is no longer used providing it has VolStatus {\bf Purged}. + +Another strategy is to label a set of volumes at the start, then use them as +{\bf Bacula} requests them. This is most often done if you are cycling through +a set of tapes, for example using an autochanger. For more details on +recycling, please see the +\ilink{Automatic Volume Recycling}{RecyclingChapter} chapter of +this manual. + +If you run a Bacula job, and you have no labeled tapes in the Pool, Bacula +will inform you, and you can create them "on-the-fly" so to speak. In my +case, I label my tapes with the date, for example: {\bf DLT-18April02}. See +below for the details of using the {\bf label} command. + +\section{Labeling Volumes with the Console Program} +\index[general]{Labeling Volumes with the Console Program } +\index[general]{Program!Labeling Volumes with the Console } + +Labeling volumes is normally done by using the console program. + +\begin{enumerate} +\item ./bconsole +\item label + \end{enumerate} + +If Bacula complains that you cannot label the tape because it is already +labeled, simply {\bf unmount} the tape using the {\bf unmount} command in the +console, then physically mount a blank tape and re-issue the {\bf label} +command. + +Since the physical storage media is different for each device, the {\bf label} +command will provide you with a list of the defined Storage resources such as +the following: + +\footnotesize +\begin{verbatim} +The defined Storage resources are: + 1: File + 2: 8mmDrive + 3: DLTDrive + 4: SDT-10000 +Select Storage resource (1-4): +\end{verbatim} +\normalsize + +At this point, you should have a blank tape in the drive corresponding to the +Storage resource that you select. + +It will then ask you for the Volume name. + +\footnotesize +\begin{verbatim} +Enter new Volume name: +\end{verbatim} +\normalsize + +If Bacula complains: + +\footnotesize +\begin{verbatim} +Media record for Volume xxxx already exists. +\end{verbatim} +\normalsize + +It means that the volume name {\bf xxxx} that you entered already exists in +the Media database. You can list all the defined Media (Volumes) with the {\bf +list media} command. Note, the LastWritten column has been truncated for +proper printing. + +\footnotesize +\begin{verbatim} ++---------------+---------+--------+----------------+-----/~/-+------------+-----+ +| VolumeName | MediaTyp| VolStat| VolBytes | LastWri | VolReten | Recy| ++---------------+---------+--------+----------------+---------+------------+-----+ +| DLTVol0002 | DLT8000 | Purged | 56,128,042,217 | 2001-10 | 31,536,000 | 0 | +| DLT-07Oct2001 | DLT8000 | Full | 56,172,030,586 | 2001-11 | 31,536,000 | 0 | +| DLT-08Nov2001 | DLT8000 | Full | 55,691,684,216 | 2001-12 | 31,536,000 | 0 | +| DLT-01Dec2001 | DLT8000 | Full | 55,162,215,866 | 2001-12 | 31,536,000 | 0 | +| DLT-28Dec2001 | DLT8000 | Full | 57,888,007,042 | 2002-01 | 31,536,000 | 0 | +| DLT-20Jan2002 | DLT8000 | Full | 57,003,507,308 | 2002-02 | 31,536,000 | 0 | +| DLT-16Feb2002 | DLT8000 | Full | 55,772,630,824 | 2002-03 | 31,536,000 | 0 | +| DLT-12Mar2002 | DLT8000 | Full | 50,666,320,453 | 1970-01 | 31,536,000 | 0 | +| DLT-27Mar2002 | DLT8000 | Full | 57,592,952,309 | 2002-04 | 31,536,000 | 0 | +| DLT-15Apr2002 | DLT8000 | Full | 57,190,864,185 | 2002-05 | 31,536,000 | 0 | +| DLT-04May2002 | DLT8000 | Full | 60,486,677,724 | 2002-05 | 31,536,000 | 0 | +| DLT-26May02 | DLT8000 | Append | 1,336,699,620 | 2002-05 | 31,536,000 | 1 | ++---------------+---------+--------+----------------+-----/~/-+------------+-----+ +\end{verbatim} +\normalsize + +Once Bacula has verified that the volume does not already exist, it will +prompt you for the name of the Pool in which the Volume (tape) is to be +created. If there is only one Pool (Default), it will be automatically +selected. + +If the tape is successfully labeled, a Volume record will also be created in +the Pool. That is the Volume name and all its other attributes will appear +when you list the Pool. In addition, that Volume will be available for backup +if the MediaType matches what is requested by the Storage daemon. + +When you labeled the tape, you answered very few questions about it -- +principally the Volume name, and perhaps the Slot. However, a Volume record in +the catalog database (internally known as a Media record) contains quite a few +attributes. Most of these attributes will be filled in from the default values +that were defined in the Pool (i.e. the Pool holds most of the default +attributes used when creating a Volume). + +It is also possible to add media to the pool without physically labeling the +Volumes. This can be done with the {\bf add} command. For more information, +please see the +\ilink{Console Chapter}{_ConsoleChapter} of this manual. diff --git a/docs/manuals/fr/concepts/verify.tex b/docs/manuals/es/main/verify.tex similarity index 100% rename from docs/manuals/fr/concepts/verify.tex rename to docs/manuals/es/main/verify.tex diff --git a/docs/manuals/fr/concepts/win32.tex b/docs/manuals/es/main/win32.tex similarity index 96% rename from docs/manuals/fr/concepts/win32.tex rename to docs/manuals/es/main/win32.tex index e637a1a8..ccad87d3 100644 --- a/docs/manuals/fr/concepts/win32.tex +++ b/docs/manuals/es/main/win32.tex @@ -81,18 +81,18 @@ Bacula, so we don't recommend that option. icon. The actual name of the icon will vary from one release version to another. -\includegraphics{./win32-nsis.eps} winbacula-1.xx.0.exe +\includegraphics{\idir win32-nsis.eps} winbacula-1.xx.0.exe \item Once launched, the installer wizard will ask you if you want to install Bacula. \addcontentsline{lof}{figure}{Win32 Client Setup Wizard} -\includegraphics{./win32-welcome.eps} +\includegraphics{\idir win32-welcome.eps} \item Next you will be asked to select the installation type. \addcontentsline{lof}{figure}{Win32 Installation Type} -\includegraphics{./win32-installation-type.eps} +\includegraphics{\idir win32-installation-type.eps} \item If you proceed, you will be asked to select the components to be @@ -102,7 +102,7 @@ Bacula, so we don't recommend that option. following: \addcontentsline{lof}{figure}{Win32 Component Selection Dialog} -\includegraphics{./win32-pkg.eps} +\includegraphics{\idir win32-pkg.eps} \index[general]{Upgrading} \item If you are installing for the first time, you will be asked to @@ -117,35 +117,35 @@ Bacula, so we don't recommend that option. \addcontentsline{lof}{figure}{Win32 Configure} -\includegraphics{./win32-config.eps} +\includegraphics{\idir win32-config.eps} \item While the various files are being loaded, you will see the following dialog: \addcontentsline{lof}{figure}{Win32 Install Progress} - \includegraphics{./win32-installing.eps} + \includegraphics{\idir win32-installing.eps} \item Finally, the finish dialog will appear: \addcontentsline{lof}{figure}{Win32 Client Setup Completed} - \includegraphics{./win32-finish.eps} + \includegraphics{\idir win32-finish.eps} \ \end{itemize} That should complete the installation process. When the Bacula File Server is -ready to serve files, an icon \includegraphics{./idle.eps} representing a +ready to serve files, an icon \includegraphics{\idir idle.eps} representing a cassette (or tape) will appear in the system tray -\includegraphics{./tray-icon.eps}; right click on it and a menu will appear.\\ -\includegraphics{./menu.eps}\\ +\includegraphics{\idir tray-icon.eps}; right click on it and a menu will appear.\\ +\includegraphics{\idir menu.eps}\\ The {\bf Events} item is currently unimplemented, by selecting the {\bf Status} item, you can verify whether any jobs are running or not. When the Bacula File Server begins saving files, the color of the holes in the -cassette icon will change from white to green \includegraphics{./running.eps}, +cassette icon will change from white to green \includegraphics{\idir running.eps}, and if there is an error, the holes in the cassette icon will change to red -\includegraphics{./error.eps}. +\includegraphics{\idir error.eps}. If you are using remote desktop connections between your Windows boxes, be warned that that tray icon does not always appear. It will always be visible @@ -369,11 +369,7 @@ non-portable backups. That is files and their data that are backed up on WinNT using the native API calls (BackupRead/BackupWrite) cannot be restored on Win95/98/Me or Unix systems. In principle, a file backed up on WinNT can be restored on WinXP, but this remains to be seen in practice -(not yet tested). In addition, the stand-alone tools such as {\bf bls} and -{\bf bextract} cannot be used to retrieve the data for those files because -those tools are not available on Windows. All restores must use the Bacula -{\bf restore} command. As of Bacula 1.39.x, thanks to Thorsten Engel, this -restriction is removed, and Bacula should be able to read non-portable +(not yet tested). Bacula should be able to read non-portable backups on any system and restore the data appropriately. However, on a system that does not have the BackupRead/BackupWrite calls (older Windows versions and all Unix/Linux machines), though the file data @@ -705,7 +701,7 @@ The problem appears as a directory which cannot be browsed with Windows Explorer. The symptoms include the following message when you try to click on that directory: -\includegraphics{./access-is-denied.eps} +\includegraphics{\idir access-is-denied.eps} If you encounter this message, the following steps will change the permissions to allow full access. @@ -717,17 +713,17 @@ to allow full access. \item If the following message appears, you can ignore it, and click on {\bf OK}. -\includegraphics{./view-only.eps} +\includegraphics{\idir view-only.eps} You should see something like this: -\includegraphics{./properties-security.eps} +\includegraphics{\idir properties-security.eps} \item click on Advanced \item click on the Owner tab \item Change the owner to something other than the current owner (which is {\bf SYSTEM} in this example as shown below). -\includegraphics{./properties-security-advanced-owner.eps} +\includegraphics{\idir properties-security-advanced-owner.eps} \item ensure the "Replace owner on subcontainers and objects" box is checked \item click on OK @@ -736,7 +732,7 @@ You should see something like this: the directory permissions with permissions granting you Full Control?", click on Yes. -\includegraphics{./confirm.eps} +\includegraphics{\idir confirm.eps} \item Click on OK to close the Properties tab \end{enumerate} diff --git a/docs/manuals/es/misc/Makefile.in b/docs/manuals/es/misc/Makefile.in index 8301f292..dced9585 100644 --- a/docs/manuals/es/misc/Makefile.in +++ b/docs/manuals/es/misc/Makefile.in @@ -37,6 +37,7 @@ IMAGES=../../../images DOC=misc +MAINDOC=Bacula_Miscellaneous_Guide.html first_rule: all @@ -72,29 +73,30 @@ html: @echo "Making html" @cp -fp ${IMAGES}/*.eps . @rm -f next.eps next.png prev.eps prev.png up.eps up.png - @(if [ -f imagename_translations ] ; then \ - ./translate_images.pl --from_meaningful_names ${DOC}.html; \ - fi) latex2html -white -no_subdir -split 0 -toc_stars -white \ -init_file latex2html-init.pl ${DOC} >tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}.html + @(if [ -f imagename_translations ] ; then \ + ./translate_images.pl --from_meaningful_names ${DOC}/${MAINDOC}; \ + fi) (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} . 2>/dev/null; done) @echo "Done making html" web: @echo "Making web" + @rm -rf ${DOC} @mkdir -p ${DOC} @cp -fp ${IMAGES}/*.eps . @rm -f next.eps next.png prev.eps prev.png up.eps up.png - @cp -fp ${IMAGES}/*.eps ${DOC}/ - @cp -fp ${IMAGES}/*.eps ${IMAGES}/*.png ${DOC}/ @rm -f ${DOC}/xp-*.png @rm -f ${DOC}/next.eps ${DOC}/next.png ${DOC}/prev.eps ${DOC}/prev.png ${DOC}/up.eps ${DOC}/up.png - @rm -rf ${DOC}/*.html - latex2html -split 3 -local_icons -t "Miscellaneous Guide" -long_titles 4 \ - -toc_stars -contents_in_nav -init_file latex2html-init.pl -white ${DOC} >tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}/Miscel_Guide.html - (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} . 2>/dev/null; done) + latex2html -split 3 -local_icons -t "Bacula Miscellaneous Guide" -long_titles 4 \ + -toc_stars -contents_in_nav -init_file latex2html-init.pl \ + -no_antialias -no_antialias_text \ + -white -notransparent ${DOC} >tex.out 2>&1 + @(if [ -f imagename_translations ] ; then \ + ./translate_images.pl --from_meaningful_names ${DOC}/${MAINDOC}; \ + fi) + @cp -f ${DOC}/${MAINDOC} ${DOC}/index.html @echo "Done making web" show: xdvi ${DOC} diff --git a/docs/manuals/es/misc/coverpage.tex b/docs/manuals/es/misc/coverpage.tex index 513bbf65..37dc9314 100644 --- a/docs/manuals/es/misc/coverpage.tex +++ b/docs/manuals/es/misc/coverpage.tex @@ -3,7 +3,7 @@ \parindent 0pt \title{\includegraphics{\idir bacula-logo.eps} \\ \bigskip - \Huge{Bacula}$^{\normalsize \textregistered}$ \Huge{Miscellaneous Guide} + \Huge{Bacula}$^{\normalsize \textregistered}$ \Huge{Bacula Miscellaneous Guide} \begin{center} \large{It comes in the night and sucks the essence from your computers. } diff --git a/docs/manuals/fr/catalog/internaldb.tex b/docs/manuals/es/misc/internaldb.tex similarity index 100% rename from docs/manuals/fr/catalog/internaldb.tex rename to docs/manuals/es/misc/internaldb.tex diff --git a/docs/manuals/es/misc/misc.kilepr b/docs/manuals/es/misc/misc.kilepr index 11c12315..9dc8bfa5 100644 --- a/docs/manuals/es/misc/misc.kilepr +++ b/docs/manuals/es/misc/misc.kilepr @@ -51,6 +51,15 @@ line=0 open=false order=-1 +[item:internaldb.tex] +archive=true +column=25 +encoding= +highlight= +line=0 +open=false +order=-1 + [item:lesser.tex] archive=true column=0 diff --git a/docs/manuals/es/misc/misc.tex b/docs/manuals/es/misc/misc.tex index 86fe4a0c..59351e52 100644 --- a/docs/manuals/es/misc/misc.tex +++ b/docs/manuals/es/misc/misc.tex @@ -50,6 +50,7 @@ \include{stunnel} \include{dvd} \include{projects} +\include{internaldb} \include{license} \include{fdl} \include{gpl} diff --git a/docs/manuals/es/problems/Makefile.in b/docs/manuals/es/problems/Makefile.in index c2b3f06b..d2557754 100644 --- a/docs/manuals/es/problems/Makefile.in +++ b/docs/manuals/es/problems/Makefile.in @@ -37,6 +37,7 @@ IMAGES=../../../images DOC=problems +MAINDOC=Bacula_Problem_Resolution_G.html first_rule: all @@ -77,24 +78,28 @@ html: fi) latex2html -white -no_subdir -split 0 -toc_stars -white -notransparent \ -init_file latex2html-init.pl ${DOC} >tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}.html - (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} .; done) + @(if [ -f imagename_translations ] ; then \ + ./translate_images.pl --from_meaningful_names ${DOC}.html; \ + fi) + (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} . 2>/dev/null; done) @echo "Done making html" web: @echo "Making web" + @rm -rf ${DOC} @mkdir -p ${DOC} @cp -fp ${IMAGES}/*.eps . @rm -f next.eps next.png prev.eps prev.png up.eps up.png - @cp -fp ${IMAGES}/*.eps ${DOC}/ - @cp -fp ${IMAGES}/*.eps ${IMAGES}/*.png ${DOC}/ @rm -f ${DOC}/xp-*.png @rm -f ${DOC}/next.eps ${DOC}/next.png ${DOC}/prev.eps ${DOC}/prev.png ${DOC}/up.eps ${DOC}/up.png - @rm -rf ${DOC}/*.html latex2html -split 3 -local_icons -t "Bacula Problem Resolution Guide" -long_titles 4 \ - -toc_stars -contents_in_nav -init_file latex2html-init.pl -white -notransparent ${DOC} >tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}/Bacula_Proble*.html - (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} .; done) + -toc_stars -contents_in_nav -init_file latex2html-init.pl \ + -no_antialias -no_antialias_text \ + -white -notransparent ${DOC} >tex.out 2>&1 + @(if [ -f imagename_translations ] ; then \ + ./translate_images.pl --from_meaningful_names ${DOC}.html; \ + fi) + @cp -f ${DOC}/${MAINDOC} ${DOC}/index.html @echo "Done making web" show: xdvi ${DOC} diff --git a/docs/manuals/es/problems/firewalls.tex b/docs/manuals/es/problems/firewalls.tex index 1e93c04e..9646ea65 100644 --- a/docs/manuals/es/problems/firewalls.tex +++ b/docs/manuals/es/problems/firewalls.tex @@ -28,7 +28,7 @@ FD -> SD:9103 Where hopefully it is obvious that DIR represents the Director, FD the File daemon or client, and SD the Storage daemon. The numbers that follow those -names are the standard ports used by Bacula, and the -\gt{} represents the +names are the standard ports used by Bacula, and the \verb:->: represents the left side making a connection to the right side (i.e. the right side is the "server" or is listening on the specified port), and the left side is the "client" that initiates the conversation. diff --git a/docs/manuals/es/problems/tapetesting.tex b/docs/manuals/es/problems/tapetesting.tex index 4596d17f..8b1bdee6 100644 --- a/docs/manuals/es/problems/tapetesting.tex +++ b/docs/manuals/es/problems/tapetesting.tex @@ -1257,9 +1257,11 @@ certain tape modes and MTEOM. \section{Tape Performance Problems} \index[general]{Tape Performance} If you have LTO-3 or LTO-4 drives, you should be able to -fairly good transfer rates, from 60 to 90 MB/second, providing -you have fast disks, GigaBit Ethernet connections, and possibly set -up your tape buffer size a bit from the default 64K. +fairly good transfer rates; from 60 to 150 MB/second, providing +you have fast disks; GigaBit Ethernet connections (probably 2); you are +running multiple simultaneous jobs; you have Bacula data spooling +enabled; your tape block size is set to 131072 or 262144; and +you have set {\bf Maximum File Size = 5G}. If you are not getting good performance, consider some of the following suggestions from the Allen Balck on the Bacula Users email list: diff --git a/docs/manuals/es/utility/Makefile.in b/docs/manuals/es/utility/Makefile.in index b37abf39..96fc1fcc 100644 --- a/docs/manuals/es/utility/Makefile.in +++ b/docs/manuals/es/utility/Makefile.in @@ -37,6 +37,7 @@ IMAGES=../../../images DOC=utility +MAINDOC=Bacula_Utility_Programs.html first_rule: all @@ -77,25 +78,29 @@ html: fi) latex2html -white -no_subdir -split 0 -toc_stars -white -notransparent \ -init_file latex2html-init.pl ${DOC} >tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}.html + @(if [ -f imagename_translations ] ; then \ + ./translate_images.pl --from_meaningful_names ${DOC}.html; \ + fi) cp ${IMAGES}/bacula-logo.png ${DOC} - (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} .; done) + (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} . 2>/dev/null; done) @echo "Done making html" web: @echo "Making web" + @rm -rf ${DOC} @mkdir -p ${DOC} @cp -fp ${IMAGES}/*.eps . @rm -f next.eps next.png prev.eps prev.png up.eps up.png - @cp -fp ${IMAGES}/*.eps ${DOC}/ - @cp -fp ${IMAGES}/*.eps ${IMAGES}/*.png ${DOC}/ @rm -f ${DOC}/xp-*.png @rm -f ${DOC}/next.eps ${DOC}/next.png ${DOC}/prev.eps ${DOC}/prev.png ${DOC}/up.eps ${DOC}/up.png - @rm -rf ${DOC}/*.html latex2html -split 3 -local_icons -t "Bacula Utility Programs" -long_titles 4 \ - -toc_stars -contents_in_nav -init_file latex2html-init.pl -white -notransparent ${DOC} >tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}/Bacula_Utilit*.html - (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} .; done) + -toc_stars -contents_in_nav -init_file latex2html-init.pl \ + -no_antialias -no_antialias_text \ + -white -notransparent ${DOC} >tex.out 2>&1 + @(if [ -f imagename_translations ] ; then \ + ./translate_images.pl --from_meaningful_names ${DOC}.html; \ + fi) + @cp -f ${DOC}/${MAINDOC} ${DOC}/index.html @echo "Done making web" show: xdvi ${DOC} diff --git a/docs/manuals/es/utility/progs.tex b/docs/manuals/es/utility/progs.tex index 7fecc8e0..d818bc3d 100644 --- a/docs/manuals/es/utility/progs.tex +++ b/docs/manuals/es/utility/progs.tex @@ -455,17 +455,21 @@ database is to reload the database by using the bootstrap file that was written when you saved it (default bacula-dir.conf file). The {\bf bscan} program can be used to re-create a database (catalog) -records from the backup information written to one or more Volumes. -This is normally -needed only if one or more Volumes have been pruned or purged from your -catalog so that the records on the Volume are no longer in the catalog, or -for Volumes that you have archived. - -With some care, it can also be used to synchronize your existing catalog with -a Volume. Although we have never seen a case of bscan damaging a -catalog, since bscan modifies your catalog, we recommend that -you do a simple ASCII backup of your database before running {\bf bscan} just -to be sure. See \ilink{Compacting Your Database}{CompactingMySQL} for +records from the backup information written to one or more Volumes. This +is normally needed only if one or more Volumes have been pruned or purged +from your catalog so that the records on the Volume are no longer in the +catalog, or for Volumes that you have archived. Note, if you scan in +Volumes that were previously purged, you will be able to do restores from +those Volumes. However, unless you modify the Job and File retention times +for the Jobs that were added by scanning, the next time you run any Job +with the same name, the records will be pruned again. Since it takes a +long time to scan Volumes this can be very frustrating. + +With some care, {\bf bscan} can also be used to synchronize your existing +catalog with a Volume. Although we have never seen a case of bscan +damaging a catalog, since bscan modifies your catalog, we recommend that +you do a simple ASCII backup of your database before running {\bf bscan} +just to be sure. See \ilink{Compacting Your Database}{CompactingMySQL} for the details of making a copy of your database. {\bf bscan} can also be useful in a disaster recovery situation, after the @@ -906,6 +910,7 @@ The full list of commands are: rewind rewind the tape scan read() tape block by block to EOT and report scanblocks Bacula read block by block to EOT and report + speed report drive speed status print tape status test General test Bacula tape functions weof write an EOF on the tape @@ -938,6 +943,54 @@ In the event that you want to relabel a {\bf Bacula}, you can simply use the note for labeling tapes, we recommend that you use the {\bf label} command in the {\bf Console} program since it will never overwrite a valid Bacula tape. +\subsubsection*{Testing your Tape Drive} +\label{sec:btapespeed} + +To determine the best configuration of your tape drive, you can run the new +\texttt{speed} command available in the \texttt{btape} program. + +This command can have the following arguments: +\begin{itemize} +\item[\texttt{file\_size=n}] Specify the Maximum File Size for this test + (between 1 and 5GB). This counter is in GB. +\item[\texttt{nb\_file=n}] Specify the number of file to be written. The amount + of data should be greater than your memory ($file\_size*nb\_file$). +\item[\texttt{skip\_zero}] This flag permits to skip tests with constant + data. +\item[\texttt{skip\_random}] This flag permits to skip tests with random + data. +\item[\texttt{skip\_raw}] This flag permits to skip tests with raw access. +\item[\texttt{skip\_block}] This flag permits to skip tests with Bacula block + access. +\end{itemize} + +\begin{verbatim} +*speed file_size=3 skip_raw +btape.c:1078 Test with zero data and bacula block structure. +btape.c:956 Begin writing 3 files of 3.221 GB with blocks of 129024 bytes. +++++++++++++++++++++++++++++++++++++++++++ +btape.c:604 Wrote 1 EOF to "Drive-0" (/dev/nst0) +btape.c:406 Volume bytes=3.221 GB. Write rate = 44.128 MB/s +... +btape.c:383 Total Volume bytes=9.664 GB. Total Write rate = 43.531 MB/s + +btape.c:1090 Test with random data, should give the minimum throughput. +btape.c:956 Begin writing 3 files of 3.221 GB with blocks of 129024 bytes. ++++++++++++++++++++++++++++++++++++++++++++ +btape.c:604 Wrote 1 EOF to "Drive-0" (/dev/nst0) +btape.c:406 Volume bytes=3.221 GB. Write rate = 7.271 MB/s ++++++++++++++++++++++++++++++++++++++++++++ +... +btape.c:383 Total Volume bytes=9.664 GB. Total Write rate = 7.365 MB/s + +\end{verbatim} + +When using compression, the random test will give your the minimum throughput +of your drive . The test using constant string will give you the maximum speed +of your hardware chain. (cpu, memory, scsi card, cable, drive, tape). + +You can change the block size in the Storage Daemon configuration file. + \section{Other Programs} \index[general]{Programs!Other} \index[general]{Other Programs} @@ -1026,6 +1079,17 @@ If you are getting incorrect dates (e.g. 1970) and you are running with a non-English language setting, you might try adding a LANG=''en\_US'' immediately before the bsmtp call. +In general, {\bf bsmtp} attempts to cleanup email addresses that you +specify in the from, copy, mailhost, and recipient fields, by adding +the necessary \lt{} and \gt{} characters around the address part. However, +if you include a {\bf display-name} (see RFC 5332), some SMTP servers +such as Exchange may not accept the message if the {\bf display-name} is +also included in \lt{} and \gt{}. As mentioned above, you must test, and +if you run into this situation, you may manually add the \lt{} and \gt{} +to the Bacula {\bf mailcommand} or {\bf operatorcommand} and when +{\bf bsmtp} is formatting an address if it already contains a \lt{} or +\gt{} character, it will leave the address unchanged. + \section{dbcheck} \label{dbcheck} \index[general]{Dbcheck} diff --git a/docs/manuals/fr/catalog/catalog.css b/docs/manuals/fr/catalog/catalog.css deleted file mode 100644 index d1824aff..00000000 --- a/docs/manuals/fr/catalog/catalog.css +++ /dev/null @@ -1,30 +0,0 @@ -/* Century Schoolbook font is very similar to Computer Modern Math: cmmi */ -.MATH { font-family: "Century Schoolbook", serif; } -.MATH I { font-family: "Century Schoolbook", serif; font-style: italic } -.BOLDMATH { font-family: "Century Schoolbook", serif; font-weight: bold } - -/* implement both fixed-size and relative sizes */ -SMALL.XTINY { font-size : xx-small } -SMALL.TINY { font-size : x-small } -SMALL.SCRIPTSIZE { font-size : smaller } -SMALL.FOOTNOTESIZE { font-size : small } -SMALL.SMALL { } -BIG.LARGE { } -BIG.XLARGE { font-size : large } -BIG.XXLARGE { font-size : x-large } -BIG.HUGE { font-size : larger } -BIG.XHUGE { font-size : xx-large } - -/* heading styles */ -H1 { } -H2 { } -H3 { } -H4 { } -H5 { } - -/* mathematics styles */ -DIV.displaymath { } /* math displays */ -TD.eqno { } /* equation-number cells */ - - -/* document-specific styles come next */ diff --git a/docs/manuals/fr/catalog/postgresql.tex b/docs/manuals/fr/catalog/postgresql.tex deleted file mode 100644 index 9bbf8203..00000000 --- a/docs/manuals/fr/catalog/postgresql.tex +++ /dev/null @@ -1,457 +0,0 @@ -%% -%% - -\chapter{Installer et configurer PostgreSQL} -\label{_ChapterStart10} -\index[general]{PostgreSQL!Installer et configurer } -\index[general]{Installer et configurer PostgreSQL } -\addcontentsline{toc}{section}{Installer et configurer PostgreSQL} - -\section{Installer et configurer PostgreSQL -- Phase I} -\index[general]{Installer et configurer PostgreSQL -- Phase I } -\index[general]{Phase I!Installer et configurer PostgreSQL -- } -\addcontentsline{toc}{section}{Installer et configurer PostgreSQL -- Phase -I} - -Attention !!! Si vous envisagez d'utiliser PostgreSQL, vous devriez -\^etre conscient de la philosophie des mises \`a jour de PostgreSQL qui -peut \^etre d\'estabilisant dans un environnement de -production. En gros, pour chaque mise \`a jour vers une version majeure, -vous devez exporter vos bases de donn\'ees au format ASCII, faire la -mise \`a jour, et recharger vos bases de donn\'ees. Ceci est d\^u au \`a des -mises \`a jour fr\'equentes du "format de donn\'ees" d'une version \`a l'autre, -et aucun outil n'est fourni pour effectuer la conversion automatiquement. -Si vous omettez d'exporter vos bases au format ASCII, elles peuvent -devenir compl\`etement inutiles si aucun des nouveaux outils ne peut y -acc\'eder en raison d'un changement de format, auquel cas le serveur -PostgreSQL sera dans l'incapacit\'e de d\'emarrer. - -Si vous avez utilis\'e l'option {\bf ./configure -\verb{--{with-postgresql=PostgreSQL-Directory} pour configurer {\bf Bacula}, vous -avez besoin d'installer la version 7.3 ou sup\'erieure de PostgreSQL. -ATTENTION! Les versions pr\'ealables \`a la 7.3 ne fonctionnent pas avec -Bacula. Si PostgreSQL est install\'e dans ses r\'epertoires sandards, seule -l'option {\bf \verb{--{with-postgresql} est n\'ecessaire, le programme de -configuration scrutant tous les r\'epertoires standards. Si PostgreSQL est -install\'e dans votre r\'epertoire de travail ou dans un r\'epertoire -atypique, il faut pr\'eciser l'option {\bf \verb{--{with-postgresql} suivie du -r\'epertoire {\it ad hoc}. - -Installer et configurer PostgreSQL n'est pas compliqu\'e mais peut \^etre -d\'eroutant la premi\`ere fois. Si vous pr\'ef\'erez, vous pouvez utiliser le -paquet de votre distribution. Les paquets binaires sont disponibles sur la -plupart des mirroirs de PostgreSQL. - -Si vous pr\'ef\'erez installer PostgreSQL \`a partir des sources, nous vous -recommandons de suivre les instructions de la -\elink{documentation PostgreSQL}{http://www.postgresql.org/docs/}. - -Si vous utilisez PostgreSQL pour FreeBSD, -\elink{cet article}{http://www.freebsddiary.org/postgresql.php} vous sera peut -\^etre utile. M\^eme si vous n'utilisez pas FreeBSD, l'article contient des -informations utiles \`a la configuration et au param\'etrage de PostgreSQL. - -Apr\`es l'installation de PostgreSQL, terminez l'installation de {\bf Bacula}. -Ensuite, quand Bacula sera install\'e, reprenez ce chapitre pour terminer -l'installation. Notez que les fichiers d'installation utilis\'es dans cette -seconde phase de l'installation de PostgreSQL sont cr\'e\'es durant -l'installation de Bacula. -\label{PostgreSQL_phase2} - -\section{Installer et configurer PostgreSQL -- Phase II} -\index[general]{Phase II!Installer et configurer PostgreSQL -- } -\index[general]{Installer et configurer PostgreSQL -- Phase II } -\addcontentsline{toc}{section}{Installer et configurer PostgreSQL -- Phase -II} - -Si vous en \^etes l\`a, vous avez construit et install\'e PostgreSQL, ou vous -aviez d\'ej\`a un serveur PostgreSQL existant et vous avez configur\'e et -install\'e {\bf Bacula}. Dans le cas contraire, nous vous invitons \`a le -faire avant de poursuivre. - -Notez bien que la commande {\bf ./configure} utilis\'ee pour -construire {\bf Bacula} n\'ecessite d'ajouter l'option {\bf -\verb{--{with-postgresql=repertoire\_de\_PostgreSQL}, o\`u {\bf -repertoire\_de\_PostgreSQL} sp\'ecifie le chemin de PostgreSQL indiqu\'e \`a -la commande ./configure. (si vous n'avez pas sp\'ecifi\'e de r\'epertoire ou -si PostgreSQL est install\'e dans son r\'epertoire par d\'efaut, cette option -n'est pas n\'ecessaire). Cette option est n\'ecessaire pour que Bacula puisse -trouver les fichiers d'en-t\^ete et les librairies d'interface \`a PostgreSQL. - - -{\bf Bacula} installe les scripts pour la gestion de la base de donn\'ees -(cr\'eer, d\'etruire, cr\'eer les tables, etc.) dans le r\'epertoire principal -de l'installation. Ces fichiers sont de la forme *\_bacula\_* (par exemple -create\_bacula\_database). Ces fichiers sont \'egalement disponibles dans le -r\'epertoire \lt{}bacula-src\gt{}/src/cats apr\`es que la commande ./configure -ait \'et\'e lanc\'ee. Si vous consultez le fichier create\_bacula\_database, -vous verrez qu'il fait appel \`a create\_postgresql\_database. Les fichiers -*\_bacula\_* sont fournis pour faciliter les choses. Peu importe la base de -donn\'ees choisie, create\_bacula\_database cr\'eera la base de donn\'ees. - -Maintenant vous allez cr\'eer la base de donn\'ees PostgreSQL et les tables -utilis\'ees par Bacula. On pr\'esume dans la suite que votre serveur -PostgreSQL fonctionne. Vous devez ex\'ecuter les diff\'erentes \'etapes -ci-dessous en tant qu'utilisateur autoris\'e \`a cr\'eer des bases. Ceci peut -\^etre fait avec l'utilisateur PostgreSQL (sur la plupart des syst\`emes il -s'agit de pgsql. NDT: sur debian il s'agit de postgres) - -\begin{enumerate} -\item cd \lt{}r\'epertoire\_d\_installation\gt{} - - Ce r\'epertoire contient le catalogue des routines d'interfaces. - -\item ./create\_bacula\_database - - Ce script cr\'e\'e le catalogue {\bf bacula} PostgreSQL. S'il \'echoue, - c'est probablement que vous n'avez pas les droits requis sur la - base de donn\'ees. Sur la plupart des syst\`emes, le propri\'etaire de - la base de donn\'ees est {\bf pgsql}, et sur d'autres tels que RedHat ou - Fedora, c'est {\bf postgres}. Vous pouvez d\'eterminer lequel en examinant - le fichier /etc/passwd. Pour cr\'eer un nouvel utilisateur avec votre nom - ou le nom {\bf bacula}, vous pouvez faire ce qui suit : - -\begin{verbatim} - su - (entrez le mot de passe root) - su pgsql (ou postgres) - createuser kern (ou peut-\^etre bacula) - Shall the new user be allowed to create databases? (y/n) y - Shall the new user be allowed to create more new users? (y/n) (choisissez ce que vous voulez) - exit -\end{verbatim} - - - A ce stade, vous devriez pouvoir ex\'ecuter la commande ./create\_bacula\_database - -\item ./make\_bacula\_tables - - Cr\'e\'ee les tables utilis\'ees par {\bf Bacula}. -\item ./grant\_bacula\_privileges - - Cr\'e\'ee l'utilisateur de la base de donn\'ees {\bf bacula} avec des droits -d'acc\`es restreints. Vous pouvez modifier ce script pour cadrer avec votre -propre configuration. Attention, cette base n'est pas prot\'eg\'ee par un mot -de passe. - -\end{enumerate} - -Chacun de ces scripts (create\_bacula\_database, make\_bacula\_tables et -grant\_bacula\_privileges) permet l'ajout d'arguments en ligne de commande. -Ceci peut \^etre utile pour sp\'ecifier le nom de l'utilisateur. Par exemple, -vous pouvez avoir besoin d'ajouter {\bf -h nom\_d\_hote} \`a la ligne de -commande pour sp\'ecifier le serveur de base de donn\'ees distant. - -Pour avoir un bon aper\c{c}u des droits d'acc\`es que vous avez sp\'ecifi\'e -vous pouvez utiliser la commande - -\footnotesize -\begin{verbatim} - -repertoire_de_PostgreSQL/bin/psql --command \\dp bacula -\end{verbatim} -\normalsize - -J'ai rencontr\'e un probl\`eme de permissions avec le mot de passe. J'ai finalement -du modifier mon fichier {\bf pg\_hba.conf} (situ\'e dans /var/lib/pgsql/data sur ma -machine) : - -\footnotesize -\begin{verbatim} -de - local all all ident sameuser -vers - local all all trust sameuser -\end{verbatim} -\normalsize - -Ceci a r\'esolu le probl\`eme pour moi, mais ce n'est pas pas forc\'ement une bonne -chose du point de vue de la s\'ecurit\'e, mais j'ai ainsi pu ex\'ecuter mes scripts de -r\'egression sans mot de passe. - -Un moyen plus s\'ecuris\'e pour l'authentification aupr\`es de la base de donn\'ees -consiste \`a utiliser le hachage MD5 des mots de passe. Pour cela, \'editez les -fichier {\bf pg\_hba.conf}, et ajoutez ajoutez ce qui suit juste avant les lignes -"local" et "host" existantes : - -\footnotesize -\begin{verbatim} - local bacula bacula md5 -\end{verbatim} -\normalsize - -Puis red\'emarrez le {\it daemon} Postgres (la plupart du temps, avec - "/etc/init.d/postgresql restart") pour activer cette nouvelle r\`egle -d'authentification. - -Ensuite, en tant qu'administrateur Postgres (connectez-vous en tant -qu'utilisateur postgres ou en utilisant {\bf su} pour devenir root, puis - {\bf su postgres}), ajoutez un mot de passe \`a la base de donn\'ees bacula -pour l'utilisateur bacula avec les commandes suivantes : - -\footnotesize -\begin{verbatim} - \$ psql bacula - bacula=# alter user bacula with password 'secret'; - ALTER USER - bacula=# \\q -\end{verbatim} -\normalsize - -Enfin, il vous faudra ajouter ce mot de passe en deux endroits du fichier -bacula-dir.conf : au niveau de la ressource Catalog et au niveau de la -directive RunBeforeJob de la ressource Job BackupCatalog. Avec les mots de -passe en place, ces deux lignes devraient ressembler \`a ceci : - -\footnotesize -\begin{verbatim} - dbname = bacula; user = bacula; password = "secret" - ... and ... - RunBeforeJob = "/etc/make_catalog_backup bacula bacula secret" -\end{verbatim} -\normalsize - -Naturellement, vous devriez choisir un meilleur mot de passe, et vous assurer -que le fichier bacula-dir.conf qui contient ce mot de passe n'est lisible -que par root. - -M\^eme avec ces restrictions, il reste un probl\`eme de s\'ecurit\'e avec cette approche : -sur certaines plateformes, la variable d'environnement utilis\'ee pour soumettre le -mot de passe \`a Postgres est disponible pour tout utilisateur -local du syst\`eme. Pour supprimer ce probl\`eme, l'\'equipe Postgres a d\'ecr\'et\'e -obsol\`ete ce m\'ecanisme de passage de mot de passe par variable d'environnement et -recommande d'utiliser un fichier .pgpass. Pour utiliser ce m\'ecanisme, cr\'eez un fichier -nomm\'e .pgpass vcontenant une simple ligne : - -\footnotesize -\begin{verbatim} - localhost:5432:bacula:bacula:secret -\end{verbatim} -\normalsize - -Ce fichier devrait \^etre copi\'e dans les r\'epertoires personnels (NDT : home directories) -de tous les comptes susceptibles d'avoir besoin d'acc\'eder \`a la base de donn\'ees : -typiquement, il s'agit de root, bacula et tout utilisateur de la console Bacula. Les fichiers -doivent appartenir aux utilisateur et groupe correspondant : root:root pour la copie -dans ~root, etc. Les permissions doivent \^etre positionn\'ees \`a 600 pour limiter -l'acc\`es au propri\'etaire du fichier. - -\section{R\'einitialiser la base des catalogues (de sauvegardes)} -\index[general]{R\'einitialiser la base des catalogues (de sauvegardes) } -\index[general]{Sauvegardes!R\'einitialiser la base des catalogues de } -\addcontentsline{toc}{section}{R\'einitialiser la base des catalogues (de -sauvegardes)} - -Apr\`es avoir fait un certain nombre de tests avec {\bf Bacula}, vous aurez -tr\`es certainement envie de nettoyer le catalogue des sauvegardes et faire -dispara{\^\i}tre tous les travaux de tests que vous avez lanc\'es. Pour ce -faire, vous pouvez ex\'ecuter les commandes suivantes: - -\footnotesize -\begin{verbatim} - - cd - ./drop_bacula_tables - ./make_bacula_tables - ./grant_bacula_privileges -\end{verbatim} -\normalsize - -Attention! Toutes les informations contenues dans cette base seront perdues et -vous repartirez de z\'ero. Si vous avez \'ecrit sur certains volumes (m\'edia -de sauvegarde), vous devrez \'ecrire une marque de fin de fichier (EOF) sur -chacun d'eux afin que {\bf Bacula} puisse les r\'eutiliser. Pour ce faire: - -\footnotesize -\begin{verbatim} - - (arr\^eter Baula ou demonter les volumes) - mt -f /dev/nst0 rewind - mt -f /dev/nst0 weof -\end{verbatim} -\normalsize - -o\`u vous devrez remplacer {\bf /dev/nst0} par le chemin appropri\'e de votre -lecteur de sauvegarde. - -\section{Installer PostgreSQL avec les RPMs} -\index[general]{PostgreSQL!Installer avec les RPMs} -\index[general]{Installer PostgreSQL avec les RPMs} -\addcontentsline{toc}{section}{Installer PostgreSQL avec les RPMs} -Si vous installez PostgreSQL avec les RPMs, il vous faut installer les -binaires PostgreSQL ainsi que les librairies clientes. Ces derni\`eres font -g\'en\'eralement partie de paquetages de d\'eveloppement, aussi vous devez installer : - -\footnotesize -\begin{verbatim} - postgresql - postgresql-devel -\end{verbatim} -\normalsize - -Il en va de m\^eme avec la plupart des gestionnaires de paquetages. - -\section{Migrer de MySQL \`a PostgreSQL} -\index[general]{Migrer de MySQL \`a PostgreSQL } -\index[general]{PostgreSQL!Migrer de MySQL \`a } -\addcontentsline{toc}{section}{Migrer de MySQL \`a PostgreSQL} - -La proc\'edure de migration pr\'esent\'ee ici \`a fonctionn\'e pour Norm -Dressler \lt{}ndressler at dinmar dot com\gt{} - -Ce process a \'et\'e test\'e en utilisant les versions suivantes des -diff\'erents logiciels: - -\begin{itemize} -\item Linux Mandrake 10/Kernel 2.4.22-10 SMP -\item MySQL Ver 12.21 Distrib 4.0.15, pour mandrake-linux-gnu (i586) -\item PostgreSQL 7.3.4 -\item Bacula 1.34.5 - \end{itemize} - -ATTENTION! Par pr\'ecaution, r\'ealisez une sauvegarde compl\`ete de vos -syst\`emes avant de proc\'eder \`a cette migration. - -\begin{enumerate} -\item Arr\^etez bacula (cd /etc/bacula;./bacula stop) -\item Lancez la commande pour extraire les donn\'ees de votre base MySQL: - - \footnotesize -\begin{verbatim} - - mysqldump -f -t -n >bacula-backup.dmp - -\end{verbatim} -\normalsize - -\item Faites une sauvegarde de votre r\'epertoire /etc/bacula (mais laisser - l'original en place ). -\item Allez dans le r\'epertoire source de {\bf Bacula} et reconstruisez le en - incluant le support PostgreSQL au lieu de celui de MySQL . V\'erifiez que le - fichier config.log de votre configuration originale et remplacez enable-mysql -par enable-postgresql. -\item Recompilez Bacula avec la commande make et si tout se passe correctement - lancez un "make install". -\item Arr\^etez MySQL. -\item Lancez PostgreSQL sur votre syst\`eme. -\item Cr\'eez un utilisateur {\bf Bacula} dans Postgres avec la commande - "createuser". En fonction de votre installation, vous serez peut \^etre - amen\'e \`a faire un "su" vers l'utilisateur ad\'equat (NDT: su postgres). -\item Verifiez que le fichier pg\_hba.conf (NdT sur Debian: - /etc/postgres/pg\_hba.conf) contient les permissions ad\'equates pour - permettre \`a {\bf Bacula} d'acc\'eder au serveur. Le mien contient les -informations suivantes, et il est situ\'e sur un r\'eseau s\'ecuris\'e, - -\footnotesize -\begin{verbatim} - -local all all trust - -host all all 127.0.0.1 255.255.255.255 trust - -ATTENTION: vous devez red\'emmarer PostgreSQL si vous faites des changements dans ce fichier. - -\end{verbatim} -\normalsize - -\item Allez dans le r\'epertoire /etc/bacula et pr\'eparez la base de - donn\'ees avec les commandes suivantes: - -\footnotesize -\begin{verbatim} - -./create_postgresql_database - -./make_postgresql_tables - -./grant_postgresql_privileges - -\end{verbatim} -\normalsize - -\item Verifiez que vous avez acc\`es \`a la base de donn\'ees: - - \footnotesize -\begin{verbatim} - -psql -Ubacula bacula - -\end{verbatim} -\normalsize - -Vous ne devriez avoir aucune erreur. -\item Chargez la base PostgreSQL avec l'extraction MySQL gr\^ace \`a la - commande: - -\footnotesize -\begin{verbatim} - -psql -Ubacula bacula - -\end{verbatim} -\normalsize - -\item R\'eindexez vos tables avec les commandes suivantes: - - \footnotesize -\begin{verbatim} - -psql -Ubacula bacula - -SELECT SETVAL('basefiles_baseid_seq', (SELECT -MAX(baseid) FROM basefiles)); - -SELECT SETVAL('client_clientid_seq', (SELECT -MAX(clientid) FROM client)); - -SELECT SETVAL('file_fileid_seq', (SELECT MAX(fileid) -FROM file)); - -SELECT SETVAL('filename_filenameid_seq', (SELECT -MAX(filenameid) FROM filename)); - -SELECT SETVAL('fileset_filesetid_seq', (SELECT -MAX(filesetid) FROM fileset)); - -SELECT SETVAL('job_jobid_seq', (SELECT MAX(jobid) FROM job)); - -SELECT SETVAL('jobmedia_jobmediaid_seq', (SELECT -MAX(jobmediaid) FROM jobmedia)); - -SELECT SETVAL('media_mediaid_seq', (SELECT MAX(mediaid) FROM media)); - -SELECT SETVAL('path_pathid_seq', (SELECT MAX(pathid) FROM path)); - -SELECT SETVAL('pool_poolid_seq', (SELECT MAX(poolid) FROM pool)); - -\end{verbatim} -\normalsize - -\item Parvenu ici, lancez {\bf Bacula}, v\'erifiez votre librairie et - faites un test pour valider que tout s'est bien d\'eroul\'e. -\end{enumerate} - -\section{Mettre \`a jour PostgreSQL} -\index[general]{Mettre \`a jour PostgreSQL } -\index[general]{Mettre \`a jour!PostgreSQL } -\addcontentsline{toc}{section}{Mettre \`a jour PostgreSQL} -Si vous mettez PosgreSQL \`a jour, vous devez reconfigurer, recompiler et -r\'einstaller Bacula, faute de quoi vous constaterez probalement des -erreurs \'etranges. -Pour cela, il vous faut installer le RPM source, modifier le fichier bacula.spec -pour l'accorder \`a votre version de PostgreSQL, reconstruire le RPM et l'installer. - -If you upgrade PostgreSQL, you must reconfigure, rebuild, and re-install -Bacula otherwise you are likely to get bizarre failures. If you -to modify the bacula.spec file to account for the new PostgreSQL version. -You can do so by rebuilding from the source rpm. To do so, you may need -install from rpms and you upgrade PostgreSQL, you must also rebuild Bacula. - - -\section{Credits} -\index[general]{Credits } -\addcontentsline{toc}{section}{Credits} - -Tous mes remerciements \`a Dan Languille pour l'\'ecriture du driver -PostgreSQL qui deviendra tr\`es certainement la base de donn\'ees la plus -r\'eput\'ee utilisable avec {\bf Bacula} diff --git a/docs/manuals/fr/concepts/Makefile.in b/docs/manuals/fr/concepts/Makefile.in deleted file mode 100644 index e3eee180..00000000 --- a/docs/manuals/fr/concepts/Makefile.in +++ /dev/null @@ -1,139 +0,0 @@ -# -# -# Makefile for LaTeX -# -# To build everything do -# make tex -# make web -# make html -# make dvipdf -# -# or simply -# -# make -# -# for rapid development do: -# make tex -# make show -# -# -# If you are having problems getting "make" to work, debugging it is -# easier if can see the output from latex, which is normally redirected -# to /dev/null. To see it, do the following: -# -# cd docs/manual -# make tex -# latex bacula.tex -# -# typically the latex command will stop indicating the error (e.g. a -# missing \ in front of a _ or a missing { or ] ... -# -# The following characters must be preceded by a backslash -# to be entered as printable characters: -# -# # $ % & ~ _ ^ \ { } -# - -IMAGES=../../../images - -DOC=concepts - -first_rule: all - -all: tex web dvipdf mini-clean - -.SUFFIXES: .tex .html -.PHONY: -.DONTCARE: - - -tex: - @./update_version - @echo "Making version `cat version.tex`" - @cp -fp ${IMAGES}/hires/*.eps . - @touch ${DOC}i-dir.tex ${DOC}i-fd.tex ${DOC}i-sd.tex \ - ${DOC}i-console.tex ${DOC}i-general.tex - latex -interaction=batchmode ${DOC}.tex - makeindex ${DOC}.idx -o ${DOC}.ind 2>/dev/null - makeindex ${DOC}.ddx -o ${DOC}.dnd >/dev/null 2>/dev/null - makeindex ${DOC}.fdx -o ${DOC}.fnd >/dev/null 2>/dev/null - makeindex ${DOC}.sdx -o ${DOC}.snd >/dev/null 2>/dev/null - makeindex ${DOC}.cdx -o ${DOC}.cnd >/dev/null 2>/dev/null - latex -interaction=batchmode ${DOC}.tex - -pdf: - @echo "Making pdfm" - @cp -fp ${IMAGES}/hires/*.eps . - dvipdfm -p a4 ${DOC}.dvi - -dvipdf: - @echo "Making dvi to pdf" - @cp -fp ${IMAGES}/hires/*.eps . - dvipdf ${DOC}.dvi ${DOC}.pdf - -html: - @echo " " - @echo "Making html" - @cp -fp ${IMAGES}/*.eps . - @rm -f next.eps next.png prev.eps prev.png up.eps up.png - @(if [ -f imagename_translations ] ; then \ - ./translate_images.pl --from_meaningful_names ${DOC}.html; \ - fi) - latex2html -white -no_subdir -split 0 -toc_stars -white \ - -init_file latex2html-init.pl ${DOC} >tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}.html - @echo "Done making html" - -web: - @echo "Making web" - @mkdir -p ${DOC} - @cp -fp ${IMAGES}/*.eps . - @rm -f next.eps next.png prev.eps prev.png up.eps up.png - @cp -fp ${IMAGES}/*.eps ${DOC}/ - @cp -fp ${IMAGES}/*.eps ${IMAGES}/*.png ${DOC}/ - @rm -f ${DOC}/xp-*.png - @rm -f ${DOC}/next.eps ${DOC}/next.png ${DOC}/prev.eps ${DOC}/prev.png ${DOC}/up.eps ${DOC}/up.png - @rm -rf ${DOC}/*.html - latex2html -split 3 -local_icons -t "Bacula Concepts and Overview Guide" -long_titles 4 \ - -toc_stars -contents_in_nav -init_file latex2html-init.pl -white ${DOC} >tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}/Bacula_Concep_Overvi_Guide.html - @echo "Done making web" -show: - xdvi ${DOC} - -texcheck: - ./check_tex.pl ${DOC}.tex - -main_configs: - pic2graph -density 100 main_configs.png - -mini-clean: - @rm -f 1 2 3 *.tex~ - @rm -f *.gif *.jpg *.eps - @rm -f *.aux *.cp *.fn *.ky *.log *.pg - @rm -f *.backup *.ilg *.lof *.lot - @rm -f *.cdx *.cnd *.ddx *.ddn *.fdx *.fnd *.ind *.sdx *.snd - @rm -f *.dnd *.old *.out - @rm -f ${DOC}/*.gif ${DOC}/*.jpg ${DOC}/*.eps - @rm -f ${DOC}/*.aux ${DOC}/*.cp ${DOC}/*.fn ${DOC}/*.ky ${DOC}/*.log ${DOC}/*.pg - @rm -f ${DOC}/*.backup ${DOC}/*.ilg ${DOC}/*.lof ${DOC}/*.lot - @rm -f ${DOC}/*.cdx ${DOC}/*.cnd ${DOC}/*.ddx ${DOC}/*.ddn ${DOC}/*.fdx ${DOC}/*.fnd ${DOC}/*.ind ${DOC}/*.sdx ${DOC}/*.snd - @rm -f ${DOC}/*.dnd ${DOC}/*.old ${DOC}/*.out - @rm -f ${DOC}/WARNINGS - - -clean: - @rm -f 1 2 3 *.tex~ - @rm -f *.png *.gif *.jpg *.eps - @rm -f *.pdf *.aux *.cp *.fn *.ky *.log *.pg - @rm -f *.html *.backup *.ps *.dvi *.ilg *.lof *.lot - @rm -f *.cdx *.cnd *.ddx *.ddn *.fdx *.fnd *.ind *.sdx *.snd - @rm -f *.dnd imagename_translations - @rm -f *.old WARNINGS *.out *.toc *.idx - @rm -f ${DOC}i-*.tex - @rm -rf ${DOC} - - -distclean: clean - @rm -f images.pl labels.pl internals.pl - @rm -f Makefile version.tex diff --git a/docs/manuals/fr/concepts/autochangerres.tex b/docs/manuals/fr/concepts/autochangerres.tex deleted file mode 100644 index 048d20c5..00000000 --- a/docs/manuals/fr/concepts/autochangerres.tex +++ /dev/null @@ -1,109 +0,0 @@ -\chapter{La ressource Autochanger} -\label{Autochangerres} -\index[sd]{Autochanger Ressource } -\index[sd]{Ressource!Autochanger } - -La ressource Autochanger supporte les librairies \`a un ou plusieurs -lecteurs en regroupant une ou plusieurs ressources Device en une -unit\'e nomm\'ee Autochanger dans Bacula (souvent d\'esign\'ee en tant que -librairie de bandes par les constructeurs). Si vous poss\'edez une -librairie, et si vous voulez qu'elle fonctionne correctement, vous -{\bf devez} avoir une ressource Autochanger dans le fichier de -configuration de votre Storage Daemon, et les directives Storage -de votre Director {\bf doivent} se r\'ef\'erer au nom de la ressource -Autochanger si elles sont suppos\'ees utiliser la librairie. Dans les -versions ant\'erieures \`a 1.38.0, les directives Storage du Director -se r\'ef\'eraient directement aux ressources Device qui \'etaient des -librairies. D\'esormais, ce type de r\'ef\'erence directe ne fonctionne -plus avec les librairies. - -\begin{description} -\item [Name = \lt{}Autochanger-Name\gt{}] - \index[sd]{Name} - Sp\'ecifie le nom de la librairie. Ce nom est utilis\'e dans la - la d\'efinition de ressource Storage du Director afin de d\'esigner - la librairie. Cette directive est requise. - -\item [Device = \lt{}Device-name1, device-name2, ...\gt{}] - Sp\'ecifie le nom de la (ou des) ressource(s) Device associ\'ees \`a la - librairie. Si votre librairie contient plusieurs lecteurs, vous - devez sp\'ecifier plusieurs noms de ressources Device, chacun d\'esignant - une ressource Device distincte qui comporte un - Drive Index correspondant au num\'ero de lecteur. Vous pouvez sp\'ecifier - plusieurs noms en une seule ligne s\'epar\'es par des virgules ou/et utiliser - plusieurs fois la directive Device. Cette directive est requise. - -\item [Changer Device = {\it name-string}] - \index[sd]{Changer Device} - La cha\^ine {\bf name-string} sp\'ecifi\'ee indique le nom du fichier syst\`eme - d\'esignant la librairie. S'il est sp\'ecifi\'e dans cette ressource, ce nom - n'est pas requis dans la ressource Device. Le nom \'eventuellement sp\'ecifi\'e - dans la ressource Device prend le pas sur celui sp\'ecifi\'e dans la ressource - Autochanger. - -\item [Changer Command = {\it name-string}] - \index[sd]{Changer Command } - La cha\^ine {\bf name-string} sp\'ecifie un programme externe appel\'e pour - changer de volume automatiquement \`a la demande de Bacula. La plupart du - temps, vous renseignerez ce champ avec le script fourni {\bf mtx-changer} - comme suit. Si cette commande est sp\'ecifi\'ee ici, elle n'a pas besoin de - l'\^etre dans la ressource Device. Dans le cas o\`u elle le serait dans les deux - ressources, la sp\'ecification de la ressource Device prendrait le pas sur celle - de la ressource Autochanger. - -\end{description} - -Voici un exemple de d\'efinition de ressource Autochanger valide : - -\footnotesize -\begin{verbatim} -Autochanger { - Name = "DDS-4-changer" - Device = DDS-4-1, DDS-4-2, DDS-4-3 - Changer Device = /dev/sg0 - Changer Command = "/etc/bacula/mtx-changer %c %o %S %a %d" -} -Device { - Name = "DDS-4-1" - Drive Index = 0 - Autochanger = yes - ... -} -Device { - Name = "DDS-4-2" - Drive Index = 1 - Autochanger = yes - ... -Device { - Name = "DDS-4-3" - Drive Index = 2 - Autochanger = yes - Autoselect = no - ... -} -\end{verbatim} -\normalsize - -Notez l'importance de la directive {\bf Autochanger = yes} dans chaque d\'efinition -de p\'eriph\'erique appartenant \`a une librairie. Un p\'eriph\'erique ne devrait pas \^etre -d\'efini comme appartenant \`a plusieurs librairies. Aussi, votre directive Device -dans la ressource Storage du Director devrait comporter le nom de la ressource -Autochanger plut\^ot que le nom de l'un des lecteurs. - -Si vous avez un lecteur qui appartient physiquement \`a une librairie mais que -vous ne souhaitez pas que Bacula puisse l'utiliser automatiquement (par exemple, -si vous voulez le r\'eserver pour les restaurations) vous pouvez utiliser la -directive : - -\footnotesize -\begin{verbatim} -Autoselect = no -\end{verbatim} -\normalsize - -\`a la ressource Device de ce lecteur. Dans ce cas, Bacula ne le s\'electionnera pas -automatiquement en acc\'edant \`a la librairie. Vous pouvez encore utiliser le lecteur en -le d\'esignant par son nom de ressource device plut\^ot que par celui de la ressource -Autochanger. Un exemple d'une telle d\'efinition est montr\'e ci-dessus pour le -lecteur DDS-4-3, qui ne sera pas s\'electionn\'e si le nom DDS-4-changer est utilis\'e -dans une ressource Storage, mais le sera si DDS-4-3 est utilis\'e. diff --git a/docs/manuals/fr/concepts/autochangers.tex b/docs/manuals/fr/concepts/autochangers.tex deleted file mode 100644 index 78c5f126..00000000 --- a/docs/manuals/fr/concepts/autochangers.tex +++ /dev/null @@ -1,936 +0,0 @@ -%% -%% - -\chapter{Support des librairies} -\label{AutochangersChapter} -\index[general]{Support!Librairies} -\index[general]{Autochanger Support } -\addcontentsline{toc}{section}{Support des librairies} - -Bacula supporte les librairies pour les op\'erations de lecture et \'ecriture. -Plusieurs conditions sont requises pour que Bacula puisse utiliser une librairie. -Celles-ci sont expliqu\'ees en d\'etail ci-dessous. -Mais voyons d'abord la liste de ces conditions : - -\begin{itemize} -\item Un script charg\'e de piloter la librairie en accord avec les commandes - envoy\'ees par Bacula est requis. Nous fournissons un tel script pr\'evu pour fonctionner - avec le programme {\bf mtx} disponible dans les paquets {\bf depkgs}. ce script ne - fonctionne qu'avec les librairies \`a un seul lecteur. -\item Chaque volume \`a utiliser doit \^etre d\'efini dans le catalogue et avoir - un num\'ero de slot (NDT : emplacement dans la librairie) assign\'e, de sorte - que Bacula puisse savoir o\`u se trouve le volume dans la librairie. Cet - enregistrement se fait la plupart du temps gr\^ace \`a la commande {\bf label}. - Voyez ci-dessous pour plus de d\'etails. Vous devez \'etiqueter manuellement - vos cartouches avant de pouvoir les utiliser. -\item Vous devez avoir modifi\'e le fichier de configuration de votre Storage - Daemon afin que la ressource Device identifie votre p\'eriph\'erique en tant - que librairie. Quelques autres param\`etres doivent \^etre d\'efinis. -\item Vous devriez aussi modifier la d\'efinition de ressource Storage dans le -fichier de configuration du Director en sorte que le slot vous soit automatiquement -demand\'e lorque vous \'etiquetez un volume. -\item Si vous n'ex\'ecutez pas le Storage Daemon en tant que root, vous devez - vous assurer qu'il d\'etient les droits requis pour acc\'eder au lecteur et au - bras robotis\'e de la librairie. -\item Vous devez placer la directive {\bf Autochanger = yes} dans la - ressource Storage de votre fichier bacula-dir.conf, de sorte que vous soyez - interrog\'e au sujet du slot \`a chaque \'etiquetage de cartouche. -\end{itemize} - -Dans les versions ult\'erieures \`a 1.37, la nouvelle directive -\ilink{Autochanger resource}{AutochangerRes} permet de grouper les ressources -Device pour cr\'eer des librairies avec plusieurs lecteurs. Si vous avez une -librairie, vous devez utiliser cette ressource. - -Bacula utilise son propre script {\bf mtx-changer} pour interagir avec un -programme qui effectue r\'eellement les changement de cartouches. Ainsi, -{\bf mtx-changer} peut \^etre adapt\'e pour fonctionner avec n'importe quel -programme de prise en chgarge de librairie. La version actuelle de -{\bf mtx-changer} fonctionne avec le programme {\bf mtx} . Cependant, -des utilisateurs de FreeBSD ont r\'ealis\'e un script, disponible dans -le r\'epertoire {\bf examples/autochangers}, qui permet \`a Bacula de fonctionner -avec le programme {\bf chio}. - -Bacula supporte aussi les librairies \'equip\'ees de lecteurs de codes barres. -Ce support inclut deux commandes de la console Bacula : {\bf label barcodes} -et {\bf update slots}. Pour plus de d\'etails au sujet de ces commandes, -voyez la section "Support des lecteurs de codes barres" plus loin. - -Le support des librairies dans Bacula n'inclue pas, pour le moment, la gestion -du nettoyage des lecteurs, ni celle des bacs de cartouches ou des silos. - -Le support des librairies \`a un ou plusieurs lecteurs requiert la ressource -\ilink{Autochanger resource}{AutochangerRes}. - -En principe, si {\bf mtx} fonctionne correctement avec votre librairie, ce -n'est qu'une question d'adaptation du script {\bf mtx-changer} pour que -Bacula s'interface correctement avec la librairie. Vous pouvez trouver une -liste des librairies support\'ees par {\bf mtx} en suivant le lien suivant : -\elink{http://mtx.opensource-sw.net/compatibility.php} -{http://mtx.opensource-sw.net/compatibility.php}. -Le site officiel du projet {\bf mtx} se trouve ici : -\elink{http://mtx.opensource-sw.net/}{http://mtx.opensource-sw.net/}. - -Si vous avez des difficult\'es, veuillez utiliser la commande {\bf auto} du -programme {\bf btape} pour tester le fonctionnement de votre librairie -avec Bacula. Lorsque Bacula fonctionne, souvenez vous que pour beaucoup de -distributions (par exemple FreeBSD, Debian,...), le Storage Daemon est -ex\'ecut\'e en tant que {\bf bacula.tape} plut\^ot que {\bf root.root}, aussi -vous devrez vous assurer que le Storage Daemon dispose de droits suffisants pour -acc\'eder \`a la librairie. - -\label{SCSI devices} -\section*{D\'eterminer vos p\'eriph\'eriques SCSI} -\index[general]{D\'eterminer!p\'eriph\'eriques SCSI} -\index[general]{D\'eterminer vos p\'eriph\'eriques SCSI} -\index[general]{P\'eriph\'eriques} -\index[general]{p\'eriph\'eriques!SCSI} - -Sous Linux, vous pouvez lire le fichier /proc/scsi/scsi : - -\footnotesize -\begin{verbatim} -cat /proc/scsi/scsi -\end{verbatim} -\normalsize - -pour conna\^itre vos p\'eriph\'eriques SCSI. Vous pouvez aussi examiner les fichiers -/proc/scsi/sg/device\_hdr et /proc/scsi/sg/devices : - -footnotesize -\begin{verbatim} -cat /proc/scsi/sg/device_hdr /proc/scsi/sg/devices -\end{verbatim} -\normalsize - -pour d\'eterminer comment sp\'ecifier leur nom de p\'eriph\'erique ({\bf /dev/sg0} -pour le premier, {\bf /dev/sg1} pour le second, ...) au niveau de -la directive {\bf Changer Device} - -Pour des informations plus d\'etaill\'ees sur le sujet, veuillez consulter la -section \ilink{Linux SCSI Tricks}{SCSITricks} du chapitre sur les tests -de lecteurs de ce manuel. - -Sous FreeBSD, vous disposez de la commande : - -\footnotesize -\begin{verbatim} -camcontrol devlist -\end{verbatim} -\normalsize - -pour afficher la liste des p\'eriph\'eriques SCSI ainsi que le {\bf /dev/passn} -que vous utiliserez pour renseigner la directive {\bf Changer Device} - -Assurez-vous que votre Storage Daemon dispose bien des privil\`eges requis -pour acc\'eder \`a ce p\'eriph\'erique. - -L'astuce suivante, destin\'ee aux utilisateurs de FreeBSD, provient de -Danny Butroyd. Au red\'emarrage, Bacula n'aura PLUS les permissions -requises pour contr\^oler le p\'eriph\'erique /dev/pass0. Pour vous -affanchir de cette difficult\'e, \'editez le fichier /etc/devfs.conf et -ajoutez lui ceci : - -\footnotesize -\begin{verbatim} -own pass0 root:bacula -perm pass0 0666 -own nsa0.0 root:bacula -perm nsa0.0 0666 -\end{verbatim} -\normalsize - -Nous avons ainsi donn\'e au groupe Bacula la permission d'\'ecrire -sur le p\'eriph\'erique nsa0.0. Pour activer ces modifications, ex\'ecutez : -/etc/rc.d/devfs restart - -Vous n'aurez plus \`a modifier les permissions sur ces p\'eriph\'eriques -pour que Bacula continue d'utiliser la librairie apr\`es un red\'emarrage. - -\label{scripts} - -\section{Exemples de scripts} -\index[general]{Scripts!Exemples } -\index[general]{Exemples de scripts } - -Veuillez lire les sections ci-dessous pour bien comprendre comment -les librairies fonctionnent avec Bacula. Bien que nous fournissions -un script {\bf mtx-changer} par d\'efaut, il se peut que votre librairie -n\'ecessite quelques am\'enagements de ce script. Si vous voulez voir des -exemples de fichiers de configuration et de scripts, jetez un oeil -au r\'epertoire \lt{}bacula-src\gt{}/examples/devices o\`u vous -trouverez un exemple de ressource Device Bacula : {\bf HP-autoloader.conf} -ainsi que plusieurs scripts {\bf mtx-changer} modifi\'es pour fonctionner -avec diverses librairies. - -\label{Slots} - -\section*{Slots} -\index[general]{Slots } - -Pour utiliser convenablement une librairie, Bacula doit savoir quel volume -se trouve dans quel {\bf slot} de la librairie. Les slots sont les -emplacements o\`u sont rang\'ees les cartouches lorsqu'elles ne sont pas dans un -lecteur. Bacula num\'erote ces slots de un jusqu'au nombre de cartouches -contenues dans la librairie. - -Bacula n'utilisera pas automatiquement une cartouche pr\'esente dans la librairie -si elle ne porte pas d'\'etiquette (label) Bacula et si son num\'ero de slot n'est pas -r\'ef\'erenc\'e dans le catalogue. Vous devez, \`a l'aide de la console, assigner un -slot \`a chaque cartouche pr\'esente dans la librairie. Cette information est -conserv\'ee dans le catalogue avec les autres donn\'ees relatives au volume. -Si le slot n'est pas pr\'ecis\'e, ou s'il est \'egal \`a z\'ero, alors Bacula ne tentera -pas d'utiliser la librairie, m\^eme si tous les enregistrements de configuration -sont pr\'esents. De m\^eme, la commande {\bf mount} de la console Bacula ne -provoque pas non plus l'utilisation de la librairie, mais se contente d'ordonner -\`a Bacula de lire toute cartouche \'eventuellement pr\'esente dans le lecteur. - -Vous pouvez contr\^oler le num\'ero de slot et le drapeau InChanger avec la commande : - -\begin{verbatim} -list Volumes -\end{verbatim} - -dans la console. - -\label{mult} -\section*{Lecteurs multiples} -\index[general]{Lecteurs!Multiples } -\index[general]{Lecteurs ultiples} - -Certaines librairies comportent plusieurs p\'eriph\'eriques de lecture/\'ectriture -(lecteurs). La nouvelle \ilink{ressource Autochanger}{AutochangerRes} -apparue avec la version 1.37 vous permet de grouper des ressources Devices -(repr\'esentant chacune un lecteur). Le Director est toujours en mesure -d'adresser directement un lecteur, mais ce faisant, il outrepasse -le fonctionnement propre aux groupements de lecteurs. Il est pr\'ef\'erable -que la Ressource Storage du Director d\'efinisse une ressource -Autochanger, permettant ainsi au Storage Daemon de s'assurer qu'un seul -lecteur \`a la fois utilise le script mtx-changer, et que deux lecteurs ne tentent -pas de lire le m\^eme volume. - -Les librairies \`a lecteurs multiples n\'ecessitent d'utiliser la directive -{\bf Drive Index} dans la ressource Device du Storage Daemon. Les -lecteurs sont num\'erot\'es \`a partir de z\'ero, ce qui constitue la valeur par -d\'efaut. Pour utiliser un deuxi\`eme lecteur dans une librairie, vous devez -d\'efinir une seconde ressource Device et lui attribuer le Drive Index 1. -En g\'en\'eral, le second p\'eriph\'erique aura le m\^eme {\bf Changer Device} -(canal de contr\^ole) que le premier, mais une {\bf Archive Device} diff\'erente. - -Par d\'efaut, les jobs Bacula pr\'ef\`erent \'ecrire sur un volume d\'ej\`a mont\'e. -Si vous avez une librairie avec plusieurs lecteurs, et si vous souhaitez que -Bacula \'ecrive sur plusieurs volumes du m\^eme pool en m\^eme temps, vous devez -d\'esactiver la directive \ilink{Prefer Mounted Volumes} {PreferMountedVolumes} -dans la ressource Job du Director. Ainsi le Storage Daemon pourra maximiser -l'usage des lecteurs. - -\label{ConfigRecords} -\subsection*{Directives de la ressource Device} -\index[general]{Directives!ressource Device} -\index[general]{Directives de la ressource Device} - -La configuration des librairies s'effectue dans Bacula au niveau de le ressource -Device du Storage Daemon. Quatre directives permettent de d\'efinir l'usage de -la librairie par Bacula : {\bf Autochanger}, {\bf Changer Device}, -{\bf Changer Command} et {\bf Maximum Changer Wait} - -Ces quatre directives sont d\'ecrites en d\'etail ci-dessous. Notez cependant -que les directives {\bf Changer Device} et {\bf Changer Command} ne sont pas -requises dans la ressource Device si elles figurent dans la ressource -{\bf Autochanger}. - -\begin{description} - -\item [Autochanger = {\it Yes|No} ] - \index[sd]{Autochanger} - La directive {\bf Autochanger} stipule que le p\'eriph\'erique ainsi d\'efini est, ou - n'est pas, une librairie. La valeur par d\'efaut est {\bf no}. - -\item [Changer Device = \lt{}device-name\gt{}] - \index[sd]{Changer Device} - En plus du nom d'Archive Device, vous devez sp\'ecifier un nom de - librairie {\bf Changer Device}, ceci parce que la plupart des librairies - sont control\'ees via un pseudo-fichier diff\'erent de celui utilis\'e pour - lire et \'ecrire sur les cartouches. Par exemple, sur les syst\`emes Linux, - on utilise g\'en\'eralement l'interface SCSI g\'en\'erique pour contr\^oler le bras - de la librairie, soit {\bf Changer Device = /dev/sg0} et l'interface SCSI - standard pour lire et \'ecrire sur les bandes, soit {\bf Archive Device = /dev/nst0}. - Notez que certaines librairies \'evolu\'ees localiseront le bras sur - {\bf /dev/sg1}. De telles librairies ont souvent plusieurs lecteurs et un - nombre important de cartouches. - - Sur FreeBSD, on sp\'ecifiera typiquement {\bf Changer Device = /dev/pass0} ou - {\bf Changer Device = /dev/passn}. - - Sur Solaris, ce sera {\bf Changer Device = /dev/rdsk}. - - Assurez vous que votre Storage Daemon poss\`ede les permissions d'acc\'eder \`a - ce p\'eriph\'erique. - -\item [Changer Command = \lt{}command\gt{}] - \index[sd]{Changer Command } - Cette directive est utilis\'ee pour sp\'ecifier le programme externe \`a appeler - et les arguments \`a lui fournir. La commande est suppos\'ee \^etre un programme - ou un script shell standard qui peut \^etre ex\'ecut\'e par le syst\`eme. cette - commande est invoqu\'ee chaque fois que Bacula manipule le bras de la librairie. - Les substitutions suivantes sont effectu\'ees dans la ligne {\bf command} - avant qu'elle ne soit envoy\'ee au syst\`eme d'exploitation pour ex\'ecution. - -\footnotesize -\begin{verbatim} - %% = % - %a = archive device name - %c = changer device name - %d = changer drive index base 0 - %f = Client's name - %j = Job name - %o = command (loaded, load, or unload) - %s = Slot base 0 - %S = Slot base 1 - %v = Volume name -\end{verbatim} -\normalsize - -Voici un exemple d'utilisation de {\bf mtx} avec le script {\bf mtx-changer} : - -\footnotesize -\begin{verbatim} -Changer Command = "/etc/bacula/mtx-changer %c %o %S %a %d" -\end{verbatim} -\normalsize - -O\`u vous devrez adapter le chemin {\bf /etc/bacula} pour qu'il co\''incide \`a -la r\'ealit\'e de votre installation. Les d\'etails des trois commandes (loaded, -load, unload) utilis\'ees par Bacula ainsi que la sortie qui en est attendue -sont donn\'es dans la section {\bf Interface entre Bacula et les librairies} -ci-dessous. - -\item [Maximum Changer Wait = \lt{}time\gt{}] - \index[sd]{Maximum Changer Wait} - Cette directive sert \`a d\'efinir le d\'elai maximal durant lequel Bacula - attendra la r\'eponse d'une librairie \`a une commande (par exemple, load). - La valeur par d\'efaut est 120 secondes. Si votre librairie est lente, vous - pouvez avoir int\'er\^et \`a allonger ce d\'elai. - - Au del\`a de ce d\'elai, le programme de chargement est tu\'e et Bacula - sollicite l'intervention d'un op\'erateur. - -\item [Drive Index = \lt{}number\gt{}] - \index[sd]{Drive Index} - Cette directive vous permet d'indiquer \`a Bacula d'utiliser le second - lecteur et les \'eventuels suivants dans une librairie qui en contient - plusieurs. Etant donn\'e que les lecteurs sont num\'erot\'es \`a partir de - z\'ero, le second est d\'efini par : - -\footnotesize -\begin{verbatim} -Device Index = 1 -\end{verbatim} -\normalsize - -Pour utiliser le second lecteur, vous devez avoir une seconde d\'efinition -de ressource Device dans le fichier bacula-sd.conf. Voyez la section -concernant les lecteurs multiples plus haut dans ce chapitre pour plus -de plus amples informations. -\end{description} - -De plus, pour un fonctionnement correct de la librairie, vous devez d\'efinir -une ressource Autochanger. -\input{autochangerres} - -\label{example} -\section{Un exemple de fichier de configuration} -\index[general]{exemple fichier configuration} -\index[general]{fichier!exemple configuration} - -Les deux ressource suivantes impl\'ementent une librairie : - -\footnotesize -\begin{verbatim} -Autochanger { - Name = "Autochanger" - Device = DDS-4 - Changer Device = /dev/sg0 - Changer Command = "/etc/bacula/mtx-changer %c %o %S %a %d" -} - -Device { - Name = DDS-4 - Media Type = DDS-4 - Archive Device = /dev/nst0 # Normal archive device - Autochanger = yes - LabelMedia = no; - AutomaticMount = yes; - AlwaysOpen = yes; -} -\end{verbatim} -\normalsize - -o\`u vous adapterez les directives {\bf Archive Device}, {\bf Changer Device} et -{\bf Changer Command} pour qu'elles conviennent \`a votre syst\`eme. - -\section{Un exemple de fichier de configuration multi-lecteurs} -\index[general]{Multi-lecteurs exemple fichier de configuration} - -Les ressources suivantes impl\'ementent une librairie multi-lecteurs : - -\footnotesize -\begin{verbatim} -Autochanger { - Name = "Autochanger" - Device = Drive-1, Drive-2 - Changer Device = /dev/sg0 - Changer Command = "/etc/bacula/mtx-changer %c %o %S %a %d" -} - -Device { - Name = Drive-1 - Drive Index = 0 - Media Type = DDS-4 - Archive Device = /dev/nst0 # Normal archive device - Autochanger = yes - LabelMedia = no; - AutomaticMount = yes; - AlwaysOpen = yes; -} - -Device { - Name = Drive-2 - Drive Index = 1 - Media Type = DDS-4 - Archive Device = /dev/nst1 # Normal archive device - Autochanger = yes - LabelMedia = no; - AutomaticMount = yes; - AlwaysOpen = yes; -} - -\end{verbatim} -\normalsize - -o\`u vous adapterez les directives {\bf Archive Device}, {\bf Changer Device} et -{\bf Changer Command} pour qu'elles conviennent \`a votre syst\`eme. - -\label{SpecifyingSlots} -\section{Sp\'ecifier des slots lors de l'\'etiquetage} -\index[general]{Sp\'ecifier des slots lors de l'\'etiquetage} -\index[general]{Etiquetage!Sp\'ecifier des slots lors de} - -Si vous utilisez la directive {\bf Autochanger = yes} \`a la ressource Storage -du fichier de configuration de votre Director, la console Bacula vous -demandera automatiquement le num\'ero de slot lors de l'utilisation des -commandes {\bf add} ou {\bf label} pour ce p\'eriph\'erique de stockage. Si -votre script {\bf mtx-changer} est correctement install\'e, Bacula -chargera la bonne cartouche \`a l'ex\'ecution de la commande {\bf label}. - -Vous devez aussi sp\'ecifier {\bf Autochanger = yes} dans la ressource -Device du Storage Daemon ainsi que nous l'avons d\'ecrit plus haut pour -que la librairie soit utilis\'ee. Veuillez consulter la section -\ilink{Ressource Storage}{Autochanger1} dans le chapitre sur la configuration -du Director pour plus de d\'etails sur ce sujet. - -Ainsi, toutes les phases de l'utilisation des cartouches peuvent \^etre -int\'egralement automatis\'ees. Il est aussi possible de param\'etrer ou -modifier la valeur du slot en utilisant le sous-menu {\bf Volume Parameters} -de la commande {\bf update} de la console. - -M\^eme si tous les param\`etres ci-dessus sont correctement sp\'ecifi\'es, Bacula ne -tentera d'acc\'eder \`a la librairie que s'il existe un {\bf slot} non-nul parmi -les volumes enregistr\'es dans le catalogue. - -Si votre librairie est \'equip\'ee d'un lecteur de codes barres, vous pouvez -\'etiqueter vos volumes l'un apr\`es l'autre en utilisant la commande -{\bf label barcodes}. Bacula montera et \'etiquettera chaque cartouche porteuse -d'un code barres contenue dans la librairie avec le nom sp\'ecifi\'e par le -code barres. L'enregistrement apropri\'e sera aussi cr\'e\'e dans le catalogue. -Toute cartouche dont le code barres commence par les caract\`eres sp\'ecifi\'es par -la directive {\bf Cleaning Prefix} est consid\'er\'ee comme une cartouche de -nettoyage, et ne sera pas \'etiquet\'ee. Par exemple, avec : - -\footnotesize -\begin{verbatim} -Pool { - Name ... - Cleaning Prefix = "CLN" -} -\end{verbatim} -\normalsize - -toute cartouche de code barres CLNxxxx sera trait\'ee en tant que cartouche de -nettoyage, et ne sera pas mont\'ee. - -\section{Changer des cartouches} -\index[general]{Changer des cartouches} -Si vous voulez ins\'erer ou retirer des cartouches de votre librairie, ou encore -ex\'ecuter manuellement le programme {\bf mtx}, vous devez "informer" Bacula de ces op\'erations : - -\footnotesize -\begin{verbatim} -unmount -(changez vos cartouches et/ou ex\'ecutez mtx) -mount -\end{verbatim} -\normalsize - -Si vous omettez de faire "unmount" avant de telles changements, Bacula ne saura plus -ce qui est dans la librairie, et ce qui n'y est pas, et peut m\^eme cesser de fonctionner -parce qu'il s'attend \`a avoir le contr\^ole exclusif de la librairie tandis quie le lecteur -est mont\'e. - -Notez que les volumes doivent \^etre pr\'e-\'etiquet\'es pour pouvoir \^etre utilis\'es -automatiquement dans la librairie lors d'une sauvegarde. Si vous ne disposez -pas d'un lecteur de code barres, ceci se fait manuellement, ou \`a l'aide d'un -script. - -\label{Magazines} -\section{Travailler avec plusieurs magasins} -\index[general]{Travailler avec plusieurs magasins} -\index[general]{magasins!Travailler avec plusieurs} - -Si vous avez plusieurs magasins ou si vous ins\'erez ou retirez des -cartouches d'un magasin, vous devriez en informer Bacula. Ainsi, Bacula -sera en mesure d'utiliser pr\'ef\'erentiellement des cartouches qu'il sait \^etre -dans la librairie, pr\'evenant ainsi des interventions humaines inutiles. - -Si votre librairie est \'equip\'ee d'un lecteur de codes barres, il est ais\'e -de tenir Bacula inform\'e : chaque fois que vous changez un magasin, ajoutez -ou pr\'elevez une cartouche, faites simplement : - -\footnotesize -\begin{verbatim} -unmount -(remove magazine) -(insert new magazine) -update slots -mount -\end{verbatim} -\normalsize - -dans la console. Avec cette commande, Bacula se renseigne aupr\`es de la librairie -pour conna\^itre les volumes qu'elle contient. Ceci ne n\'ecessite pas d'acc\'eder -aux volumes car la librairie se charge de faire son inventaire lors de sa -mise sous tension. Bacula s'assure alors que tout volume pr\'esent dans la -librairie est marqu\'e pr\'esent dans le catalogue et que tout volume absent de la -librairie est marqu\'e absent dans le catalogue. En outre, les num\'eros de slots -des volumes sont corrig\'es dans le catalogue s'ils sont inexacts. - -Si vous ne disposez pas d'un lecteur de codes barres, vous avez plusieurs alternatives : - -\begin{enumerate} -\item Vous pouvez attribuer manuellement les num\'eros de slots et les drapeaux - InChanger \`a l'aide de la commande {\bf update volume} dans la console. Cette - m\'ethode est assez p\'enible. - -\item Vous pouvez lancer la commande - -\footnotesize -\begin{verbatim} -update slots scan -\end{verbatim} -\normalsize - - qui ordonne \`a Bacula de lire l'\'etiquette (label) de chacune des cartouches - dans la librairie par montage successif, et de mettre \`a jour les informations - (Slot, drapeau InChanger) dans le catalogue. Cette m\'ethode est efficace, mais - prend du temps pour charger chaque cartouche et en lire l'\'etiquette. - -\item Vous pouvez modifier le script mtx-changer en sorte qu'il simule une - librairie \'equip\'ee d'un lecteur de codes barres. Voyez ce qui suit pour plus de - d\'etails -\end{enumerate} - -\label{simulating} -\section{Simuler un lecteur de codes barres dans votre librairie} -\index[general]{Librairie!Simuler un lecteur de codes barres dans votre} -\index[general]{Simuler un lecteur de codes barres dans votre} - -Vous pouvez simuler un lecteur de codes barres dans votre librairie en faisant -en sorte que le script {\bf mtx-changer} retourne les informations que -retournerait une librairie avec lecteur de codes barres. Pour cela, commentez -la ligne ci-dessous dans le "case" aux alentours de la ligne 99 : - -\footnotesize -\begin{verbatim} - ${MTX} -f $ctl status | grep " *Storage Element [0-9]*:.*Full" | awk "{print \$3 \$4}" | sed "s/Full *\(:VolumeTag=\)*//" -\end{verbatim} -\normalsize - -en ajoutant un \# au d\'ebut de cette ligne (vous pouvez aussi supprimer la ligne). -A sa place, ajoutez une nouvelle ligne dont le r\^ole est d'imprimer le contenu -d'un fichier. Par exemple : - -\footnotesize -\begin{verbatim} -cat /etc/bacula/changer.volumes -\end{verbatim} -\normalsize - -Le nom du fichier est libre, mais assurez vous d'utiliser un chemin absolu. -Le contenu du fichier doit avoir le format : - -\footnotesize -\begin{verbatim} -1:Volume1 -2:Volume2 -3:Volume3 -... -\end{verbatim} -\normalsize - -O\`u 1, 2, 3 sont les num\'eros de slots et Volume1, Volume2, Volume3 sont les -noms de volumes dans ces slots. Vous pouvez utiliser plusieurs fichiers -repr\'esentant les contenus de plusieurs magasins, ainsi, lorsque vous -changez de magasin, contentez vous de copier le contenu du fichier associ\'e -dans le fichier {\bf /etc/bacula/changer.volumes}. Il n'est pas utile de -stopper et red\'emarrer Bacula lors d'un changement de magasins, mettez simplement -les bonnes valeurs dans le fichier avant de lancer la commande {\bf update slots}. -Votre librairie appara\^itra \`a Bacula comme \'equip\'ee d'un lecteur de codes barres. - -\label{updateslots} - -\section{La forme compl\`ete de la commande Update Slots} -\index[general]{La forme compl\`ete de la commande Update Slots} -\index[general]{Command!La forme compl\`ete de la commande Update Slots} - -Si vous ne changez qu'une cartouche, vous ne voulez peut-\^etre pas passer au crible -tous vos volumes, c'est pourquoi la commande {\bf update slots} (de m\^eme que la -commande {\bf update slots scan}) poss\`ede la forme additionnelle : - -\footnotesize -\begin{verbatim} -update slots=n1,n2,n3-n4, ... -\end{verbatim} -\normalsize - -o\`u le mot-clef {\bf scan} peut \'eventuellement \^etre ajout\'e. n1, n2, n3-n4 -repr\'esentent respectivement les num\'eros et la plage de slots que vous souhaitez -mettre \`a jour. - -Cette forme est particuli\`erement utile si vous voulez utiliser "scan" (couteux en temps) -en restrignant l'op\'eration \`a quelques slots. - -Par exemple, si vous lancez la commande : - -\footnotesize -\begin{verbatim} -update slots=1,6 scan -\end{verbatim} -\normalsize - -Bacula va charger le volume du slot 6, lire son \'etiquette logicielle (label) et -mettre \`a jour le catalogue, avant de faire de m\^eme avec la cartouche du slot 6. -Avec la commande : - -\footnotesize -\begin{verbatim} -update slots=1-3,6 -\end{verbatim} -\normalsize - -il va lire les codes barres des volumes dans les slots 1,2,3 et 6, et faire les -mises \`a jour approri\'ees dans le catalogue. Si vous n'avez pas de lecteur de -codes barres, ni n'en simulez comme d\'ecrit plus haut, la commande ci-dessus -ne trouvera aucun nom de volume et ne fera donc rien. - -\label{FreeBSD} - -\section{Sp\'ecificit\'es FreeBSD} -\index[general]{Sp\'ecificit\'es!FreeBSD } -\index[general]{Sp\'ecificit\'es FreeBSD} - -Si vous rencontrez des probl\`emes sur FreeBSD lorsque Bacula tente de s\'electionner -une cartouche, et si le message est {\bf Device not configured}, c'est -parce que FreeBSD a fait dispara\^itre le fichier de p\'eriph\'erique {\bf /dev/nsa1} -lorsqu'il n'y avait plus de cartouche mont\'ee dans le lecteur. Par cons\'equent, -Bacula ne peut ouvrir le p\'eriph\'erique. Une solution consiste \`a charger une -cartouche avant le lancement de Bacula. Ce probl\`eme est corrig\'e dans les -versions de Bacula ult\'erieures \`a 1.32f-5. - -Veuillez consulter le chapitre -\ilink{Tester votre lecteur}{FreeBSDTapes} de ce manuel pour d'{\bf importantes} -informations sur votre lecteur avant de passer au test de la librairie. -\label{AutochangerTesting} - -\section{Tester la librairie et adapter le script mtx-changer} -\index[general]{Tester la librairie et adapter le script mtx-changer} -\index[general]{Script!Tester la librairie et adapter le script mtx-changer} - -Avant d'essayer d'utiliser une librairie avec Bacula, il est pr\'ef\'erable de v\'erifier -"\`a la main" que le bras robotis\'e fonctionne. Pour ce faire, utilisez les commandes -suivantes (\`a supposer que le script {\bf mtx-changer} est install\'e dans -{\bf /etc/bacula/mtx-changer}) : - -\begin{description} - -\item [Assurez vous que Bacula est stopp\'e] - -\item [/etc/bacula/mtx-changer \ /dev/sg0 \ list \ 0 \ /dev/nst0 \ 0] -\index[sd]{mtx-changer list} - -Cette commande devrait afficher : - -\footnotesize -\begin{verbatim} - 1: - 2: - 3: - ... - -\end{verbatim} -\normalsize - -soit un num\'ero suivi de deux points pour chacun des slots occup\'e dans la librairie. -Si votre librairie a un lecteur de codes barres, celui-ci sera affich\'e apr\`es les -deux points. Si un message d'erreur s'affiche, vous devez r\'esoudre le probl\`eme -(par exemple, essayez un autre nom de p\'eriph\'erique si {\bf /dev/sg0} n'est pas -le bon. PAr exemple, sur FreeBSD c'est g\'en\'eralement {\bf /dev/pass2}). - -\item [/etc/bacula/mtx-changer \ /dev/sg0 \ slots \ 0 \ /dev/nst0 \ 0] -\index[sd]{mtx-changer slots} - -Cette commande devrait retourner le nombre de slots de votre librairie. - -\item [/etc/bacula/mtx-changer \ /dev/sg0 \ unload \ ] -\index[sd]{mtx-changer unload} - -Si une cartouche est charg\'ee, cette commande devrait la d\'echarger. - -\item [/etc/bacula/mtx-changer \ /dev/sg0 \ load \ 3 \ /dev/nst0 \ 0 ] -\index[sd]{mtx-changer load} - -Si vous avez une cartouche dans le slot 3, elle sera charg\'ee dans le slot -de lecture (0). - -\item [/etc/bacula/mtx-changer \ /dev/sg0 \ loaded \ 0 \ /dev/nst0 \ 0] -\index[sd]{mtx-changer loaded} - -devrait afficher "3" - -\item [/etc/bacula/mtx-changer \ /dev/sg0 \ unload] -\end{description} - -Une fois que toutes les commandes ci-dessus fonctionnent correctement, Bacula -devrait \^etre capable d'utiliser la librairie, pourvu que votre configuration -comporte la bonne commande {\bf Changer Command}. A ce stade, il ne peut subsister -qu'un probl\`eme : si votre librairie requiert un certain d\'elai pour charger la cartouche -apr\`es l'ex\'ecution de la commande. Imm\'ediatement apr\`es avoir obtenu le retour -du script {\bf mtx-changer}, Bacula commande le rembobinage et la lecture de la bande. -S'il obtient une erreur I/O, vous devriez probablement ins\'erer une pause ({\bf sleep 20}) -apr\`es la commande {\bf mtx}, mais prenez soin de terminer le script avec un -code de sortie 0 en ajoutant {\bf exit 0} apr\`es toute commande que vous ajoutez -au script, car Bacula contr\^ole le code de sortie du script qui devrait \^etre 0 si -tout s'est bien pass\'e. - -Vous pouvez tester si vous avez ou non besoin d'une telle pause en -ex\'ecutant le script suivant : - -\footnotesize -\begin{verbatim} -#!/bin/sh -/etc/bacula/mtx-changer /dev/sg0 unload -/etc/bacula/mtx-changer /dev/sg0 load 3 -mt -f /dev/st0 rewind -mt -f /dev/st0 weof -\end{verbatim} -\normalsize - -S'il fonctionne correctement, vous n'\^etes sans doute pas concern\'e par ce -probl\`eme. Sinon, commencez par ajouter {\bf sleep 30} voire {\bf sleep 60} -juste apr\`es la commande "/etc/bacula/mtx-changer /dev/sg0 load 3". Si -\c{c}a marche, vous pouvez alors int\'egrer cette pause dans le script -{\bf mtx-changer} afin qu'elle soit effective lorsque Bacula est ex\'ecut\'e. - -Quelques rares librairies exigent l'\'ejection de la cartouche avant de pouvoir -la d\'echarger. Dan ce cas, la commande /etc/bacula/mtx-changer /dev/sg0 load 3 -ne fonctionne jamais, quel que soit la dur\'ee de la pause. Si vous pensez -avoir ce probl\`eme, ins\'erez une commande "eject" juste avant la commande -/etc/bacula/mtx-changer /dev/sg0 unload : - -\footnotesize -\begin{verbatim} -#!/bin/sh -/etc/bacula/mtx-changer /dev/sg0 unload -mt -f /dev/st0 offline -/etc/bacula/mtx-changer /dev/sg0 load 3 -mt -f /dev/st0 rewind -mt -f /dev/st0 weof -\end{verbatim} -\normalsize - -Naturellement, si vous avez besoin de la commande {\bf offline}, vous devriez -l'int\'egrer au script mtx-changer, en n'oubliant pas de pr\'eserver le code de -sortie du script par l'ajout de {\bf exit 0}. - -Comme indiqu\'e pr\'ec\'edemment, plusieurs scripts qui impl\'ementent ces fonctions -sont regroup\'es dans {\bf \lt{}bacula-source\gt{}/examples/devices}, ils -peuvent vous inspirer pour faire en sorte que le votre fonctionne. - -Si Bacula affiche "Rewind error on /dev/nst0. ERR=Input/output error." vous -avez probablement besoin d'accro\^itre la pause dans le script {\bf mtx-changer} - -\label{using} - -\section{Utiliser la librairie} -\index[general]{Utiliser la librairie} -\index[general]{Librairie!Utiliser la } - -Supposons que vous ayez convenablement d\'efini les directives Device du -Storage Daemon, et que vous ayez ajout\'e la directive {\bf Autochanger = yes} -dans la ressource Storage de votre fichier bacula-dir.conf. - -Maintenant, alimentez votre librairie avec quelques cartouches vierges. - -Que faire pour que Bacula acc\`ede \`a ces cartouches ? - -Une strat\'egie consiste \`a pr\'e-\'etiqueter chacune des cartouches. Pour cela, -d\'emarrez Bacula, puis utilisez la commande {\bf label} dans la console : - -\footnotesize -\begin{verbatim} -./console -Connecting to Director rufus:8101 -1000 OK: rufus-dir Version: 1.26 (4 October 2002) -*label -\end{verbatim} -\normalsize - -l'affichage devrait \^etre : - -\footnotesize -\begin{verbatim} -Using default Catalog name=BackupDB DB=bacula -The defined Storage resources are: - 1: Autochanger - 2: File -Select Storage resource (1-2): 1 -\end{verbatim} -\normalsize - -Choisissez la librairie (choix 1), vous obtenez : - -\footnotesize -\begin{verbatim} -Enter new Volume name: TestVolume1 -Enter slot (0 for none): 1 -\end{verbatim} -\normalsize - -Ici saisissez {\bf TestVolume1} en guise de nom, et {\bf 1} pour le slot. -On vous demande alors : - -\footnotesize -\begin{verbatim} -Defined Pools: - 1: Default - 2: File -Select the Pool (1-2): 1 -\end{verbatim} -\normalsize - -S\'electionnez le pool Default (ce qui est fait automatiquement si vous -n'avez que celui-l\`a). Bacula poursuit en d\'echargeant toute cartouche -charg\'ee, en chargeant celle du slot 1 et en l'\'etiquetant. Dans cet exemple, -le lecteur \'etait vide, il en r\'esulte l'affichage : - -\footnotesize -\begin{verbatim} -Connecting to Storage daemon Autochanger at localhost:9103 ... -Sending label command ... -3903 Issuing autochanger "load slot 1" command. -3000 OK label. Volume=TestVolume1 Device=/dev/nst0 -Media record for Volume=TestVolume1 successfully created. -Requesting mount Autochanger ... -3001 Device /dev/nst0 is mounted with Volume TestVolume1 -You have messages. -* -\end{verbatim} -\normalsize - -Vous pouvez continuer \`a \'etiqueter les autres volumes, les messages -changeront l\'eg\`erement du fait qu'il y aura cette fois une cartouche -\`a d\'echarger avant de charger la suivante. - -Une fois que tous vos volumes sont \'etiquet\'es, Bacula est en mesure de les -charger lorsqu'il en a besoin. - -Pour "voir" votre \'etiquetage, saisissez la commande {\bf list volumes} dans -la console, vous devriez obtenir quelque chose comme : - -\footnotesize -\begin{verbatim} -*{\bf list volumes} -Using default Catalog name=BackupDB DB=bacula -Defined Pools: - 1: Default - 2: File -Select the Pool (1-2): 1 -+-------+----------+--------+---------+-------+--------+----------+-------+------+ -| MedId | VolName | MedTyp | VolStat | Bites | LstWrt | VolReten | Recyc | Slot | -+-------+----------+--------+---------+-------+--------+----------+-------+------+ -| 1 | TestVol1 | DDS-4 | Append | 0 | 0 | 30672000 | 0 | 1 | -| 2 | TestVol2 | DDS-4 | Append | 0 | 0 | 30672000 | 0 | 2 | -| 3 | TestVol3 | DDS-4 | Append | 0 | 0 | 30672000 | 0 | 3 | -| ... | -+-------+----------+--------+---------+-------+--------+----------+-------+------+ -\end{verbatim} -\normalsize - -\label{Barcodes} - -\section{Support des codes barres} -\index[general]{Support!codes barres} -\index[general]{Support des codes barres} - -Bacula utilise les codes barres \`a travers deux commandes de la console : -{\bf label barcodes} et {\bf update slots}. - -La commande {\bf label barcodes} ordonne \`a Bacula de lire tous les codes -barres de toutes les cartouches pr\'esentes dans la librairie \`a l'aide de la -commande {\bf mtx-changer} {\bf list}. Les cartouches sont ensuite mont\'ees -l'une apr\`es l'autre pour \^etre \'etiquet\'e du nom de leur code barres. - -La commande {\bf update slots} commence par obtenir du script {\bf mtx-changer} -la liste des cartouches et de leurs codes barres. Ensuite, il confronte -chacune des valeurs du catalogues \`a cette liste afin de le mettre \`a jour. -Notez que si un volume ne figure pas dans le catalogue, il n'y a rien a faire. -Cette commande est utile pour synchroniser Bacula avec le contenu de la librairie -si vous avez chang\'e de magasin ou d\'eplac\'e des cartouches. - -La directive {\bf Cleaning Prefix} peut \^etre utilis\'ee dans la ressource Pool pour -d\'efinir un pr\'efixe de nom de volume qui, s'il correspond au code barres d'un volume -conf\`ere \`a ce volume le statut (VolStatus) {\bf Cleaning}. Ceci \'evite que Bacula -tente d'\'ecrire sur une cartouche de nettoyage. - -\label{interface} - -\section{Interface entre Bacula et les librairies} -\index[general]{Interface!Bacula et les librairies} -\index[general]{Interface entre Bacula et les librairies} - -Bacula appelle le script mtx-changer que vous sp\'ecifiez au niveau de la -directive {\bf Changer Command}. En principe, ce sera le script {\bf mtx-changer} -que nous fournissons, mais ce pourrait \^etre n'importe quel programme -qui impl\'emente les commandes {\bf loaded}, {\bf load}, {\bf unload}, {\bf list}, -et {\bf slots} qu'utilise Bacula. Voici le format sous lequel ces commandes -doivent retourner les informations : - -\footnotesize -\begin{verbatim} -- Currently the changer commands used are: - loaded -- retourne le num\'ero du slot d'origine de la cartouche charg\'ee, - avec pour base 1 et 0 pour le lecteur. - load -- charge la cartouche du slot sp\'ecifi\'e dans le lecteur.(notez que certains - mat\'eriels requi\`erent une pause de 30 secondes apr\`es cette commande) - unload -- d\'echarge le lecteur (la cartouche retourne dans son slot d'origine). - list -- retourne une ligne par cartouche pr\'esente dans la librairie - au format : o\`u {\bf slot} est un entier non-nul - repr\'esentant le num\'ero du slot, et {\bf barcode} est le code barres, - s'il existe et si la librairie le prend en charge, associ\'e \`a la cartouche - (dans le cas contraire, le champ "barcode" est laiss\'e blanc. - slots -- retourne le nombre total de slots dans la librairie. -\end{verbatim} -\normalsize - -Bacula contr\^ole le code de sortie du programme appel\'e. Si ce code est 0, les -informations sont accept\'ees. Dans le cas contraire, elles sont ignor\'ees -et le lecteur est trait\'e comme s'il n'\'etait pas dans une librairie. diff --git a/docs/manuals/fr/concepts/bimagemgr.bix b/docs/manuals/fr/concepts/bimagemgr.bix deleted file mode 100644 index 8c18e201..00000000 --- a/docs/manuals/fr/concepts/bimagemgr.bix +++ /dev/null @@ -1,7 +0,0 @@ -\indexentry {Bimagemgr }{2} -\indexentry {bimagemgr!Installation }{2} -\indexentry {bimagemgr Installation }{2} -\indexentry {bimagemgr!Usage }{4} -\indexentry {bimagemgr Usage }{4} -\indexentry {GNU Free Documentation License}{7} -\indexentry {License!GNU Free Documentation}{7} diff --git a/docs/manuals/fr/concepts/general.tex b/docs/manuals/fr/concepts/general.tex deleted file mode 100644 index 977f699e..00000000 --- a/docs/manuals/fr/concepts/general.tex +++ /dev/null @@ -1,554 +0,0 @@ -%% -%% - -\chapter{Qu'est-ce que Bacula ?} -\label{_ChapterStart41} -\index[general]{Qu'est-ce que Bacula ? } -\index[general]{Bacula!Qu'est-ce que } -\addcontentsline{toc}{section}{Qu'est-ce que Bacula ?} - -{\bf Bacula} est un jeu de programmes qui vous permet (ou \`a l'administrateur -syst\`eme) de faire des sauvegardes, restaurations, et v\'erifications des -donn\'ees d'un ordinateur sur un r\'eseau h\'et\'erog\`ene. Bacula peut -fonctionner compl\`etement sur un seul ordinateur. Il est capable de -sauvegarder sur des supports vari\'es, y compris disques et cartouches. - -En termes -techniques, il s'agit d'un programme de sauvegarde Client/Serveur. Bacula est -relativement facile d'utilisation et efficace, tout en offant de nombreuses -fonctions avanc\'ees de gestion de stockage qui facilitent la recherche et la -restauration de fichiers perdus ou endommag\'es. Gr\^ace \`a sa conception -modulaire, Bacula est \'echelonnable depuis le simple syst\`eme constitu\'e -d'un ordinateur, jusqu'au syst\`eme de plusieurs centaines d'ordinateurs -diss\'emin\'es sur un vaste r\'eseau. - -\section{Qui a besoin de Bacula ?} -\index[general]{Qui a besoin de Bacula ? } -\index[general]{Bacula!Qui a besoin de } -\addcontentsline{toc}{section}{Qui a besoin de Bacula ?} - -Si vous utilisez actuellement un programme tel que {\bf tar}, {\bf dump}, ou -{\bf bru} pour sauvegarder vos donn\'ees, et aimeriez une solution r\'eseau, -plus de flexibilit\'e, ou les commodit\'es d'un catalogue, Bacula vous -procurera certainement les fonctions suppl\'ementaires que vous recherchez. -Cependant, si vous avez peu d'exp\'erience des syst\`emes Unix ou si vous -n'avez pas l'exp\'erience d'un syst\`eme de sauvegarde sophistiqu\'e, nous ne -vous recommandons pas l'utilisation de Bacula, car il est beaucoup plus -difficile \`a installer et utiliser que {\bf tar} ou {\bf dump}. - -Si vous attendez de Bacula qu'il se comporte comme les programmes simples -mentionn\'es ci-dessus et qu'il \'ecrive sur toute cartouche ins\'er\'ee dans le -lecteur, vous \'eprouverez des difficult\'es \`a travailler avec Bacula. Bacula -est con\c {c}u pour prot\'eger vos donn\'ees en suivant les r\`egles que vous sp\'ecifiez, -ce qui signifie que la r\'eutilisation d'une cartouche ne se fera qu'en dernier -ressort. Il est possible de "contraindre" Bacula \`a \'ecraser toute cartouche dans -le lecteur, mais il est plus facile et plus efficace d'utiliser un outil -plus basique pour ce genre d'op\'erations. - -Si vous utilisez {\bf Amanda} et aimeriez un programme de sauvegarde qui peut -\'ecrire sur plusieurs volumes (qui ne soit pas limit\'e par la capacit\'e de vos -cartouches), Bacula peut certainement satisfaire vos besoins, d'autant que -plusieurs de nos utilisateurs estiment que Bacula est plus simple \`a -installer et utiliser que d'autres programmes \'equivalents. - -Si vous utilisez actuellement un logiciel commercial sophistiqu\'e tel que -{\bf Legato Networker}, {\bf ARCserveIT}, {\bf Arkeia}, ou {\bf -PerfectBackup+}, vous pourriez \^etre interess\'e par Bacula qui fournit la -plupart de leurs fonctions et qui est un logiciel libre sous licence GNU -version 2. - -\section{Composants ou Services de Bacula} -\index[general]{Bacula!Composants ou Services de } -\index[general]{Composants ou Services de Bacula } -\addcontentsline{toc}{section}{Composants ou Services de Bacula} - -Bacula est constitu\'e des cinq composants ou services majeurs suivants : - -\includegraphics{./bacula-applications.eps} -(remerciements \`a Aristedes Maniatis pour ce sch\'ema et le suivant) - -\begin{itemize} -\item - \label{DirDef} - Le service {\bf Bacula Director -\label{a1} -} est le programme qui supervise toutes les op\'erations de sauvegarde, -restauration, v\'erification et archivage. L'administrateur syst\`eme utilise -le Bacula Director pour planifier les sauvegardes et restaurer les fichiers. -Pour plus de d\'etails, consultez la section concernant la conception du Daemon Director -dans la documentation pour d\'eveloppeurs. Le Director est ex\'ecut\'e en tant que {\it daemon} -ou service (c'est \`a dire en tâche de fond). -\item - \label{UADef} - Le service {\bf Bacula Console} est le programme qui permet \`a -l'administrateur ou \`a l'utilisateur de communiquer avec le {\bf Bacula -Director} (voir ci-dessus). Actuellement, le service Bacula Console est -disponible en trois versions. La premi\`ere et la plus simple est -d'ex\'ecuter le programme Console dans une fen\^etre shell (i.e. interface -TTY). La plupart des administrateurs syst\`eme trouveront cette m\'ethode -parfaitement ad\'equate. La seconde version est une interface graphique GNOME -qui est loin d'\^etre compl\`ete, mais est -tout \`a fait fonctionnelle puisqu'elle poss\`ede la plupart des -possibilit\'es de la Console shell. La troisi\`eme version est une interface -graphique wxWidgets qui permet de s\'electionner interactivement les fichiers -\`a restaurer. Elle int\`egre la plupart des fonctionnalit\'es de la console -shell, permet la compl\'etion automatique avec la touche tabulation, et -fournit une aide instantan\'ee relative \`a la commande que vous \^etes en -train de taper. Pour plus de d\'etails, consultez la section -\ilink{Conception de la Console Bacula}{_ConsoleChapter} dans la documentation -pour d\'eveloppeurs. -\item - \label{FDDef} - Le service {\bf Bacula File} (ou programme client) est le programme install\'e -sur la machine \`a sauvegarder. Il est sp\'ecifique au syst\`eme sur lequel -il est ex\'ecut\'e et a la charge de fournir les attributs des fichiers et -les donn\'ees requis par le Director. Les Services File sont aussi charg\'es -de la partie d\'ependant du syst\`eme de fichiers lors de la restauration des -attributs de fichiers et des donn\'ees. Pour plus de d\'etails, consultez le -document sur la conception du File Daemon dans le Guide pour Developpeurs. Ce -programme est ex\'ecut\'e en tant que service sur la machine \`a sauvegarder, -et la documentation s'y r\'ef\`ere parfois en tant que Client (par exemple -dans les fichiers de configuration de Bacula). En plus du File Daemon pour -Unix/Linux, il existe un File Daemon pour Windows (usuellement distribu\'e au -format binaire). Le File Daemon Windows fonctionne sur toutes les versions -actuelles de Windows (NT, 2000, XP, 2003 et peut-\^etre aussi 98 et Me). -\item - \label{SDDef} - Le service {\bf Bacula Storage} est le programme qui transf\`ere les donn\'ees -et les attributs de fichiers aux m\'edia physiques ou aux volumes et les -restitue lors de restaurations. En d'autres termes, Le storage Daemon est -responsable des op\'erations de lecture et d'\'ecriture sur vos cartouches (ou -autres m\'edia de stockage, comme par exemple des fichiers). Pour plus de -d\'etails consultez la Documentation Pour D\'eveloppeurs sur la conception du -Storage Daemon. -\item - \label{DBDefinition} - Les services {\bf Catalogue} ont pour t\^ache de maintenir \`a jour la base de -donn\'ees des index de fichiers et volumes pour tous les fichiers -sauvegard\'es. Les services {\bf Catalogue} permettent \`a l'administrateur -syst\`eme ou \`a l'utilisateur de localiser rapidement et restaurer n'importe -quel fichier. Les services Catalogue de Bacula le placent dans une -cat\'egorie diff\'erente de programmes tels que tar et bru, puisque le -catalogue Bacula maintient un enregistrement de chaque volume utilis\'e, -chaque job ex\'ecut\'e et chaque fichier sauvegard\'e ce qui permet des -restaurations et une gestion de volumes efficaces. Bacula supporte -actuellement trois bases de donn\'ees diff\'erentes, MySQL, PostgreSQL, et -SQLite. L'une des trois doit \^etre choisie \`a la compilation de {\bf -Bacula}. - -Les trois bases de donn\'ees actuellement support\'ees (MySQL, PostgreSQL, ou -SQLite) fournissent de nombreuses fonctions telles l'indexation rapide, -requ\^etes arbitraires, et s\'ecurit\'e. Bien que nous pr\'evoyions de -supporter d'autres bases de donn\'ees SQL majeures, l'impl\'ementation -actuelle s'interface seulement avec MySQL, PostgreSQL, et SQLite. Pour plus -de d\'etails consultez le -\ilink{document sur la conception des Services Catalogue -}{_ChapterStart30}. - -Les RPMs pour MySQL et PostgreSQL font partie de la distribution Red Hat. -Sinon, il est tout \`a fait ais\'e de les construire \`a partir des sources. -Consultez le chapitre -\ilink{ Installer et configurer MySQL}{_ChapterStart} ou -\ilink{ Installer et configurer PostgreSQL}{_ChapterStart10} de -ce document pour plus de d\'etails. Pour plus d'informations sur MySQL et -PostgreSQL, consultez -\elink{www.mysql.com}{http://www.mysql.com} ou -\elink{www.postgresql.org}{http://www.postgresql.org}. - -Configurer et construire SQLite est encore plus facile. Pour les d\'etails de -configuration de SQLite, consultez le chapitre -\ilink{Installer et Configurer SQLite}{_ChapterStart33} de ce -document. -\item - \label{MonDef} - Le service {\bf Bacula Monitor} est le programme qui permet \`a -l'administrateur ou \`a l'utilisateur de contr\^oler le statut des {\it -daemons} Bacula ({\bf Bacula Directors}, {\bf Bacula File Daemons} et {\bf -Bacula Storage Daemons}) (voir ci-dessus). Actuellement, la seule version -disponible est une version GTK+, qui fonctionne avec Gnome et KDE (ainsi que -tout gestionnaire de fen\^etre qui respecte le standard system tray -FreeDesktop.org). -\end{itemize} - -Pour r\'ealiser avec succ\`es les op\'erations de sauvegarde et restauration, -les quatre services suivants doivent \^etre configur\'es et lanc\'es : le -Director Daemon, le File Daemon, le Storage Daemon et MySQL, PostgreSQL ou -SQLite. - -\section{Configuration de Bacula} -\index[general]{Configuration de Bacula } -\index[general]{Bacula!Configuration de } -\addcontentsline{toc}{section}{Configuration de Bacula} - -Pour que Bacula comprenne votre syst\`eme, quels clients vous voulez -sauvegarder et comment, vous devez cr\'eer un certain nombre de fichiers de -configuration. La suite brosse un tableau de ces op\'erations. - -\includegraphics{./bacula-objects.eps} - -\section{Conventions utilis\'ees dans ce document} -\index[general]{Conventions utilis\'ees dans ce document } -\index[general]{Document!Conventions utilis\'ees dans ce } -\addcontentsline{toc}{section}{Conventions utilis\'ees dans ce document} - -{\bf Bacula} est en constante \'evolution, par cons\'equent, ce manuel ne sera -pas toujours en accord avec le code. Si un objet de ce manuel est -pr\'ec\'ed\'e d'un ast\'erisque (*), cela signifie que cette fonctionnalit\'e -particuli\`ere n'est pas impl\'ement\'ee. S'il est pr\'ec\'ed\'e d'un signe -plus (+), cela indique que la fonction est peut-\^etre partiellement -impl\'ement\'ee. - -Si vous lisez la version de ce manuel fournie avec les sources de Bacula, le -paragraphe ci-dessus reste vrai. En revanche, si vous lisez la version en -ligne : -\elink{www.bacula.org/manual}{http://www.bacula.org/manual}, veuillez garder -\`a l'esprit que cette version d\'ecrit la version courante de d\'eveloppement -de Bacula (celle du CVS) qui peut contenir des fonctionnalit\'es qui -n'existent pas dans la version "officielle". De m\^eme, il est -g\'en\'eralement un peu \`a la tra{\^\i}ne derri\`ere le code. - -\section{D\'emarrage rapide} -\index[general]{D\'emarrage rapide } -\index[general]{Rapide!D\'emarrage } -\addcontentsline{toc}{section}{D\'emarrage rapide} - -Pour faire fonctionner Bacula rapidement, nous vous recommandons de commencer -par parcourir la section Terminologie ci-dessous, de passer rapidement en -revue le chapitre suivant intitul\'e -\ilink{L'\'etat actuel de Bacula}{_ChapterStart2}, puis le -\ilink{Guide de d\'emarrage rapide de Bacula}{_ChapterStart37}, -qui vous donnera une vue d'ensemble de la mise en oeuvre de Bacula . Apr\`es -quoi vous devriez poursuivre avec le chapitre sur -\ilink{ L'installation de Bacula}{_ChapterStart17}, puis le chapitre -\ilink{Comment configurer Bacula}{_ChapterStart16}, et finalement, -le chapitre \ilink{Ex\'ecuter Bacula}{_ChapterStart1}. - -\section{Terminologie} -\index[general]{Terminologie } -\addcontentsline{toc}{section}{Terminologie} - -Pour faciliter la communication autour de ce projet, nous fournissons ici les -d\'efinitions de la terminologie que nous utilisons. - -\begin{description} - -\item [Administrateur] - \index[sd]{Administrateur } - La ou les personne(s) responsable(s) de l'administration du syst\`eme Bacula. - - -\item [Sauvegarde] - \index[sd]{Sauvegarde } - Nous utilisons ce terme pour un job Bacula qui sauvegarde des fichiers. - -\item [Fichier Bootstrap (Bootstrap File)] - \index[sd]{Fichier Bootstrap (Bootstrap File) } - Le bootstrap est un fichier ASCII qui contient, sous une forme compacte, les -commandes qui permettent \`a Bacula ou \`a l'utilitaire autonome {\bf -bextract} de restaurer les contenus d'un ou plusieurs volumes, par exemple, -l'\'etat courant d'un syst\`eme qui vient d'\^etre sauvegard\'e. Avec un -fichier bootstrap, Bacula peut restaurer votre syst\`eme sans catalogue. Vous -pouvez cr\'eer un fichier bootstrap depuis un catalogue pour extraire le -fichier que vous voulez. - -\item [Catalogue] - \index[sd]{Catalogue } - Le catalogue est utilis\'e pour stocker des informations sommaires concernant -les Jobs et Clients, les fichiers qui ont \'et\'e sauvegard\'es ainsi que le -ou les volume(s) o\`u ils ont \'et\'e sauvegard\'es. L'information stock\'ee -dans le catalogue permet \`a l'administrateur ou aux utilisateurs de -d\'eterminer quels jobs ont \'et\'e ex\'ecut\'es, leur statut, ainsi que -d'importantes caract\'eristiques de chaque fichier sauvegard\'e. Le catalogue -est une ressource en ligne, mais ne contient pas les donn\'ees pour les -fichiers sauvegard\'es. La plupart des informations stock\'ees dans le -catalogue le sont aussi sur les volumes de sauvegarde (i.e. cartouches). Bien -sur, les cartouches auront aussi une copie du fichier en plus de ses attributs - (voir ci-dessus). - -La fonction Catalogue est de celles qui distinguent Bacula de simples -programmes de sauvegarde et archivage tels que {\bf dump} et {\bf tar}. - -\item [Client] - \index[sd]{Client } - Dans la terminologie de Bacula, le mot Client d\'esigne une machine -sauvegard\'ee, et est synonyme de File service ou File Daemon. Nous nous y -r\'ef\'erons assez souvent par "le FD". Un client est d\'efini dans une -ressource de fichier de configuration. - -\item [Console] - \index[sd]{Console } - Le programme qui interface le Director, permettant \`a l'administrateur de -contr\^oler Bacula. - -\item [Daemon] - \index[sd]{Daemon } - Terminologie Unix pour un programme toujours pr\'esent en arri\`ere plan pour -prendre en charge une t\^ache donn\'ee. Sur les syst\`emes Windows, ainsi que -certains Linux, les {\it daemons} sont appel\'es {\bf Services}. - -\item [Directive] - \index[sd]{Directive } - Le terme directive est utilis\'e pour d\'esigner une entr\'ee ou -enregistrement \`a l'int\'erieur d'une ressource dans un fichier de -configuration qui d\'efinit un \'el\'ement sp\'ecifique. Par exemple, la -directive {\bf Name} d\'efinit le nom de la ressource. - -\item [Director] - \index[sd]{Director } - Le principal {\it daemon} serveur de Bacula qui planifie et dirige toutes -les op\'erations de Bacula. Occasionnellement, nous le d\'esignons par "le -DIR". - -\item [Differentielle (Differential)] - \index[sd]{Differentielle (Differential) } - Une sauvegarde qui inclut tous les fichiers modifi\'es depuis le lancement de -la derni\`ere sauvegarde compl\`ete (Full). Notez que d'autres logiciels de -sauvegarde peuvent d\'efinir ceci diff\'eremment. - -\item [Attributs de fichiers] - \index[sd]{Attributs de fichiers } - Les Attributs de fichiers sont toutes les informations n\'ecessaires au sujet -d'un fichier pour l'identifier, et toutes ses propri\'et\'es telles taille, -date de cr\'eation, date de modification, permission, etc. En principe, les -attributs sont int\'egralement manipul\'es par Bacula de sorte que -l'utilisateur n'a jamais \`a s'en pr\'eoccuper. Les attributs n'incluent pas -les donn\'ees du fichier. - -\item [File Daemon] - \index[sd]{File Daemon } - Le {\it daemon} ex\'ecut\'e sur l'ordinateur client \`a sauvegarder. Il est -aussi d\'esign\'e par Service Fichier (File Service) et parfois Service Client -ou FD. - -\item [ - \label{FileSetDef} - FileSet] -\index[sd]{a name } -Un FileSet est une ressource d'un fichier de configuration qui d\'efinit les -fichiers \`a sauvegarder. Il consiste en une liste de fichiers ou -r\'epertoires inclus, une liste de fichiers ou r\'epertoires exclus et la -fa\c{c}on dont les fichiers seront stock\'es (compression, chiffrement, -signatures). Pour plus de d\'etails consultez le paragraphe -\ilink{D\'efinition de la Ressource FileSet}{FileSetResource} -dans le chapitre Director de ce document. - -\item [Incrementale] - \index[sd]{Incrementale } - Une sauvegarde qui inclut tous les fichiers modifi\'es depuis le lancement de -la derni\`ere sauvegarde compl\`ete (Full), diff\'erentielle, ou -incr\'ementale. Normalement sp\'ecifi\'e dans la directive {\bf Level} -(niveau) dans la d\'efinition de la ressource Job, ou dans une ressource -Schedule. - -\item [ - \label{JobDef} - Job] -\index[sd]{a name } -Un Job Bacula est une ressource de configuration qui d\'efinit le travail que -Bacula doit effectuer pour sauvegarder ou restaurer un client particulier. Un -Job consiste en un {\bf Type}, (Type : backup, restore, verify, etc.), un -{\bf Niveau} (Level : full, incremental, ...), un {\bf FileSet}, et un lieu de -{\bf Stockage} o\`u \'ecrire les fichiers (Storage device, Media Pool). Pour -plus de d\'etails consultez le chapitre -\ilink{D\'efinition des Ressources Job}{JobResource} de ce -document. - -\item [Monitor] - \index[sd]{Monitor } - Le programme qui s'interface avec chacun des {\it daemons} pour permettre \`a -l'utilisateur ou \`a l'administrateur de surveiller le statut de Bacula. - -\item [Resource] - \index[sd]{Resource } - Une ressource est une partie d'un fichier de configuration qui d\'efinit une -unit\'e sp\'ecifique d'information disponible pour Bacula. Par exemple, la -ressource {\bf Job} d\'efinit toutes les propri\'et\'es d'un Job sp\'ecifique -: nom, schedule (planification), volume pool, type de sauvegarde, niveau de -sauvegarde, etc. - -\item [Restore] - \index[sd]{Restore } - Une Restore est une ressource de configuration qui d\'ecrit l'op\'eration de -restauration d'un fichier (perdu ou endommag\'e) depuis un medium de -sauvegarde. C'est l'op\'eration r\'eciproque d'une sauvegarde, sauf que, dans -la plupart des cas, une restauration concernera un petit ensemble de fichiers -tandis qu'une sauvegarde concerne le plus souvent l'ensemble des fichiers -d'un syst\`eme. Bien sur, apr\`es une d\'efaillance de disque(s), Bacula peut -\^etre appel\'e \`a effectuer une restauration compl\`ete de tous les -fichiers qui \'etaient sur le syst\`eme. - -\item [Schedule] - \index[sd]{Schedule } - Un Schedule est une ressource de configuration qui d\'efinit le moment de -l'ex\'ecution du Job Bacula. Pour utiliser un schedule, la ressource Job se -r\'ef\`ere au nom du Schedule. Pour plus de d\'etails, consultez la -\ilink{D\'efinition de la ressource Schedule}{ScheduleResource} -dans le chapitre Director de ce document. - -\item [Service] - \index[sd]{Service } - Terminologie Windows pour d\'esigner un {\it daemon} -- Voir plus haut. Elle -est maintenant fr\'equemment utilis\'ee dans les environnements Unix aussi. - -\item [Adresses de stockage] - \index[sd]{Adresses de stockage } - Les informations retourn\'ees par les Storage services qui localisent de -fa\c{c}on unique les fichiers sur un medium de sauvegarde. Elles consistent -en deux parties : l'une appartient \`a chaque fichier sauvegard\'e, l'autre -\`a l'ensemble du Job. Normalement, cette information est sauvegard\'ee dans -le catalogue de sorte que l'utilisateur n'a pas besoin de connaissances -particuli\`eres des adresses de stockage. L'adresse de stockage inclut les -attributs de fichiers (voir plus haut) ainsi que la localisation unique de -l'information sur le volume de sauvegarde. - -\item [Storage Daemon] - \index[sd]{Storage Daemon } - Le Storage Daemon, parfois d\'esign\'e par "SD" est le programme qui -\'ecrit les attributs et les donn\'ees sur un Volume de Stockage (Storage -Volume) (Usuellement une cartouche ou un disque). - -\item [Session] - \index[sd]{Session } - D\'esigne en principe le dialogue interne entre le File Daemon et le Storage -Daemon. Le File Daemon ouvre une {\bf session} avec le Storage Daemon pour -sauvegarder un Fileset, ou pour le restaurer. Une session est associ\'ee \`a -un et un seul Job Bacula (voir plus haut). - -\item [Verify] - \index[sd]{Verify } - Il s'agit d'un job qui compare les attributs du fichier actuel aux attributs -qui ont \'et\'e pr\'ealablement stock\'es dans le catalogue Bacula. Cette -fonction peut \^etre utilis\'ee pour d\'etecter les modifications de -syst\`emes de fichiers critiques, \`a la fa\c{c}on de {\bf Tripwire}. L'un -des avantages majeurs de l'utilisation de Bacula pour cette t\^ache est que -sur la machine que vous voulez prot\'eger, vous pouvez n'ex\'ecuter que le -File Daemon. Le Director, le Storage Daemon et le catalogue peuvent r\'esider -sur une autre machine. Par cons\'equent si votre serveur est un jour -compromis, il est peu probable que la base de donn\'ees de v\'erification ait -\'et\'e trifouill\'ee. - -Verify peut aussi \^etre utilis\'e pour s'assurer que les donn\'ees les plus -r\'ecemment \'ecrites sur un volume sont coh\'erentes avec ce qui figure dans -le catalogue (c-\`a-d il compare les attributs de fichiers), ou encore, -confronter le contenu du volume aux fichiers originaux sur le disque. - -\item [*Archive] - \index[sd]{*Archive } - Une op\'eration d'archivage est effectu\'ee apr\`es une sauvegarde, et -consiste en l'exclusion des volumes sur lesquels les donn\'ees sont -sauvegard\'ees de l'utilisation courante. Ces volumes sont marqu\'es -"Archived", et ne sont plus utilis\'es pour sauvegarder des fichiers. Tous -les fichiers contenus sur un Volume Archive sont supprim\'es du catalogue. -PAS ENCORE IMPLEMENTE. - -\item [*Update] - \index[sd]{*Update } - Une op\'eration Update synchronise les fichiers du syst\`eme distant sur ceux -du local. Ceci est l'\'equivalent d'une fonctionnalit\'e {\bf rdist}. PAS -ENCORE IMPLEMENTE. - -\item [P\'eriode de r\'etention] - \index[sd]{P\'eriode de r\'etention } - Bacula reconnait plusieurs sortes de p\'eriodes de r\'etention. Les plus -importantes sont la p\'eriode de r\'etention des fichiers, la p\'eriode de -r\'etention des jobs et la p\'eriode de r\'etention des volumes. Chacune de -ces p\'eriodes de r\'etention d\'esigne la dur\'ee pendant laquelle -l'enregistrement sp\'ecifique sera conserv\'e dans le catalogue. Ceci ne doit -pas \^etre confondu avec le temps pendant lequel les donn\'ees sauvegard\'ees -sur un volume sont valides. - -La p\'eriode de r\'etention des fichiers d\'etermine la dur\'ee pendant -laquelle les enregistrements concernant les fichiers seront gard\'es dans le -catalogue. Cette p\'eriode est importante car le volume des enregistrements -relatifs aux fichiers occupe, de loin, le plus d'espace dans la base de -donn\'ees. Par cons\'equent, vous devez vous assurer qu'un "\'elagage" -(NDT : pruning) r\'egulier de ces enregistrements est effectu\'e. (Voir la -commande {\bf retention} de la Console pour plus de d\'etails sur ce sujet). - -La p\'eriode de r\'etention des jobs est la dur\'ee pendant laquelle les -enregistrements relatifs aux jobs seront conserv\'es dans le catalogue. Notez -que tous les enregistrements relatifs aux fichiers sont attach\'es aux jobs -qui ont sauvegard\'e ces fichiers. Les enregistrements relatifs aux fichiers -peuvent \^etre purg\'es tout en conservant ceux relatifs aux jobs. Dans ce -cas, l'information concernant les jobs ex\'ecut\'es restera disponible, mais -pas les d\'etails des fichiers sauvegard\'es. Normalement, lorsqu'un job est -purg\'e, tous les enregistrements concernant les fichiers qu'il a -sauvegard\'e le sont aussi. - -La p\'eriode de r\'etention des volumes est la -dur\'ee minimale de conservation d'un volume avant qu'il ne soit -r\'eutilis\'e. Bacula n'effacera, en principe, jamais un volume qui contient -la seule copie de sauvegarde d'un fichier. Dans les conditions id\'eales, le -catalogue maintiendrait les entr\'ees pour tous les fichiers sauvegard\'es -pour tous les volumes courants. Une fois qu'un volume est \'ecras\'e, les -fichiers qui \'etaient sauvegard\'es dessus sont automatiquement effac\'es du -catalogue. Cependant, s'il y a un tr\`es gros pool de volumes ou si un volume -n'est jamais \'ecras\'e, le catalogue pourrait devenir \'enorme. Pour -maintenir le catalogue dans des proportions g\'erables, les informations de -sauvegarde devraient \^etre supprim\'ees apr\`es une p\'eriode de r\'etention -des fichiers d\'efinie. - -\item [Scan] - \index[sd]{Scan } - Une op\'eration de scan consiste en un balayage du contenu d'un volume ou -d'une s\'erie de volumes. Ces volumes et les informations concernant les -fichiers qu'ils contiennent sont restaur\'es vers le catalogue Bacula. Une -fois ces informations restaur\'ees, les fichiers sauvegard\'es sur ces -volumes pourront \^etre ais\'ement restaur\'es. Cette fonction est -particuli\`erement utile si certains volumes ou jobs ont d\'epass\'e leur -p\'eriode de r\'etention et ont \'et\'e \'elagu\'es ou purg\'es du -catalogue. Le balayage des donn\'ees des volumes est effectu\'e en utilisant -le programme {\bf bscan}. Consultez la -\ilink{section bscan }{bscan} du chapitre sur les utilitaires -Bacula de ce manuel pour plus de d\'etails. - -\item [Volume] - \index[sd]{Volume } - Un volume est une unit\'e d'archivage, usuellement une cartouche ou un -fichier nomm\'e sur disque o\`u Bacula stocke les donn\'ees pour un ou -plusieurs jobs de sauvegarde. Tous les volumes Bacula ont un label unique -(logiciel) \'ecrit sur le volume par Bacula afin qu'il puisse \^etre assur\'e de -lire le bon volume. (En principe, il ne devrait pas y avoir de -confusion avec des fichiers disques, mais avec des cartouches, il est facile -de monter la mauvaise). -\end{description} - -\section{Ce que Bacula n'est pas} -\index[general]{Ce que Bacula n'est pas } -\index[general]{Pas!Ce que Bacula n'est } -\addcontentsline{toc}{section}{Ce que Bacula n'est pas} - -{\bf Bacula} est un programme de sauvegarde, restauration et v\'erification, -ce n'est pas un syst\`eme complet de disaster recovery -\label{c} -\`a lui seul, mais il peut en \^etre une partie clef si vous planifiez -soigneusement et suivez les instructions incluses dans le chapitre -\ilink{ Plan de reprise d'activit\'e avec Bacula}{_ChapterStart38} de -ce manuel. - -Avec la planification appropri\'ee, telle que d\'ecrite dans le chapitre sur le -plan de reprise d'activit\'e, {\bf Bacula} peut devenir la pi\`ece centrale de -votre plan de reprise d'activit\'e. Par exemple, si vous avez cr\'e\'e un(e) -disque(tte) boot d'urgence et un(e) disque(tte) de secours Bacula pour -sauvegarder les informations de partitionnement courantes de votre disque dur, -et maintenu un jeu de sauvegardes complet de votre syst\`eme, il est possible -de reconstruire compl\`etement votre syst\`eme "depuis le m\'etal brut" -(NDT : From bare metal) -\label{d1} -. - -Si vous avez utilis\'e la directive {\bf WriteBootstrap} dans votre job ou -quelque autre moyen pour sauvegarder un fichier bootstrap valide, vous pourrez -l'utiliser pour extraire les fichiers n\'ecessaires (sans utiliser le -catalogue et sans chercher manuellement les fichiers \`a restaurer). - -\section{Interactions entre les services Bacula} -\index[general]{Bacula!Interactions entre les services } -\index[general]{Interactions entre les services Bacula } -\addcontentsline{toc}{section}{Interactions entre les services Bacula} - -Le diagramme fonctionnel suivant montre les interactions typiques entre les -services Bacula pour un job de type sauvegarde. Chaque bloc repr\'esente en -g\'en\'eral un processus s\'epar\'e (normalement un {\it daemon}). En -g\'en\'eral, le director surveille le flux d'informations. Il maintient aussi -le catalogue. \includegraphics{./flow.eps} diff --git a/docs/manuals/fr/concepts/projects.tex b/docs/manuals/fr/concepts/projects.tex deleted file mode 100644 index f118e791..00000000 --- a/docs/manuals/fr/concepts/projects.tex +++ /dev/null @@ -1,28 +0,0 @@ -%% -%% - -\chapter{Bacula Projects} -\label{ProjectsChapter} -\index[general]{Projects!Bacula } -\index[general]{Bacula Projects } - -Once a new major version of Bacula is released, the Bacula -users will vote on a list of new features. This vote is used -as the main element determining what new features will be -implemented for the next version. Generally, the development time -for a new release is between four to nine months. Sometimes it may be -a bit longer, but in that case, there will be a number of bug fix -updates to the currently released version. - -For the current list of project, please see the projects page in the CVS -at: \elink{http://cvs.sourceforge.net/viewcvs.py/*checkout*/bacula/bacula/projects} -{http://cvs.sourceforge.net/viewcvs.py/*checkout*/bacula/bacula/projects} -see the {\bf projects} file in the main source directory. The projects -file is updated approximately once every six months. - -Separately from the project list, Kern maintains a current list of -tasks as well as ideas, feature requests, and occasionally design -notes. This list is updated roughly weekly (sometimes more often). -For a current list of tasks you can see {\bf kernstodo} in the Source Forge -CVS at \elink{http://cvs.sourceforge.net/viewcvs.py/*checkout*/bacula/bacula/kernstodo} -{http://cvs.sourceforge.net/viewcvs.py/*checkout*/bacula/bacula/kernstodo}. diff --git a/docs/manuals/fr/concepts/python.tex b/docs/manuals/fr/concepts/python.tex deleted file mode 100644 index 40e1b2e0..00000000 --- a/docs/manuals/fr/concepts/python.tex +++ /dev/null @@ -1,479 +0,0 @@ -%% -%% - -\chapter{Python Scripting} -\label{PythonChapter} -\index[general]{Python Scripting} -\index[general]{Scripting!Python} - -You may be asking what Python is and why a scripting language is -needed in Bacula. The answer to the first question is that Python -is an Object Oriented scripting language with features similar -to those found in Perl, but the syntax of the language is much -cleaner and simpler. The answer to why have scripting in Bacula is to -give the user more control over the whole backup process. Probably -the simplest example is when Bacula needs a new Volume name, with -a scripting language such as Python, you can generate any name -you want, based on the current state of Bacula. - -\section{Python Configuration} -\index[general]{Python Configuration} -\index[general]{Configuration!Python} - -Python must be enabled during the configuration process by adding -a \verb:--:with-python, and possibly specifying an alternate -directory if your Python is not installed in a standard system -location. If you are using RPMs you will need the python-devel package -installed. - -When Python is configured, it becomes an integral part of Bacula and -runs in Bacula's address space, so even though it is an interpreted -language, it is very efficient. - -When the Director starts, it looks to see if you have a {\bf -Scripts Directory} Directive defined (normal default {\bf -/etc/bacula/scripts}, if so, it looks in that directory for a file named -{\bf DirStartUp.py}. If it is found, Bacula will pass this file to Python -for execution. The {\bf Scripts Directory} is a new directive that you add -to the Director resource of your bacula-dir.conf file. - -Note: Bacula does not install Python scripts by default because these -scripts are for you to program. This means that with a default -installation with Python enabled, Bacula will print the following error -message: - -\begin{verbatim} -09-Jun 15:14 bacula-dir: ERROR in pythonlib.c:131 Could not import -Python script /etc/bacula/scripts/DirStartUp. Python disabled. -\end{verbatim} - -The source code directory {\bf examples/python} contains sample scripts -for DirStartUp.py, SDStartUp.py, and FDStartUp.py that you might want -to use as a starting point. Normally, your scripts directory (at least -where you store the Python scripts) should be writable by Bacula, because -Python will attempt to write a compiled version of the scripts (e.g. -DirStartUp.pyc) back to that directory. - -When starting with the sample scripts, you can delete any part that -you will not need, but you should keep all the Bacula Event and Job Event -definitions. If you do not want a particular event, simply replace the -existing code with a {\bf noop = 1}. - -\section{Bacula Events} -\index[general]{Bacula Events} -\index[general]{Events} -A Bacula event is a point in the Bacula code where Bacula -will call a subroutine (actually a method) that you have -defined in the Python StartUp script. Events correspond -to some significant event such as a Job Start, a Job End, -Bacula needs a new Volume Name, ... When your script is -called, it will have access to all the Bacula variables -specific to the Job (attributes of the Job Object), and -it can even call some of the Job methods (subroutines) -or set new values in the Job attributes, such as the -Priority. You will see below how the events are used. - -\section{Python Objects} -\index[general]{Python Objects} -\index[general]{Objects!Python} - -There are four Python objects that you will need to work with: -\begin{description} -\item [The Bacula Object] - The Bacula object is created by the Bacula daemon (the Director - in the present case) when the daemon starts. It is available to - the Python startup script, {\bf DirStartup.py}, by importing the - Bacula definitions with {\bf import bacula}. The methods - available with this object are described below. - -\item [The Bacula Events Class] - You create this class in the startup script, and you pass - it to the Bacula Object's {\bf set\_events} method. The - purpose of the Bacula Events Class is to define what global - or daemon events you want to monitor. When one of those events - occurs, your Bacula Events Class will be called at the method - corresponding to the event. There are currently three events, - JobStart, JobEnd, and Exit, which are described in detail below. - -\item [The Job Object] - When a Job starts, and assuming you have defined a JobStart method - in your Bacula Events Class, Bacula will create a Job Object. This - object will be passed to the JobStart event. The Job Object has a - has good number of read-only members or attributes providing many - details of the Job, and it also has a number of writable attributes - that allow you to pass information into the Job. These attributes - are described below. - -\item [The Job Events Class] - You create this class in the JobStart method of your Bacula Events - class, and it allows you to define which of the possible Job Object - events you want to see. You must pass an instance of your Job Events - class to the Job Object set\_events() method. - Normally, you will probably only have one - Job Events Class, which will be instantiated for each Job. However, - if you wish to see different events in different Jobs, you may have - as many Job Events classes as you wish. -\end{description} - - -The first thing the startup script must do is to define what global Bacula -events (daemon events), it wants to see. This is done by creating a -Bacula Events class, instantiating it, then passing it to the -{\bf set\_events} method. There are three possible -events. - -\begin{description} -\item [JobStart] - \index[dir]{JobStart} - This Python method, if defined, will be called each time a Job is started. - The method is passed the class instantiation object as the first argument, - and the Bacula Job object as the second argument. The Bacula Job object - has several built-in methods, and you can define which ones you - want called. If you do not define this method, you will not be able - to interact with Bacula jobs. - -\item [JobEnd] - This Python method, if defined, will be called each time a Job terminates. - The method is passed the class instantiation object as the first argument, - and the Bacula Job object as the second argument. - -\item [Exit] - This Python method, if defined, will be called when the Director terminates. - The method is passed the class instantiation object as the first argument. -\end{description} - -Access to the Bacula variables and methods is done with: - - import bacula - -The following are the read-only attributes provided by the bacula object. -\begin{description} -\item [Name] -\item [ConfigFile] -\item [WorkingDir] -\item [Version] string consisting of "Version Build-date" -\end{description} - - -A simple definition of the Bacula Events Class might be the following: - -\footnotesize -\begin{verbatim} -import sys, bacula -class BaculaEvents: - def JobStart(self, job): - ... -\end{verbatim} -\normalsize - -Then to instantiate the class and pass it to Bacula, you -would do: - -\footnotesize -\begin{verbatim} -bacula.set_events(BaculaEvents()) # register Bacula Events wanted -\end{verbatim} -\normalsize - -And at that point, each time a Job is started, your BaculaEvents JobStart -method will be called. - -Now to actually do anything with a Job, you must define which Job events -you want to see, and this is done by defining a JobEvents class containing -the methods you want called. Each method name corresponds to one of the -Job Events that Bacula will generate. - -A simple Job Events class might look like the following: - -\footnotesize -\begin{verbatim} -class JobEvents: - def NewVolume(self, job): - ... -\end{verbatim} -\normalsize - -Here, your JobEvents class method NewVolume will be called each time -the Job needs a new Volume name. To actually register the events defined -in your class with the Job, you must instantiate the JobEvents class and -set it in the Job {\bf set\_events} variable. Note, this is a bit different -from how you registered the Bacula events. The registration process must -be done in the Bacula JobStart event (your method). So, you would modify -Bacula Events (not the Job events) as follows: - -\footnotesize -\begin{verbatim} -import sys, bacula -class BaculaEvents: - def JobStart(self, job): - events = JobEvents() # create instance of Job class - job.set_events(events) # register Job events desired - ... -\end{verbatim} -\normalsize - -When a job event is triggered, the appropriate event definition is -called in the JobEvents class. This is the means by which your Python -script or code gets control. Once it has control, it may read job -attributes, or set them. See below for a list of read-only attributes, -and those that are writable. - -In addition, the Bacula {\bf job} object in the Director has -a number of methods (subroutines) that can be called. They -are: -\begin{description} -\item [set\_events] The set\_events method takes a single - argument, which is the instantiation of the Job Events class - that contains the methods that you want called. The method - names that will be called must correspond to the Bacula - defined events. You may define additional methods but Bacula - will not use them. -\item [run] The run method takes a single string - argument, which is the run command (same as in the Console) - that you want to submit to start a new Job. The value - returned by the run method is the JobId of the job that - started, or -1 if there was an error. -\item [write] The write method is used to be able to send - print output to the Job Report. This will be described later. -\item[cancel] The cancel method takes a single integer argument, - which is a JobId. If JobId is found, it will be canceled. -\item [DoesVolumeExist] The DoesVolumeExist method takes a single - string argument, which is the Volume name, and returns - 1 if the volume exists in the Catalog and 0 if the volume - does not exist. -\end{description} - -The following attributes are read/write within the Director -for the {\bf job} object. - -\begin{description} -\item [Priority] Read or set the Job priority. - Note, that setting a Job Priority is effective only before - the Job actually starts. -\item [Level] This attribute contains a string representing the Job - level, e.g. Full, Differential, Incremental, ... if read. - The level can also be set. -\end{description} - -The following read-only attributes are available within the Director -for the {\bf job} object. - -\begin{description} -\item [Type] This attribute contains a string representing the Job - type, e.g. Backup, Restore, Verify, ... -\item [JobId] This attribute contains an integer representing the - JobId. -\item [Client] This attribute contains a string with the name of the - Client for this job. -\item [NumVols] This attribute contains an integer with the number of - Volumes in the Pool being used by the Job. -\item [Pool] This attribute contains a string with the name of the Pool - being used by the Job. -\item [Storage] This attribute contains a string with the name of the - Storage resource being used by the Job. -\item [Catalog] This attribute contains a string with the name of the - Catalog resource being used by the Job. -\item [MediaType] This attribute contains a string with the name of the - Media Type associated with the Storage resource being used by the Job. -\item [Job] This attribute contains a string containing the name of the - Job resource used by this job (not unique). -\item [JobName] This attribute contains a string representing the full - unique Job name. -\item [JobStatus] This attribute contains a single character string - representing the current Job status. The status may change - during execution of the job. It may take on the following - values: - \begin{description} - \item [C] Created, not yet running - \item [R] Running - \item [B] Blocked - \item [T] Completed successfully - \item [E] Terminated with errors - \item [e] Non-fatal error - \item [f] Fatal error - \item [D] Verify found differences - \item [A] Canceled by user - \item [F] Waiting for Client - \item [S] Waiting for Storage daemon - \item [m] Waiting for new media - \item [M] Waiting for media mount - \item [s] Waiting for storage resource - \item [j] Waiting for job resource - \item [c] Waiting for client resource - \item [d] Waiting on maximum jobs - \item [t] Waiting on start time - \item [p] Waiting on higher priority jobs - \end{description} - -\item [Priority] This attribute contains an integer with the priority - assigned to the job. -\item [CatalogRes] tuple consisting of (DBName, Address, User, - Password, Socket, Port, Database Vendor) taken from the Catalog resource - for the Job with the exception of Database Vendor, which is - one of the following: MySQL, PostgreSQL, SQLite, Internal, - depending on what database you configured. -\item [VolumeName] - After a Volume has been purged, this attribute will contain the - name of that Volume. At other times, this value may have no meaning. -\end{description} - -The following write-only attributes are available within the -Director: - -\begin{description} -\item [JobReport] Send line to the Job Report. -\item [VolumeName] Set a new Volume name. Valid only during the - NewVolume event. -\end{description} - -\section{Python Console Command} -\index[general]{Python Console Command} -\index[general]{Console Command!Python} - -There is a new Console command named {\bf python}. It takes -a single argument {\bf restart}. Example: -\begin{verbatim} - python restart -\end{verbatim} - -This command restarts the Python interpreter in the Director. -This can be useful when you are modifying the DirStartUp script, -because normally Python will cache it, and thus the -script will be read one time. - -\section{Debugging Python Scripts} -\index[general]{Debugging Python Scripts} -In general, you debug your Python scripts by using print statements. -You can also develop your script or important parts of it as a -separate file using the Python interpreter to run it. Once you -have it working correctly, you can then call the script from -within the Bacula Python script (DirStartUp.py). - -If you are having problems loading DirStartUp.py, you will probably -not get any error messages because Bacula can only print Python -error messages after the Python interpreter is started. However, you -may be able to see the error messages by starting Bacula in -a shell window with the {\bf -d1} option on the command line. That -should cause the Python error messages to be printed in the shell -window. - -If you are getting error messages such as the following when -loading DirStartUp.py: - -\begin{verbatim} - Traceback (most recent call last): - File "/etc/bacula/scripts/DirStartUp.py", line 6, in ? - import time, sys, bacula - ImportError: /usr/lib/python2.3/lib-dynload/timemodule.so: undefined - symbol: PyInt_FromLong - bacula-dir: pythonlib.c:134 Python Import error. -\end{verbatim} - -It is because the DirStartUp script is calling a dynamically loaded -module (timemodule.so in the above case) that then tries to use -Python functions exported from the Python interpreter (in this case -PyInt\_FromLong). The way Bacula is currently linked with Python does -not permit this. The solution to the problem is to put such functions -(in this case the import of time into a separate Python script, which -will do your calculations and return the values you want. Then call -(not import) this script from the Bacula DirStartUp.py script, and -it all should work as you expect. - - - - - -\section{Python Example} -\index[general]{Python Example} -\index[general]{Example!Python} - -An example script for the Director startup file is provided in -{\bf examples/python/DirStartup.py} as follows: - -\footnotesize -\begin{verbatim} -# -# Bacula Python interface script for the Director -# - -# You must import both sys and bacula -import sys, bacula - -# This is the list of Bacula daemon events that you -# can receive. -class BaculaEvents(object): - def __init__(self): - # Called here when a new Bacula Events class is - # is created. Normally not used - noop = 1 - - def JobStart(self, job): - """ - Called here when a new job is started. If you want - to do anything with the Job, you must register - events you want to receive. - """ - events = JobEvents() # create instance of Job class - events.job = job # save Bacula's job pointer - job.set_events(events) # register events desired - sys.stderr = events # send error output to Bacula - sys.stdout = events # send stdout to Bacula - jobid = job.JobId; client = job.Client - numvols = job.NumVols - job.JobReport="Python Dir JobStart: JobId=%d Client=%s NumVols=%d\n" % (jobid,client,numvols) - - # Bacula Job is going to terminate - def JobEnd(self, job): - jobid = job.JobId - client = job.Client - job.JobReport="Python Dir JobEnd output: JobId=%d Client=%s.\n" % (jobid, client) - - # Called here when the Bacula daemon is going to exit - def Exit(self, job): - print "Daemon exiting." - -bacula.set_events(BaculaEvents()) # register daemon events desired - -""" - These are the Job events that you can receive. -""" -class JobEvents(object): - def __init__(self): - # Called here when you instantiate the Job. Not - # normally used - noop = 1 - - def JobInit(self, job): - # Called when the job is first scheduled - noop = 1 - - def JobRun(self, job): - # Called just before running the job after initializing - # This is the point to change most Job parameters. - # It is equivalent to the JobRunBefore point. - noop = 1 - - def NewVolume(self, job): - # Called when Bacula wants a new Volume name. The Volume - # name returned, if any, must be stored in job.VolumeName - jobid = job.JobId - client = job.Client - numvol = job.NumVols; - print job.CatalogRes - job.JobReport = "JobId=%d Client=%s NumVols=%d" % (jobid, client, numvol) - job.JobReport="Python before New Volume set for Job.\n" - Vol = "TestA-%d" % numvol - job.JobReport = "Exists=%d TestA-%d" % (job.DoesVolumeExist(Vol), numvol) - job.VolumeName="TestA-%d" % numvol - job.JobReport="Python after New Volume set for Job.\n" - return 1 - - def VolumePurged(self, job): - # Called when a Volume is purged. The Volume name can be referenced - # with job.VolumeName - noop = 1 - - - -\end{verbatim} -\normalsize diff --git a/docs/manuals/fr/concepts/requirements.tex b/docs/manuals/fr/concepts/requirements.tex deleted file mode 100644 index e720635f..00000000 --- a/docs/manuals/fr/concepts/requirements.tex +++ /dev/null @@ -1,63 +0,0 @@ -%% -%% - -\chapter{Caract\'eristiques syst\`eme g\'en\'erales indispensables \`a Bacula} -\label{_ChapterStart51} -\index[general]{Caract\'eristiques syst\`eme g\'en\'erales indispensables \`a Bacula } -\index[general]{Bacula!Caract\'eristiques syst\`eme g\'en\'erales indispensables \`a } -\addcontentsline{toc}{section}{Caract\'eristiques syst\`eme g\'en\'erales indispensables \`a Bacula} - -\label{SysReqs} - -\section{Caract\'eristiques syst\`eme g\'en\'erales indispensables \`a Bacula} -\index[general]{Caract\'eristiques syst\`eme g\'en\'erales indispensables \`a Bacula } -\index[general]{Bacula!Caract\'eristiques syst\`eme g\'en\'erales indispensables \`a } -\addcontentsline{toc}{section}{Caract\'eristiques syst\`eme g\'en\'erales indispensables \`a Bacula} - -\begin{itemize} -\item {\bf Bacula} a \'et\'e compil\'e et ex\'ecut\'e sur les syst\`emes - Linux RedHat, Mandriva, SUSE, Debian et Gentoo, sur FreeBSD, et Solaris. -\item Il requiert GNU C++ version 2.95 ou sup\'erieur pour compiler. Vous - pouvez essayer avec d'autres compilateurs et des versions plus anciennes, mais - vous serez seuls. Nous avons compil\'e et utilis\'e avec succ\`es Bacula sur -RH8.0/RH9/RHEL 3.0 avec GCC 3.2. Note, en g\'en\'eral GNU C++ est un paquet -s\'epar\'e (e.g. RPM) de GNU C, et vous devrez avoir les deux. Sur les -syst\`emes RedHat, le compilateur C++ fait partie du paquet RPM {\bf -gcc-c++}. -\item Certains paquets tiers sont n\'ecessaires \`a {\bf Bacula}. - Except\'e pour MySQL et PostgreSQL, ils peuvent tous \^etre trouv\'es dans - les distributions {\bf depkgs} et {\bf depkgs1}. -\item Si vous voulez construire les binaires Win32, vous aurez besoin du - compilateur Microsoft Visual C++ (ou Visual Studio). Bien que tous les - composants compilent (la console produit quelques messages d'alertes), seul -le File Daemon a \'et\'e test\'e. -\item {\bf Bacula} requiert une bonne impl\'ementation fonctionnelle des - pthreads. Ce n'est pas le cas sur certains syst\`emes BSD. -\item Le code source a \'et\'e \'ecrit dans un esprit de portabilit\'e et est - le plus souvent compatible POSIX. Ainsi le portage sur chaque syst\`eme - d'exploitation compatible POSIX est relativement ais\'e. -\item Le programme GNOME Console est developp\'e et test\'e sous GNOME 2.X. - Il s'ex\'ecute aussi sous GNOME 1.4 mais cette version est d\'epr\'eci\'ee et - n'est plus maintenue. -\item Le programme wxWidgets Console est developp\'e et test\'e avec la - derni\`ere version stable de - \elink{ wxWidgets}{http://www.wxwidgets.org/} (2.4.2). Il fonctionne bien -avec la version Windows et GTK+-1.x de wxWidgets, ainsi que sur les autres -plateformes support\'ees par wxWidgets. -\item Le programme Tray Monitor est developp\'e pour GTK+-2.x. Il n\'ecessite - Gnome \gt{}=2.2, KDE \gt{}=3.1 ou un gestionnaire de fen\^etre supportant le - standard -\elink{systemtray}{http://www.freedesktop.org/Standards/systemtray-spec} de -FreeDesktop. -\item Si vous voulez permettre l'\'edition en ligne de commande et - l'historique, il vous faudra /usr/include/termcap.h et l'une des - biblioth\`eques termcap ou ncurses charg\'ee (libtermcap-devel ou -ncurses-devel). -\item Si vous voulez utiliser des DVD en guise de media de sauvegarde, vous devrez - t\'el\'echarger les \elink{dvd+rw-tools 5.21.4.10.8}{http://fy.chalmers.se/~appro/linux/DVD+RW/}, - appliquer le \elink{patch}{http://cvs.sourceforge.net/viewcvs.py/*checkout*/bacula/bacula/patches/dvd+rw-tools-5.21.4.10.8.bacula.patch} - pour rendre ces outils compatibles avec Bacula, puis les compiler et installer. - N'utilisez pas les dvd+rw-tools fournis par votre distribution, ils ne - fonctionneront pas avec Bacula. - -\end{itemize} diff --git a/docs/manuals/fr/concepts/restore.tex b/docs/manuals/fr/concepts/restore.tex deleted file mode 100644 index ea232f24..00000000 --- a/docs/manuals/fr/concepts/restore.tex +++ /dev/null @@ -1,1209 +0,0 @@ -%% -%% - -\chapter{La commande restore de la console Bacula} -\label{_ChapterStart13} -\index[general]{Commande!restore de la console Bacula} -\index[general]{La commande restore de la console Bacula} -\addcontentsline{toc}{section}{La commande restore de la console Bacula} - -\section{G\'en\'eralit\'es} -\index[general]{G\'en\'eralit\'es} -\addcontentsline{toc}{section}{G\'en\'eralit\'es} - -Nous allons maintenant d\'ecrire la restauration de fichiers avec la commande -{\bf restore} de la Console, qui est le mode de restauration recommand\'e. -Il existe cependant un programme ind\'ependant nomm\'e {\bf bextract}, qui permet -lui aussi de restaurer des fichiers. Pour plus d'informations sur ce -programme, consultez le chapitre \ilink{Programmes utilitaires Bacula}{bextract} -de ce manuel. Vous y trouverez aussi des informations sur le programme {\bf bls} -qui sert \`a produire une liste du contenu de vos volumes, et sur le programme -{\bf bscan} qui vous sera utilie si vous voulez restaurer les enregistrements -du catalogue relatifs \`a un ancien volume qui n'y figure plus. - -En g\'en\'eral, pour restaurer un fichier ou un ensemble de fichiers, vous devez -ex\'ecuter un job de type {\bf restore}, par cons\'equent, vous devez pr\'ed\'efinir -un tel job dans le fichier de configuration de votre Director. Les param\`etres -(Client, FileSet,...) que vous d\'efinissez ici ne sont pas importants, -Bacula les ajustera automatiquement lors de l'utilisation de {\bf restore}. - -Bacula \'etant un programme r\'eseau, il vous appartient de vous assurer que -vous avez s\'electionn\'e le bon client et le bon disque dur pour recevoir la -restauration. Bacula peut sauvegarder le client A et restaurer ses fichiers -sur le client B, pourvu que leurs syst\`emes ne soient pas trop diff\'erents -au niveau de leurs structures de fichiers. Par d\'efaut, Bacula restaure les -donn\'ees sur leur client d'origine, mais pas \`a leur emplacement d'origine : -dans le r\'epertoire {\bf /tmp/bacula-restores}. Vous pouvez modifier ces -valeurs par d\'efaut lorsque la commande {\bf restore} vous demande confirmation -d'ex\'ecution du job en choisissant l'option {\bf mod}. - -\label{Example1} -\section{La commande Restore} -\index[general]{Commande!Restore } -\index[general]{La commande Restore} -\addcontentsline{toc}{section}{La commande Restore} -Puisque Bacula maintient un catalogue des fichiers sauvegard\'es, et des volumes -o\`u ils sont stock\'es, il peut se charger de la majeure partie du travail -d'intendance. Ainsi, il vous suffit de sp\'ecifier le type de restauration que -vous souhaitez (d'apr\`es la derni\`ere sauvegarde, d'apr\`es la derni\`ere sauvegarde -ant\'erieure \`a une date sp\'ecifi\'ee...), et quels fichiers vous voulez restaurer. - -Ceci est r\'ealis\'e par la commande {\bf restore} de la Console. Vous s\'electionnez -d'abord le type de restauration souhait\'ee ce qui entra\^ine la s\'election des -JobIds requis et la construction d'une arborescence interne \`a Bacula contenant -les enregistrements de fichiers des JobIds s\'electionn\'es. A ce stade, le -processus de restauration entre dans un mode o\`u vous pouvez naviguer -interactivement dans l'arborescence des fichiers disponibles pour restauration -et s\'electionner ceux que vous voulez restaurer. Ce mode est similaire au -programme de s\'election de fichier interactif standard d'Unix {\bf restore}. - -Si vos fichiers ont \'et\'e \'elagu\'es, la commande {\bf restore} sera dans -l'incapacit\'e de les trouver. Voyez ci-dessous pour plus de d\'etails sur ce cas -de figure. - -Dans la Console, apr\`es avoir saisi {\bf restore}, le menu suivant vous est -pr\'esent\'e : - -\footnotesize -\begin{verbatim} -First you select one or more JobIds that contain files -to be restored. You will be presented several methods -of specifying the JobIds. Then you will be allowed to -select which files from those JobIds are to be restored. -To select the JobIds, you have the following choices: - 1: List last 20 Jobs run - 2: List Jobs where a given File is saved - 3: Enter list of comma separated JobIds to select - 4: Enter SQL list command - 5: Select the most recent backup for a client - 6: Select backup for a client before a specified time - 7: Enter a list of files to restore - 8: Enter a list of files to restore before a specified time - 9: Find the JobIds of the most recent backup for a client - 10: Find the JobIds for a backup for a client before a specified time - 11: Enter a list of directories to restore for found JobIds - 12: Cancel -Select item: (1-12): -\end{verbatim} -\normalsize - -\begin{itemize} -\item Le choix 1 \'enum\`ere les 20 derniers jobs ex\'ecut\'es. Si vous trouvez - celui (ceux) que vous voulez, vous pouvez ensuite faire le choix 3 et entrer - son (leurs) JobId(s). - -\item Le choix 2 affiche tous les Jobs ayant sauvegard\'e un fichier - sp\'ecifi\'e. Si vous trouvez celui (ceux) que vous voulez, vous pouvez ensuite - faire le choix 3 et entrer son (leurs) JobId(s). - -\item Le choix 3 vous permet de saisir une liste de JobIds, s\'epar\'es par des - virgules. Les fichiers de ces jobs seront plac\'es dans l'arborescence afin - que vous puissiez s\'electionner ceux que vous voulez restaurer. - -\item Le choix 4 vous permet d'entrer une requ\^ete SQL arbitraire. C'est - certainement le moyen le plus primitif pour trouver les jobs d\'esir\'es, - mais aussi le plus flexible. Si vous trouvez celui (ceux) que vous voulez, - vous pouvez ensuite faire le choix 3 et entrer son (leurs) JobId(s). - -\item Le choix 5 s\'electionne automatiquement la full la plus r\'ecente, et toutes - les incr\'ementales et diff\'erentielles subs\'equentes \`a cette full pour un - client sp\'ecifi\'e. Il s'agit l\`a des jobs et fichiers qui, si vous les - restaurez, ram\`eneront votre syst\`eme \`a son dernier \'etat sauvegard\'e. - Les JobIds sont automatiquement charg\'es dans l'arborescence. C'est - probablement le plus pratique des choix propos\'es pour restaurer un - client \`a son \'etat le plus r\'ecent. - - Notez que ce processus de s\'election automatique ne s\'electionnera jamais - un job qui a \'echou\'e (termin\'e avec un statut d'erreur). Si vous disposez - d'un tel job dont vous voulez extraire des fichiers, vous devez - eplicitement entrer son JobId au niveau du choix 3 et choisir les fichiers - \`a restaurer. - - Si certains de jobs requis pour la restauration ont eu leurs enregistrements - de fichiers \'elagu\'es, la restauration sera incompl\`ete. Bacula ne d\'etecte - pas, pour l'instant, cette condition. Vous pouvez cependant la - contr\^oler en examinant attentivement la liste des jobs s\'electionn\'es - et affich\'es par Bacula. Si vous trouvez des jobs dont le champ JobFiles - est \`a z\'ero alors que ces fichiers auraient d\^u \^etre sauvegard\'es, alors - vous pouvez vous attendre \`a des probl\`emes. - - Si tous les enregistrements de fichiers ont \'et\'e \'elagu\'es, Bacula constatera - qu'il n'y a aucune r\'ef\'erence \`a aucun fichier pour le JobIds s\'electionn\'es - et vous en informera, et vous proposera de faire une restauration compl\`ete - (non s\'elective) de ces JobIds. Ceci est possible car Bacula sait encore - o\`u commencent les donn\'ees sur les volumes, m\^eme s'il ne sait plus o\`u sont - les fichiers individuellement. - -\item Le choix 6 vous permet de sp\'ecifier une date et un heure. Bacula - s\'electionne alors automatiquement la plus r\'ecente full ant\'erieure \`a cette date - ainsi que les incr\'ementales et diff\'erentielles subs\'equentes \`a cette full et - ant\'erieures \`a cette date. - -\item Le choix 7 vous permet de sp\'ecifier un ou plusieurs noms de fichiers - (le chemin absolu est requis) \`a restaurer. Les noms de fichiers sont saisis - un par un, \`a moins que vous ne pr\'ef\'eriez cr\'eer un fichier pr\'efix\'e du - caract\`ere "moins" (\lt{}) que Bacula consid\`ere comme une liste de fichier - \`a restaurer. Pour quitter ce mode, entrez une ligne vide. - -\item Le choix 8 vous permet de sp\'ecifier une date et une heure avant - d'entrer les noms de fichiers. Voir le choix 7 pour plus de d\'etails. - -\item Le choix 9 vous permet de d\'eterminer les JobIds de la sauvegarde - la plus r\'ecente pour un client. C'est essentiellement la m\^eme chose - que le choix 5 (le m\^eme code est utilis\'e), mais ces JobIds sont - conserv\'es en interne comme si vous les aviez saisis manuellement. - Vous pouvez alors faire le choix 11 pour restaurer un ou plusieurs - r\'epertoires. - -\item Le choix 10 est le m\^eme que le 9, sauf qu'il vous permet d'entrer - une date butoir (comme pour le choix 6) pour la s\'election des JobIds. - Ces JobIds sont conserv\'es en interne comme si vous les aviez saisis manuellement. - -\index[general]{Restaurer des r\'epertoires} -\item Le choix 11 vous permet d'entrer une liste de JobIds \`a partir de - laquelle vous pouvez s\'electionner les r\'epertoires \`a restaurer. La liste de - JobIds peut avoir \'et\'e \'etablie pr\'ec\'edemment \`a l'aide des choix 9 ou 10 - du menu. Vous pouvez alors entrer le chemin absolu d'un r\'epertoire, ou - un nom de fichier pr\'efix\'e d'un signe "moins" (\lt{}) contenant la liste - des r\'epertoires \`a restaurer. Tous les fichiers des r\'epertoires s\'electionn\'es - seront restaur\'es, mais pas les sous-r\'epertoires, \`a moins que vous ne les - sp\'ecifiiez explicitement. - -\item Le choix 12 vous permet d'abandonner la restauration. -\end{itemize} - -A titre d'exemple, supposons que nous s\'electionnions l'option 5 (restaurer \`a -l'\'etat le plus r\'ecent). Bacula vous demande alors le client d\'esir\'e ce qui, -sur mon syst\`eme, se manifeste ainsi : - -\footnotesize -\begin{verbatim} -Defined clients: - 1: Rufus - 2: Matou - 3: Polymatou - 4: Minimatou - 5: Minou - 6: MatouVerify - 7: PmatouVerify - 8: RufusVerify - 9: Watchdog -Select Client (File daemon) resource (1-9): - -\end{verbatim} -\normalsize - -Si vous n'avez qu'un client, il est automatiquement s\'electionn\'e. Dans le cas -pr\'esent, j'entre {\bf Rufus} pour s\'electionner ce client. Bacula a -maintenant conna\^itre le FileSet \`a restaurer, aussi il affiche : - -\footnotesize -\begin{verbatim} -The defined FileSet resources are: - 1: Full Set - 2: Kerns Files -Select FileSet resource (1-2): - -\end{verbatim} -\normalsize - -J'opte pour le choix 1, ma sauvegarde full. En principe, vous n'aurez qu'un -FileSet pour chaque job, et si vos machines de ressemblent (m\^emes syst\`emes), -vous pouvez n'avoir qu'un seul FileSet pour tous vos clients. - -A ce stade, Bacula d\'etient toutes les informations dont il a besoin pour -trouver le jeu de sauvegardes le plus r\'ecent. Il va maintenant interroger le -cataloguie, ce qui peut prendre un peu de temps, et afficher quelque chose -comme : - -\footnotesize -\begin{verbatim} -+-------+------+----------+-------------+-------------+------+-------+---------- ---+ -| JobId | Levl | JobFiles | StartTime | VolumeName | File | SesId | -VolSesTime | -+-------+------+----------+-------------+-------------+------+-------+---------- ---+ -| 1,792 | F | 128,374 | 08-03 01:58 | DLT-19Jul02 | 67 | 18 | -1028042998 | -| 1,792 | F | 128,374 | 08-03 01:58 | DLT-04Aug02 | 0 | 18 | -1028042998 | -| 1,797 | I | 254 | 08-04 13:53 | DLT-04Aug02 | 5 | 23 | -1028042998 | -| 1,798 | I | 15 | 08-05 01:05 | DLT-04Aug02 | 6 | 24 | -1028042998 | -+-------+------+----------+-------------+-------------+------+-------+---------- ---+ -You have selected the following JobId: 1792,1792,1797 -Building directory tree for JobId 1792 ... -Building directory tree for JobId 1797 ... -Building directory tree for JobId 1798 ... -cwd is: / -$ -\end{verbatim} -\normalsize - -(Certaines colonnes sont tromqu\'ees pour des n\'ecessit\'es de mise en page). - -Selon le nombre de {\bf JobFiles} pour chaque JobId, la construction de -l'arborescence peut prendre un certain temps. Si vous constatez que tous les -JobFiles sont \`a z\'ero, vos fichiers ont probalement \'et\'e \'elagu\'es et vous ne -pourrez pas s\'electionner les fichiers individuellement : vous devrez -restaurer tout ou rien. - -Dans notre exemple, Bacula a trouv\'e quatre jobs qui comprennent la -sauvegarde la plus r\'ecente du client et du FileSet sp\'ecifi\'es. Deux des jobs -ont le m\^eme JobId car le job a \'ecrit sur deux volumes diff\'erents. Le -troisi\`eme est une incr\'ementale qui n'a sauvegard\'e que 254 fichier sur les -128 374 de la full. Le quatri\`eme est aussi une incr\'ementale, et n'a sauvegard\'e -que 15 fichiers. - -Maintenant Bacula ins\`ere ces jobs dans l'arborescence, sans en marquer aucun -pour restauration par d\'efaut. Il vous indique le nombre de fichiers dans -l'arbre, et vous informe que le r\'epertoire de travail courant ({\bf cwd}) est -/. Finalement, Bacula vous invite avec le signe (\$) \`a saisir des commandes -pour vous d\'eplacer dans l'arborescence, et s\'electionner des fichiers. - -Si vous voulez que tous les fichiers de l'arbre soient marqu\'es pour -restauration \`a sa construction, tapez {\bf restore all}. - -Plut\^ot que de choisir l'option 5 du premier menu (s\'electionner la -sauvegarde la plus r\'ecente pour un client), si nous avions choisi l'option 3 -(Entrer une liste de JobIds \`a s\'electionner), et si nous avions saisi -{\bf 1792,1797,1798}, nous serions arriv\'es au m\^eme point. - -Il faut noter un point si vous saisissez manuellement les JobIds : vous devez -les entrer dans l'ordre o\`u ils ont \'et\'e ex\'ecut\'es (en g\'en\'eral, l'ordre croissant. -Si vous les sasissez dans un ordre diff\'erent, vous courrez le risque de ne pas -version la plus r\'ecente d'un fichier sauvegard\'e plusieurs fois si celui-ci a \'et\'e -sauvegard\'e dans plusieurs jobs. - -Entre vos JobIds directement peut aussi vous permettre de restaurer depuis -un job qui a \'ecrit des donn\'ees sur les volumes mais qui s'est termin\'e en erreur. - -Dans le mode s\'election de fichiers, vous pouvez utiliser {\bf help} ou une -question (?) pour produire un r\'esum\'e des commandes disponibles : - -\footnotesize -\begin{verbatim} - Command Description - ======= =========== - cd change current directory - count count marked files in and below the cd - dir long list current directory, wildcards allowed - done leave file selection mode - estimate estimate restore size - exit same as done command - find find files, wildcards allowed - help print help - ls list current directory, wildcards allowed - lsmark list the marked files in and below the cd - mark mark dir/file to be restored recursively in dirs - markdir mark directory name to be restored (no files) - pwd print current working directory - unmark unmark dir/file to be restored recursively in dir - unmarkdir unmark directory name only no recursion - quit quit and do not do restore - ? print help -\end{verbatim} -\normalsize - -Par d\'efaut, aucun fichier n'est s\'electionn\'e pour restauration (sauf si vous -avez ajout\'e {\bf all} \`a la ligne de commande). Si, \`a ce stade, vous voulez -tout restaurer, vous devriez saisir {\bf mark *}, puis {\bf done}, Bacula -\'ecrira alors les donn\'ees bootstrap dans un fichier et sollicitera votre -approbation pour d\'emarrer la restauration. - -Si vous n'utilisez pas {\bf mark *}, vous commencez avec une s\'election vide. -Vous pouvez simplement regarder et marquer ({\bf mark}) les fichiers et/ou -r\'epertoires qui vous int\'eressent. Il est ais\'e de commettre une erreur dans ces -op\'erations, et la gestion des erreurs dans Bacula n'est pas parfaite, aussi -contr\^olez votre travail avec la commande {\bf ls} ou {\bf dir} pour voir -quels fichiers ont \'et\'e s\'electionn\'es. Les fichiers s\'electionn\'es sont pr\'ec\'ed\'es -d'une ast\'erisque. - -Pour contr\^oler ce qui est marqu\'e et ce qui ne l'est pas utilisez la commande -{\bf count} qui affiche : - -\footnotesize -\begin{verbatim} -128401 total files. 128401 marked to be restored. - -\end{verbatim} -\normalsize - -Chacune des commandes ci-dessus sera expliqu\'e plus en d\'etail dans la -prochaine section. Poursuivons avec notre exemple, en validant la restauration de -tous les fichiers. En saisissant {\bf done}, Bacula affiche : - -\footnotesize -\begin{verbatim} -Bootstrap records written to /home/kern/bacula/working/restore.bsr -The restore job will require the following Volumes: - - DLT-19Jul02 - DLT-04Aug02 -128401 files selected to restore. -Run Restore job -JobName: kernsrestore -Bootstrap: /home/kern/bacula/working/restore.bsr -Where: /tmp/bacula-restores -Replace: always -FileSet: Kerns Files -Client: Rufus -Storage: SDT-10000 -JobId: *None* -OK to run? (yes/mod/no): - -\end{verbatim} -\normalsize - -Examinez chaque \'el\'ement attentivement pour vous assurer que tout est -conforme \`a ce que vous souhaitez. En particulier, v\'erifiez la ligne {\bf where}, -qui vous indique dans quelle partie du syst\`eme de fichiers vos donn\'ees -seront restaur\'ees, et quel client va les recevoir (par d\'efaut, les -restaurations ont lieu sur le client d'origine). Ces param\`etres n'auront pas -forc\'ement les bonnes valeurs, mais vous pouvez les modifier \`a l'aide -de la commande {\bf mod} et en vous laissant guider par l'invite de la -console. - -L'affichage ci-dessus suppose que vous ayez d\'efini une ressource Job de type -{\bf restore} dans le fichier de configuration de votre Director. en -principe, vous n'en n'aurez besoin que d'une, car, par nature, une -restauration est une op\'eration essentiellement manuelle. A l'aide de la -Console, vous pourrez modifier le job Restore pour faire ce que vous voulez -qu'il fasse. - -Un exemple de ressource Job de type restore est donn\'e plus bas. - -Pour en revenir \`a notre exemple, en plus de v\'erifier le client, il est sage -de v\'erifier que le p\'eriph\'erique de stockage choisi par Bacula est le bon. -Bien que le FileSet soit pr\'esent\'e, il est en fait ignor\'e dans la restauration. -Le processus de restauration choisit ses fichiers en lisant le fichier -{\bf bootstrap}, et restaure tous les fichiers associ\'es au JobId consid\'er\'e -si ce fichier n'est pas sp\'ecifi\'e. - -Enfin, avant de lancer la restauration, notez que le lieu par d\'efaut pour les -fichiers restaur\'es n'est pas leur emplacement d'origine mais le r\'epertoire -{\bf /tmp/bacula-restores}. Vous pouvez modifier cette valeur par d\'efaut dans -le fichier de configuration du Director, ou avec l'option {\bf mod}. Si vous -voulez restaurer les fichiers \`a leurs emplacements d'origine, modifiez l'option -{\bf where} : sp\'ecifiez la racine ({\bf /} ou rien du tout). - -Si vous entrez maintenant {\bf yes}, Bacula lance la restauration. le Storage -Daemon va d'abord requ\'erir le volume {\bf DLT-19Jul02}, puis le {\bf DLT-04Aug02} -une fois qu'il aura extrait les fichiers requis du premier. - -\section{S\'electionner des fichiers par leurs noms} -\index[general]{S\'electionner des fichiers par leurs noms} -\index[general]{Noms de fichiers!S\'electionner des fichiers par leurs} -\addcontentsline{toc}{section}{S\'electionner des fichiers par leurs noms} - -Si vous n'avez qu'un petit nombre de fichiers \`a restaurer dont vous connaissez -les noms, vous pouvez, aux choix, placer ces noms dans un fichier qui sera -lu par Bacula, ou saisir les noms un par un. Les noms de fichier doivent inclure -le chemin absolu. Les caract\`eres jokers ne peuvent \^etre utilis\'es. - -Pour saisir la liste, choisissez l'option 7 dans le menu de la commande {\bf restore} : - -\footnotesize -\begin{verbatim} -To select the JobIds, you have the following choices: - 1: List last 20 Jobs run - 2: List Jobs where a given File is saved - 3: Enter list of comma separated JobIds to select - 4: Enter SQL list command - 5: Select the most recent backup for a client - 6: Select backup for a client before a specified time - 7: Enter a list of files to restore - 8: Enter a list of files to restore before a specified time - 9: Find the JobIds of the most recent backup for a client - 10: Find the JobIds for a backup for a client before a specified time - 11: Enter a list of directories to restore for found JobIds - 12: Cancel -Select item: (1-12): -\end{verbatim} -\normalsize - -Vous \^etes alors invit\'e \`a pr\'eciser le client : - -\footnotesize -\begin{verbatim} -Defined Clients: - 1: Timmy - 2: Tibs - 3: Rufus -Select the Client (1-3): 3 -\end{verbatim} -\normalsize - -Si vous n'avez qu'un client, il est s\'electionn\'e automatiquement. -Finalement, Bacula vous demande d'entrer un nom de fichier : - -\footnotesize -\begin{verbatim} -Enter filename: -\end{verbatim} -\normalsize - -Vous pouvez, \`a ce stade, saisir le chemin absolu et le nom du fichier : - -\footnotesize -\begin{verbatim} -Enter filename: /home/kern/bacula/k/Makefile.in -Enter filename: -\end{verbatim} -\normalsize - -Si Bacula ne peut en trouver aucune copie, il affiche ce qui suit : - -\footnotesize -\begin{verbatim} -Enter filename: junk filename -No database record found for: junk filename -Enter filename: -\end{verbatim} -\normalsize - -Si vous souhaitez que Bacula r\'ecup\`ere la liste des fichiers \`a restaurer depuis -un fichier, r\'edigez ce fichier et donnez lui un nom commen\c{c}ant par le signe -moins (\lt{}) et saisissez-le ici. Lorsque vous avez entr\'e tous les noms de -fichiers, validez une ligne vide. Bacula \'ecrit maintenant le fichier -bootstrap, vous indique les cartouches qui seront utilis\'ees, et vous propose -de valider la restauration : - -\footnotesize -\begin{verbatim} -Enter filename: -Automatically selected Storage: DDS-4 -Bootstrap records written to /home/kern/bacula/working/restore.bsr -The restore job will require the following Volumes: - - test1 -1 file selected to restore. -Run Restore job -JobName: kernsrestore -Bootstrap: /home/kern/bacula/working/restore.bsr -Where: /tmp/bacula-restores -Replace: always -FileSet: Kerns Files -Client: Rufus -Storage: DDS-4 -When: 2003-09-11 10:20:53 -Priority: 10 -OK to run? (yes/mod/no): -\end{verbatim} -\normalsize - -Il est possible d'automatiser la s\'election des fichiers en pla\c{c}ant votre liste -de fichiers dans, part exemple, {\bf /tmp/file-list}, puis en utilisant la -commande suivante : - -\footnotesize -\begin{verbatim} -restore client=Rufus file=----| Stunnel 1 |-----> Port 9102 - |===========| - stunnel-fd2.conf - |===========| - Port 9103 >----| Stunnel 2 |-----> server:29103 - |===========| - Director (server): - stunnel-dir.conf - |===========| - Port 29102 >----| Stunnel 3 |-----> client:29102 - |===========| - stunnel-sd.conf - |===========| - Port 29103 >----| Stunnel 4 |-----> 9103 - |===========| -\end{verbatim} -\normalsize - -\section{Certificates} -\index[general]{Certificates } - -In order for stunnel to function as a server, which it does in our diagram for -Stunnel 1 and Stunnel 4, you must have a certificate and the key. It is -possible to keep the two in separate files, but normally, you keep them in one -single .pem file. You may create this certificate yourself in which case, it -will be self-signed, or you may have it signed by a CA. - -If you want your clients to verify that the server is in fact valid (Stunnel 2 -and Stunnel 3), you will need to have the server certificates signed by a CA -(Certificate Authority), and you will need to have the CA's public certificate -(contains the CA's public key). - -Having a CA signed certificate is {\bf highly} recommended if you are using -your client across the Internet, otherwise you are exposed to the man in the -middle attack and hence loss of your data. - -See below for how to create a self-signed certificate. - -\section{Securing the Data Channel} -\index[general]{Channel!Securing the Data } -\index[general]{Securing the Data Channel } - -To simplify things a bit, let's for the moment consider only the data channel. -That is the connection between the File daemon and the Storage daemon, which -takes place on port 9103. In fact, in a minimalist solution, this is the only -connection that needs to be encrypted, because it is the one that transports your -data. The connection between the Director and the File daemon is simply a -control channel used to start the job and get the job status. - -Normally the File daemon will contact the Storage daemon on port 9103 -(supplied by the Director), so we need an stunnel that listens on port 9103 on -the File daemon's machine, encrypts the data and sends it to the Storage -daemon. This is depicted by Stunnel 2 above. Note that this stunnel is -listening on port 9103 and sending to server:29103. We use port 29103 on the -server because if we would send the data to port 9103, it would go directly to the -Storage daemon, which doesn't understand encrypted data. On the server -machine, we run Stunnel 4, which listens on port 29103, decrypts the data and -sends it to the Storage daemon, which is listening on port 9103. - -\section{Data Channel Configuration} -\index[general]{Modification of bacula-dir.conf for the Data Channel } -\index[general]{baculoa-dir.conf!Modification for the Data Channel } - -The Storage resource of the bacula-dir.conf normally looks something like the -following: - -\footnotesize -\begin{verbatim} -Storage { - Name = File - Address = server - SDPort = 9103 - Password = storage_password - Device = File - Media Type = File -} -\end{verbatim} -\normalsize - -Notice that this is running on the server machine, and it points the File -daemon back to server:9103, which is where our Storage daemon is listening. We -modify this to be: - -\footnotesize -\begin{verbatim} -Storage { - Name = File - Address = localhost - SDPort = 9103 - Password = storage_password - Device = File - Media Type = File -} -\end{verbatim} -\normalsize - -This causes the File daemon to send the data to the stunnel running on -localhost (the client machine). We could have used client as the address as -well. - -\section{Stunnel Configuration for the Data Channel} -\index[general]{Stunnel Configuration for the Data Channel } - -In the diagram above, we see above Stunnel 2 that we use stunnel-fd2.conf on the -client. A pretty much minimal config file would look like the following: - -\footnotesize -\begin{verbatim} -client = yes -[29103] -accept = localhost:9103 -connect = server:29103 -\end{verbatim} -\normalsize - -The above config file does encrypt the data but it does not require a -certificate, so it is subject to the man in the middle attack. The file I -actually used, stunnel-fd2.conf, looked like this: - -\footnotesize -\begin{verbatim} -# -# Stunnel conf for Bacula client -> SD -# -pid = /home/kern/bacula/bin/working/stunnel.pid -# -# A cert is not mandatory here. If verify=2, a -# cert signed by a CA must be specified, and -# either CAfile or CApath must point to the CA's -# cert -# -cert = /home/kern/stunnel/stunnel.pem -CAfile = /home/kern/ssl/cacert.pem -verify = 2 -client = yes -# debug = 7 -# foreground = yes -[29103] -accept = localhost:9103 -connect = server:29103 -\end{verbatim} -\normalsize - -You will notice that I specified a pid file location because I ran stunnel -under my own userid so I could not use the default, which requires root -permission. I also specified a certificate that I have as well as verify level -2 so that the certificate is required and verified, and I must supply the -location of the CA (Certificate Authority) certificate so that the stunnel -certificate can be verified. Finally, you will see that there are two lines -commented out, which when enabled, produce a lot of nice debug info in the -command window. - -If you do not have a signed certificate (stunnel.pem), you need to delete the -cert, CAfile, and verify lines. - -Note that the stunnel.pem, is actually a private key and a certificate in a -single file. These two can be kept and specified individually, but keeping -them in one file is more convenient. - -The config file, stunnel-sd.conf, needed for Stunnel 4 on the server machine -is: - -\footnotesize -\begin{verbatim} -# -# Bacula stunnel conf for Storage daemon -# -pid = /home/kern/bacula/bin/working/stunnel.pid -# -# A cert is mandatory here, it may be self signed -# If it is self signed, the client may not use -# verify -# -cert = /home/kern/stunnel/stunnel.pem -client = no -# debug = 7 -# foreground = yes -[29103] -accept = 29103 -connect = 9103 -\end{verbatim} -\normalsize - -\section{Starting and Testing the Data Encryption} -\index[general]{Starting and Testing the Data Encryption } -\index[general]{Encryption!Starting and Testing the Data } - -It will most likely be the simplest to implement the Data Channel encryption -in the following order: - -\begin{itemize} -\item Setup and run Bacula backing up some data on your client machine - without encryption. -\item Stop Bacula. -\item Modify the Storage resource in the Director's conf file. -\item Start Bacula -\item Start stunnel on the server with: - - \footnotesize -\begin{verbatim} - stunnel stunnel-sd.conf - -\end{verbatim} -\normalsize - -\item Start stunnel on the client with: - - \footnotesize -\begin{verbatim} - stunnel stunnel-fd2.conf - -\end{verbatim} -\normalsize - -\item Run a job. -\item If it doesn't work, turn debug on in both stunnel conf files, restart - the stunnels, rerun the job, repeat until it works. - \end{itemize} - -\section{Encrypting the Control Channel} -\index[general]{Channel!Encrypting the Control } -\index[general]{Encrypting the Control Channel } - -The Job control channel is between the Director and the File daemon, and as -mentioned above, it is not really necessary to encrypt, but it is good -practice to encrypt it as well. The two stunnels that are used in this case -will be Stunnel 1 and Stunnel 3 in the diagram above. Stunnel 3 on the server -might normally listen on port 9102, but if you have a local File daemon, this -will not work, so we make it listen on port 29102. It then sends the data to -client:29102. Again we use port 29102 so that the stunnel on the client -machine can decrypt the data before passing it on to port 9102 where the File -daemon is listening. - -\section{Control Channel Configuration} -\index[general]{Control Channel Configuration } - -We need to modify the standard Client resource, which would normally look -something like: - -\footnotesize -\begin{verbatim} -Client { - Name = client-fd - Address = client - FDPort = 9102 - Catalog = BackupDB - Password = "xxx" -} -\end{verbatim} -\normalsize - -to be: - -\footnotesize -\begin{verbatim} -Client { - Name = client-fd - Address = localhost - FDPort = 29102 - Catalog = BackupDB - Password = "xxx" -} -\end{verbatim} -\normalsize - -This will cause the Director to send the control information to -localhost:29102 instead of directly to the client. - -\section{Stunnel Configuration for the Control Channel} -\index[general]{Config Files for stunnel to Encrypt the Control Channel } - -The stunnel config file, stunnel-dir.conf, for the Director's machine would -look like the following: - -\footnotesize -\begin{verbatim} -# -# Bacula stunnel conf for the Directory to contact a client -# -pid = /home/kern/bacula/bin/working/stunnel.pid -# -# A cert is not mandatory here. If verify=2, a -# cert signed by a CA must be specified, and -# either CAfile or CApath must point to the CA's -# cert -# -cert = /home/kern/stunnel/stunnel.pem -CAfile = /home/kern/ssl/cacert.pem -verify = 2 -client = yes -# debug = 7 -# foreground = yes -[29102] -accept = localhost:29102 -connect = client:29102 -\end{verbatim} -\normalsize - -and the config file, stunnel-fd1.conf, needed to run stunnel on the Client -would be: - -\footnotesize -\begin{verbatim} -# -# Bacula stunnel conf for the Directory to contact a client -# -pid = /home/kern/bacula/bin/working/stunnel.pid -# -# A cert is not mandatory here. If verify=2, a -# cert signed by a CA must be specified, and -# either CAfile or CApath must point to the CA's -# cert -# -cert = /home/kern/stunnel/stunnel.pem -CAfile = /home/kern/ssl/cacert.pem -verify = 2 -client = yes -# debug = 7 -# foreground = yes -[29102] -accept = localhost:29102 -connect = client:29102 -\end{verbatim} -\normalsize - -\section{Starting and Testing the Control Channel} -\index[general]{Starting and Testing the Control Channel } -\index[general]{Channel!Starting and Testing the Control } - -It will most likely be the simplest to implement the Control Channel -encryption in the following order: - -\begin{itemize} -\item Stop Bacula. -\item Modify the Client resource in the Director's conf file. -\item Start Bacula -\item Start stunnel on the server with: - - \footnotesize -\begin{verbatim} - stunnel stunnel-dir.conf - -\end{verbatim} -\normalsize - -\item Start stunnel on the client with: - - \footnotesize -\begin{verbatim} - stunnel stunnel-fd1.conf - -\end{verbatim} -\normalsize - -\item Run a job. -\item If it doesn't work, turn debug on in both stunnel conf files, restart - the stunnels, rerun the job, repeat until it works. - \end{itemize} - -\section{Using stunnel to Encrypt to a Second Client} -\index[general]{Using stunnel to Encrypt to a Second Client } -\index[general]{Client!Using stunnel to Encrypt to a Second } - -On the client machine, you can just duplicate the setup that you have on the -first client file for file and it should work fine. - -In the bacula-dir.conf file, you will want to create a second client pretty -much identical to how you did for the first one, but the port number must be -unique. We previously used: - -\footnotesize -\begin{verbatim} -Client { - Name = client-fd - Address = localhost - FDPort = 29102 - Catalog = BackupDB - Password = "xxx" -} -\end{verbatim} -\normalsize - -so for the second client, we will, of course, have a different name, and we -will also need a different port. Remember that we used port 29103 for the -Storage daemon, so for the second client, we can use port 29104, and the -Client resource would look like: - -\footnotesize -\begin{verbatim} -Client { - Name = client2-fd - Address = localhost - FDPort = 29104 - Catalog = BackupDB - Password = "yyy" -} -\end{verbatim} -\normalsize - -Now, fortunately, we do not need a third stunnel to on the Director's machine, -we can just add the new port to the config file, stunnel-dir.conf, to make: - -\footnotesize -\begin{verbatim} -# -# Bacula stunnel conf for the Directory to contact a client -# -pid = /home/kern/bacula/bin/working/stunnel.pid -# -# A cert is not mandatory here. If verify=2, a -# cert signed by a CA must be specified, and -# either CAfile or CApath must point to the CA's -# cert -# -cert = /home/kern/stunnel/stunnel.pem -CAfile = /home/kern/ssl/cacert.pem -verify = 2 -client = yes -# debug = 7 -# foreground = yes -[29102] -accept = localhost:29102 -connect = client:29102 -[29104] -accept = localhost:29102 -connect = client2:29102 -\end{verbatim} -\normalsize - -There are no changes necessary to the Storage daemon or the other stunnel so -that this new client can talk to our Storage daemon. - -\section{Creating a Self-signed Certificate} -\index[general]{Creating a Self-signed Certificate } -\index[general]{Certificate!Creating a Self-signed } - -You may create a self-signed certificate for use with stunnel that will permit -you to make it function, but will not allow certificate validation. The .pem -file containing both the certificate and the key can be made with the -following, which I put in a file named {\bf makepem}: - -\footnotesize -\begin{verbatim} -#!/bin/sh -# -# Simple shell script to make a .pem file that can be used -# with stunnel and Bacula -# -OPENSSL=openssl - umask 77 - PEM1="/bin/mktemp openssl.XXXXXX" - PEM2="/bin/mktemp openssl.XXXXXX" - ${OPENSSL} req -newkey rsa:1024 -keyout $PEM1 -nodes \ - -x509 -days 365 -out $PEM2 - cat $PEM1 > stunnel.pem - echo "" >>stunnel.pem - cat $PEM2 >>stunnel.pem - rm $PEM1 $PEM2 -\end{verbatim} -\normalsize - -The above script will ask you a number of questions. You may simply answer -each of them by entering a return, or if you wish you may enter your own data. - - -\section{Getting a CA Signed Certificate} -\index[general]{Certificate!Getting a CA Signed } -\index[general]{Getting a CA Signed Certificate } - -The process of getting a certificate that is signed by a CA is quite a bit -more complicated. You can purchase one from quite a number of PKI vendors, but -that is not at all necessary for use with Bacula. - -To get a CA signed -certificate, you will either need to find a friend that has setup his own CA -or to become a CA yourself, and thus you can sign all your own certificates. -The book OpenSSL by John Viega, Matt Mesier \& Pravir Chandra from O'Reilly -explains how to do it, or you can read the documentation provided in the -Open-source PKI Book project at Source Forge: -\elink{ -http://ospkibook.sourceforge.net/docs/OSPKI-2.4.7/OSPKI-html/ospki-book.htm} -{http://ospkibook.sourceforge.net/docs/OSPKI-2.4.7/OSPKI-html/ospki-book.htm}. -Note, this link may change. - -\section{Using ssh to Secure the Communications} -\index[general]{Communications!Using ssh to Secure the } -\index[general]{Using ssh to Secure the Communications } - -Please see the script {\bf ssh-tunnel.sh} in the {\bf examples} directory. It -was contributed by Stephan Holl. diff --git a/docs/manuals/fr/concepts/supporteddrives.tex b/docs/manuals/fr/concepts/supporteddrives.tex deleted file mode 100644 index d5b587a0..00000000 --- a/docs/manuals/fr/concepts/supporteddrives.tex +++ /dev/null @@ -1,174 +0,0 @@ -%% -%% - -\chapter{Lecteurs de bandes support\'es} -\label{_ChapterStart19} -\index[general]{Lecteurs de bandes support\'es } -\index[general]{Lecteurs!bandes support\'ees } -\addcontentsline{toc}{section}{Lecteurs de bandes support\'es} - -M\^eme si votre lecteur est dans la liste ci dessous, v\'erifiez le -\ilink{Chapitre Test des Lecteurs Bandes}{btape1} de ce manuel -pour les proc\'edures que vous pouvez utiliser pour v\'erifier si votre -lecteur de bandes est susceptible de fonctionner avec Bacula. -Si votre lecteur est en mode bloc -fixe, il peut para\^itre fonctionner avec Bacula jusqu'\`a ce que vous essayiez de -restaurer et que Bacula tente de se positionner sur la bande. Seuls la -proc\'edure ci-dessus et vos propres tests peuvent vous garantir un -fonctionnement correct. - -Il est tr\`es difficile de fournir une liste de lecteurs de bandes -support\'es, ou de lecteurs qui sont connus pour fonctionner avec Bacula en -raison du peu de retours de la part des usagers. (par cons\'equent, si vous -utilisez Bacula sur un lecteur qui ne figure pas dans la liste, merci de nous -le faire savoir). Selon les informations provenant de nos utilisateurs, les -lecteurs suivants sont connus pour fonctionner avec Bacula. Un trait d'union -dans une colonne signifie "inconnu" : - -\begin{longtable}{|l|l|l|l|l|} - \hline -\multicolumn{1}{|c| }{\bf OS } & \multicolumn{1}{c| }{\bf Fabr. } & -\multicolumn{1}{c| }{\bf Media } & \multicolumn{1}{c| }{\bf Mod\`ele } & -\multicolumn{1}{c| }{\bf Capacit\'e } \\ - \hline -{- } & {ADIC } & {DLT } & {Adic Scalar 100 DLT } & {100GB } \\ - \hline -{- } & {ADIC } & {DLT } & {Adic Fastor 22 DLT } & {- } \\ - \hline -{- } & {- } & {DDS } & {Compaq DDS 2,3,4 } & {- } \\ - \hline -{- } & {Exabyte } & {- } & {Lecteurs Exabyte de moins de dix ans } & {- -} \\ - \hline -{- } & {Exabyte } & {- } & {Exabyte VXA drives } & {- } \\ - \hline -{- } & {HP } & {Travan 4 } & {Colorado T4000S } & {- } \\ - \hline -{- } & {HP } & {DLT } & {HP DLT drives } & {- } \\ - \hline -{- } & {HP } & {LTO } & {HP LTO Ultrium drives } & {- } \\ - \hline -{FreeBSD 4.10 RELEASE } & {HP } & {DAT } & {HP StorageWorks DAT72i } & {- -} \\ - \hline -{- } & {Overland } & {LTO } & {LoaderXpress LTO } & {- } \\ - \hline -{- } & {Overland } & {- } & {Neo2000 } & {- } \\ - \hline -{- } & {OnStream } & {- } & {OnStream drives (see below) } & {- } \\ - \hline -{- } & {Quantum } & {DLT } & {DLT-8000 } & {40/80GB } \\ - \hline -{Linux } & {Seagate } & {DDS-4 } & {Scorpio 40 } & {20/40GB } \\ - \hline -{FreeBSD 4.9 STABLE } & {Seagate } & {DDS-4 } & {STA2401LW } & {20/40GB } -\\ - \hline -{FreeBSD 5.2.1 pthreads patched RELEASE } & {Seagate } & {AIT-1 } & -{STA1701W } & {35/70GB } \\ - \hline -{Linux } & {Sony } & {DDS-2,3,4 } & {- } & {4-40GB } \\ - \hline -{Linux } & {Tandberg } & {- } & {Tandbert MLR3 } & {- } \\ - \hline -{FreeBSD } & {Tandberg } & {- } & {Tandberg SLR6 } & {- } \\ - \hline -{Solaris } & {Tandberg } & {- } & {Tandberg SLR75 } & {- } \\ - \hline -{Linux Gentoo } & {ADIC } & {- } & {IBM Ultrium LTO I } & {100/200 Go } -\\ \hline - -\end{longtable} - -Une liste des -\ilink{Librarires support\'ees}{Models} figure dans le -\ilink{chapitre librairies (autochangers)}{_ChapterStart} de -ce document, o\`u vous trouverez d'autres lecteurs de bandes qui fonctionnent avec -Bacula. - -\section{Lecteurs de bande non support\'es} -\label{UnSupportedDrives} -\index[general]{Lecteurs de bande non support\'es } -\addcontentsline{toc}{section}{Lecteurs de bande non support\'es} - -Auparavant les lecteurs de bandes OnStream IDE-SCSI ne fonctionnaient pas avec -Bacula. A partir de la version 1.33 de Bacula et de la version 0.9.14 du -pilote noyau ou sup\'erieur,ce lecteur est support\'e. Consultez le chapitre -de test car vous devez le configurer pour fonctionner en mode blocs de taille -fixe. - -Les lecteurs QIC sont connus pour avoir nombre de particularit\'es (taille de -blocs fixe, et un EOF plut\^ot que deux pour terminer la bande). En -cons\'equence, vous devrez \^etre particuli\`erement attentif \`a sa -configuration pour le faire fonctionner avec Bacula. - -\section{A l'attention des utilisateurs de FreeBSD !!!} -\index[general]{L'attention des utilisateurs de FreeBSD } -\index[general]{FreeBSD!l'attention des utilisateurs de } -\addcontentsline{toc}{section}{l'attention des utilisateurs de FreeBSD !!!} - -A moins que vous n'ayez appliqu\'e un correctif sur la biblioth\`eque pthreads -de votre syst\`eme FreeBSD, vous perdrez des donn\'ees quand Bacula aura -rempli une bande et passera \`a la suivante. La raison en est que les -biblioth\`eques pthreads sans correctifs \'echouent \`a retourner un \'etat -d'alerte \`a Bacula signalant que la fin de bande est proche. Consultez le -\ilink{chapitre test des lecteurs de bandes}{FreeBSDTapes} de -ce manuel pour d'importantes informations concernant la configuration de votre -lecteur de bande pour qu'il soit compatible avec {\bf Bacula}. - -\section{Librairiess support\'ees} -\index[general]{Librairiess support\'ees } -\addcontentsline{toc}{section}{Librairies support\'ees} - -Pour des informations sur les libraries (autochangeurs) support\'ees, allez -voir la section -\ilink{Libraries connues pour fonctionner avec Bacula}{Models} du chapitre -Librairies support\'ees de ce manuel. - -\section{Sp\'ecifications des cartouches} -\index[general]{Sp\'ecifications!Cartouches} -\index[general]{Cartouches Sp\'ecifications} -\addcontentsline{toc}{section}{Sp\'ecifications des cartouches} -Nous ne pouvons vraiment pas vous dire quel lecteur acheter pour utiliser Bacula. -Cependant, nous pouvons recommander d'\'eviter les lecteurs DDS. La -technologie est plut\^ot ancienne et ces lecteurs n\'ecessitent de fr\'equents -nettoyages. Les lecteurs DLT sont g\'en\'eralement bien meilleurs (technologie -plus r\'ecente) et ne requi\`erent pas autant d'op\'erations de nettoyage. - -Ci-dessous, vous trouverez une table de sp\'ecifications de cartouches DLT et LTO -qui vous permettra de vous faire une id\'ee de la capacit\'e et de la rapidit\'e des -lecteurs et cartouches modernes. Les capacit\'es report\'ees ici sont les natives, -sans compression. Tous les lecteurs modernes pratiquent la compression -mat\'erielle, et les fabricants affichent souvent une capacit\'e compress\'ee avec un -ratio de 2:1. Le facteur de compression r\'eel d\'epend principalement des donn\'ees -sauvegard\'ees, mais je pense qu'un ratio 1,5:1 est beaucoup plus raisonnable -(autrement dit, multipliez la valeur de la table par 1,5 pour obtenir une -estimation grossi\`ere de la capacit\'e compress\'ee). Les taux de transfert sont -arrondis au GB/hr le plus proche. Les valeurs sont fournies par les divers -fabricants. - -Le type de media est la d\'esignation du fabricant, vous n'\^etes pas oblig\'e de -l'utiliser (mais vous devriez...) dans vos ressources de configuration Bacula. - - -\begin{tabular}{|c|c|c|c} -Type de media & Type de lecteur & Capacit\'e des media & Taux de transfert \\ \hline -DDS-1 & DAT & 2 GB & ?? GB/hr \\ \hline -DDS-2 & DAT & 4 GB & ?? GB/hr \\ \hline -DDS-3 & DAT & 12 GB & 5.4 GB/hr \\ \hline -Travan 40 & Travan & 20 GB & ?? GB/hr \\ \hline -DDS-4 & DAT & 20 GB & 11 GB/hr \\ \hline -VXA-1 & Exabyte & 33 GB & 11 GB/hr \\ \hline -DAT-72 & DAT & 36 GB & 13 GB/hr \\ \hline -DLT IV & DLT8000 & 40 GB & 22 GB/hr \\ \hline -VXA-2 & Exabyte & 80 GB & 22 GB/hr \\ \hline -Half-high Ultrum 1 & LTO 1 & 100 GB & 27 GB/hr \\ \hline -Ultrium 1 & LTO 1 & 100 GB & 54 GB/hr \\ \hline -Super DLT 1 & SDLT 220 & 110 GB & 40 GB/hr \\ \hline -VXA-3 & Exabyte & 160 GB & 43 GB/hr \\ \hline -Super DLT I & SDLT 320 & 160 GB & 58 GB/hr \\ \hline -Ultrium 2 & LTO 2 & 200 GB & 108 GB/hr \\ \hline -Super DLT II & SDLT 600 & 300 GB & 127 GB/hr \\ \hline -VXA-4 & Exabyte & 320 GB & 86 GB/hr \\ \hline -Ultrium 3 & LTO 3 & 400 GB & 216 GB/hr \\ \hline -\end{tabular} diff --git a/docs/manuals/fr/concepts/supportedoses.tex b/docs/manuals/fr/concepts/supportedoses.tex deleted file mode 100644 index 78904bc2..00000000 --- a/docs/manuals/fr/concepts/supportedoses.tex +++ /dev/null @@ -1,92 +0,0 @@ -%% -%% - -\chapter{Syst\`emes d'exploitation support\'es} -\label{SupportedOSes} -\index[general]{Syst\`emes d'exploitation support\'es } - -\begin{itemize} -\item[X] Compl\`etement support\'e -\item[$\star$] Fonctionne, mais non support\'e par le projet Bacula. -\end{itemize} - - -\begin{tabular}[h]{|l|l|c|c|c|} - \hline - OS & Version & Client \small{Daemon} & Director \small{Daemon} & Storage \small{Daemon} \\ - \hline - \hline - GNU/Linux - & All & X & X & X \\ - \hline - FreeBSD & $\geq$ 5.0 & X & X & X - \\ - \hline - Solaris & $\geq$ 8 & X & X & X \\ - \hline - OpenSolaris & ~ & X & X & X \\ - \hline - \hline - MS Windows 32bit& Win98/Me & X & ~ & ~ \\ - \hline - ~ & WinNT/2K & X & $\star$ & $\star$ \\ - \hline - ~ & XP & X & $\star$ & $\star$ \\ - ~ & 2008/Vista & X & $\star$ & $\star$ \\ - MS Windows 64bit& 2008/Vista & X & ~ & ~ \\ - \hline - \hline - MacOS X/Darwin & ~ & X & ~ & ~ \\ - \hline - OpenBSD & ~ & X & $\star$ & ~ \\ - \hline - NetBSD & ~ & X & $\star$ & ~ \\ - \hline - Irix & ~ & $\star$ & ~ & ~ \\ - \hline - True64 & ~ & $\star$ & ~ & ~ \\ - \hline - AIX & $\geq$ 4.3 & $\star$ & ~ & ~ \\ - \hline - BSDI & ~ & $\star$ & ~ & ~ \\ - \hline - HPUX & ~ & $\star$ & ~ & ~ \\ - \hline -\end{tabular} - - -\section*{Notes importantes} - -\begin{itemize} -\item Par GNU/Linux, nous pensons 32/64bit Gentoo, Red Hat, Fedora, Mandriva, - Debian, OpenSuSE, Ubuntu, Kubuntu, \dots - - \item FreeBSD (pilote de bande support\'e \`a partir de la version 1.30 -- - allez voir les consid\'erations {\bf importantes} dans la section - \ilink{Configuration des lecteurs de bandes sur FreeBSD}{FreeBSDTapes} du - chapitre Test des Bandes de ce manuel.) - -\item Le Director et le Storage Daemon MS Windows sont disponibles dans - l'installeur du Client. - -\item MacOS X/Darwin (voir - \elink{ http://fink.sourceforge.net/}{http://fink.sourceforge.net/} pour - obtenir les paquets) -\end{itemize} - -Si vous avez un syst\`eme Red Hat r\'ecent ex\'ecutant le noyau 2.4.x et si -vous avez le r\'epertoire {\bf /lib/tls} install\'e sur votre syst\`eme (par -d\'efaut normalement), {\bf Bacula ne fonctionnera pas correctement} Ceci est -d\^u \`a la nouvelle biblioth\`eque pthreads qui est d\'efectueuse. Vous devez -supprimer ce r\'epertoire avant d'ex\'ecuter Bacula, ou vous pouvez simplement -le renommer en {\bf /lib/tls-broken} puis red\'emarrer votre machine (une des -rares occasions o\`u; Linux doit \^etre red\'emarr\'e). Si vous ne souhaitez -pas d\'eplacer/renommer /lib/tls, une autre alternative est de placer la -variable d'environnement ``LD\_ASSUME\_KERNEL=2.4.19'' avant d'ex\'ecuter -Bacula. Pour cette option, vous n'avez pas besoin de red\'emarrer, et tous les -programmes autres que {\bf Bacula} continueront d'utiliser {\bf /lib/tls}. - -Le probl\`eme n'existe pas ur les noyaux 2.6. - -Voir le chapitre de Portage de la Documentation Pour Developpeurs pour les -informations concernant le portage sur d'autres syst\`emes. diff --git a/docs/manuals/fr/concepts/tutorial.tex b/docs/manuals/fr/concepts/tutorial.tex deleted file mode 100644 index 389a5a61..00000000 --- a/docs/manuals/fr/concepts/tutorial.tex +++ /dev/null @@ -1,1392 +0,0 @@ -%% -%% - -\chapter{Une br\`eve documentation} -\label{_ChapterStart1} -\index[general]{Une br\`eve documentation} -\index[general]{Documentation!br\`eve } - -Ce chapitre vous guidera \`a travers les \'etapes n\'ecessaires pour ex\'ecuter Bacula. -Pour cela, nous supposons que vous avez install\'e Bacula, peut \^etre dans un simple -r\'epertoire comme le d\'ecrit le chapitre pr\'ec\'edent, auquel cas vous pouvez ex\'ecuter -Bacula sans \^etre root pour ces tests. Nous supposons d'autre part que vous n'avez -pas modifi\'e les fichiers de configuration. Dans le cas contraire, nous vous -recommandons de d\'esinstaller Bacula et de le r\'einstaller sans rien modifier. Les -exemples de ce chapitre utilisent les fichiers de configuration par d\'efaut, et -cr\'eent les volumes dans le r\'epertoire {\bf /tmp} de votre disque. De plus, les -donn\'ees sauvegard\'ees seront celle du r\'epertoire des sources de Bacula o\`u vous -l'avez compil\'e. Par cons\'equent, tous les {\it daemons} peuvent \^etre ex\'ecut\'es -sans les droits root pour ces tests. Notez bien qu'en production, vos File -Daemons devront \^etre ex\'ecut\'es en tant que root. Voyez le chapitre sur la -s\'ecurit\'e pour plus d'informations sur ce sujet. - -Voici les \'etapes que nous suivrons : - -\begin{enumerate} -\item cd \lt{}install-directory\gt{} -\item D\'emarrer la base de donn\'ees (si vous utilisez MySQL ou PostgreSQL) -\item D\'emarrer les {\it daemons} avec {\bf ./bacula start} -\item Lancer le programme Console pour interagir avec le Director -\item Lancer un job -\item Lorsqu'un volume est plein, le d\'emonter, s'il s'agit d'une cartouche, en - \'etiqueter une nouvelle et poursuivre. Dans ce chapitre, nous n'\'ecrirons que sur - des volumes fichier, aussi vous n'avez pas \`a vous inqui\'eter au sujet des - cartouches pour le moment. -\item Tester la restauration de quelques fichiers depuis le volume fraichement \'ecrit - pour s'assurer de la validit\'e de la sauvegarde et qu'il est possible de restaurer. - Mieux vaut essayer avant qu'un d\'esastre ne survienne... -\item Ajouter un second client. - \end{enumerate} - -Chacune de ces \'etapes est d\'ecrite en d\'etail ci-dessous. - -\section{Avant d'ex\'ecuter Bacula} -\index[general]{Bacula!Avant d'ex\'ecuter} -\index[general]{Avant d'ex\'ecuter Bacula} -\addcontentsline{toc}{section}{Avant d'ex\'ecuter Bacula} - -Avant d'utiliser Bacula pour la premi\`ere fois en production, nous vous recommandons -d'ex\'ecuter la commande {\bf test} du programme {\bf btape} ainsi qu'il est d\'ecrit -dans le chapitre \ilink{Programmes utilitaires}{btape} de ce manuel. -Ce programme vous aidera \`a vous assurer que votre lecteur de bandes fonctionne -correctement avec Bacula. Si vous avez un lecteur moderne de marque HP, Sony, ou -Quantum DDS ou DLT qui fonctionne sous Linux ou Solaris, vous pouvez probablement -vous dispenser de faire ce test car Bacula est bien test\'e avec ces lecteurs et ces -syst\`emes. Dans tous les autres cas, vous \^etes {\bf fortement} encourag\'e \`a -ex\'ecuter les tests avant de poursuivre. {\bf btape} dispose aussi d'une commande -{\bf fill} qui tente de reproduire le comportement de Bacula lorsqu'il remplit -une cartouche et qu'il poursuit son \'ecriture sur la suivante. Vous devriez -songer \`a faire ce test, sachez cependant qu'il peut \^etre long (environ -4 heures sur mon lecteur) de remplir une cartouche de haute capacit\'e. - -\section{D\'emarrer la base de donn\'ees} -\label{StartDB} -\index[general]{D\'emarrer la base de donn\'ees} -\index[general]{base de donn\'ees!D\'emarrer la } -\addcontentsline{toc}{section}{D\'emarrer la base de donn\'ees} - -Si vous utilisez MySQL ou PostgreSQL pour votre catalogue Bacula, vous devez -d\'emarrer la base de donn\'ees avant d'essayer de lancer un job pour \'eviter -d'obtenir des messages d'erreur au d\'emarrage de Bacula. J'utilise les scripts -{\bf startmysql} et {\bf stopmysql} pour d\'emarrer mon MySQL local. Notez que si -vous utilisez SQLite, vous n'aurez pas \`a utiliser {\bf startmysql} ou {\bf stopmysql}. -Si vous utilisez ceci en production, vous souhaiterez probablement trouver -un moyen pour d\'emarrer automatiquement MySQL ou PostgreSQL apr\`es chaque -red\'emarrage du syst\`eme. - -Si vous utilisez SQLite (c'est \`a dire, si vous avez sp\'ecifi\'e l'option -{\bf \verb:--:with-sqlite=xxx} de la commande {\bf ./configure}, vous n'avez rien \`a faire. -SQLite est d\'emarr\'ee automatiquement par {\bf Bacula}. - -\section{D\'emarrer les daemons} -\label{StartDaemon} -\index[general]{D\'emarrer les daemons} -\index[general]{Daemons!D\'emarrer les} -\addcontentsline{toc}{section}{D\'emarrer les daemons} - -Que vous ayez compil\'e Bacula depuis les sources ou que vous ayez install\'e les rpms, -tapez simplement : - -./bacula start - -dans votre r\'epertoire d'installation pour d\'emarrer les trois {\it daemons}. - -Le script {\bf bacula} lance le Storage Daemon, le File Daemon et le Director Daemon, qui -tournent tous trois en tant que {\it daemons} en t\^ache de fond. Si vous utilisez -la fonction de d\'emarrage automatique de Bacula, vous pouvez, au choix, lancer les -trois {\it daemons} lors du d\'emarrage, ou au contraire les lancer individuellement -avec les scripts {\bf bacula-dir}, {\bf bacula-fd}, et {\bf bacula-sd} usuellement -situ\'es dans {\bf /etc/init.d}, bien que leur localisation effective soit d\'ependante du syst\`eme -d'exploitation. - -Notez que seul le File Daemon a \'et\'e port\'e sur les syst\`emes Windows, et qu'il doit \^etre -d\'emarr\'e diff\'eramment. Veuillez consulter le chapitre -\ilink{La version Windows de Bacula}{_ChapterStart7} de ce manuel. - -Les paquetages rpm configurent les {\it daemons} pour qu'ils s'ex\'ecutent en tant -qu'utilisateur root et en tant que groupe bacula. Le processus d'installation rpm -se charge de cr\'eer le groupe bacula s'il n'existe pas sur le syst\`eme. Tout utilisateur -ajout\'e au groupe bacula h\'erite de l'acc\`es aux fichiers cr\'e\'es par les {\it daemons}. Pour -modifier ce comportement, \'editez les scripts de d\'emarrage des {\it daemons} : - -\begin{itemize} - \item /etc/bacula/bacula - \item /etc/init.d/bacula-dir - \item /etc/init.d/bacula-sd - \item /etc/init.d/bacula-fd -\end{itemize} - -puis red\'emarrez-les. - -Le chapitre -\ilink{installation}{_ChapterStart17} de ce manuel indique comment installer -les scripts de d\'emarrage automatique des {\it daemons}. - -\section{Interagir avec le Director pour l'interroger sur l'\'etat de Bacula ou lancer des jobs} -\index[general]{Jobs!Interagir avec le Director pour interroger l'\'etat de Bacula ou lancer des} -\index[general]{Interagir avec le Director pour interroger l'\'etat de Bacula ou lancer des jobs} -\addcontentsline{toc}{section}{Interagir avec le Director pour interroger l'\'etat de Bacula ou lancer des jobs} - -Pour communiquer avec le Director et pour s'enqu\'erir de l'\'etat de Bacula ou de jobs en -cours d'ex\'ecution, tapez simplement : - -./bconsole - -dans le r\'epertoire de plus haut niveau. - -Si vous avez install\'e la console GNOME et utilis\'e l'option {\bf \verb:--:enable-gnome} -de la commande configure, vous pouvez aussi utiliser la console GNOME en tapant : - -./gnome-console - -Vous pouvez aussi utiliser le programme wxWidgets {\bf bwx-console}. - -Pour simplifier, nous ne d\'ecrirons ici que le programme {\bf ./bconsole}. La plus -grande partie de ce qui est d\'ecrit ici s'applique aussi aux programmes {\bf ./gnome-console} -et {\bf bwx-console}. - -La commande {\bf ./bconsole} lance le programme Console, qui se connecte au Director. -Bacula \'etant un programme r\'eseau, vous pouvez utiliser la Console depuis n'importe quelle -machine de votre r\'eseau. Cependant, la plupart du temps le Console est ex\'ecut\'ee sur la -m\^eme machine que le Director. En principe, la Console devrait produire un affichage -similaire \`a : - -\footnotesize -\begin{verbatim} -[kern@polymatou bin]$ ./bconsole -Connecting to Director lpmatou:9101 -1000 OK: HeadMan Version: 1.30 (28 April 2003) -* -\end{verbatim} -\normalsize - -L'ast\'erisque est l'invite de commande de la console. - -Tapez {\bf help} pour obtenir la liste des commandes disponibles : - -\footnotesize -\begin{verbatim} -*help - Command Description - ======= =========== - add add media to a pool - autodisplay autodisplay [on/off] -- console messages - automount automount [on/off] -- after label - cancel cancel job=nnn -- cancel a job - create create DB Pool from resource - delete delete [pool= | media volume=] - estimate performs FileSet estimate debug=1 give full listing - exit exit = quit - help print this command - label label a tape - list list [pools | jobs | jobtotals | media | - files jobid=]; from catalog - llist full or long list like list command - messages messages - mount mount - prune prune expired records from catalog - purge purge records from catalog - query query catalog - quit quit - relabel relabel a tape - release release - restore restore files - run run - setdebug sets debug level - show show (resource records) [jobs | pools | ... | all] - sqlquery use SQL to query catalog - status status [storage | client]= - time print current time - unmount unmount - update update Volume or Pool - use use catalog xxx - var does variable expansion - version print Director version - wait wait until no jobs are running -* -\end{verbatim} -\normalsize - -Pour plus de d\'etails sur les commandes de la console, consultez le chapitre -\ilink{Console}{_ConsoleChapter} de ce manuel. - -\section{ex\'ecuter un job} -\label{Running} -\index[general]{Job!ex\'ecuter un} -\index[general]{ex\'ecuter un job} -\addcontentsline{toc}{section}{Ex\'ecuter un job} - -A ce stade, nous supposons que vous avez : - -\begin{itemize} -\item Configur\'e Bacula avec la commande {\bf ./configure \verb:--:your-options} -\item Compil\'e Bacula avec la commande {\bf make} -\item Install\'e Bacula avec la commande {\bf make install} -\item Cr\'e\'e votre catalogue avec, par exemple, la commande {\bf - ./create\_sqlite\_database} -\item Cr\'e\'e les tables du catalogue avec la commande {\bf - ./make\_bacula\_tables} -\item Eventuellement \'edit\'e votre fichier {\bf bacula-dir.conf} pour le personnaliser - quelque peu. ATTENTION ! Si vous modifiez le nom du Director ou son mot de passe, - vous devez faire les modifications correspondantes dans les autres fichiers de - configuration. Il est sans dout pr\'ef\'erable, pour l'instant, de ne rien changer. -\item D\'emarr\'e Bacula avec la commande {\bf ./bacula start} -\item Invoqu\'e le programme Console avec la commande {\bf ./bconsole}. -\end{itemize} - -En outre, nous supposons pour le moment que vous utilisez les fichiers de configuration -par d\'efaut. - -Maintenant, entrez les commandes suivantes : - -\footnotesize -\begin{verbatim} -show filesets -\end{verbatim} -\normalsize - -Vous devriez obtenir quelque chose comme : - -\footnotesize -\begin{verbatim} -FileSet: name=Full Set - O M - N - I /home/kern/bacula/regress/build - N - E /proc - E /tmp - E /.journal - E /.fsck - N -FileSet: name=Catalog - O M - N - I /home/kern/bacula/regress/working/bacula.sql - N -\end{verbatim} -\normalsize - -Il s'agit d'un {\bf FileSet} pr\'ed\'efini qui sauvegardera le r\'epertoire des -sources de Bacula. Les noms de r\'epertoires qui seront r\'eellement affich\'es -devraient correspondre \`a votre configuration. Dans une perspective de tests, -nous avons choisi un r\'epertoire de taille et de complexit\'e mod\'er\'ee (environ -40 Mo). Le FileSet {\bf Catalog} est utilis\'e pour sauvegarder le catalogue -Bacula et nous ne nous y attarderons pas pour le moment. Les entr\'ees {\bf I} -sont les fichiers ou r\'epertoires qui seront inclus dans la sauvegarde, tandis -que les entr\'ees {\bf E} sont ceux qui en seront exclus, quand aux entr\'ees {\bf O}, -ce sont les options sp\'ecifi\'ees pour ce FileSet. Vous pouvez changer ce qui est -sauvegard\'e en modifiant la ligne {\bf File =} de la ressource {\bf FileSet}. - - -Il est maintenant temps de lancer votre premi\`ere sauvegarde. Nous allons -sauvegarder votre r\'epertoire sources de Bacula vers un volume File dans votre -r\'epertoire {\bf /tmp} afin de vous montrer combien c'est facile. Saisissez : - -\footnotesize -\begin{verbatim} -status dir -\end{verbatim} -\normalsize - -Vous devriez obtenir : - -\footnotesize -\begin{verbatim} -rufus-dir Version: 1.30 (28 April 2003) -Daemon started 28-Apr-2003 14:03, 0 Jobs run. -Console connected at 28-Apr-2003 14:03 -No jobs are running. -Level Type Scheduled Name -================================================================= -Incremental Backup 29-Apr-2003 01:05 Client1 -Full Backup 29-Apr-2003 01:10 BackupCatalog -==== -\end{verbatim} -\normalsize - -O\`u les dates et le nom du Director seront diff\'erents et en accord avec votre -installation. Ceci montre qu'une sauvegarde incr\'ementale est planifi\'ee pour -le job {\bf Client1} \`a 1h05, et qu'une sauvegarde full est planifi\'ee pour -le job {\bf BackupCatalog} \`a 1h10. Vous devriez remplacer le nom {\bf Client1} -par celui de votre machine, sinon vous risquez la confusion lorsque vous -ajouterez de nouveaux clients. Pour ma machine r\'eelle, j'utilise {\bf Rufus} -plut\^ot que {\bf Client1}. - -A pr\'esent, tapez : - -\footnotesize -\begin{verbatim} -status client -\end{verbatim} -\normalsize - -Vous devriez obtenir : - -\footnotesize -\begin{verbatim} -The defined Client resources are: - 1: rufus-fd -Item 1 selected automatically. -Connecting to Client rufus-fd at rufus:8102 -rufus-fd Version: 1.30 (28 April 2003) -Daemon started 28-Apr-2003 14:03, 0 Jobs run. -Director connected at: 28-Apr-2003 14:14 -No jobs running. -==== -\end{verbatim} -\normalsize - -Dans ce cas, le client se nomme {\bf rufus-fd}, votre nom sera diff\'erent, mais la -ligne qui d\'ebute par {\bf rufus-fd Version...} est produite par votre File Daemon, -nous sommes donc maintenant surs qu'il fonctionne. - -Finalement, faites de m\^eme pour votre Storage Daemon : - -\footnotesize -\begin{verbatim} -status storage -\end{verbatim} -\normalsize - -Vous devriez obtenir : - -\footnotesize -\begin{verbatim} -The defined Storage resources are: - 1: File -Item 1 selected automatically. -Connecting to Storage daemon File at rufus:8103 -rufus-sd Version: 1.30 (28 April 2003) -Daemon started 28-Apr-2003 14:03, 0 Jobs run. -Device /tmp is not open. -No jobs running. -==== -\end{verbatim} -\normalsize - -Vous noterez que le p\'eriph\'erique du Storage Daemon par d\'efaut est nomm\'e {\bf File} -et qu'il utilise le p\'eriph\'erique {\bf /tmp}, qui n'est actuellement pas ouvert. - -Maintenant, lancez un job : - -\footnotesize -\begin{verbatim} -run -\end{verbatim} -\normalsize - -Vous devriez obtenir : - -\footnotesize -\begin{verbatim} -Using default Catalog name=MyCatalog DB=bacula -A job name must be specified. -The defined Job resources are: - 1: Client1 - 2: BackupCatalog - 3: RestoreFiles -Select Job resource (1-3): -\end{verbatim} -\normalsize - -Ici, Bacula affiche la liste des trois diff\'erents jobs que vous pouvez ex\'ecuter. -Choisissez le num\'ero {\bf 1} et validez (entr\'ee). - -Vous devriez obtenir : - -\footnotesize -\begin{verbatim} -Run Backup job -JobName: Client1 -FileSet: Full Set -Level: Incremental -Client: rufus-fd -Storage: File -Pool: Default -When: 2003-04-28 14:18:57 -OK to run? (yes/mod/no): -\end{verbatim} -\normalsize - -Prenez un peu de temps pour examiner cet affichage et le comprendre. Il vous -est demand\'e de valider, modifier ou annuler l'ex\'ecution d'un job nomm\'e -{\bf Client1} avec le FileSet {\bf Full Set} que nous avons affich\'e plus haut -en incr\'emental sur votre client rufus, utilisant le p\'eriph\'erique de stockage -{\bf File} et le pool {\bf Default} \`a la date indiqu\'ee sur la ligne "When". - -Nous avons le choix de valider ({\bf yes}), modifier un ou plusieurs des -param\`etres ci-dessus ({\bf mod}), ou de ne pas ex\'ecuter le job ({\bf no}). - -Validez l'ex\'ecution du job ({\bf yes}), vous devriez imm\'ediatement obtenir -l'invite de commande de la console (un ast\'erisque). Apr\`es quelques minutes, -la commande {\bf messages} devrait produire un r\'esultat tel que : - -\footnotesize -\begin{verbatim} -28-Apr-2003 14:22 rufus-dir: Last FULL backup time not found. Doing - FULL backup. -28-Apr-2003 14:22 rufus-dir: Start Backup JobId 1, - Job=Client1.2003-04-28_14.22.33 -28-Apr-2003 14:22 rufus-sd: Job Client1.2003-04-28_14.22.33 waiting. - Cannot find any appendable volumes. -Please use the "label" command to create a new Volume for: - Storage: FileStorage - Media type: File - Pool: Default -\end{verbatim} -\normalsize - -Le premier message signale qu'aucune sauvegarde full n'a jamais \'et\'e faite, et -que par cons\'equent Bacula \'el\`eve votre incr\'ementale en une Full (ce comportement -est normal). Le second message indique que le job a d\'emarr\'e avec le JobId 1 et le -troisi\`eme message vous informe que Bacula ne peut trouver aucun volume dans le -pool Default sur lequel \'ecrire les donn\'ees du job. Ceci est normal, car nous -n'avons encore cr\'e\'e (ou \'etiquet\'e) aucun volume. Bacula vous fournit tous les d\'etails -concernant le volume dont il a besoin. - -A ce point, le job est bloqu\'e en attente d'un volume. Vous pouvez le v\'erifier -en utilisant la commande {\bf status dir}. Pour continuer, vous devez cr\'eer un -volume sur lequel Bacula pourra \'ecrire. Voici la manipulation : - -\footnotesize -\begin{verbatim} -label -\end{verbatim} -\normalsize - -Bacula devrait afficher : - -\footnotesize -\begin{verbatim} -The defined Storage resources are: - 1: File -Item 1 selected automatically. -Enter new Volume name: -\end{verbatim} -\normalsize - -Entrez un nom commen\c {c}ant par une lettre et ne contenant que des chiffres et des lettres -(p\'eriodes, tirets et soulign\'e "\_" sont aussi autoris\'es). Par exemple entrez {\bf TestVolume001}, -vous devriez obtenir : - -\footnotesize -\begin{verbatim} -Defined Pools: - 1: Default -Item 1 selected automatically. -Connecting to Storage daemon File at rufus:8103 ... -Sending label command for Volume "TestVolume001" Slot 0 ... -3000 OK label. Volume=TestVolume001 Device=/tmp -Catalog record for Volume "TestVolume002", Slot 0 successfully created. -Requesting mount FileStorage ... -3001 OK mount. Device=/tmp -\end{verbatim} -\normalsize - -Finalement, tapez la commande {\bf messages}, vous devriez obtenir quelque chose comme : - -\footnotesize -\begin{verbatim} -28-Apr-2003 14:30 rufus-sd: Wrote label to prelabeled Volume - "TestVolume001" on device /tmp -28-Apr-2003 14:30 rufus-dir: Bacula 1.30 (28Apr03): 28-Apr-2003 14:30 -JobId: 1 -Job: Client1.2003-04-28_14.22.33 -FileSet: Full Set -Backup Level: Full -Client: rufus-fd -Start time: 28-Apr-2003 14:22 -End time: 28-Apr-2003 14:30 -Files Written: 1,444 -Bytes Written: 38,988,877 -Rate: 81.2 KB/s -Software Compression: None -Volume names(s): TestVolume001 -Volume Session Id: 1 -Volume Session Time: 1051531381 -Last Volume Bytes: 39,072,359 -FD termination status: OK -SD termination status: OK -Termination: Backup OK -28-Apr-2003 14:30 rufus-dir: Begin pruning Jobs. -28-Apr-2003 14:30 rufus-dir: No Jobs found to prune. -28-Apr-2003 14:30 rufus-dir: Begin pruning Files. -28-Apr-2003 14:30 rufus-dir: No Files found to prune. -28-Apr-2003 14:30 rufus-dir: End auto prune. -\end{verbatim} -\normalsize - -Si rien ne se passe dans l'imm\'ediat, vous pouvez continuer de rentrer la -commande {\bf messages} jusqu'\`a ce que le job se termine, ou utiliser la -commande {\bf autodisplay on} afin que les messages soient affich\'es d\`es-qu'ils -sont disponibles. - -si vous faites {\bf ls -l} dans votre r\'epertoire {\bf /tmp}, vous verrez -l'\'el\'ement suivant : - -\footnotesize -\begin{verbatim} --rw-r----- 1 kern kern 39072153 Apr 28 14:30 TestVolume001 -\end{verbatim} -\normalsize - -Il s'agit du volume File que vous venez juste d'\'ecrire, et qui contient toutes -les donn\'ees du job que vous venez d'ex\'ecuter. Si vous ex\'ecutez d'autres jobs, -il seront ajout\'es \`a la suite de ce volume, \`a moins que vous n'ayez sp\'ecifi\'e -un autre comportement. - -Vous vous demandez peut-\^etre s'il va vous falloir \'etiqueter vous m\^eme chaque -volume que Bacula sera amen\'e \`a utiliser. La r\'eponse, en ce qui concerne les -volumes disque tels que celui que nous avons utilis\'e, est non. Il est possible -de param\'etrer Bacula pour qu'il cr\'e\'ee lui m\^eme les volumes. En revanche, -pour les volumes de type cartouche, il vous faudra tr\`es probablement -\'etiqueter chaque volume que vous voulez utiliser. - -Si vous souhaitez en rester l\`a, saisissez simplement {\bf quit} dans la -console, puis stoppez Bacula avec {\bf ./bacula stop}. Pour nettoyer -votre installation des r\'esultats de vos tests, supprimez le fichier - {\bf /tmp/TestVolume001}, et r\'einitialisez votre catalogue en utilisant : - -\footnotesize -\begin{verbatim} -./drop_bacula_tables -./make_bacula_tables -\end{verbatim} -\normalsize - -Notez bien que ceci supprimera toutes les informations concernant les jobs pr\'ec\'edemment -ex\'ecut\'es et que, si c'est sans doute ce que vous souhaitez faire en fin de phase de -test, ce n'est g\'en\'eralement pas une op\'eration souhaitable en utilisation normale. - -Si vous souhaitez essayer de restaurer les fichiers que vous venez de sauvegarder, -lisez la section suivante. - -\label{restoring} - -\section{Restaurer vos fichiers} -\index[general]{Fichiers!Restaurer vos} -\index[general]{Restaurer vos fichiers} -\addcontentsline{toc}{section}{Restaurer vos fichiers} - -Si vous avez utilis\'e la configuration par d\'efaut et sauvegard\'e les sources de Bacula -comme dans la d\'emonstration ci-dessus, vous pouvez restaurer les fichiers sauvegard\'es -en saisissant les commandes suivantes dans la Console : - -\footnotesize -\begin{verbatim} -restore all -\end{verbatim} -\normalsize - -Vous obtiendrez : - -\footnotesize -\begin{verbatim} -First you select one or more JobIds that contain files -to be restored. You will be presented several methods -of specifying the JobIds. Then you will be allowed to -select which files from those JobIds are to be restored. - -To select the JobIds, you have the following choices: - 1: List last 20 Jobs run - 2: List Jobs where a given File is saved - 3: Enter list of comma separated JobIds to select - 4: Enter SQL list command - 5: Select the most recent backup for a client - 6: Select backup for a client before a specified time - 7: Enter a list of files to restore - 8: Enter a list of files to restore before a specified time - 9: Find the JobIds of the most recent backup for a client - 10: Find the JobIds for a backup for a client before a specified time - 11: Enter a list of directories to restore for found JobIds - 12: Cancel -Select item: (1-12): -\end{verbatim} -\normalsize - -Comme vous pouvez le constater, les options sont nombreuses, mais pour l'instant, -choisissez l'option {\bf 5} afin de s\'electionner la derni\`ere sauvegarde effectu\'ee. -Vous obtiendrez : - -\footnotesize -\begin{verbatim} -Defined Clients: - 1: rufus-fd -Item 1 selected automatically. -The defined FileSet resources are: - 1: 1 Full Set 2003-04-28 14:22:33 -Item 1 selected automatically. -+-------+-------+----------+---------------------+---------------+ -| JobId | Level | JobFiles | StartTime | VolumeName | -+-------+-------+----------+---------------------+---------------+ -| 1 | F | 1444 | 2003-04-28 14:22:33 | TestVolume002 | -+-------+-------+----------+---------------------+---------------+ -You have selected the following JobId: 1 -Building directory tree for JobId 1 ... -1 Job inserted into the tree and marked for extraction. -The defined Storage resources are: - 1: File -Item 1 selected automatically. -You are now entering file selection mode where you add and -remove files to be restored. All files are initially added. -Enter "done" to leave this mode. -cwd is: / -$ -\end{verbatim} -\normalsize - -(J'ai tronqu\'e l'affichage \`a droite par soucis de lisibilit\'e.) -Comme vous pouvez le constater au d\'ebut de cet affichage, Bacula conna\^it -vos clients, et puisque vous n'en avez qu'un, il est automatiquement -s\'electionn\'e. Il en va de m\^eme pour le FileSet. Bacula produit alors une -liste de tous les jobs qui constituent la sauvegarde courante. Dans le cas -pr\'esent, il n'y en a qu'un. Notez que le Storage Daemon est aussi -s\'electionn\'e automatiquement. Bacula est maintenant en mesure de produire -une {\bf arborescence} \`a partir de tous les fichiers qui ont \'et\'e -sauvegard\'es (il s'agit d'une repr\'esentation en m\'emoire de votre syst\`eme de -fichiers). A ce stade, vous pouvez utiliser les commandes {\bf cd }, {\bf ls} -et {\bf dir} pour naviguer dans l'arborescence et voir quels fichiers -peuvent \^etre restaur\'es. Par exemple, si je saisis {\bf cd /home/kern/bacula/bacula-1.30} -suivi de {\bf dir}, j'obtiens la liste de tous les fichiers du r\'epertoire source de -Bacula. Pour plus d'information sur ce sujet, veuillez consulter le chapitre -\ilink{La commande Restore}{_ChapterStart13}. - -Pour quitter, tapez simplement : - -\footnotesize -\begin{verbatim} -done -\end{verbatim} -\normalsize - -Vous obtiendrez : - -\footnotesize -\begin{verbatim} -Bootstrap records written to - /home/kern/bacula/testbin/working/restore.bsr -The restore job will require the following Volumes: - - TestVolume001 -1444 files selected to restore. -Run Restore job -JobName: RestoreFiles -Bootstrap: /home/kern/bacula/testbin/working/restore.bsr -Where: /tmp/bacula-restores -Replace: always -FileSet: Full Set -Client: rufus-fd -Storage: File -JobId: *None* -When: 2005-04-28 14:53:54 -OK to run? (yes/mod/no): -\end{verbatim} -\normalsize - -Si vous acceptez ({\bf yes}), vos fichiers seront restaur\'es vers le r\'epertoire -{\bf /tmp/bacula-restores}. Si vous pr\'ef\'erez restaurer les fichiers \`a leurs -emplacements d'origine, vous devez utiliser l'option {\bf mod} et r\'egler -explicitement le param\`etre {\bf Where} \`a vide ou "/". Nous vous conseillons de -poursuivre avec {\bf yes}. Apr\`es quelques instants, la commande {\bf messages} -devrait produire la liste des fichiers restaur\'es, ainsi qu'un r\'esum\'e du job -qui devrait ressembler \`a ceci : - -\footnotesize -\begin{verbatim} -28-Apr-2005 14:56 rufus-dir: Bacula 1.30 (28Apr03): 28-Apr-2003 14:56 -JobId: 2 -Job: RestoreFiles.2005-04-28_14.56.06 -Client: rufus-fd -Start time: 28-Apr-2005 14:56 -End time: 28-Apr-2005 14:56 -Files Restored: 1,444 -Bytes Restored: 38,816,381 -Rate: 9704.1 KB/s -FD termination status: OK -Termination: Restore OK -28-Apr-2005 14:56 rufus-dir: Begin pruning Jobs. -28-Apr-2005 14:56 rufus-dir: No Jobs found to prune. -28-Apr-2005 14:56 rufus-dir: Begin pruning Files. -28-Apr-2005 14:56 rufus-dir: No Files found to prune. -28-Apr-2005 14:56 rufus-dir: End auto prune. -\end{verbatim} -\normalsize - -Apr\`es avoir quitt\'e la Console, vous pouvez examiner les fichiers dans le -r\'epertoire {\bf /tmp/bacula-restores}, il contient l'arborescence avec tous -vos fichiers. Supprimez-le apr\`es avoir v\'erifi\'e : - -\footnotesize -\begin{verbatim} -rm -rf /tmp/bacula-restore -\end{verbatim} -\normalsize - -\section{Quitter le programme Console} -\index[general]{Programme!Quitter Console } -\index[general]{Quitter le programme Console} -\addcontentsline{toc}{section}{Quitter le programme Console} - -Saisissez simplement la commande {\bf quit}. -\label{SecondClient} - -\section{Ajouter un client} -\index[general]{Client!Ajouter } -\index[general]{Ajouter un client } -\addcontentsline{toc}{section}{Ajouter un client} - -Si vous \^etes parvenus \`a faire fonctionner tous les exemples ci-dessus, vous \^etes -sans doute pr\`et \`a ajouter un nouveau client (File Daemon), c'est \`a dire une seconde -machine que vous souhaitez sauvegarder. La seule chose \`a installer sur la nouvelle -machine est le binaire {\bf bacula-fd} (ou {\bf bacula-fd.exe} pour Windows) et son -fichier de configuration {\bf bacula-fd.conf}. Vous pouvez d\'emarrer en copiant le fichier -pr\'ec\'edemment cr\'e\'e moyennant une modification mineure pour l'adapter au nouveau client : -changez le nom de File Daemon ({\bf rufus-fd} dans l'exemple ci-dessus) en le nom -que vous avez choisi pour le nouveau client. Le mieux est d'utiliser le nom de -la machine. Par exemple : - -\footnotesize -\begin{verbatim} -... -# -# "Global" File daemon configuration specifications -# -FileDaemon { # this is me - Name = rufus-fd - FDport = 9102 # where we listen for the director - WorkingDirectory = /home/kern/bacula/working - Pid Directory = /var/run -} -... -\end{verbatim} -\normalsize - -devient : - -\footnotesize -\begin{verbatim} -... -# -# "Global" File daemon configuration specifications -# -FileDaemon { # this is me - Name = matou-fd - FDport = 9102 # where we listen for the director - WorkingDirectory = /home/kern/bacula/working - Pid Directory = /var/run -} -... -\end{verbatim} -\normalsize - -O\`u {\bf rufus-fd} est devenu {\bf matou-fd} (je ne montre qu'une partie du fichier). -Le choix des noms vous appartient. Pour l'instant, je vous recommande de ne rien changer -d'autre. Plus tard, vous changerez le mot de passe. - -Installez cette configuration sur votre seconde machine. Il vous faut maintenant -ajouter quelques lignes \`a votre {\bf bacula-dir.conf} pour d\'efinir le nouveau -File Daemon. En vous basant sur l'exemple initial qui devrait \^etre install\'e -sur votre syst\`eme, ajoutez les lignes suivantes (essentiellement, une copie des lignes -existantes avec seulement les noms modifi\'es) \`a votre {\bf bacula-dir.conf} : - -\footnotesize -\begin{verbatim} -# -# Define the main nightly save backup job -# By default, this job will back up to disk in /tmp -Job { - Name = "Matou" - Type = Backup - Client = matou-fd - FileSet = "Full Set" - Schedule = "WeeklyCycle" - Storage = File - Messages = Standard - Pool = Default - Write Bootstrap = "/home/kern/bacula/working/matou.bsr" -} -# Client (File Services) to backup -Client { - Name = matou-fd - Address = matou - FDPort = 9102 - Catalog = MyCatalog - Password = "xxxxx" # password for - File Retention = 30d # 30 days - Job Retention = 180d # six months - AutoPrune = yes # Prune expired Jobs/Files -} -\end{verbatim} -\normalsize - -Assurez-vous que le param\`etre Address de la ressource Storage a pour valeur -le nom pleinement qualifi\'e et non quelque chose comme "localhost". L'adresse -sp\'ecifi\'ee est envoy\'ee au client et doit \^etre un nom pleinement qualifi\'e. Si vous -utilisez "localhost", l'adresse du Storage Daemon ne sera pas r\'esolue -correctement, il en r\'esultera un {\it timeout} lorsque le File Daemon -\'echouera \`a connecter le Storage Daemon. - -Il n'y a rien d'autre \`a faire. J'ai copi\'e les ressources existantes pour cr\'eer -un second job (Matou) pour sauvegarder le second client (matou-fd). le client -se nomme {\bf matou-fd} et le job {\bf Matou}, le fichier bootstrap est modifi\'e -mais tout le reste est inchang\'e. Ceci signifie que Matou sera sauvegard\'e -avec la m\^eme planification sur les m\^emes cartouches. Vous pourrez changer ceci -plus tard, pour le moment, restons simples. - -La seconde modification consiste en l'ajout d'une nouvelle ressource Client -qui d\'efinit {\bf matou-fd} et qui a l'adresse correcte {\bf matou} (mais dans -la vraie vie, vous pouvez avoir besoin d'un nom pleinement qualifi\'e ou d'une -adresse IP. J'ai aussi conserv\'e le m\^eme mot de passe (xxxxx dans l'exemple). - -A ce stade, il suffit de red\'emarrer Bacula pour qu'il prenne en compte vos -modifications. L'invite que vous avez vu plus haut devrait maintenant -inclure la nouvelle machine. - -Pour une utilisation en production vous voudrez probablement utiliser -plusieurs pools et diff\'erentes planifications. Il vous appartient de faire les -adaptations qui seyent \`a vos besoins. Dans tous les cas, n'oubliez pas de -changer les mots de passe dans les fichiers de configuration du Director et -du Client pour des raisons de s\'ecurit\'e. - -Vous trouverez des astuces importantes concernant le changement des noms et mots de -passe, ainsi qu'un diagramme d\'ecrivant leurs correspondances dans la section -\ilink{Erreurs d'authentification}{AuthorizationErrors} du chapitre FAQ de ce manuel. - -\section{Lorsque la cartouche est pleine} -\label{FullTape} -\index[general]{pleine!Lorsque la cartouche } -\index[general]{Lorsque la cartouche est pleine} -\addcontentsline{toc}{section}{Lorsque la cartouche est pleine} -Si vous avez planifi\'e votre job, il viendra un moment o\`u la cartouche sera pleine -et o\`u {\bf Bacula} ne pourra continuer. Dans ce cas, Bacula vous enverra un message -tel que : - -\begin{verbatim} -rufus-sd: block.c:337 === Write error errno=28: ERR=No space left - on device -\end{verbatim} -\normalsize - -Ceci indique que Bacula a re\c {c}u une erreur d'\'ecriture \`a cause de la carouche pleine. -Bacula va maintenant rechercher une cartouche utilisable dans le pool sp\'ecifi\'e -pour le job. Dans la situation id\'eale, vous avez r\'egl\'e correctement vos r\'etentions -et sp\'ecifi\'e que vos cartouches peuvent \^etre recycl\'ees automatiquement. Dans ce cas, -Bacula recycle automatiquement vos cartouches sorties de r\'etention et est en mesure -de r\'e\'ecrire dessus. Pour plus d'informations sur le recyclage, veuillez consulter -le chapitre \ilink{Recyclage}{_ChapterStart22} de ce manuel. Si vous constatez que -vos cartouches ne sont pas recycl\'ees correctement, consultez la section sur le -\ilink{Recyclage manuel}{manualrecycling} du chapitre Recyclage. - -Si comme moi, vous avez un tr\`es grand nombre de cartouches que vous \'etiquetez -avec la date de premi\`ere \'ecriture, si vous n'avez pas r\'egl\'e vos p\'eriodes de -r\'etention, Bacula ne trouvera pas de cartouche dans le pool et il vous enverra -un message tel que : - -\footnotesize -\begin{verbatim} -rufus-sd: Job kernsave.2002-09-19.10:50:48 waiting. Cannot find any - appendable volumes. -Please use the "label" command to create a new Volume for: - Storage: SDT-10000 - Media type: DDS-4 - Pool: Default -\end{verbatim} -\normalsize - -Ce message sera r\'ep\'et\'e une heure plus tard, puis deux heures plus tard et -ainsi de suite en doublant \`a chaque fois l'intervalle \`a concurrence d'un jour -jusqu'\`a ce que vous cr\'eiez un volume. - -Que faire dans cette situation ? - -La r\'eponse est simple : d'abord, fermez le lecteur \`a l'aide de la commande -{\bf unmount} du programme Console. Si vous n'avez qu'un lecteur, il sera -s\'electionn\'e automatiquement, sinon assurez-vous de d\'emonter celui sp\'ecifi\'e -dans le message (dans ce cas {\bf STD-10000}). - -Ensuite, retirez la cartouche du lecteur et ins\'erez-en une vierge. Notez que -sur certains lecteurs anciens, il peut \^etre n\'ecessaire d'\'ecrire une marque de -fin de fichier ({\bf mt \ -f \ /dev/nst0 \ weof}) pour \'eviter que le lecteur -ne d\'eroule toute la cartouche lorsque Bacula tente de lire le label. (NDT : j'ai un doute, la vo dit : "to prevent the drive from running away when Bacula attempts to read the label.") - -Finalement, utilisez la commande {\bf label} dans la console pour \'ecrire un -label sur le nouveau volume. la commande {\bf label} va contacter le Storage -Daemon pour qu'il \'ecrive l'\'etiquette logicielle. Si cette op\'eration se termine -correctement, le nouveau volume est ajout\'e au pool et la commande {\bf mount} est -envoy\'ee au Storage Daemon. Voyez les sections pr\'ec\'edentes de ce chapitre pour plus -de d\'etails sur l'\'etiquetage des cartouches. - -Bacula peut maintenant poursuivre le job et continuer d'\'ecrire les donn\'ees -sauvegard\'ees sur le nouveau volume. - -Si Bacula cycle sur un pool de volumes, au lieu du message ci-dessus - "Cannot find any appendable volumes.", Bacula peut vous demander de -monter un volume particulier. Dans ce cas, essayez de le satisfaire. Si, pour -quelque raison, vous n'avez plus le volume, vous pouvez monter n'importe quel -autre volume du pool, pourvu qu'il soit utilisable, Bacula l'utilisera. -La commande {\bf list volumes} du programme Console permet de d\'eterminer -les volumes utilisables et ceux qui ne le sont pas. - -Si, comme moi, vous avez param\'etr\'e correctement vos p\'eriodes de r\'etention, mais -n'avez plus aucun volume libre, vous pouvez r\'e-\'etiqueter et r\'e-utiliser un volume -comme suit : - -\begin{itemize} -\item Saisissez {\bf list volumes} dans la console et s\'electionnez le volume le plus -anciens pour le r\'e-\'etiqueter. -\item Si vos p\'eriodes de r\'etention sont judicieusement choisies, le volume devrait -avoir le statut {\bf Purged}. -\item Si le statut n'est pas {\bf Purged}, il vous faut purger le catalogue des jobs \'ecrits -sur ce volume. Ceci peut \^etre fait avec la commande {\bf purge jobs volume} dans -la console. Si vous avez plusieurs pools, vous serez invit\'e \`a choisir lequel avant -de devoir saisir le VolumeName (ou MediaId). -\item Enfin, utilisez simplement la commande {\bf relabel} pour r\'e-\'etiqueter le -volume. - \end{itemize} - -Pour r\'e-\'etiqueter manuellement le volume, suivez les \'etapes suppl\'ementaire ci-dessous : - -\begin{itemize} -\item Effacez le volume du catalogue avec la commande {\bf delete volume} dans la -console (s\'electionnez le VolumeName ou le MediaId lorsque vous y \^etes invit\'e). -\item Utilisez la commande {\bf unmount} pour d\'emonter l'ancienne cartouche. -\item R\'e-\'etiquetez physiquement l'ancienne cartouche de sorte qu'elle puisse -\^etre r\'eutilis\'ee. -\item Ins\'erez l'ancienne cartouche dans le lecteur. -\item Depuis la ligne de commande, saississez : {\bf mt \ -f \ /dev/st0 \ rewind} et -{\bf mt \ -f \ /dev/st0 \ weof}, o\`u vous prendrez soin de substituer la cha\^ine d\'esignant - votre lecteur \`a {\bf /dev/st0}. -\item Utilisez la commande {\bf label} dans la console pour \'ecrire une nouvelle -\'etiquette Bacula sur votre cartouche. -\item Utilisez la commande {\bf mount}, si ce n'est pas r\'ealis\'e automatiquement, afin -que Bacula commence \`a utiliser la cartouche fraichement \'etiquet\'ee. -\end{itemize} - -\section{D'autres commandes utiles de la console Bacula} -\index[general]{Commands!autres commandes utiles de la console Bacula} -\index[general]{autres commandes utiles de la console Bacula} -\addcontentsline{toc}{section}{D'autres commandes utiles de la console Bacula} - -\begin{description} - -\item [status dir] - \index[console]{status dir } - Affiche un \'etat de tous les jobs en cours d'ex\'ecution ainsi que tous les - jobs programm\'es dans les prochine 24 heures - -\item [status] - \index[console]{status } - Le programme Console vous invite \`a s\'electionner un {\it daemon}, puis - il s'enquiert de l'\'etat de ce {\it daemon}. - -\item [status jobid=nn] - \index[console]{status jobid } - Affiche un \'etat du JobId nn s'il est en cours d'ex\'ecution. Le Storage - Daemon est aussi contact\'e pour produire un \'etat du job. - -\item [list pools] - \index[console]{list pools } - Affiche la liste des pools d\'efinis dans le catalogue. - -\item [list media] - \index[console]{list media } - Affiche la liste des m\'edia d\'efinis dans le catalogue. - -\item [list jobs] - \index[console]{list jobs } - Affiche la liste de tous les jobs enregistr\'es dans le catalogue et squi ont \'et\'e - ex\'ecut\'es. - -\item [list jobid=nn] - \index[console]{list jobid } - Affiche le JobId nn depuis le catalogue. - -\item [list jobtotals] - \index[console]{list jobtotals } - Affiche les totaux pour tous le jobs du catalogue. - -\item [list files jobid=nn] - \index[console]{list files jobid } - Affiche la liste des fichiers sauvegard\'es pour le JobId nn. - -\item [list jobmedia] - \index[console]{list jobmedia } - Affiche des informations relatives aux m\'edia utilis\'es pour chaque job ex\'ecut\'e. - -\item [messages] - \index[console]{messages } - Affiche tous les messages redirig\'es vers la console. - -\item [unmount storage=storage-name] - \index[console]{unmount storage } - D\'emonte le lecteur associ\'e au p\'eriph\'erique de stockage d\'esign\'e par - {\bf storage-name} s'il n'est pas en cours d'utilisation. Cette commande - est utile si vous souhaitez que Bacula lib\`ere le lecteur. - -\item [mount storage=storage-name] - \index[sd]{mount storage } - Le lecteur associ\'e au p\'eriph\'erique de stockage est mont\'e \`a nouveau. Lorsque - Bacula atteint la fin d'un volume et vous demande d'en monter un nouveau, - vous devez utiliser cette commande apr\`es avoir introduit une nouvelle - cartouche dans le lecteur. En effet, c'est le signal qui indique \`a Bacula - qu'il peut commencer \`a lire ou \'ecrire sur la cartouche. - -\item [quit] - \index[sd]{quit } - Permet de quitter le programme Console. -\end{description} - -La plupart des commandes cit\'ees ci-dessus, \`a l'exception de {\bf list}, -vous invitent \`a compl\'eter la liste des arguments fournis si vous -vous contentez d'entrer le nom de la commande. - -\section{D\'ebugger la sortie des daemons} -\index[general]{D\'ebugger sortie daemons} -\index[general]{Output!D\'ebugger daemons} -\addcontentsline{toc}{section}{D\'ebugger la sortie des daemons} - -Si vous voulez d\'ebugger la sortie des {\it daemons} en cours d'ex\'ecution, -lancez-les, depuis le r\'epertoire d'installation, comme suit : - -\footnotesize -\begin{verbatim} -./bacula start -d100 -\end{verbatim} -\normalsize - -Cette possibilit\'e peut vous fournir une aide pr\'ecieuse si vos {\it daemons} -ne d\'emarrent pas correctement. Normalement, la sortie des {\it daemons} est -dirig\'ee vers le p\'eriph\'erique NULL, avec un niveau de d\'ebuggage sup\'erieur \`a -z\'ero, elle est dirig\'ee vers le terminal de lancement. - -Pour stopper les trois {\it daemons}, tapez simplement : - -\footnotesize -\begin{verbatim} -./bacula stop -\end{verbatim} -\normalsize - -dans le r\'epertoire d'installation. - -L'ex\'ecution de {\bf bacula stop} peut signaler des pids non trouv\'es. C'est Ok, -sp\'ecialement si l'un des {\bf bacula stop} est mort, ce qui est tr\`es rare. - -Pour faire une sauvegarde compl\`ete (Full) du syst\`eme, chaque File Daemon doit -\^etre ex\'ecut\'e en tant que root afin d'avoir les permissions requises pour acc\'eder -\`a tous les fichiers. Les autres {\it daemons} n'ont pas besoin des privil\`eges -root. Cependant, le Storage Daemon doit \^etre capable d'acc\'eder aux lecteurs, ce qui -Sur beaucoup de syst\`emes, n'est possible que pour root. Vous pouvez, au choix, -ex\'ecuter le Storage Daemon en tant que root, ou changer les permissions sur les -lecteurs pour autoriser les acc\`es non-root. MySQL et PostgreSQL peuvent \^etre -install\'es et ex\'ecut\'es avec un userid quelconque, les privil\`eges root ne sont pas -requis. - -\section{Soyez patient lorsque vous d\'emarrez les {\it daemons} ou montez des -cartouches vierges} -\index[general]{Soyez patient lorsque vous d\'emarrez les {\it daemons} ou montez des -cartouches vierges} -\index[general]{Cartouches!Soyez patient lorsque vous d\'emarrez les {\it daemon}s ou montez} -\addcontentsline{toc}{section}{Soyez patient lorsque vous d\'emarrez les {\it daemon}s -ou montez des cartouches vierges} - -Lorsque vous lancez les {\it daemons} Bacula, le Storage Daemon tente d'ouvrir -tous les p\'eriph\'eriques de stockage d\'efinis et de v\'erifier le volumes courrament -mont\'es. Il n'accepte aucune connection de la console tant que tous les p\'eriph\'eriques -n'ont pas \'et\'e v\'erifi\'es. Une cartouche qui a \'et\'e utilis\'e pr\'ec\'edemment doit \^etre -rembobin\'ee, ce qui, sur certain lecteurs, peut prendre plusieurs minutes. -Par cons\'equent, vous devriez faire preuve d'un peu de patience lorsue vous -tentez de contacter le Storage Daemon pour la premi\`ere fois apr\`es le -lancement de Bacula. Si vous avez un acc\`es visuel \`a votre lecteur, celui-ci -devrait \^etre pr\`et \`a l'emploi lorsque son t\'emoin lumineux cesse de clignoter. - -Les m\^emes consid\'erations s'appliquent si vous avez mont\'e une cartouche vierge -dans un lecteur tels qu'un HP DLT. Il peut s'\'ecouler une \`a deux minutes avant -que le lecteur se rende compte que la cartouche est vierge. Si vous tentez -de la monter pendant cette p\'eriode, il est probable que vous aller geler votre -pilote SCSI (c'est le cas sur mon syst\`eme RedHat). Par cons\'equent, nous vous -enjoignons une fois encore \`a \^etre patient lors de l'insertion de cartouches vierges. -Laissez le lecteur s'initialiser avant de tenter d'y acc\'eder. - -\section{Probl\`emes de connection du FD vers le SD} -\index[general]{Probl\`emes de connection du FD vers le SD } -\index[general]{SD!Probl\`emes de connection du FD vers le} -\addcontentsline{toc}{section}{Probl\`emes de connection du FD vers le SD} - -Si l'un ou plusieurs de vos File Daemons rencontre des difficult\'es \`a se connecter -au Storage Daemon, c'est tr\`es probablement que vous n'avez pas utilis\'e un nom -pleinement qualifi\'e pour la directive {\bf Address} de la ressource Storage -du fichier de configuration du Director. Le r\'esolveur de la machine cliente -(celle qui ex\'ecute le FD) doit \^etre capable de r\'esoudre le nom que vous avez -sp\'ecifi\'e dans cette directive en une adresse IP. Un exemple d'adresse ne -fonctionnant pas est {\bf localhost}. Un exemple qui pourrait fonctionner : -{\bf megalon}. Un exemple qui a encore plus de chances de fonctionner : -{\bf magalon.mydomain.com}. Sur les syst\`emes Win32, si vous ne disposez pas d'un -bon r\'esolveur (c'est souvent le cas sur Win98), vous pouvez essayer en utilisant -une adresse IP plut\^ot qu'un nom. - -Si votre adresse est correcte, assurez vous qu'aucun autre programme n'utilise -le port 9103 sur la machine qui h\'eberge le Storage Daemon. Les num\'eros de ports -de Bacula sont autoris\'es par l'IANA, et ne devraient donc pas \^etre utilis\'es par -d'autres programmes, mais il semble que certaines imprimantes HP les utilisent. -Ex\'ecutez la commande {\bf netstat -a} sur la machine qui h\'eberge le Storage -Daemon pour d\'eterminer qui utilise le port 9103 (utilis\'e pour les communications -du FD vers le SD). - -\section{Options en ligne de commande des Daemons} -\index[general]{Options en ligne de commande des Daemons} -\index[general]{Options!en ligne de commande des Daemons} -\addcontentsline{toc}{section}{Options en ligne de commande des Daemons} - -Chacun des trois {\it daemons} (Director, File, Storage) acceptent quelques options -sur la ligne de commande. En g\'en\'eral, chacun d'entre eux, de m\^eme que le -programme Console, admet les otpions suivantes : - - -\begin{description} - -\item [-c \lt{}file\gt{}] - \index[sd]{-c \lt{}file\gt{} } - D\'efinit le fichier de configuration \`a utiliser. La valeur par d\'efaut est le -nom du {\it daemon} suivi de {\bf conf}, par exemple {\bf bacula -dir.conf} pour -le Director, {\bf bacula-fd} pour le File Daemon, et {\bf bacula-sd.conf} pour -le Storage Daemon. - -\item [-d nn] - \index[sd]{-d nn } - Fixe le niveau de d\'ebuggage \`a la valeur {\bf nn}. Les niveaux les plus \'elev\'e -permettent d'afficher plus d'information sur STDOUT concernant ce que le {\it daemon} est -en train de faire. - -\item [-f] - Ex\'ecute le {\it daemon} en arri\`ere plan. Cette option est requise pour ex\'ecuter les -{\it daemon}s avec le debugger. - -\item [-s] - Ne pas capturer les signaux. Cette option est requise pour ex\'ecuter les -{\it daemon}s avec le debugger. - -\item [-t] - Lire les fichiers de configuration et afficher les messages d'erreur, et quitter -imm\'ediatement. Tr\`es utile pour tester la syntaxe de nouveaux fichiers de configuration. - -\item [-v] - Mode verbeux. Utile pour rendre les messages d'erreur et d'information plus complets. - -\item [-?] - Affiche la version et la liste des options. - \end{description} - -Le Director a les options sp\'ecifiques suivantes : - -\begin{description} - -\item [-r \lt{}job\gt{}] - \index[fd]{-r \lt{}job\gt{} } - Ex\'ecute le job d\'esign\'e imm\'ediatement. Ceci ne devrait servir qu'\`a des fins -de d\'ebuggage. -\end{description} - -Le File Daemon les options sp\'ecifiques suivantes : - -\begin{description} - -\item [-i] - Suppose que le {\it daemon} est appel\'e par {\bf inetd} ou {\bf xinetd}. Dans ce cas, -le {\it daemon} suppose qu'une connection est d\'ej\`a \'etablie et qu'elle est pass\'ee en tant que -STDIN. Le {\it daemon} s'arr\`ete d\`es que la connection se termine. -\end{description} - -Le Storage Daemon n'a pas d'options sp\'ecifiques. - -Le programme Console n'a pas d'options sp\'ecifiques. - -\section{Cr\'eer un Pool} -\label{Pool} -\index[general]{Pool!Cr\'eer un } -\index[general]{Cr\'eer un Pool } -\addcontentsline{toc}{section}{Cr\'eer un Pool} - -La cr\'eation de pool est automatique au d\'emarrage de Bacula, aussi si vous -comprenez d\'ej\`a le concept de pools et leur fonctionnement, vous pouvez passer -\`a la section suivante. - -Lorsque vous ex\'ecutez un job, Bacula doit d\'eterminer quel volume utiliser pour -sauvegarder le FileSet. Plut\^ot que de sp\'ecifier un volume directement, vous -sp\'ecifiez l'ensemble de volumes dans lequel vous autorisez Bacula \`a puiser -lorsqu'il lui faut un volume pour \'ecrire les donn\'ees sauvegard\'ees. D\`es lors, Bacula -se charge de s\'electionner le premier volume utilisable dans le pool appropri\'e -au p\'eriph\'erique que vous avez sp\'ecifi\'e pour le job ex\'ecut\'e. Lorsqu'un volume est -plein, Bacula change son VolStatus de {\bf Append} en {\bf Full}, et utilise le -volume suivant, et ainsi de de suite. S'il n'y a pas de volume utilisable, -Bacula envoie un message \`a l'op\'erateur pour r\'eclamer la cr\'eation d'un -volume appropri\'e. - -{\bf Bacula} garde trace des noms de pools, des volumes contenus dans les pools, -et de plusieurs caract\'eristiques de chacun de ces volumes. - -Lorsque Bacula d\'emarre, il s'assure que toutes les d\'efinitions de ressources Pool -ont \'et\'e enregistr\'ees dans le catalogue. Vous pouvez le v\'erifier avec la commande : - -\footnotesize -\begin{verbatim} -list pools -\end{verbatim} -\normalsize - -du programme Console, qui devrait produire quelque chose comme : - -\footnotesize -\begin{verbatim} -*list pools -Using default Catalog name=MySQL DB=bacula -+--------+---------+---------+---------+----------+-------------+ -| PoolId | Name | NumVols | MaxVols | PoolType | LabelFormat | -+--------+---------+---------+---------+----------+-------------+ -| 1 | Default | 3 | 0 | Backup | * | -| 2 | File | 12 | 12 | Backup | File | -+--------+---------+---------+---------+----------+-------------+ -* -\end{verbatim} -\normalsize - -Si vous tentez de cr\'eer un pool existant, Bacula affiche : - -\footnotesize -\begin{verbatim} -Error: Pool Default already exists. -Once created, you may use the {\bf update} command to -modify many of the values in the Pool record. -\end{verbatim} -\normalsize - -\label{Labeling} - -\section{Etiqueter vos Volumes} -\index[general]{Volumes!Etiqueter vos} -\index[general]{Etiqueter vos Volumes} -\addcontentsline{toc}{section}{Etiqueter vos Volumes} - -Bacula exige que chaque volume comporte une \'etiquette (NDT : label) logicielle. -Il existe plusieurs strat\'egies pour \'etiqueter les volumes. Celle que j'utilise -consiste \`a les \'etiqueter \`a l'aide du programme Console au fur et \`a mesure qu'ils -sont requis par Bacula. Ainsi, lorsqu'il a besoin d'un volume qu'il ne trouve pas -dans son catalogue, Bacula m'envoie un e-mail pour m'enjoindre \`a ajouter un -volume au pool. J'utilise alors la commande {\bf label} dans la console pour -\'etiqueter un nouveau volume et le d\'efinir dans le catalogue, apr\`es quoi Bacula -est en mesure de l'utiliser. Alternativement, je peux utiliser la commande -{\bf relabel} pour r\'e-\'etiquter un volume qui n'est plus utilis\'e, pourvu qu'il ait -le VolStatus {\bf Purged}. - -Une autre strat\'egie consiste \`a \'etiqueter un ensemble de volumes, et \`a les -utiliser au fur et \`a mesure que Bacula les r\'eclame. C'est le plus souvent ce qui -est fait lorsque vous cyclez sur un groupe de volumes, par exemple avec une -librairie. Pour plus de d\'etails sur le recyclage, veuillez consulter le -chapitre \ilink{Recyclage automatique des volumes}{_ChapterStart22} de ce -manuel. - -Si vous ex\'ecutez un job Bacula alors que vous n'avez pas de volumes -\'etiquet\'es dans le pool concern\'e, Bacula vous en informe, et vous pouvez les -cr\'eer "\`a la vol\'ee". Dans mon cas, j'\'etiquette mes cartouches avec la date, -par exemple : {\bf DLT-18April02}. Voyez ci-dessous pour plus de d\'etails -sur l'usage de la commande {\bf label}. - -\section{Etiquetage des volumes dans la console} -\index[general]{Etiquetage des volumes dans la console} -\index[general]{Console!Etiquetage des volumes dans la} -\addcontentsline{toc}{section}{Etiquetage des volumes dans la console} - -L'\'etiquetage des volumes se fait, en principe, avec le programme Console. - -\begin{enumerate} -\item ./bconsole -\item label - \end{enumerate} - -Si Bacula annonce que vous ne pouvez \'etiqueter une cartouche au motif qu'elle -porte d\'ej\`a une \'etiquette, d\'emontez-la avec la commande {\bf unmount}, puis -recommencez avec une cartouche vierge. - -Etand donn\'e que le support de stockage physique est diff\'erent pour chaque -p\'eriph\'erique, la commande {\bf label} vous propose une liste de ressources -Storage d\'efinies telle que celle-ci : - -\footnotesize -\begin{verbatim} -The defined Storage resources are: - 1: File - 2: 8mmDrive - 3: DLTDrive - 4: SDT-10000 -Select Storage resource (1-4): -\end{verbatim} -\normalsize - -A ce stade, vous devriez avoir une cartouche vierge dans votre lecteur -d'un type correspondant \`a la ressource Storage que vous avez s\'electionn\'e. - -Bacula vous demande le nom du volume : - -\footnotesize -\begin{verbatim} -Enter new Volume name: -\end{verbatim} -\normalsize - -S'il proteste : - -\footnotesize -\begin{verbatim} -Media record for Volume xxxx already exists. -\end{verbatim} -\normalsize - -Cela signifie que le nom de volume {\bf xxxx} que vous avez entr\'e existe d\`ej\`a -dans le catalogue. Vous pouvez afficher la liste des m\'edia d\'efinis avec la -commande {\bf list media}. Notez que la colonne LastWritten a ici \'et\'e -tronqu\'ee pour permettre un affichage propre. - -\footnotesize -\begin{verbatim} -+---------------+---------+--------+----------------+-----/~/-+------------+-----+ -| VolumeName | MediaTyp| VolStat| VolBytes | LastWri | VolReten | Recy| -+---------------+---------+--------+----------------+---------+------------+-----+ -| DLTVol0002 | DLT8000 | Purged | 56,128,042,217 | 2001-10 | 31,536,000 | 0 | -| DLT-07Oct2001 | DLT8000 | Full | 56,172,030,586 | 2001-11 | 31,536,000 | 0 | -| DLT-08Nov2001 | DLT8000 | Full | 55,691,684,216 | 2001-12 | 31,536,000 | 0 | -| DLT-01Dec2001 | DLT8000 | Full | 55,162,215,866 | 2001-12 | 31,536,000 | 0 | -| DLT-28Dec2001 | DLT8000 | Full | 57,888,007,042 | 2002-01 | 31,536,000 | 0 | -| DLT-20Jan2002 | DLT8000 | Full | 57,003,507,308 | 2002-02 | 31,536,000 | 0 | -| DLT-16Feb2002 | DLT8000 | Full | 55,772,630,824 | 2002-03 | 31,536,000 | 0 | -| DLT-12Mar2002 | DLT8000 | Full | 50,666,320,453 | 1970-01 | 31,536,000 | 0 | -| DLT-27Mar2002 | DLT8000 | Full | 57,592,952,309 | 2002-04 | 31,536,000 | 0 | -| DLT-15Apr2002 | DLT8000 | Full | 57,190,864,185 | 2002-05 | 31,536,000 | 0 | -| DLT-04May2002 | DLT8000 | Full | 60,486,677,724 | 2002-05 | 31,536,000 | 0 | -| DLT-26May02 | DLT8000 | Append | 1,336,699,620 | 2002-05 | 31,536,000 | 1 | -+---------------+---------+--------+----------------+-----/~/-+------------+-----+ -\end{verbatim} -\normalsize - -Une fois que Bacula a v\'erifi\'e que le volume n'existe pas encore, il vous -demande le pool dans lequel vous souhaitez que le volume soit cr\'e\'e. S'il -n'existe qu'un pool, il est s\'electionn\'e automatiquement. - -Si la cartouche est \'etiquet\'ee correctement, un enregistrement de volume est -aussi cr\'e\'e dans le pool. Ainsi, le nom du volume et tous ses attributs -appara\^itront lorque vous afficherez les volumes du pool. De plus, le volume -est disponible pour les sauvegardes, pourvu que le MediaType co\"¨incide avec -celui requis par le Storage Daemon. - -Lorsque vous avez \'etiquet\'e la cartouche, vous n'avez r\'epondu qu'\`a quelques -questions la concernant -- principalement son nom, et \'eventuellement le {\it Slot}. -Cependant, un enregistrement de volume dans le catalogue (connu au niveau interne -en tant qu'enregistrement Media) contient un certain nombre d'attributs. -La plupart d'entre eux sont renseign\'es selon les valeurs par d\'efaut qui ont \'et\'e -d\'efinies lors de la cr\'eation du pool (au trement dit, le pool comporte la plupart des -attributs par d\'efaut utilis\'es lors de la cr\'eation d'un volume). - -Il est aussi possible d'ajouter des media aux pools sans les \'etiqueter -physiquement. C'est la fonction de la commande {\bf add}. Pour plus -d'informations, veuillez consulterle chapitre \ilink{Console}{_ConsoleChapter} -de ce manuel. diff --git a/docs/manuals/fr/concepts/uploaddoc b/docs/manuals/fr/concepts/uploaddoc deleted file mode 100755 index 02668a12..00000000 --- a/docs/manuals/fr/concepts/uploaddoc +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -ftp -i ftp.sectoor.de <tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}.html + @(if [ -f imagename_translations ] ; then \ + ./translate_images.pl --from_meaningful_names ${DOC}.html; \ + fi) + (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} .; done) @echo "Done making html" web: @echo "Making web" + @rm -rf ${DOC} @mkdir -p ${DOC} @cp -fp ${IMAGES}/*.eps . @rm -f next.eps next.png prev.eps prev.png up.eps up.png - @cp -fp ${IMAGES}/*.eps ${DOC}/ - @cp -fp ${IMAGES}/*.eps ${IMAGES}/*.png ${DOC}/ @rm -f ${DOC}/xp-*.png @rm -f ${DOC}/next.eps ${DOC}/next.png ${DOC}/prev.eps ${DOC}/prev.png ${DOC}/up.eps ${DOC}/up.png - @rm -rf ${DOC}/*.html latex2html -split 3 -local_icons -t "Bacula Console and Operators Guide" -long_titles 4 \ - -toc_stars -contents_in_nav -init_file latex2html-init.pl -white -notransparent ${DOC} >tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}/Bacula_Consol*.html + -toc_stars -contents_in_nav -init_file latex2html-init.pl \ + -no_antialias -no_antialias_text \ + -white -notransparent ${DOC} >tex.out 2>&1 + @(if [ -f imagename_translations ] ; then \ + ./translate_images.pl --from_meaningful_names ${DOC}.html; \ + fi) + @cp -f ${DOC}/${MAINDOC} ${DOC}/index.html @echo "Done making web" show: xdvi ${DOC} diff --git a/docs/manuals/fr/console/bconsole.tex b/docs/manuals/fr/console/bconsole.tex index f46853e6..32774003 100644 --- a/docs/manuals/fr/console/bconsole.tex +++ b/docs/manuals/fr/console/bconsole.tex @@ -1,60 +1,60 @@ %% %% -\chapter{La console Bacula} +\chapter{Bacula Console} \label{_ConsoleChapter} \index[general]{Console!Bacula} -\index[general]{La console Bacula} +\index[general]{Bacula Console} \index[general]{Console!Bacula} -\index[general]{LA console Bacula} -\addcontentsline{toc}{section}{La console Bacula} - -\section{G\'en\'eralit\'es} -\index[general]{G\'en\'eralit\'es} -\addcontentsline{toc}{section}{G\'en\'eralit\'es} - -La {\bf console Bacula} (parfois d\'esign\'ee "Agent utilisateur") est un programme -qui permet \`a l'utilisateur autoris\'e ou \`a l'administrateur syst\`eme d'interagir -avec le Director. - -Actuellement, la console Bacula existe en deux versions : une interface shell -(fa\c{c}on TTY), et une interface graphique GNOME. Avec la console Bacula, vous -pouvez d\'eterminer l'\'etat d'un job particulier, examiner le contenu du -catalogue et effectuer certaines manipulations de cartouches. - -Il existe d'autre part un programme nomm\'e bwx-console, b\^atie avec wxWidgets qui -offre une interface graphique aux op\'erations de restauration. - -Etant donn\'e que la Console interagit avec le Director au travers du r\'eseau, -il n'est pas n\'ecessaire que les deux programmes r\'esident sur la m\^eme machine. - -Bacula a besoin d'un minimum de retour de la Console afin de pouvoir utiliser plus -d'une cartouche. En effet, lorsqu'il en r\'eclame une nouvelle, il attend jusqu'\`a -ce qu'un op\'erateur lui indique, via la Console, qu'une nouvelle cartouche est mont\'ee. - -\section{Configuration de la Console} -\index[general]{Configuration de la Console} +\index[general]{Bacula Console} + +The {\bf Bacula Console} (sometimes called the User Agent) is a program that +allows the user or the System Administrator, to interact with the Bacula +Director daemon while the daemon is running. + +The current Bacula Console comes in two versions: a shell interface (TTY +style), and a GNOME GUI interface. Both permit the administrator or authorized +users to interact with Bacula. You can determine the status of a particular +job, examine the contents of the Catalog as well as perform certain tape +manipulations with the Console program. + +In addition, there is a bwx-console built with wxWidgets that allows a graphic +restore of files. As of version 1.34.1 it is in an early stage of development, +but it already is quite useful. Unfortunately, it has not been enhanced for +some time now. + +Since the Console program interacts with the Director through the network, your +Console and Director programs do not necessarily need to run on the same +machine. + +In fact, a certain minimal knowledge of the Console program is needed in order +for Bacula to be able to write on more than one tape, because when Bacula +requests a new tape, it waits until the user, via the Console program, +indicates that the new tape is mounted. + +\section{Console Configuration} +\index[general]{Console Configuration} \index[general]{Configuration!Console} -\index[general]{Configuration de la Console} +\index[general]{Console Configuration} \index[general]{Configuration!Console} -\addcontentsline{toc}{section}{Configuration de la Console} - -Lors de son lancement, la Console lit le fichier de configuration standard -nomm\'e {\bf bconsole.conf} (ou {\bf gnome-console.conf} dans le cas de la version -GNOME) Ce fichier d\'efinit une configuration par d\'efaut de la Console et, \`a l'heure -actuelle, la seule ressource d\'efinie est la ressource Director, qui informe -la Console du nom et de l'adresse du Director. Pour plus d'informations sur la -configuration de la Console, voyez le chapitre \ilink{Configurer la Console}{_ChapterStart36} -de ce manuel. - -\section{Utiliser la Console} -\index[general]{Utiliser la Console} -\index[general]{Console!Utiliser la} -\index[general]{Utiliser la Console} -\index[general]{Console!Utiliser la} -\addcontentsline{toc}{section}{Utiliser la Console} - -Le programme Console admet les options suivantes : + +When the Console starts, it reads a standard Bacula configuration file +named {\bf bconsole.conf} or {\bf bgnome-console.conf} in the case of the GNOME +Console version from the current directory unless you specify the {\bf {-}c} +command line option (see below). This file allows default configuration +of the Console, and at the current time, the only Resource Record defined +is the Director resource, which gives the Console the name and address of +the Director. For more information on configuration of the Console +program, please see the \ilink{Console Configuration +File}{ConsoleConfChapter} Chapter of this document. + +\section{Running the Console Program} +\index[general]{Running the Console Program} +\index[general]{Program!Running the Console} +\index[general]{Running the Console Program} +\index[general]{Program!Running the Console} + +The console program can be run with the following options: \footnotesize \begin{verbatim} Usage: bconsole [-s] [-c config_file] [-d debug_level] @@ -62,18 +62,20 @@ Usage: bconsole [-s] [-c config_file] [-d debug_level] -dnn set debug level to nn -n no conio -s no signals + -u set command execution timeout to seconds -t test - read configuration and exit -? print this message. \end{verbatim} \normalsize -Apr\`es son d\'emarrage, la Console est en attente de vos commandes, ce qui -est indiqu\'e par une ast\'erisque (*) (ce n'est pas le cas dans la version -GNOME o\`u vous saisissez vos commandes dans la boite texte en bas de l'\'ecran). -Vous pouvez, pour toutes les commandes, vous contenter d'entrer le nom de la -commande, la Console se chargera de vous demander les arguments n\'ecessaires, -mais dans la plupart des cas, vous pouvez entrer les commandes suivies de leurs -arguments. Le format g\'en\'eral est : + +After launching the Console program (bconsole), it will prompt you for the +next command with an asterisk (*). (Note, in the GNOME version, the prompt is +not present; you simply enter the commands you want in the command text box at +the bottom of the screen.) Generally, for all commands, you can simply enter +the command name and the Console program will prompt you for the necessary +arguments. Alternatively, in most cases, you may enter the command followed by +arguments. The general format is: \footnotesize \begin{verbatim} @@ -81,15 +83,15 @@ arguments. Le format g\'en\'eral est : \end{verbatim} \normalsize -O\`u {\bf command} est l'une des commandes \'enum\'er\'ees ci-dessous, {\bf keyword} -est l'un des mots-clef \'enum\'er\'es ci-dessous (usuellement suivi d'un argument), -et {\bf argument} est la valeur du mot-clef. La commande peut \^etre abr\'eg\'ee -jusqu'\`a sa plus courte abr\'eviation unique. Si deux commandes commencent -par les m\^emes lettres, c'est celle qui appara\^it en t\^ete dans la liste fournie -par la commande {\bf help} qui sera s\'electionn\'ee si votre abr\'eviation est -ambig\"ue. Aucun des mots-clef suivant la commande ne peut \^etre abr\'eg\'e. +where {\bf command} is one of the commands listed below; {\bf keyword} is one +of the keywords listed below (usually followed by an argument); and {\bf +argument} is the value. The command may be abbreviated to the shortest unique +form. If two commands have the same starting letters, the one that will be +selected is the one that appears first in the {\bf help} listing. If you want +the second command, simply spell out the full command. None of the keywords +following the command may be abbreviated. -Par exemple : +For example: \footnotesize \begin{verbatim} @@ -97,9 +99,7 @@ list files jobid=23 \end{verbatim} \normalsize -\'enum\`ere les fichiers sauvegard\'es par le job de JobId 23. - -Cette autre commande : +will list all files saved for JobId 23. Or: \footnotesize \begin{verbatim} @@ -107,328 +107,360 @@ show pools \end{verbatim} \normalsize -affiche toutes les ressources Pool. - -\section{Quitter la Console} -\index[general]{Console!Quitter} -\index[general]{Quitter la Console} -\index[general]{Console!Quitter} -\index[general]{Quitter la Console} -\addcontentsline{toc}{section}{Quitter la Console} - -Normalement, le programme Console se termine si vous saisissez {\bf quit} -ou {\bf exit}. Cependant, il il attend jusq"\`a ce que le Director ait pris -en compte la commande, ce qui peut prendre du temps si ce dernier est d\'ej\`a -occup\'e \`a une t\^ache longue (par exemple, un \'elagage du catalogue). Si vous voulez -quitter la Console imm\'ediatement, utilisez la commande {\bf .quit}. - -Il n'existe actuellement aucun moyen d'interrompre une commande de la Console -une fois lanc\'ee (Ctrl-C ne marche pas). En revanche, \`a l'invite d'une commande -vous demandant de choisir parmi plusieurs possibilit\'es, vous pouvez annuler -la commande en entrant un point ({\bf .}), vous serez dans la plupart des cas -ramen\'e \`a l'invite principal, ou \`a l'invite pr\'ec\'edente, dans le cas de choix -imbriqu\'es. En quelques endroits, comme celui o\`u l'on vous demande un -nom de volume, le point sera pris pour la r\'eponse (Bacula pensera que vous -voulez nommer votre volume "."). Dans cette situation, vous serez la plupart -du temps en mesure d'annuler \`a l'invite suivante. +will display all the Pool resource records. + +The maximum command line length is limited to 511 characters, so if you +are scripting the console, you may need to take some care to limit the +line length. + +\section{Stopping the Console Program} +\index[general]{Program!Stopping the Console} +\index[general]{Stopping the Console Program} +\index[general]{Program!Stopping the Console} +\index[general]{Stopping the Console Program} + +Normally, you simply enter {\bf quit} or {\bf exit} and the Console program +will terminate. However, it waits until the Director acknowledges the command. +If the Director is already doing a lengthy command (e.g. prune), it may take +some time. If you want to immediately terminate the Console program, enter the +{\bf .quit} command. + +There is currently no way to interrupt a Console command once issued (i.e. +Ctrl-C does not work). However, if you are at a prompt that is asking you to +select one of several possibilities and you would like to abort the command, +you can enter a period ({\bf .}), and in most cases, you will either be +returned to the main command prompt or if appropriate the previous prompt (in +the case of nested prompts). In a few places such as where it is asking for a +Volume name, the period will be taken to be the Volume name. In that case, you +will most likely be able to cancel at the next prompt. \label{keywords} -\section{Index des mots-clef de la Console} -\index[general]{Mots-clef!Index Console} -\index[general]{Index des mots-clef de la Console} -\index[general]{Mots-clef!Index Console} -\index[general]{Index des mots-clef de la Console} -\addcontentsline{toc}{section}{Index des mots-clef de la Console} -Sauf sp\'ecification contraire, chacun des mots-clef suivant admet un argument, -qui est sp\'ecifi\'e apr\`es le mot-clef suivi du signe \'egale. Par exemple : +\section{Alphabetic List of Console Keywords} +\index[general]{Keywords!Alphabetic List of Console} +\index[general]{Alphabetic List of Console Keywords} +\index[general]{Keywords!Alphabetic List of Console} +\index[general]{Alphabetic List of Console Keywords} +Unless otherwise specified, each of the following keywords +takes an argument, which is specified after the keyword following +an equal sign. For example: \begin{verbatim} jobid=536 \end{verbatim} -Notez que cette liste est probablement incompl\`ete, car le processus de cr\'eation -est toujours en cours. Il se peut aussi qu'elle ne soit pas dans l'ordre -alphab\'etique. +Please note, this list is incomplete as it is currently in +the process of being created and is not currently totally in +alphabetic +order ... \begin{description} \item [restart] - Permis dans la commande {\it python}, provoque le red\'emarrage de - l'interpr\'eteur Python. Ne prend pas d'arguments. + Permitted on the python command, and causes the Python + interpreter to be restarted. Takes no argument. \item [all] - Permis dans les commandes {\it status} et {\it show} pour sp\'ecifier, respectivement, tous les - composants ou toutes les ressources. + Permitted on the status and show commands to specify all components or + resources respectively. +\item [allfrompool] + Permitted on the update command to specify that all Volumes in the + pool (specified on the command line) should be updated. +\item [allfrompools] + Permitted on the update command to specify that all Volumes in all + pools should be updated. \item [before] - Utilis\'e dans la commande {\it restore}. + Used in the restore command. \item [bootstrap] - Utilis\'e dans la commande {\it restore}. + Used in the restore command. \item [catalog] - Permis dans la commande {\it use} pour sp\'ecifier le nom de catalogue \`a utiliser. + Allowed in the use command to specify the catalog name + to be used. \item [catalogs] - Utilis\'e dans la commande {\it show}. Ne prend pas d'arguments + Used in the show command. Takes no arguments. \item [client | fd] \item [clients] - Utilis\'e dans les commandes {\it show}, {\it list}, et {\it llist}. ne prend pas d'arguments. + Used in the show, list, and llist commands. Takes no arguments. \item [counters] - Utilis\'e dans la commande {\it show}. Ne prend pas d'arguments. + Used in the show command. Takes no arguments. \item [current] - Utilis\'e dans la commande {\it restore}. Ne prend pas d'arguments. + Used in the restore command. Takes no argument. \item [days] - Utilisé pour définir le nombre de jours que la commande "list nextvol" doit - prendre en compte dans son évaluation des prochains jobs à exécuter. - Le mot-clef "day" peut aussi être utilisé avec la commande "status dir" - afin qu'elle affiche les jobs planifiés pour la période spécifiés. + Used to define the number of days the "list nextvol" command + should consider when looking for jobs to be run. The days keyword + can also be used on the "status dir" command so that it will display + jobs scheduled for the number of days you want. \item [devices] - Utilis\'e dans la commande {\it show}. Ne prend pas d'arguments. + Used in the show command. Takes no arguments. \item [dir | director] \item [directors] - Utilis\'e dans la commande {\it show}. Ne prend pas d'arguments. + Used in the show command. Takes no arguments. \item [directory] - Utilis\'e dans la commande {\it restore}. Son argument spécifie - le répertoire à restaurer. + Used in the restore command. Its argument specifies the directory + to be restored. \item [enabled] - Ce mot-clef peut être utilisé avec la commande {\bf update volume} et admet - l'un des arguments suivants : yes, true, no, false, archived, 0, 1, 2, où - 0 correspond à "no" ou "false", 1 à "yes" ou "true" et 2 à "archived". Les volumes - avec le statut "archived" ne seront pas utilisés, pas plus que ne seront élagués leurs - enregistrements dans le catalogue. Les volumes qui n'ont pas le statut "enabled" - ne seront pas utilisés pour des sauvegardes ou des restaurations. + This keyword can appear on the {\bf update volume} as well + as the {\bf update slots} commands, and can + allows one of the following arguments: yes, true, no, false, archived, + 0, 1, 2. Where 0 corresponds to no or false, 1 corresponds to yes or true, and + 2 corresponds to archived. Archived volumes will not be used, nor will + the Media record in the catalog be pruned. Volumes that are not enabled, + will not be used for backup or restore. \item [done] - Utilis\'e dans la commande {\it restore}. Ne prend pas d'arguments. + Used in the restore command. Takes no argument. \item [file] - Utilis\'e dans la commande {\it restore}. + Used in the restore command. \item [files] - Utilis\'e dans les commandes {\it list}, et {\it llist}. ne prend pas d'arguments. + Used in the list and llist commands. Takes no arguments. \item [fileset] \item [filesets] - Utilis\'e dans la commande {\it show}. Ne prend pas d'arguments. + Used in the show command. Takes no arguments. \item [help] - Utilis\'e dans la commande {\it show}. Ne prend pas d'arguments. + Used in the show command. Takes no arguments. \item [jobs] - Utilis\'e dans les commandes {\it show}, {\it list} et {\it llist}. Ne prend pas d'arguments. + Used in the show, list and llist commands. Takes no arguments. \item [jobmedia] - Utilis\'e dans les commandes {\it list}, et {\it llist}. ne prend pas d'arguments. + Used in the list and llist commands. Takes no arguments. \item [jobtotals] - Utilis\'e dans les commandes {\it list}, et {\it llist}. ne prend pas d'arguments. + Used in the list and llist commands. Takes no arguments. \item [jobid] - Le JobId est le num\'ero de job qui est affich\'e dans le rapport de job. - C'est l'index du catalogue pour le job donn\'e. Bien qu'il soit unique - pour tous les jobs existant dans le catalogue, le m\^eme JobId peut - \^etre r\'eutilis\'e une fois qu'un job a \'et\'e supprim\'e du catalogue. - Vous d\'esignerez certainement les jobs sp\'ecifiques par leur JobId. + The JobId is the numeric jobid that is printed in the Job + Report output. It is the index of the database record for the + given job. While it is unique for all the existing Job records + in the catalog database, the same JobId can be reused once a + Job is removed from the catalog. Probably you will refer + specific Jobs that ran using their numeric JobId. \item [job | jobname] - Le mot-clef Job ou Jobname se r\'ef\`ere au nom que vous avez sp\'ecifi\'e - dans la ressource Job, et donc peut d\'esigner plusieurs jobs effectu\'es. - C'est particuli\`erement utile lorsque vous voulez la liste des jobs - execut\'es portant un nom particulier. + The Job or Jobname keyword refers to the name you specified + in the Job resource, and hence it refers to any number of + Jobs that ran. It is typically useful if you want to list + all jobs of a particular name. \item [level] \item [listing] - Permis dans la commande {\it estimate}. Ne prend pas d'arguments. + Permitted on the estimate command. Takes no argument. \item [limit] \item [messages] - Utilis\'e dans la commande {\it show}. Ne prend pas d'arguments. + Used in the show command. Takes no arguments. \item [media] - Utilis\'e dans les commandes {\it list}, et {\it llist}. ne prend pas d'arguments. + Used in the list and llist commands. Takes no arguments. \item [nextvol | nextvolume] - Utilis\'e dans les commandes {\it list}, et {\it llist}. ne prend pas d'arguments. + Used in the list and llist commands. Takes no arguments. \item [on] - Ne prend pas d'arguments. + Takes no keyword. \item [off] - Ne prend pas d'arguments. + Takes no keyword. \item [pool] \item [pools] - Utilis\'e dans les commandes, {\it show}, {\it list}, et {\it llist}. ne prend pas d'arguments. + Used in the show, list, and llist commands. Takes no arguments. \item [select] - Utilis\'e dans la commande {\it restore}. Ne prend pas d'arguments. + Used in the restore command. Takes no argument. \item [storages] - Utilis\'e dans la commande {\it show}. Ne prend pas d'arguments. + Used in the show command. Takes no arguments. \item [schedules] - Utilis\'e dans la commande {\it show}. Ne prend pas d'arguments. + Used in the show command. Takes no arguments. \item [sd | store | storage] \item [ujobid] - L'ujobid est un identificateur unique de job qui est affich\'e dans - le rapport du job. Actuellement, il consiste en le nom du job - (celui de la directive Name de ce job) suffix\'e de la date et de - l'heure d'ex\'ecution du job. Ce mot-clef est utile si vous voulez - identifier compl\`etement l'instance du job ex\'ecut\'e. + The ujobid is a unique job identification that is printed + in the Job Report output. At the current time, it consists + of the Job name (from the Name directive for the job) appended + with the date and time the job was run. This keyword is useful + if you want to completely identify the Job instance run. \item [volume] \item [volumes] - Utilis\'e dans les commandes {\it list}, et {\it llist}. ne prend pas d'arguments. + Used in the list and llist commands. Takes no arguments. \item [where] - Utilis\'e dans la commande {\it restore}. Ne prend pas d'arguments. + Used in the restore command. \item [yes] - Utilis\'e dans la commande {\it restore}. Ne prend pas d'arguments. + Used in the restore command. Takes no argument. \end{description} \label{list} -\section{Index des commandes de la Console} -\index[general]{Commandes!Index des commandes de la Console} -\index[general]{Index des commandes de la Console} -\index[general]{Commandes!Index des commandes de la Console} -\index[general]{Index des commandes de la Console} -\addcontentsline{toc}{section}{Index des commandes de la Console} +\section{Alphabetic List of Console Commands} +\index[general]{Commands!Alphabetic List of Console} +\index[general]{Alphabetic List of Console Commands} +\index[general]{Commands!Alphabetic List of Console} +\index[general]{Alphabetic List of Console Commands} -Les commandes suivantes sont actuellement impl\'ement\'ees : +The following commands are currently implemented: \begin{description} \item [{add [pool=\lt{}pool-name\gt{} storage=\lt{}storage\gt{} jobid=\lt{}JobId\gt{}]} ] \index[general]{add} -Cette commande sert \`a ajouter des volumes \`a un pool existant. Les noms des -volumes saisis sont plac\'es dans le catalogue et deviennent ainsi disponibles -pour les sauvegardes. Normalement, on pr\'ef\`er utiliser la commande {\bf label} -qui remplit les m\^emes fonctions en plus d'apposer une \'etiquette logicielle -(label) sur les bandes, par opposition \`a {\bf add} qui se contente de -r\'ef\'erencer le volume dans le catalogue. Ainsi, si vous utilisez {\bf add}, -le volume doit pr\'eexister et \^etre d\'ej\`a \'etiquet\'e. Cette commande peut -cependant \^etre utile si vous voulez ajouter plusieurs cartouches dans un -pool en ne les \'etiquettant que plus tard. Elle peut aussi se r\'ev\'eler utile -si vous importez des cartouches provenant d'un autre site. Consultez le -paragraphe sur la commande {\bf label} pour conna\^itre la liste des -caract\`eres autoris\'es dans un nom de volume. + This command is used to add Volumes to an existing Pool. That is, + it creates the Volume name in the catalog and inserts into the Pool + in the catalog, but does not attempt to access the physical Volume. + Once + added, Bacula expects that Volume to exist and to be labeled. + This command is not normally used since Bacula will + automatically do the equivalent when Volumes are labeled. However, + there may be times when you have removed a Volume from the catalog + and want to later add it back. + + Normally, the {\bf label} command is used rather than this command + because the {\bf label} command labels the physical media (tape, disk, + DVD, ...) and does the equivalent of the {\bf add} command. The {\bf + add} command affects only the Catalog and not the physical media (data + on Volumes). The physical media must exist and be labeled before use + (usually with the {\bf label} command). This command can, however, be + useful if you wish to add a number of Volumes to the Pool that will be + physically labeled at a later time. It can also be useful if you are + importing a tape from another site. Please see the {\bf label} command + below for the list of legal characters in a Volume name. \item [autodisplay on/off] \index[general]{autodisplay on/off} - Cette commande accepte les arguments {\bf on} ou {\bf off} et active ou - d\'esactive l'affichage automatique des messages. La valeur par d\'efaut dans - la Console est {\bf off}, ce qui signifie que les messages en attente - vous sont notifi\'es, mais qu'ils ne sont pas automatiquement affich\'es. - La valeur par d\'efaut pour la console GNOME est {\bf on}, ainsi les - messages sont affich\'es lorqu'ils sont re\c{c}us (habituellement dans les 5 secondes - apr\`es qu'ils aient \'et\'e g\'en\'er\'es). - - Lorsque l'affichage automatique est d\'esactiv\'e, vous devez explicitement - en demander l'affichage avec la commande {\bf messages}. + This command accepts {\bf on} or {\bf off} as an argument, and turns + auto-display of messages on or off respectively. The default for the + console program is {\bf off}, which means that you will be notified when + there are console messages pending, but they will not automatically be + displayed. The default for the bgnome-console program is {\bf on}, which + means that messages will be displayed when they are received (usually + within five seconds of them being generated). + + When autodisplay is turned off, you must explicitly retrieve the + messages with the {\bf messages} command. When autodisplay is turned + on, the messages will be displayed on the console as they are received. \item [automount on/off] \index[general]{automount on/off} - Cette commande accepte les arguments {\bf on} ou {\bf off} et active ou - d\'esactive le montage automatique de la cartouche apr\`es une commande {\bf label}. - La valeur par d\'efaut est {\bf on}. Si le montage automatique est d\'esactiv\'e, - vous devez explicitement monter la cartouche apr\`es avoir utilis\'e {\bf label} - pour pouvoir \'ecrire dessus. + This command accepts {\bf on} or {\bf off} as the argument, and turns + auto-mounting of the Volume after a {\bf label} command on or off + respectively. The default is {\bf on}. If {\bf automount} is turned + off, you must explicitly {\bf mount} tape Volumes after a label command to + use it. \item [{cancel [jobid=\lt{}number\gt{} job=\lt{}job-name\gt{} ujobid=\lt{}unique-jobid\gt{}]}] \index[general]{cancel jobid} - Cette commande sert \`a supprimer un job et admet les arguments {\bf jobid=nnn} - ou {\bf job=xxx} o\`u nnn est \`a remplacer par le JobId et xxx par le nom de - job. Si vous lancez cette commande sans arguments, la Console vous propose - de choisir parmi les jobs actifs celui \`a supprimer. - - Une fois qu'un job est marqu\'e "A supprimer", il peut se passer quelques instants - (en g\'en\'eral, moins d'une minute) avant qu'il se termine, en fonction des - op\'erations en cours. - -\item [{ create [pool=\lt{}pool-name\gt{}]}] + This command is used to cancel a job and accepts {\bf jobid=nnn} or {\bf + job=xxx} as an argument where nnn is replaced by the JobId and xxx is + replaced by the job name. If you do not specify a keyword, the Console + program will prompt you with the names of all the active jobs allowing + you to choose one. + + Once a Job is marked to be canceled, it may take a bit of time + (generally within a minute but up to two hours) before the Job actually + terminates, depending on what operations it is doing. + Don't be surprised that you receive a Job not found message. That just + means that one of the three daemons had already canceled the job. + Messages numbered in the 1000's are from the Director, 2000's are from + the File daemon and 3000's from the Storage daemon. + + +\item [{create [pool=\lt{}pool-name\gt{}]}] \index[general]{create pool} - Cette commande sert \`a cr\'eer un enregistrement Pool dans le catalogue - selon les ressources Pool d\'efinis dans le fichier de configuration - du Director. En un sens, cette commande se content de transf\'erer - l'information depuis la ressource Pool dans le fichier de configuration - vers le catalogue. En principe, cete commande est automatiquement - ex\'ecut\'ee au lancement du Director, pourvu que le pool soit r\'ef\'erenc\'e - dans une ressource Job. Si vous utilisez cette commande sur un pool - existant, elle met \`a jour le catalogue en foction des informations de - la ressource Pool. Apr\`es avoir cr\'e\'e un pool, vous uiliserez - probablement la commande {\bf label} pour \'etiqueter un ou plusieurs - volumes et enregistrer leurs noms dans le catalogue. - - Si, au lancement d'un job, Bacula d\'etermine qu'il n'y a pas de pool - enregistr\'e dans le catalogue, mais qu'il existe une ressource Pool pour - le pool appropri\'e, alors il le cr\'e\'e pour vous. Si vous voulez le voir - appara\^itre imm\'ediatement dans le catalogue, utilisez cette commande pour - forcer sa cr\'eation imm\'ediate. - -\item [{ delete [volume=\lt{}vol-name\gt{} pool=\lt{}pool-name\gt{} job + This command is not normally used as the Pool records are automatically + created by the Director when it starts based on what it finds in + the conf file. If needed, this command can be + to create a Pool record in the database using the + Pool resource record defined in the Director's configuration file. So + in a sense, this command simply transfers the information from the Pool + resource in the configuration file into the Catalog. Normally this + command is done automatically for you when the Director starts providing + the Pool is referenced within a Job resource. If you use this command + on an existing Pool, it will automatically update the Catalog to have + the same information as the Pool resource. After creating a Pool, you + will most likely use the {\bf label} command to label one or more + volumes and add their names to the Media database. + + When starting a Job, if Bacula determines that there is no Pool record + in the database, but there is a Pool resource of the appropriate name, + it will create it for you. If you want the Pool record to appear in the + database immediately, simply use this command to force it to be created. + +\item [{delete [volume=\lt{}vol-name\gt{} pool=\lt{}pool-name\gt{} job jobid=\lt{}id\gt{}]}] \index[general]{delete} - Cette commande s'utilise pour supprimer un volume, un pool ou un job - du catalogue, ainsi que tous les enregistrements du catalogue qui leur - sont associ\'es. Cette commande op\`ere exclusivement sur le catalogue - et n'a aucune r\'epercussion sur les donn\'ees \'ecrites sur les cartouches. - Elle peut \^etre dangereuse, et nous vous recommandons fortement de ne - pas l'utiliser si vous ne savez pas exactement ce que vous faites. - - Voici la forme compl\`ete de cette commande : + The delete command is used to delete a Volume, Pool or Job record from + the Catalog as well as all associated catalog Volume records that were + created. This command operates only on the Catalog database and has no + effect on the actual data written to a Volume. This command can be + dangerous and we strongly recommend that you do not use it unless you + know what you are doing. + + If the keyword {\bf Volume} appears on the command line, the named + Volume will be deleted from the catalog, if the keyword {\bf Pool} + appears on the command line, a Pool will be deleted, and if the keyword + {\bf Job} appears on the command line, a Job and all its associated + records (File and JobMedia) will be deleted from the catalog. The full + form of this command is: \begin{verbatim} -delete pool=\lt{}pool-name\gt{} +delete pool= \end{verbatim} - supprime un pool du catalogue. + or \begin{verbatim} -delete volume=\lt{}volume-name\gt{} pool=\lt{}pool-name\gt{} +delete volume= pool= or \end{verbatim} - supprime du catalogue un volume du pool sp\'ecifi\'e. - \begin{verbatim} -delete JobId=\lt{}job-id\gt{} JobId=\lt{}job-id2\gt{} ... +delete JobId= JobId= ... or \end{verbatim} - supprime du catalogue le job sp\'ecifi\'e. - \begin{verbatim} delete Job JobId=n,m,o-r,t ... \end{verbatim} - supprime les job de JobIds m,n,o,p,q,r et t (o\`u m,n,... sont, bien sur, des - nombres). Ainsi, la commande "delete jobid" accepte les listes et les plages - de jobids. + The first form deletes a Pool record from the catalog database. The + second form deletes a Volume record from the specified pool in the + catalog database. The third form deletes the specified Job record from + the catalog database. The last form deletes JobId records for JobIds + n, m, o, p, q, r, and t. Where each one of the n,m,... is, of course, a + number. That is a "delete jobid" accepts lists and ranges of + jobids. \item [disable job\lt{}job-name\gt{}] - \index[general]{enable} - Cette commande vous permet de d\'esactiver un job normalement planifi\'e - pour ex\'ecution. Le job peut avoir \'et\'e pr\'ealablement activ\'e par la - directive {\bf Enabled} dans la ressource Job, ou avec la commande - {\bf enable} dans la Console. Au prochain d\'emarrage du Director, ou - si le fichier de configuration est recharg\'e, l'\'etat Enable/Disable sera - r\'etabli \`a celui sp\'ecifi\'e dans la ressource Job (la valeur par d\'efaut - est enabled). + \index[general]{disable} + This command permits you to disable a Job for automatic scheduling. + The job may have been previously enabled with the Job resource + {\bf Enabled} directive or using the console {\bf enable} command. + The next time the Director is restarted or the conf file is reloaded, + the Enable/Disable state will be set to the value in the Job resource + (default enabled) as defined in the bacula-dir.conf file. \item [enable job\lt{}job-name\gt{}] \index[general]{enable} - Cette commande vous permet de d'activer un job planifi\'e - pour ex\'ecution automatique. Le job peut avoir \'et\'e pr\'ealablement d\'esactiv\'e par la - directive {\bf Disabled} dans la ressource Job, ou avec la commande - {\bf disable} dans la Console. Au prochain d\'emarrage du Director, ou - si le fichier de configuration est recharg\'e, l'\'etat Enable/Disable sera - r\'etabli \`a celui sp\'ecifi\'e dans la ressource Job (la valeur par d\'efaut - est enabled). + This command permits you to enable a Job for automatic scheduling. + The job may have been previously disabled with the Job resource + {\bf Enabled} directive or using the console {\bf disable} command. + The next time the Director is restarted or the conf file is reloaded, + the Enable/Disable state will be set to the value in the Job resource + (default enabled) as defined in the bacula-dir.conf file. \label{estimate} \item [estimate] \index[general]{estimate} - Avec cette commande, vous pouvez vous faire une id\'ee du nombre de fichier - seront sauvegard\'es. Vous pouvez aussi l'utiliser pour \'eprouver les - param\`etres Include de vos FileSets sans passer par une sauvegarde - r\'eelle. Par d\'efaut, l'estimation est faite pour une sauvegarde Full. - Cependant, vous pouvez passer outre ce comportement en sp\'ecifiant - {\bf level=Incremental} ou {\bf level=Differential} sur la ligne de - commande. Un nom de job doit \^etre sp\'ecifi\'e, faute de quoi il vous sera - demand\'e. Optionnellement, vous pouvez sp\'ecifier un client et un - FileSet sur la ligne de commande. Bacula contacte alors le client - et calcule le nombre de fichier et d'octets qui seraient - sauvegard\'es. Notez qu'il s'agit d'une estimation calcul\'ee d'apr\`es - le nombre de blocs dans les fichiers plut\^ot qu'en lisant le nombre - effectif d'octets. Aussi, la taille estim\'ee est g\'en\'eralement plus - importante que celle de la sauvegarde r\'eelle. - - Optionnellement, vous pouvez ajouter le mot-clef {\bf listing}, auquel cas - tous les fichiers \`a sauvegarder seront affich\'es. Notez qu'un tel affichage - peut prendre un certain temps s'il s'agit d'une grosse sauvegarde. - Voici la forme compl\`ete de cette commande : + Using this command, you can get an idea how many files will be backed + up, or if you are unsure about your Include statements in your FileSet, + you can test them without doing an actual backup. The default is to + assume a Full backup. However, you can override this by specifying a + {\bf level=Incremental} or {\bf level=Differential} on the command line. + A Job name must be specified or you will be prompted for one, and + optionally a Client and FileSet may be specified on the command line. + It then contacts the client which computes the number of files and bytes + that would be backed up. Please note that this is an estimate + calculated from the number of blocks in the file rather than by reading + the actual bytes. As such, the estimated backup size will generally be + larger than an actual backup. + + The \texttt{estimate} command can use the accurate code to detect changes + and give a better estimation. You can set the accurate behavior on command + line using \texttt{accurate=yes/no} or use the Job setting as default value. + + Optionally you may specify the keyword {\bf listing} in which case, all the + files to be backed up will be listed. Note, it could take quite some time to + display them if the backup is large. The full form is: \begin{verbatim} -estimate job=\lt{}job-name\gt{} listing client=\lt{}client-name\gt{} - fileset=\lt{}fileset-name\gt{} level=\lt{}level-name\gt{} +estimate job= listing client= accurate= + fileset= level= \end{verbatim} - La sp\'ecification du {\bf job} est suffisante, mais vous pouvez aussi - passer outre le client, le FileSet et/ou le niveau en les - sp\'ecifiant sur la ligne de commande. + Specification of the {\bf job} is sufficient, but you can also override the + client, fileset, accurate and/or level by specifying them on the estimate + command line. + - Par exemple, vous pourriez faire ceci : +As an example, you might do: \footnotesize \begin{verbatim} @@ -438,51 +470,62 @@ estimate job=\lt{}job-name\gt{} listing client=\lt{}client-name\gt{} \end{verbatim} \normalsize -ce qui produirait une liste compl\`ete de tous les fichiers \`a sauvegarder pour -le job {\bf NightlySave} au cours d'une sauvegarde incr\'ementale, et qui -consignerait cette liste dans le fichier {\bf /tmp/listing}. Notez que l'évaluation -produite par cette commande se base sur les tailles de fichiers contenues dans -l'objet "répertoire", aussi l'estimation peut être très éloignée de la réalité si vous -avez des fichiers creux (NDT : sparse files) sur votre système. Ce type de fichiers se -rencontre souvent sur les systèmes 64 bits avec certains systèmes de fichiers. -Le volume obtenu par l'évaluation est celui que sauvegardera Bacula si l'option -sparse est désactivée. Il n'y a actuellement aucun moyen d'évaluer le volume de -ce qui serait sauvegardé avec l'option sparse activée. + which will do a full listing of all files to be backed up for the Job {\bf + NightlySave} during an Incremental save and put it in the file {\bf + /tmp/listing}. Note, the byte estimate provided by this command is + based on the file size contained in the directory item. This can give + wildly incorrect estimates of the actual storage used if there are + sparse files on your systems. Sparse files are often found on 64 bit + systems for certain system files. The size that is returned is the size + Bacula will backup if the sparse option is not specified in the FileSet. + There is currently no way to get an estimate of the real file size that + would be found should the sparse option be enabled. + +\item [exit] + \index[general]{exit} + This command terminates the console program. + +\item [gui] + \index[general]{gui} + Invoke the non-interactive gui mode. +\begin{verbatim} +gui [on|off] +\end{verbatim} \item [help] \index[general]{help} - Cette commande affiche la liste des commandes disponibles. + This command displays the list of commands available. \item [label] \index[general]{label} \index[general]{relabel} \index[general]{label} \index[general]{relabel} - Cette commande est utilis\'ee pour \'etiqueter les volumes. La forme compl\`ete est : + This command is used to label physical volumes. The full form of this command + is: \begin{verbatim} - label storage=\lt{}storage-name\gt{} volume=\lt{}volume-name\gt{} - slot=\lt{}slot\gt{} +label storage= volume= + slot= \end{verbatim} - Si vous omettez l'un quelconque des arguments, il vous sera r\'eclam\'e. - Le type de m\'edia est automatiquement r\'ecup\'er\'e de la ressource Storage. - Une fois que les informations requises sont r\'eunies, la Console - contacte le Storage Daemon sp\'ecifi\'e et lui ordonne d'\'etiqueter la - cartouche sp\'ecifi\'ee. Si l'\'etiquetage s'effectue correctement, la - Console cr\'e\'e un nouvel enregistrement dans le catalogue pour le - volume dans le pool appropri\'e. - - Les noms de volumes ne doivent contenir que des lettres, chiffres et - les caract\`eres sp\'eciaux tiret ({\bf -}), sous-lign\'e ({\bf \_}), double-point - ({\bf :}), et point ({\bf .}). Tous les autres caract\`eres, y compris l'espace, - sont ill\'egaux. Cette restriction vise \`a assurer une bonne lisibilit\'e - des noms de volumes pour r\'eduire le risque d'erreurs humaines. - - Notez que lors de l'\'etiquetage d'une cartouche vierge, Bacula obtient des - erreurs {\bf read I/O error} lorqu'il tente de v\'erifier si la cartouche - a d\'ej\`a un label. Si vous voulez \'eviter ce genre de message, placez un - indicateur de fin de fichier sur votre cartouche avant son \'etiquetage : + If you leave out any part, you will be prompted for it. The media type + is automatically taken from the Storage resource definition that you + supply. Once the necessary information is obtained, the Console program + contacts the specified Storage daemon and requests that the Volume be + labeled. If the Volume labeling is successful, the Console program will + create a Volume record in the appropriate Pool. + + The Volume name is restricted to letters, numbers, and the special + characters hyphen ({\bf -}), underscore ({\bf \_}), colon ({\bf :}), and + period ({\bf .}). All other characters including a space are invalid. + This restriction is to ensure good readability of Volume names to reduce + operator errors. + + Please note, when labeling a blank tape, Bacula will get {\bf read I/O + error} when it attempts to ensure that the tape is not already labeled. If + you wish to avoid getting these messages, please write an EOF mark on + your tape before attempting to label it: \footnotesize \begin{verbatim} @@ -492,24 +535,25 @@ ce qui serait sauvegardé avec l'option sparse activée. \end{verbatim} \normalsize -La commande label peut \'echouer pour plusieurs raisons : - +The label command can fail for a number of reasons: \begin{enumerate} -\item Le nom de volume que vous avez sp\'ecifi\'e figure d\'ej\`a dans le catalogue. -\item Le Storage Daemon a d\'ej\`a une cartouche mont\'ee dans le lecteur. Dans ce cas, - vous devez la d\'emonter ({\bf unmount}) et ins\'erer une cartouche vierge - avant de lancer la commande {\bf label}. -\item La cartouche dans le lecteur porte d\'ej\`a une \'etiquette Bacula. - (Bacula ne r\'e-\'etiquette jamais une cartouche \`a moins qu'elle soit recycl\'ee - et que vous utilisiez la commande {\bf relabel} ). -\item Il n'y a pas de cartouche dans le lecteur. +\item The Volume name you specify is already in the Volume database. + +\item The Storage daemon has a tape or other Volume already mounted on the + device, in which case you must {\bf unmount} the device, insert a blank + tape, then do the {\bf label} command. + +\item The Volume in the device is already a Bacula labeled Volume. (Bacula will + never relabel a Bacula labeled Volume unless it is recycled and you use the + {\bf relabel} command). + +\item There is no Volume in the drive. \end{enumerate} -Il existe deux moyens pour r\'e-\'etiqueter un volume qui porte d\'ej\`a une -\'etiquette Bacula. La m\'ethode brutale consiste \`a \'ecrire une marque de fin de -fichier sur la cartouche vec la commande du syst\`eme d'exploitation {\bf mt}, -quelque chose dans ce style : +There are two ways to relabel a volume that already has a Bacula label. The +brute force method is to write an end of file mark on the tape using the +system {\bf mt} program, something like the following: \footnotesize \begin{verbatim} @@ -518,23 +562,24 @@ quelque chose dans ce style : \end{verbatim} \normalsize -puis d'utiliser la commande {\bf label} pour ajouter une nouvelle \'etiquette. -Cette m\'ethode peut cependant laisser des traces de l'ancien volume dans le -catalogue. +For a disk volume, you would manually delete the Volume. + +Then you use the {\bf label} command to add a new label. However, this could +leave traces of the old volume in the catalog. -Il est pr\'ef\'erable d'utiliser la commande {\bf relabel} d\'ecrite ci-dessous sur -un volume purg\'e (automatiquement ou avec la commande {\bf purge}). +The preferable method to relabel a Volume is to first {\bf purge} the volume, +either automatically, or explicitly with the {\bf purge} command, then use +the {\bf relabel} command described below. -Si votre librairie comporte un lecteur de codes barres, vous pouvez -\'etiqueter tous les volumes qu'elle contient en -utilisant la commande {\bf label barcodes}. En effet, apr\`es le lancement de -cette commande, Bacula monte chaque cartouche l'une apr\`es l'autre et -l'\'etiquette du nom de son code barres. simultan\'ement, l'enregistrement -appropri\'e est cr\'e\'e dans le catalogue. Toute cartouche dont le code barres -commence par les m\^emes caract\`eres que ceux sp\'ecifi\'es par la directive -"CleaningPrefix" de la ressource Pool du director est consid\'er\'ee comme -une cartouche de nettoyage et ne re\c{c}oit donc pas d'\'etiquette, bien -qu'une entr\'ee dans le catalogue lui soit d\'edi\'ee. Par exemple avec : +If your autochanger has barcode labels, you can label all the Volumes in +your autochanger one after another by using the {\bf label barcodes} +command. For each tape in the changer containing a barcode, Bacula will +mount the tape and then label it with the same name as the barcode. An +appropriate Media record will also be created in the catalog. Any barcode +that begins with the same characters as specified on the +"CleaningPrefix=xxx" directive in the Director's Pool resource, will be +treated as a cleaning tape, and will not be labeled. However, an entry for +the cleaning tape will be created in the catalog. For example with: \footnotesize \begin{verbatim} @@ -546,35 +591,34 @@ qu'une entr\'ee dans le catalogue lui soit d\'edi\'ee. Par exemple avec : \end{verbatim} \normalsize -tout slot contenant une cartouche de code barres CLNxxxxx sera trait\'ee en tant -que cartouche de nettoyage et ne sera jamais mont\'ee. Notez que la forme -compl\`ete de la commande est : +Any slot containing a barcode of CLNxxxx will be treated as a cleaning tape +and will not be mounted. Note, the full form of the command is: \footnotesize \begin{verbatim} -update storage=xxx pool=yyy slots=1-5,10 barcodes +label storage=xxx pool=yyy slots=1-5,10 barcodes \end{verbatim} \normalsize \item [list] \index[general]{list} - La commande {\bf list} extrait du catalogue les informations demand\'ees. Les - diff\'erentes champs de chaque enregistrement sont \'enum\'er\'es sur une simple - ligne. Voici les diff\'erentes formes de la commande : - + The list command lists the requested contents of the Catalog. The + various fields of each record are listed on a single line. The various + forms of the list command are: \footnotesize \begin{verbatim} list jobs - list jobid= (affiche le jobid id) + list jobid= (list jobid id) - list ujobid= (affiche le job dont le nom unique est ) + list ujobid= (list job with unique name) - list job= (Affiche tous les jobs dont le nom est "job-name") + list job= (list all jobs with "job-name") - list jobname= (voir ci-dessus) + list jobname= (same as above) - Dans cette commande, vous pouvez ajouter "limit=nn" pour limiter la sortie \`a nn jobs. + In the above, you can add "limit=nn" to limit the output to + nn jobs. list jobmedia @@ -608,39 +652,36 @@ update storage=xxx pool=yyy slots=1-5,10 barcodes list nextvol job= days=nnn - - \end{verbatim} \normalsize - Ce que font la plupart des commandes ci-dessus devrait \^etre plus ou moins \'evident. - En g\'en\'eral, si vous ne sp\'ecifiez pas tous les arguments requis, la Console - vous sollicitera pour les arguments manquants. - - La commande {\bf list nextvol} affiche le nom du volume qui dera utilis\'e par - le job sp\'ecifi\'e. Soyez conscient que le prochain volume utilis\'e - pour un job d\'epend de nombreux facteurs dont le temps, et les autres - jobs qui seront ex\'ecut\'es avant celui sp\'ecifi\'e, qui peuvent remplir une - cartouche qui \'etait vide au moment de l'ex\'ecution de {\bf list nextvol}. - Aussi, consid\'erez la r\'eponse fournie par cette commande comme une bonne - estimation plut\^ot que comme une r\'eponse d\'efinitive. De plus, cette commande - a certains effets de bord : \'etant donn\'e qu'elle ex\'ecute le m\^eme algorithme - qu'un job, elle est susceptible de purger ou recycler un volume. Par d\'efaut, - le job sp\'ecifi\'e doit \^etre ex\'ecut\'e dans les deux jours ou aucun volume - ne sera trouv\'e. Vous pouvez cependant sp\'ecifier jusqu'\`a 50 jours en avant - avec la directive {\bf days=nnn}. Si, par exemple, un vendredi, vous voulez - savoir quel volume sera requis lundi pour le job MyJob, utilisez - {\bf list nextvol job=MyJob days=3}. - - Si vous souhaitez ajouter vos propres commandes pour interroger le - catalogue, vous pouvez les placer dans le fichier {\bf query.sql}. - Cela demande quelques connaissances du langage SQL. Voyez le - paragraphe sur la commande {\bf query} ci-dessous pour plus - d'informations. Voyez aussi le paragraphe sur la commande - {\bf llist} qui permet l'affichage complet des informations du - catalogue. - - Voici un exemple d'affichage produit par la commande {\bf list pools} : + What most of the above commands do should be more or less obvious. In + general if you do not specify all the command line arguments, the + command will prompt you for what is needed. + + The {\bf list nextvol} command will print the Volume name to be used by + the specified job. You should be aware that exactly what Volume will be + used depends on a lot of factors including the time and what a prior job + will do. It may fill a tape that is not full when you issue this + command. As a consequence, this command will give you a good estimate + of what Volume will be used but not a definitive answer. In addition, + this command may have certain side effect because it runs through the + same algorithm as a job, which means it may automatically purge or + recycle a Volume. By default, the job specified must run within the + next two days or no volume will be found. You can, however, use the + {\bf days=nnn} specification to specify up to 50 days. For example, + if on Friday, you want to see what Volume will be needed on Monday, + for job MyJob, you would use {\bf list nextvol job=MyJob days=3}. + + If you wish to add specialized commands that list the contents of the + catalog, you can do so by adding them to the {\bf query.sql} file. + However, this takes some knowledge of programming SQL. Please see the + {\bf query} command below for additional information. See below for + listing the full contents of a catalog record with the {\bf llist} + command. + + As an example, the command {\bf list pools} might produce the following + output: \footnotesize \begin{verbatim} @@ -653,32 +694,32 @@ update storage=xxx pool=yyy slots=1-5,10 barcodes \end{verbatim} \normalsize - Comme mentionn\'e pr\'ec\'edemment, la commande {\bf list} affiche des - informations du catalogue. Certais \'el\'ements sont ajout\'es dans le catalogue - d\`es le d\'emarrage de Bacula, mais en g\'en\'eral, la plupart ne le sont que - lorsqu'ils sont utilis\'es pour la premi\`ere fois. C'est le cas des clients, - des jobs, etc. + As mentioned above, the {\bf list} command lists what is in the + database. Some things are put into the database immediately when Bacula + starts up, but in general, most things are put in only when they are + first used, which is the case for a Client as with Job records, etc. - Bacula cr\'e\'e une entr\'ee relative \`a un nouveau client dans le catalogue - la premi\`ere fois que vous ex\'ecut\'ez un job pour ce client. L'entr\'ee est - cr\'e\'ee que le job aboutisse ou qu'il \'echoue, mais il doit au moins d\'emarrer. - Lorsque le client est contact\'e, des informations suppl\'ementaires sont - r\'ecup\'er\'ees du client (le r\'esultat d'un "uname -a") et ajout\'ees au - catalogue. Un {\bf status} n'entra\^ine pas l'enregistrement dans le catalogue. + Bacula should create a client record in the database the first time you + run a job for that client. Doing a {\bf status} will not cause a + database record to be created. The client database record will be + created whether or not the job fails, but it must at least start. When + the Client is actually contacted, additional info from the client will + be added to the client record (a "uname -a" output). - Si vous voulez visualiser les ressources Client disponibles dans votre - catalogue, utilisez la commande {\bf show clients}. + If you want to see what Client resources you have available in your conf + file, you use the Console command {\bf show clients}. \item [llist] \index[general]{llist} - La commande {\bf llist} (pour "long list") admet les m\^emes arguments que la - commande list d\'ecrite ci-dessus. La diff\'erence est que {\bf llist} affiche - le contenu complet de chaque enregistrement du catalogue s\'electionn\'e. - L'affichage des diff\'erents champs est produit verticalement, un champ par - ligne. Cette commande peut \^etre tr\`es prolixe. - - Si, au lieu du {\bf list pools} de l'exemple pr\'ec\'edent, vous saisissez - {\bf llist pools}, vous obtiendrez un affichage de ce genre : + The llist or "long list" command takes all the same arguments that the + list command described above does. The difference is that the llist + command list the full contents of each database record selected. It + does so by listing the various fields of the record vertically, with one + field per line. It is possible to produce a very large number of output + lines with this command. + + If instead of the {\bf list pools} as in the example above, you enter + {\bf llist pools} you might get the following output: \footnotesize \begin{verbatim} @@ -719,185 +760,232 @@ update storage=xxx pool=yyy slots=1-5,10 barcodes \item [messages] \index[general]{messages} - Cette commande affiche imm\'ediatement tout message de la console en attente. + This command causes any pending console messages to be immediately displayed. + +\item [memory] + \index[general]{memory} + Print current memory usage. \item [mount] \index[general]{mount} - - La commande {\bf mount} est utilis\'ee pour obtenir de Bacula qu'il lise - un volume charg\'e dans un lecteur. C'est un moyen d'indiquer \`a Bacula - que vous avez charg\'e une cartouche qu'il doit examiner. Cette commande - n'est utilis\'ee que lorsque Bacula a demand\'e votre intervention pour - charger un lecteur vide, ou lorsque vous avez explicitement d\'emont\'e - un volume avec la commande {\bf unmount} dans la Console, ce qui - provoque la fermeture du lecteur. Si vous avez une librairie, vous ne - ferez pas op\'erer Bacula dessus avec la commande mount. Voici les - diff\'erentes formes de cette commande : - -mount storage=\lt{}storage-name\gt{} + The mount command is used to get Bacula to read a volume on a physical + device. It is a way to tell Bacula that you have mounted a tape and + that Bacula should examine the tape. This command is normally + used only after there was no Volume in a drive and Bacula requests you to mount a new + Volume or when you have specifically unmounted a Volume with the {\bf + unmount} console command, which causes Bacula to close the drive. If + you have an autoloader, the mount command will not cause Bacula to + operate the autoloader unless you specify a {\bf slot} and possibly a + {\bf drive}. The various forms of the mount command are: + +mount storage=\lt{}storage-name\gt{} [ slot=\lt{}num\gt{} ] [ + drive=\lt{}num\gt{} ] mount [ jobid=\lt{}id\gt{} | job=\lt{}job-name\gt{} ] - Si vous avez sp\'ecifi\'e {\bf Automatic Mount = yes} dans la ressource - Device du Storage Daemon, Alors Bacula pourra acc\'eder automatiquement - au volume, \`a moins que vous ne l'ayez explicitement d\'emont\'e ({\bf unmount}) - dans la Console. + If you have specified {\bf Automatic Mount = yes} in the Storage daemon's + Device resource, under most circumstances, Bacula will automatically access + the Volume unless you have explicitly {\bf unmount}ed it in the Console + program. -\item[python] - \index[general]{python} - La commande {\bf python} n'admet qu'un argument : {\bf restart}. - - La commande {\bf python} {\bf restart} r\'einitialise l'interpr\'eteur Python - du Director. Ceci peut \^etre tr\`es utile pour effectuer des tests, car une - fois que le Director est lanc\'e, et l'interpr\'eteur Python initialis\'e, - il n'y a pas d'autre moyen de lui faire int\'egrer des modifications - du script de d\'emarrage {\bf DirStartUp.py}. Pour plus de d\'etails sur - l'\'ecriture de scripts Python, consultez le chapitre \ilink{Ecrire des - scripts Python}{_ChapterStart60}. - \label{ManualPruning} \item [prune] \index[general]{prune} - La commande {\bf prune} permet d'\'elaguer en toute s\'ecurit\'e les - enregistrements expir\'es du catalogue pour les jobs et les volumes. - Cette commande n'affecte que le catalogue, et non les donn\'ees - \'ecrites sur les volumes. Dans tous les cas, la commande {\bf prune} - respecte les p\'eriodes de r\'etention des enregistrements sp\'ecifi\'es. - Vous pouvez \'elaguer les jobs expir\'es, ainsi que les jobs et fichiers - d'un volume sp\'ecifi\'e. - -prune files|jobs|volume client=\lt{}client-name\gt{} + The Prune command allows you to safely remove expired database records from + Jobs, Volumes and Statistics. This command works only on the Catalog + database and does not affect data written to Volumes. In all cases, the + Prune command applies a retention period to the specified records. You can + Prune expired File entries from Job records; you can Prune expired Job + records from the database, and you can Prune both expired Job and File + records from specified Volumes. + +prune files|jobs|volume|stats client=\lt{}client-name\gt{} volume=\lt{}volume-name\gt{} - Pour qu'un volume soit \'elagu\'e, son {\bf VolStatus} doit \^etre Full, - Used, ou Append, faute de quoi l'\'elagage sera sans effet. - + For a Volume to be pruned, the {\bf VolStatus} must be Full, Used, or + Append, otherwise the pruning will not take place. + \item [purge] \index[general]{purge} - La commande {\bf purge} efface les enregistrements sp\'ecifi\'es du catalogue - sans \'egards pour les p\'eriodes de r\'etention. {\bf Purge} n'affecte que le - catalogue, et non les donn\'ees \'ecrites sur les volumes. Cette commande - peut se r\'ev\'eler tr\`es dangereuse car vous pouvez parfaitement supprimer - les enregistrements relatifs \`a des sauvegardes valides et r\'ecentes. Aussi, - nous vous recommandons de ne pas l'utiliser \`a moins de savoir exactement - ce que vous faites. Voici les diff\'erentes formes de la commande {\bf purge} : - + The Purge command will delete associated Catalog database records from + Jobs and Volumes without considering the retention period. {\bf Purge} + works only on the Catalog database and does not affect data written to + Volumes. This command can be dangerous because you can delete catalog + records associated with current backups of files, and we recommend that + you do not use it unless you know what you are doing. The permitted + forms of {\bf purge} are: + purge files jobid=\lt{}jobid\gt{}|job=\lt{}job-name\gt{}|client=\lt{}client-name\gt{} purge jobs client=\lt{}client-name\gt{} (of all jobs) purge volume|volume=\lt{}vol-name\gt{} (of all jobs) +For the {\bf purge} command to work on Volume Catalog database records the +{\bf VolStatus} must be Append, Full, Used, or Error. + +The actual data written to the Volume will be unaffected by this command. + +\item[python] + \index[general]{python} + The python command takes a single argument {\bf restart}: - Pour qu'un volume puisse \^etre purg\'e, son {\bf VolStatus} doit \^etre Full, - Used, ou Append, faute de quoi la purge sera sans effet. +python restart + + This causes the Python interpreter in the Director to be reinitialized. + This can be helpful for testing because once the Director starts and the + Python interpreter is initialized, there is no other way to make it + accept any changes to the startup script {\bf DirStartUp.py}. For more + details on Python scripting, please see the \ilink{Python + Scripting}{PythonChapter} chapter of this manual. + +\item [query] + \index[general]{query} + This command reads a predefined SQL query from the query file (the name and + location of the query file is defined with the QueryFile resource record in + the Director's configuration file). You are prompted to select a query from + the file, and possibly enter one or more parameters, then the command is + submitted to the Catalog database SQL engine. + +The following queries are currently available (version 2.2.7): + +\footnotesize +\begin{verbatim} +Available queries: +1: List up to 20 places where a File is saved regardless of the directory +2: List where the most recent copies of a file are saved +3: List last 20 Full Backups for a Client +4: List all backups for a Client after a specified time +5: List all backups for a Client +6: List Volume Attributes for a selected Volume +7: List Volumes used by selected JobId +8: List Volumes to Restore All Files +9: List Pool Attributes for a selected Pool +10: List total files/bytes by Job +11: List total files/bytes by Volume +12: List Files for a selected JobId +13: List Jobs stored on a selected MediaId +14: List Jobs stored for a given Volume name +15: List Volumes Bacula thinks are in changer +16: List Volumes likely to need replacement from age or errors +Choose a query (1-16): +\end{verbatim} +\normalsize + +\item [quit] + \index[general]{quit} + This command terminates the console program. The console program sends the + {\bf quit} request to the Director and waits for acknowledgment. If the + Director is busy doing a previous command for you that has not terminated, it + may take some time. You may quit immediately by issuing the {\bf .quit} + command (i.e. quit preceded by a period). \item [relabel] \index[general]{relabel} \index[general]{relabel} - Cette commande sert \`a r\'e-\'etiqueter physiquement un volume. En voici - la forme compl\`ete : + This command is used to label physical volumes. The full form of this + command is: relabel storage=\lt{}storage-name\gt{} oldvolume=\lt{}old-volume-name\gt{} volume=\lt{}newvolume-name\gt{} - Si vous omettez l'un quelconque des arguments, la console vous sollicitera - pour obtenir les informations manquantes. Pour qu'un volume puisse \^etre - r\'e-\'etiquet\'e, il doit figurer dans le catalogue, et avoir le statut - {\bf Purged} ou {\bf Recycle}. Cette situation peut se pr\'esenter - automatiquement par l'application des p\'eriodes de r\'etention, ou vous - pouvez l'obtenir par une {\bf purge} explicite du volume. + If you leave out any part, you will be prompted for it. In order for + the Volume (old-volume-name) to be relabeled, it must be in the catalog, + and the volume status must be marked {\bf Purged} or {\bf Recycle}. + This happens automatically as a result of applying retention periods, or + you may explicitly purge the volume using the {\bf purge} command. - Une fois que le volume a \'et\'e physiquement r\'e-\'etiquet\'e, les donn\'ees - qu'il contenait sont d\'efinitivement et irr\'em\'ediablement perdues. + Once the volume is physically relabeled, the old data previously written + on the Volume is lost and cannot be recovered. \item [release] \index[general]{release} - Cette commande ordonne au Storage Daemon de rembobiner la cartouche - dans le lecteur, et de relire son \'etiquette \`a la prochaine utilisation - de la cartouche. + This command is used to cause the Storage daemon to rewind (release) the + current tape in the drive, and to re-read the Volume label the next time + the tape is used. release storage=\lt{}storage-name\gt{} - Apr\`es cette commande, le lecteur est gard\'e \`a l'\'etat ouvert par Bacula - (sauf si l'option Always Open est d\'esactiv\'ee dans la configuration - du Storage Daemon), et il ne peut donc \^etre utilis\'e par un autre - programme. Toutefois, il est possible, avec certains lecteurs, de - changer la cartouche \`a ce stade. Lors du prochain job, Bacula saura - relire l'\'etiquette de la cartouche pour savoir laquelle est mont\'ee. - Si vous voulez \^etre en mesure d'utiliser le lecteur avec un autre - programme, par exemple {\bf mt}, vous devez uiliser la commande - {\bf unmount} pour que Bacula le lib\`ere compl\`etement. + After a release command, the device is still kept open by Bacula (unless + Always Open is set to No in the Storage Daemon's configuration) so it + cannot be used by another program. However, with some tape drives, the + operator can remove the current tape and to insert a different one, and + when the next Job starts, Bacula will know to re-read the tape label to + find out what tape is mounted. If you want to be able to use the drive + with another program (e.g. {\bf mt}), you must use the {\bf unmount} + command to cause Bacula to completely release (close) the device. \item [reload] \index[general]{reload} - Lorsqu'il re\c{c}oit la commande {\bf reload}, le Director relit ses fichiers - de configuration et applique les \'eventuelles modifications. Celles-ci - sont prises en compte imm\'ediatement, et donc effectives pour tous les - jobs \`a venir. Notez cependant qu'en ce qui concerne les modifications - apport\'ees aux Schedules, la prise en compte des nouvelles valeur peut - \^etre report\'ee au del\`a de l'ex\'ecution des jobs d\'ej\`a planifi\'es pour - les deux prochaines heures. Ceci est d\^u au planificateur qui pr\'evoit - "pr\'e-planifie" jusqu'\`a deux heures \`a l'avance les jobs \`a ex\'ecuter. - Ainsi, des jobs qui ont d\'ej\`a \'et\'e "pr\'e-planifi\'es" seront ex\'ecut\'es - suivant les valeurs sp\'ecifi\'ees par la ressource Schedule avant sa - modification. Les nouveaux jobs utiliseront les nouvelles valeurs. - A chaque fois que vous utilisez la commande {\bf reload} alors que - des jobs sont en cours d'ex\'ecution, les valeurs de la configuration - pr\'ec\'edente demeurent en vigueur jusqu'\`a ce que les ces jobs se terminent. - Le Director peut ainsi conserver jusqu'\`a 10 jeux de configurations - ant\'erieures avant de refuser une nouvelle commande {\bf reload}. - Une fois que l'un, au moins, des jeux de valeurs ant\'erieur a \'et\'e accept\'e, - il peut \`a nouveau accepter de nouvelles commandes {\bf reload}. - - Bien qu'il soit possible de recharger la configuration du Director - \`a la vol\'ee, alors m\^eme que des jobs sont en cours d'ex\'ecution, il faut - garder \`a l'esprit que c'est une op\'eration complexe, qui n'est pas d\'enu\'ee - d'effets de bords. C'est pourquoi il est recommand\'e, si vous \^etes amen\'e \`a - utiliser la commande {\bf reload}, de red\'emarrer le Director d\`es que vous - en aurez l'opportunit\'e. + The reload command causes the Director to re-read its configuration + file and apply the new values. The new values will take effect + immediately for all new jobs. However, if you change schedules, + be aware that the scheduler pre-schedules jobs up to two hours in + advance, so any changes that are to take place during the next two + hours may be delayed. Jobs that have already been scheduled to run + (i.e. surpassed their requested start time) will continue with the + old values. New jobs will use the new values. Each time you issue + a reload command while jobs are running, the prior config values + will queued until all jobs that were running before issuing + the reload terminate, at which time the old config values will + be released from memory. The Directory permits keeping up to + ten prior set of configurations before it will refuse a reload + command. Once at least one old set of config values has been + released it will again accept new reload commands. + + While it is possible to reload the Director's configuration on the fly, + even while jobs are executing, this is a complex operation and not + without side effects. Accordingly, if you have to reload the Director's + configuration while Bacula is running, it is advisable to restart the + Director at the next convenient opportunity. \label{restore_command} \item [restore] \index[general]{restore} - La commande {\bf restore} vous permet de s\'electionner un ou plusieurs jobs - (JobIds) \`a restaurer selon plusieurs m\'ethodes. Une fois que les JobIds ont - \'et\'e s\'electionn\'es, les enregistrements de fichiers sont plac\'es dans une - arborescence interne \`a Bacula, et la Console entre dans un mode de - s\'election interactif qui vous permet de naviguer dans cette arborescence - en s\'electionnant individuellement les fichiers ou r\'epertoires \`a restaurer. - Ce mode est assez similaire au mode de s\'election interactif du programme - Unix {\bf restore} standard. - -restore storage=\lt{}storage-name\gt{} client=\lt{}client-name\gt{} + The restore command allows you to select one or more Jobs (JobIds) to be + restored using various methods. Once the JobIds are selected, the File + records for those Jobs are placed in an internal Bacula directory tree, + and the restore enters a file selection mode that allows you to + interactively walk up and down the file tree selecting individual files + to be restored. This mode is somewhat similar to the standard Unix {\bf + restore} program's interactive file selection mode. + +restore storage=\lt{}storage-name\gt{} client=\lt{}backup-client-name\gt{} where=\lt{}path\gt{} pool=\lt{}pool-name\gt{} fileset=\lt{}fileset-name\gt{} + restoreclient=\lt{}restore-client-name\gt{} select current all done - O\`u l'option {\bf current}, si elle est sp\'ecifi\'ee, indique \`a la commande - {\bf restore} de s\'electionner automatiquement la sauvegarde la plus - r\'ecente (sinon, vous serez sollicit\'e \`a ce sujet). L'option {\bf all}, - si elle est sp\'ecifi\'ee, indique \`a la commande {\bf restore} de restaurer - tous les fichiers (sinon, vous serez sollicit\'e \`a ce sujet). Pour plus de - d\'etails concernant la commande {\bf restore}, consultez le chapitre - \ilink{Restaurations avec Bacula}{_ChapterStart13}. - + Where {\bf current}, if specified, tells the restore command to + automatically select a restore to the most current backup. If not + specified, you will be prompted. The {\bf all} specification tells the + restore command to restore all files. If it is not specified, you will + be prompted for the files to restore. For details of the {\bf restore} + command, please see the \ilink{Restore Chapter}{RestoreChapter} of this + manual. + + The client keyword initially specifies the client from which the backup + was made and the client to which the restore will be make. However, + if the restoreclient keyword is specified, then the restore is written + to that client. + \item [run] \index[general]{run} - Cette commande vous permet d'ex\'ecuter imm\'ediatement vos jobs. Voici la forme - compl\`ete de cette commande : + This command allows you to schedule jobs to be run immediately. The full form + of the command is: run job=\lt{}job-name\gt{} client=\lt{}client-name\gt{} fileset=\lt{}FileSet-name\gt{} level=\lt{}level-keyword\gt{} storage=\lt{}storage-name\gt{} where=\lt{}directory-prefix\gt{} - when=\lt{}universal-time-specification\gt{} yes + when=\lt{}universal-time-specification\gt{} spooldata=yes|no yes - Toute information omise quoique requise fait l'objet d'une liste de s\'election, - et avant le lancement du job, un bilan des param\`etres vous est pr\'esent\'e avec - options d'accord, refus et modification, \`a moins que vous ayez sp\'ecifi\'e - {\bf yes}, auquel cas le job est imm\'ediatement envoy\'e vers le planificateur. - - Sur mon syst\`eme, j'obtiens ce qui suit lorsque je lance la commande run : + Any information that is needed but not specified will be listed for + selection, and before starting the job, you will be prompted to accept, + reject, or modify the parameters of the job to be run, unless you have + specified {\bf yes}, in which case the job will be immediately sent to + the scheduler. + + On my system, when I enter a run command, I get the following prompt: \footnotesize \begin{verbatim} @@ -917,7 +1005,7 @@ Select Job resource (1-9): \end{verbatim} \normalsize -Si je choisis le num\'ero 5, j'obtiens : +If I then select number 5, I am prompted with: \footnotesize \begin{verbatim} @@ -934,8 +1022,8 @@ OK to run? (yes/mod/no): \end{verbatim} \normalsize -Si maintenant j'entre {\bf yes}, le job est ex\'ecut\'e. Si je choisis {\bf mod}, -voici les otpions qui me sont propos\'ees : +If I now enter {\bf yes}, the Job will be run. If I enter {\bf mod}, I will +be presented with the following prompt. \footnotesize \begin{verbatim} @@ -952,94 +1040,99 @@ Select parameter to modify (1-7): \end{verbatim} \normalsize -Vous pouvez, si vous le souhaitez, d\'emarrer un job plus tard, en utilisant le -param\`etre {\bf When}. Pour cela, faites le choix {\bf mod}, puis s\'electionnez -{\bf When} (no. 6) et enfin, saisissez l'heure et le jour de lancement -d\'esir\'es au format AAAA-MM-JJ HH:MM:SS. +If you wish to start a job at a later time, you can do so by setting the When +time. Use the {\bf mod} option and select {\bf When} (no. 6). Then enter the +desired start time in YYYY-MM-DD HH:MM:SS format. + +The spooldata argument of the run command cannot be modified through the menu +and is only accessible by setting its value on the intial command line. If +no spooldata flag is set, the job, storage or schedule flag is used. \item [setdebug] \index[general]{setdebug} \index[general]{setdebug} - \index[general]{debuggage} - \index[general]{debuggage Win32} - \index[general]{Windows!debuggage} - - Cette commande est utilis\'ee pour param\'etrer le niveau de d\'ebuggage de chaque - {\it daemon}. Voici la forme compl\`ete de cette commande. + \index[general]{debugging} + \index[general]{debugging Win32} + \index[general]{Windows!debugging} + This command is used to set the debug level in each daemon. The form of this + command is: setdebug level=nn [trace=0/1 client=\lt{}client-name\gt{} | dir | director | storage=\lt{}storage-name\gt{} | all] - Si le param\`etre de tra\c{c}age est actif (trace=1), alors le {\it daemon} est - plac\'e en mode tra\c{c}age, ce qui signifie que toutes les informations de - d\'ebuggage sont envoy\'ees vers le fichier {\bf bacula.trace} dans le - r\'epertoire courant du {\it daemon}. En principe, ce n'est n\'ecessaire - que pour le d\'ebuggage des clients Win32 o\`u les informations ne peuvent - \^etre envoy\'ees vers un terminal ou redirig\'ees vers un fichier. en mode - tra\c{c}age, chaque message de d\'ebuggage est ajout\'e au fichier, que vous devez - supprimer explicitement lorsque vous avez fini. + If trace=1 is set, then tracing will be enabled, and the daemon will be + placed in trace mode, which means that all debug output as set by the + debug level will be directed to the file {\bf bacula.trace} in the + current directory of the daemon. Normally, tracing is needed only for + Win32 clients where the debug output cannot be written to a terminal or + redirected to a file. When tracing, each debug output message is + appended to the trace file. You must explicitly delete the file when + you are done. + +\item [setip] + \index[general]{setip} + Sets new client address -- if authorized. + \item [show] \index[general]{show} \index[general]{show} - LA commande {\bf show} \'enum\`ere les directives des ressources du Director - telles qu'ells sont d\'efinies dans son fichier de configuration. - Cette commande est surtout utilis\'ee par les d\'eveloppeurs \`a des fins - de d\'ebuggage. LEs mots-clef suivants sont accept\'es : - catalogs, clients, counters, devices, directors, + The show command will list the Director's resource records as defined in + the Director's configuration file (normally {\bf bacula-dir.conf}). + This command is used mainly for debugging purposes by developers. + The following keywords are accepted on the + show command line: catalogs, clients, counters, devices, directors, filesets, jobs, messages, pools, schedules, storages, all, help. - Ne confondez pas cette commande ave la commande {\bf list}, qui affiche - quand \`a elle le contenu du catalogue. + Please don't confuse this command + with the {\bf list}, which displays the contents of the catalog. \item [sqlquery] \index[general]{sqlquery} - La commande {\bf sqlquery} place le programme Console en mode de - requ\^etes SQL, dans lequel chaque ligne que vousq tapez est concat\'en\'ee - \`a la pr\'ec\'edents jusqu'\`a ce qu'un point-virgule (;) soit rencontr\'e. Le - point-virgule termine la commande qui est alors directement envoy\'e au moteur - de base de donn\'ee SQL. Lorsque le r\'esultat issu de la base de donn\'ee SQL est - affich\'e, la Console est pr\`ete \`a recevoir une nouvelle commande SQL. - Pour sortir du mode {\bf sqlquery} et reevenir \`a l'invite de la Console, - entrez un point (.). - - Cette commande vous permet d'interroger directement le catalogue. Notez - que vous devriez savoir exactement ce que vous faites en utilisant cette - commande, car vous pouvez endommager s\'erieusement votre catalogue. - Consultez le paragraphe relatif \`a la commande {\bf query} qui offre un - moyen \`a la fois plus simple et plus sur de saisir des requ\^etes SQL. - - En fonction du moteur de base de donn\'ees que vous utilisez (MySQL, - PostgreSQL ou SQLite), vous disposerez de commandes quelque peu diff\'erentes. - Pour plus de d\'etails, r\'ef\'erez-vous aux documentations de MySQL, PostgreSQL - ou SQLite. - + The sqlquery command puts the Console program into SQL query mode where + each line you enter is concatenated to the previous line until a + semicolon (;) is seen. The semicolon terminates the command, which is + then passed directly to the SQL database engine. When the output from + the SQL engine is displayed, the formation of a new SQL command begins. + To terminate SQL query mode and return to the Console command prompt, + you enter a period (.) in column 1. + + Using this command, you can query the SQL catalog database directly. + Note you should really know what you are doing otherwise you could + damage the catalog database. See the {\bf query} command below for + simpler and safer way of entering SQL queries. + + Depending on what database engine you are using (MySQL, PostgreSQL or + SQLite), you will have somewhat different SQL commands available. For + more detailed information, please refer to the MySQL, PostgreSQL or + SQLite documentation. + \item [status] \index[general]{status} - Cette commande produit un \'etat des prochains jobs planifi\'es au cours des - 24 prochanes heures, ainsi que l'\'etat des jobs en cours d'ex\'ecution. Voici - la forme compl\`ete de cette commande : - -status [all | dir=\lt{}dir-name\gt{} | director | - client=\lt{}client-name\gt{} | storage=\lt{}storage-name\gt{} | - days=nnn] - - Si vous entrez {\bf status dir}, la Console \'enum\`ere tous les jobs en cours - d'ex\'ecution, un r\'esum\'e des jobs planifi\'e pour ex\'ecution au cours des prochaines - 24 heures incluant le volume qui sera probablement utilis\'e, et donne la liste - des dix derniers jobs ex\'ecut\'es avec leurs \'etats. Gardez \`a l'esprit les deux - \'el\'ements suivants : - \begin{itemize} - \item L'obtention du volume n\'ecessite d'appliquer le m\^eme algorithme que - celui utilis\'e lors de l'ex\'ecution d'un job, ce qui peut r\'esulter en un \'elagage - de cartouche. - \item Le volume affich\'e est, au mieux, une bonne supposition. En effet le - volume effectivement utilis\'e peut \^etre diff\'erent en raison du temps \'ecoul\'e - entre le status et l'ex\'ecution du job, un autre job ayant pu, entre temps, - remplir compl\`etement la cartouche. - \end{itemize} - - Dans la liste des jobs en cours d'ex\'ecutions, vous pouvez trouver ce type - d'informations : + + This command will display the status of all components. For the director, it + will display the next jobs that are scheduled during the next 24 hours as + well as the status of currently running jobs. For the Storage Daemon, you + will have drive status or autochanger content. The File Daemon will give you + information about current jobs like average speed or file accounting. The + full form of this command is: + +status [all | dir=\lt{}dir-name\gt{} | director [days=nnn] | + client=\lt{}client-name\gt{} | [slots] storage=\lt{}storage-name\gt{}] + + If you do a {\bf status dir}, the console will list any currently + running jobs, a summary of all jobs scheduled to be run in the next 24 + hours, and a listing of the last ten terminated jobs with their statuses. + The scheduled jobs summary will include the Volume name to be used. You + should be aware of two things: 1. to obtain the volume name, the code + goes through the same code that will be used when the job runs, but it + does not do pruning nor recycling of Volumes; 2. The Volume listed is + at best a guess. The Volume actually used may be different because of + the time difference (more durations may expire when the job runs) and + another job could completely fill the Volume requiring a new one. + + In the Running Jobs listing, you may find the following types of + information: + \footnotesize \begin{verbatim} @@ -1051,30 +1144,29 @@ status [all | dir=\lt{}dir-name\gt{} | director | \end{verbatim} \normalsize - La liste ci-dessus indique que le job de JobId 5343 (Rufus) est en cours. - Le job de JobId 5348 (Minou) est en attente de la fin du job 5343 - qui utilise la m\^eme ressource Storage, ce qui provoque le "waiting - on max Storage jobs". Le job de JobId 5349 a une priorit\'e inf\'erieure - \`a celle de tous les autres jobs, aussi, il est en attente de la fin de - jobs de priorit\'es sup\'erieures. Finalement, le job de jobId 2508 (MatouVerify) - est en attente ("waiting execution") car un seul job peut \^etre ex\'ecut\'e - en m\^eme temps. - - Si vous faites un {\bf status dir}, Bacula affiche par d\'efaut les premi\`eres - occurrences de tous les jobs pr\'evus pour ex\'ecution aujourd'hui et demain. - Si vous voulez voir les jobs pr\'evus pour les trois prochains jours, - (Si, par exemple vendredi, vous voulez voir les premi\`eres occurrences - des cartouches \`a utiliser vendredi, samedi, dimanche et lundi), vous - pouvez ajouter l'option {\bf days=3}. Notez, {\bf days=0} montre les - premi\`eres occurrences des jobs planifi\'es pour \^etre ex\'ecut\'es aujourd'hui - seulement. Si vous avez plusieurs ex\'ecutions planifi\'ees, pour chaque - job, seule la premi\`ere occurrence sera affich\'e pour la p\'eriode sp\'ecifi\'ee. - - Si votre job para\^it bloqu\'e, vous pouvez avoir une id\'ee g\'en\'erale du probl\`eme - en utilisant {\bf status dir}, et obtenir une information plus sp\'ecifique - avec {\bf status storage=xxx}. Par exemple, si j'utilise cette derni\`ere - commande sur un syst\`eme inoccup\'e, j'obtiens : - + Looking at the above listing from bottom to top, obviously JobId 5343 + (Rufus) is running. JobId 5348 (Minou) is waiting for JobId 5343 to + finish because it is using the Storage resource, hence the "waiting on + max Storage jobs". JobId 5349 has a lower priority than all the other + jobs so it is waiting for higher priority jobs to finish, and finally, + JobId 2507 (MatouVerify) is waiting because only one job can run at a + time, hence it is simply "waiting execution" + + If you do a {\bf status dir}, it will by default list the first + occurrence of all jobs that are scheduled today and tomorrow. If you + wish to see the jobs that are scheduled in the next three days (e.g. on + Friday you want to see the first occurrence of what tapes are scheduled + to be used on Friday, the weekend, and Monday), you can add the {\bf + days=3} option. Note, a {\bf days=0} shows the first occurrence of jobs + scheduled today only. If you have multiple run statements, the first + occurrence of each run statement for the job will be displayed for the + period specified. + + If your job seems to be blocked, you can get a general idea of the + problem by doing a {\bf status dir}, but you can most often get a + much more specific indication of the problem by doing a + {\bf status storage=xxx}. For example, on an idle test system, when + I do {\bf status storage=File}, I get: \footnotesize \begin{verbatim} status storage=File @@ -1097,15 +1189,13 @@ Terminated Jobs: ==== Device status: -utochanger "DDS-4-changer" with devices: +Autochanger "DDS-4-changer" with devices: "DDS-4" (/dev/nst0) Device "DDS-4" (/dev/nst0) is mounted with Volume="TestVolume002" Pool="*unknown*" Slot 2 is loaded in drive 0. Total Bytes Read=0 Blocks Read=0 Bytes/block=0 Positioned at File=0 Block=0 -Device "Dummy" is not open or does not exist. -No DEVICE structure. Device "DVD-Writer" (/dev/hdc) is not open. Device "File" (/tmp) is not open. @@ -1116,11 +1206,11 @@ In Use Volume status: \end{verbatim} \normalsize -Ce qui r\'ev\`ele qu'aucun job n'est en cours d'ex\'ecution, et qu'aucun des -p\'eriph\'eriques n'est en cours d'utilisation. Si je d\'emonte la librairie -({\bf unmount}), qui ne sera plus utilis\'ee dans cet exemple, et que je lance -un job qui utilise le stockage File, le job se bloque. Si je demande \`a -nouveau {\bf status storage=xxx}, j'obtiens : +Now, what this tells me is that no jobs are running and that none of +the devices are in use. Now, if I {\bf unmount} the autochanger, which +will not be used in this example, and then start a Job that uses the +File device, the job will block. When I re-issue the status storage +command, I get for the Device status: \footnotesize \begin{verbatim} @@ -1132,8 +1222,6 @@ Autochanger "DDS-4-changer" with devices: Device "DDS-4" (/dev/nst0) is not open. Device is BLOCKED. User unmounted. Drive 0 is not loaded. -Device "Dummy" is not open or does not exist. -No DEVICE structure. Device "DVD-Writer" (/dev/hdc) is not open. Device "File" (/tmp) is not open. @@ -1143,45 +1231,62 @@ Device "File" (/tmp) is not open. \end{verbatim} \normalsize -Il devrait maintenant \^etre clair que si un job n\'ecessitant la librairie -est ex\'ecut\'e, il bloquera en raison du d\'emontage de cette derni\`ere par -l'utilisateur. Mais le probl\`eme pour le job que j'ai lanc\'e avec le -p\'eriph\'erique "File" est que le p\'eriph\'erique est bloqu\'e en attente -d'un media : Bacula a besoin que vous \'etiquetiez un volume. +Now, here it should be clear that if a job were running that wanted +to use the Autochanger (with two devices), it would block because +the user unmounted the device. The real problem for the Job I started +using the "File" device is that the device is blocked waiting for +media -- that is Bacula needs you to label a Volume. + +\item [time] + \index[general]{time} + Prints the current time. + +\item [trace] + \index[general]{trace} + Turn on/off trace to file. + +\item [umount] + \index[general]{umount} + For old-time Unix guys. See the unmount command for full details. \item [unmount] \index[general]{unmount} - Cette commande sert \`a ordonner au Storage Daemon de d\'emonter le p\'eriph\'erique - sp\'ecifi\'e. Les formes de cette commande sont les m\^emes que celle de la commande - mount : - + This command causes the indicated Bacula Storage daemon to unmount the + specified device. The forms of the command are the same as the mount command: \footnotesize \begin{verbatim} -unmount storage= +unmount storage= [ drive= ] unmount [ jobid= | job= ] \end{verbatim} \normalsize + Once you unmount a storage device, Bacula will no longer be able to use + it until you issue a mount command for that device. If Bacula needs to + access that device, it will block and issue mount requests periodically + to the operator. + + If the device you are unmounting is an autochanger, it will unload + the drive you have specified on the command line. If no drive is + specified, it will assume drive 1. + \label{UpdateCommand} \item [update] \index[general]{update} - Cette commande met \`a jour le catalogue, que ce soit pour un pool sp\'ecifique, - un enregistrement de volume, ou les slots d'une librairie dot\'ee d'un lecteur - de codes barres. Dans le cas de la mise \`a jour d'un enregistrement de pool, - la nouvelle configuration est automatiquement r\'ecup\'er\'ee de la ressource - correspondante du fichier de configuration du Director. Cette commande peut - notamment servir \`a augmenter le nombre maxial de volumes dans un pool. Les - principaux mots-clef suivants peuvent \^etre utilis\'es : - + This command will update the catalog for either a specific Pool record, a Volume + record, or the Slots in an autochanger with barcode capability. In the case + of updating a Pool record, the new information will be automatically taken + from the corresponding Director's configuration resource record. It can be + used to increase the maximum number of volumes permitted or to set a maximum + number of volumes. The following main keywords may be specified: \footnotesize \begin{verbatim} - media, volume, pool, slots + media, volume, pool, slots, stats \end{verbatim} \normalsize -Dans le cas de la mise \`a jour d'un volume, vous serez interrog\'e sur le -param\`etre que vous voulez modifier. Voici ces param\`etres : +In the case of updating a Volume, you will be prompted for which value you +wish to change. The following Volume parameters may be changed: \footnotesize \begin{verbatim} @@ -1193,193 +1298,155 @@ param\`etre que vous voulez modifier. Voici ces param\`etres : Maximum Volume Files Maximum Volume Bytes Recycle Flag + Recycle Pool Slot InChanger Flag Pool Volume Files Volume from Pool All Volumes from Pool + All Volumes from all Pools \end{verbatim} \normalsize - Pour le param\`etre slot, {\bf update slots}, Bacula obtient une liste - de tous les slots et de leurs codes barres du Storage Daemon, - pour chaque code barres trouv\'e, le slot est mis \`a jour dans - l'enregistrement Media du catalogue. C'est tr\`es pratique si vous - d\'eplacez des cartouches dans la librairie, ou si vous changez des - magasins de cartouches. Dans la foul\'ee, le drapeau InChanger est - aussi mis \`a jour.Ceci permet \`a BAcula de savoir quels cartouches sont - effectivement dans la librairie. - - Si vous n'avez pas de lecteur de codes barres, vous pouvez faire la - m\^eme chose depuis la version 1.33 gr\^ace \`a la commande {\bf update slots scan}. - Le mot-clef {\bf scan} ordonne \`a Bacula de monter physiquement chaque - cartouche afin de lire son VolumeName. - - Pour le param\`etre Pool, {\bf update pool}, Bacula d\'eplace le volume de - son pool courant vers le pool sp\'ecifi\'e. - - Pour les parm\`etres {\bf Volume from Pool} et {\bf All Volumes from Pool}, - les valeurs suivantes sont mises \`a jour depuis l'enregistrement - de pool : Recycle, VolRetention, VolUseDuration, MaxVolJobs, MaxVolFiles, - and MaxVolBytes. - - Voici la forme compl\`ete de la commande {\bf update} : + For slots {\bf update slots}, Bacula will obtain a list of slots and + their barcodes from the Storage daemon, and for each barcode found, it + will automatically update the slot in the catalog Media record to + correspond to the new value. This is very useful if you have moved + cassettes in the magazine, or if you have removed the magazine and + inserted a different one. As the slot of each Volume is updated, the + InChanger flag for that Volume will also be set, and any other Volumes + in the Pool that were last mounted on the same Storage device + will have their InChanger flag turned off. This permits + Bacula to know what magazine (tape holder) is currently in the + autochanger. + + If you do not have barcodes, you can accomplish the same thing in + version 1.33 and later by using the {\bf update slots scan} command. + The {\bf scan} keyword tells Bacula to physically mount each tape and to + read its VolumeName. + + For Pool {\bf update pool}, Bacula will move the Volume record from its + existing pool to the pool specified. + + For {\bf Volume from Pool}, {\bf All Volumes from Pool} and {\bf All Volumes + from all Pools}, the following values are updated from the Pool record: + Recycle, RecyclePool, VolRetention, VolUseDuration, MaxVolJobs, MaxVolFiles, + and MaxVolBytes. (RecyclePool feature is available with bacula 2.1.4 or + higher.) + + The full form of the update command with all command line arguments is: \footnotesize \begin{verbatim} update volume=xxx pool=yyy slots volstatus=xxx VolRetention=ddd VolUse=ddd MaxVolJobs=nnn MaxVolBytes=nnn Recycle=yes|no - slot=nnn enabled=n + slot=nnn enabled=n recyclepool=zzz \end{verbatim} \normalsize \item [use] \index[general]{use} - Cette commande vous perment de pr\'eciser le catalogue que vous voulez utiliser. - En principe, vous n'utiliserez qu'un seul catalogue, aussi vous n'aurez pas - besoin de faire ce choix. Sinon, utilisez cette commande pour passer de l'un - de vos catalogues \`a l'autre. + This command allows you to specify which Catalog database to use. Normally, +you will be using only one database so this will be done automatically. In +the case that you are using more than one database, you can use this command +to switch from one to another. use \lt{}database-name\gt{} \item [var] \label{var} \index[general]{var name} - Cette commande prend une cha\^ine \'eventuellement encadr\'ee de guillemets et effectue - l'expansion des variables comme elle serait effectu\'ee au niveau de la - directive {\bf LabelFormat}. Ainsi, vous pouvez tester vos cha\^ines - de format d'\'etiquetage. La diff\'erence entre la commande {\bf var} et le - processus effectif est que pour la premi\`ere, aucun job n'est en cours, - aussi des valeurs factices sont utilis\'ees au lieu des variables sp\'ecifiques - aux jobs. Cela vous permet cependant de vous faire une bonne id\'ee de ce qui - se passerait dans le cas r\'eel. + This command takes a string or quoted string and does variable expansion on + it the same way variable expansion is done on the {\bf LabelFormat} string. + Thus, for the most part, you can test your LabelFormat strings. The + difference between the {\bf var} command and the actual LabelFormat process + is that during the var command, no job is running so "dummy" values are + used in place of Job specific variables. Generally, however, you will get a + good idea of what is going to happen in the real case. \item [version] \index[general]{version} - Cette commande affiche la version du Director. - -\item [quit] - \index[general]{quit} - Cette commande stoppe le programme Console. Celui-ci envoie la requ\^ete - {\bf quit} au Director et attend son accus\'e de r\'eception. Si le Director - est occup\'e, cela peut prendre un certain temps. Vous pouvez quitter - imm\'ediatement en utilisant la variante {\bf .quit} ({\bf quit} pr\'ec\'ed\'ee - d'un point). - -\item [query] - \index[general]{query} - Cette commande lit une requ\^ete SQL pr\'ed\'efinie dans le fichier de requ\^etes - (le nom et l'emplacement de ce fichier sont d\'efinis par la directive - QueryFile du fichier de configuration du Director). Il vous est alors - demand\'e de s\'electionner une requ\^ete du fichier, et \'eventuellement de - saisir un ou plusieurs param\`etres. La requ\^ete est alors soumise au - moteur de base de donn\'ees. - -Les requ\^etes suivantes sont actuellement (version 1.24) disponibles : - -\footnotesize -\begin{verbatim} -Available queries: - 1: List Job totals: - 2: List where a file is saved: - 3: List where the most recent copies of a file are saved: - 4: List total files/bytes by Job: - 5: List total files/bytes by Volume: - 6: List last 20 Full Backups for a Client: - 7: List Volumes used by selected JobId: - 8: List Volumes to Restore All Files: - 9: List where a File is saved: -Choose a query (1-9): - -\end{verbatim} -\normalsize - -\item [exit] - \index[general]{exit} - Cette commande termine le programme Console. + The command prints the Director's version. \item [wait] \index[general]{wait} - Cette commande place le Director en pause jusqu'\`a ce qu'il n'y ait plus - aucun job en ex\'ecution. Cette commande est utile dans des situation - d'utilisation automatis\'ee par scripts telles que les tests de r\'egression - o\`u vous voulez d\'emarrer un job, et attendre qu'il se termine avant de - poursuivre. Cette commande admet les options suivantes : - + The wait command causes the Director to pause until there are no jobs + running. This command is useful in a batch situation such as regression + testing where you wish to start a job and wait until that job completes + before continuing. This command now has the following options: \footnotesize \begin{verbatim} wait [jobid=nn] [jobuid=unique id] [job=job name] \end{verbatim} \normalsize + If specified with a specific JobId, ... the wait command will wait + for that particular job to terminate before continuing. \end{description} \label{dotcommands} +\section{Special dot Commands} +\index[general]{Commands!Special dot} +\index[general]{Special dot Commands} -\section{Commandes sp\'eciales, pr\'ec\'ed\'ees d'un point} -\index[general]{Commands!sp\'eciales, pr\'ec\'ed\'ees d'un point} -\index[general]{Commandes sp\'eciales, pr\'ec\'ed\'ees d'un point} -\addcontentsline{toc}{section}{Commandes sp\'eciales, pr\'ec\'ed\'ees d'un point} - -Voici une liste de commandes pr\'efix\'ees d'un point (.). Elles ont pour vocation -d'\^etre utilis\'ees soit dans des programmes {\it batch}, soit par des interfaces -graphiques. Elles ne sont, en principe, pas utilis\'ees en mode interactif. -Une fois que le d\'eveloppement d'interfaces graphiques aura d\'emarr\'e, cette liste -s'accro\^itra consid\'erablement. +There is a list of commands that are prefixed with a period (.). These +commands are intended to be used either by batch programs or graphical user +interface front-ends. They are not normally used by interactive users. Once +GUI development begins, this list will be considerably expanded. The following +is the list of dot commands: \footnotesize \begin{verbatim} .backups job=xxx list backups for specified job +.clients list all client names .defaults client=xxx fileset=yyy list defaults for specified client .die cause the Director to segment fault (for debugging) .dir when in tree mode prints the equivalent to the dir command, but with fields separated by commas rather than spaces. +.exit quit +.filesets list all fileset names +.help help command output .jobs list all job names .levels list all levels -.filesets list all fileset names -.clients list all client names -.pools list all pool names -.types list job types -.msgs return any queued messages .messages get quick messages -.help help command output +.msgs return any queued messages +.pools list all pool names .quit quit .status get status output -.exit quit +.storage return storage resource names +.types list job types \end{verbatim} \normalsize \label{atcommands} -\section{Commandes sp\'eciales, pr\'ec\'ed\'ees d'un arobase (@)} -\index[general]{Commandes!sp\'eciales arobase @} -\index[general]{Commandes sp\'eciales, pr\'ec\'ed\'ees d'un arobase (@)} -\addcontentsline{toc}{section}{Commandes sp\'eciales, pr\'ec\'ed\'ees d'un arobase (@)} +\section{Special At (@) Commands} +\index[general]{Commands!Special At @} +\index[general]{Special At (@) Commands} -Normalement, toutes les commandes saisies dans la Console sont imm\'ediatement -transmises au Director, qui peut r\'esider sur une autre machine, afin d'y \^etre -ex\'ecut\'ees. Il existe cependant quelques commandes, toutes pr\'ec\'ed\'ees du -caract\`ere arobase (@), qui ne sont pas envoy\'ees au Director, mais -directement interpr\'et\'ees par la Console. Notez que seule la Console -tty impl\'emente ces commandes, et non la Console GNOME. En voici la liste : +Normally, all commands entered to the Console program are immediately +forwarded to the Director, which may be on another machine, to be executed. +However, there is a small list of {\bf at} commands, all beginning with an at +character (@), that will not be sent to the Director, but rather interpreted +by the Console program directly. Note, these commands are implemented only in +the tty console program and not in the GNOME Console. These commands are: \begin{description} -\item [@input \lt{}nom-de-fichier\gt{}] - \index[general]{@input \lt{}nom-de-fichier\gt{}} - Lit et ex\'ecute les commandes consign\'ees dans le fichier sp\'ecifi\'e. +\item [@input \lt{}filename\gt{}] + \index[general]{@input \lt{}filename\gt{}} + Read and execute the commands contained in the file specified. -\item [@output \lt{}nom-de-fichier\gt{} w/a] - \index[general]{@output \lt{}nom-de-fichier\gt{} w/a} - Envoit l'ensemble des retours de la Console vers le fichier sp\'ecifi\'e, - avec \'ecrasement si l'option {\bf w} est sp\'ecifi\'ee, ou ajout \`a la suite si l'option - {\bf a} est sp\'ecifi\'ee. Pour rediriger la sortie vers le terminal, entrez - simplement {\bf output} sans sp\'ecifier de nom de fichier. - ATTENTION : prenez garde de ne pas \'ecraser un fichier valide. - Voici un exemple typique lors d'un test de r\'egression : +\item [@output \lt{}filename\gt{} w/a] + \index[general]{@output \lt{}filename\gt{} w/a} + Send all following output to the filename specified either overwriting the +file (w) or appending to the file (a). To redirect the output to the +terminal, simply enter {\bf @output} without a filename specification. +WARNING: be careful not to overwrite a valid file. A typical example during a +regression test might be: \footnotesize \begin{verbatim} @@ -1390,46 +1457,62 @@ tty impl\'emente ces commandes, et non la Console GNOME. En voici la liste : \end{verbatim} \normalsize -\item [@tee \lt{}nom-de-fichier\gt{} w/a] - \index[general]{@tee \lt{}nom-de-fichier\gt{} w/a} - Comme la commande pr\'ec\'edente avec envoi simultan\'e vers le terminal. Pour - sortir de ce mode, vous pouvez utiliser {\bf @tee} ou {\bf @output} sans - sp\'ecifier de nom de fichier. +\item [@tee \lt{}filename\gt{} w/a] + \index[general]{@tee \lt{}filename\gt{} w/a} + Send all subsequent output to both the specified file and the terminal. It is + turned off by specifying {\bf @tee} or {\bf @output} without a filename. \item [@sleep \lt{}seconds\gt{}] \index[general]{@sleep \lt{}seconds\gt{}} - Met en sommeil pour une dur\'ee du nombre de secondes sp\'ecifi\'e. + Sleep the specified number of seconds. \item [@time] \index[general]{@time} - Affiche la date et l'heure courantes. + Print the current time and date. \item [@version] \index[general]{@version} - Affiche la version de la Console. + Print the console's version. \item [@quit] \index[general]{@quit} - Quitte. + quit \item [@exit] \index[general]{@exit} - Quitte. + quit + +\item [@\# anything] + \index[general]{anything} + Comment + +\item [@help] + \index[general]{@help} + Get the list of every special @ commands. + +\item [@separator \lt{}char\gt{}] +\index[general]{@separator} + When using bconsole with readline, you can set the command separator to one + of those characters to write commands who require multiple input on one line, + or to put multiple commands on a single line. +\begin{verbatim} + !$%&'()*+,-/:;<>?[]^`{|}~ +\end{verbatim} + + Note, if you use a semicolon (;) as a separator character, which is + common, you will not be able to use the {\bf sql} command, which + requires each command to be terminated by a semicolon. -\item [@\# n-importe-quoi] - \index[general]{n-importe-quoi} - Commentaire. \end{description} \label{scripting} +\section{Running the Console from a Shell Script} +\index[general]{Script!Running the Console Program from a Shell} +\index[general]{Running the Console Program from a Shell Script} -\section{Ex\'ecuter la Console depuis un script shell} -\index[general]{Script!Ex\'ecuter la Console depuis un script shell} -\index[general]{Ex\'ecuter la Console depuis un script shell} -\addcontentsline{toc}{section}{Ex\'ecuter la Console depuis un script shell} -Vous pouvez automatiser de nombreuses t\^aches effectu\'ees \`a la Console, en les -ex\'ecutant dans un script shell. Par exemple, si vous avez cr\'e\'e un fichier -contenant ceci : +You can automate many Console tasks by running the console program from a +shell script. For example, if you have created a file containing the following +commands: \footnotesize \begin{verbatim} @@ -1440,12 +1523,12 @@ contenant ceci : \end{verbatim} \normalsize -A l'ex\'ecution de ce fichier, le p\'eriph\'erique DDS-4 est d\'emont\'e. -Vous pouvez, si vous le souhaitez, ex\'ecuter cette t\^ache lors d'un job avec -les directives {\bf RunBeforeJob} ou {\bf RunAfterJob}. +when that file is executed, it will unmount the current DDS-4 storage device. +You might want to run this command during a Job by using the {\bf +RunBeforeJob} or {\bf RunAfterJob} records. -Il est aussi possible d'ex\'ecuter la Console \`a partir de l'entr\'ee d'un -fichier contenant les commandes comme suit : +It is also possible to run the Console program from file input where the file +contains the commands as follows: \footnotesize \begin{verbatim} @@ -1453,12 +1536,11 @@ fichier contenant les commandes comme suit : \end{verbatim} \normalsize -o\`u le fichier nomm\'e {\bf filename} contient un ensemble quelconque de -commandes de la Console. +where the file named {\bf filename} contains any set of console commands. -Voici un exemple r\'eel, issu des tests de r\'egression de Bacula. Il -\'etiquette un volume (sur disque) ex\'ecute une sauvegarde puis une -restauration des fichiers sauvegard\'es. +As a real example, the following script is part of the Bacula regression +tests. It labels a volume (a disk volume), runs a backup, then does a restore +of the files saved. \footnotesize \begin{verbatim} @@ -1484,10 +1566,9 @@ END_OF_DATA \end{verbatim} \normalsize -Les donn\'ees issues de la sauvegarde sont envoy\'ees vers /tmp/log1.out et -celles de la restaurations vers /tmp/log2.out. Pour v\'erifier que les -op\'erations se sont d\'eroul\'ees correctement, les fichiers de sorties -sont contr\^ol\'es avec : +The output from the backup is directed to /tmp/log1.out and the output from +the restore is directed to /tmp/log2.out. To ensure that the backup and +restore ran correctly, the output files are checked with: \footnotesize \begin{verbatim} @@ -1498,32 +1579,29 @@ restorestat=$? \end{verbatim} \normalsize -\section{Ajouter des volumes \`a un pool} -\index[general]{Ajouter des volumes \`a un pool} -\index[general]{Pool!Ajouter des volumes \`a un} -\addcontentsline{toc}{section}{Ajouter des volumes \`a un pool} +\section{Adding Volumes to a Pool} +\index[general]{Adding Volumes to a Pool} +\index[general]{Pool!Adding Volumes to a} -Si vous avez utilis\'e la commande {\bf label} pour \'etiqueter un volume, alors -celui-ci est automatiquement ajout\'e au pool, et vous n'avez pas besoin de le faire -manuellement. +If you have used the {\bf label} command to label a Volume, it will be +automatically added to the Pool, and you will not need to add any media to the +pool. -Une alternative consiste \`a ajouter plusieurs volumes \`a un pool sans les -\'etiqueter pr\'ealablement. Vous devrez alors les \'etiqueter plus tard, lorsque Bacula -en aura besoin. +Alternatively, you may choose to add a number of Volumes to the pool without +labeling them. At a later time when the Volume is requested by {\bf Bacula} +you will need to label it. -Avant d'ajouter un volume \`a un pool, vous devez conna\^itre les informations -suivantes : +Before adding a volume, you must know the following information: \begin{enumerate} -\item Le nom du pool (normalement, "Default") ; -\item Le type de media tel qu'il est sp\'ecifi\'e dans la ressource Storage -du fichier de configuration du Director (par exemple, "DLT8000") ; -\item Le nombre de volumes que vous voulez cr\'eer, et leurs noms. -The number and names of the Volumes you wish to create. +\item The name of the Pool (normally "Default") +\item The Media Type as specified in the Storage Resource in the Director's + configuration file (e.g. "DLT8000") +\item The number and names of the Volumes you wish to create. \end{enumerate} -Par exemple, pour ajouter un media \`a un pool, vous utiliseriez les commandes -suivantes dans la Console : +For example, to add media to a Pool, you would issue the following commands to +the console program: \footnotesize \begin{verbatim} @@ -1538,7 +1616,7 @@ Enter the starting number: 1 \end{verbatim} \normalsize -Pour voir ce que vous avez ajout\'e, tapez : +To see what you have added, enter: \footnotesize \begin{verbatim} @@ -1561,8 +1639,8 @@ Pour voir ce que vous avez ajout\'e, tapez : \end{verbatim} \normalsize -Notez que la Console a automatiquement ajout\'e un num\'ero au nom de volume de -base que vous avez sp\'ecifi\'e ("Save" dans ce cas). Si vous ne souhaitez pas -ce comportement, r\'epondez simplement 0 (z\'ero) \`a la queston "Enter number -of Media volumes to create . Max=1000:" et un seul volume sera cr\'e\'e avec -le nom exact que vous avez sp\'ecifi\'e. +Notice that the console program automatically appended a number to the base +Volume name that you specify (Save in this case). If you don't want it to +append a number, you can simply answer 0 (zero) to the question "Enter number +of Media volumes to create. Max=1000:", and in this case, it will create a +single Volume with the exact name you specify. diff --git a/docs/manuals/fr/console/console.kilepr b/docs/manuals/fr/console/console.kilepr new file mode 100644 index 00000000..37505b3b --- /dev/null +++ b/docs/manuals/fr/console/console.kilepr @@ -0,0 +1,70 @@ +[General] +img_extIsRegExp=false +img_extensions=.eps .jpg .jpeg .png .pdf .ps .fig .gif +kileprversion=2 +kileversion=2.0 +lastDocument=bconsole.tex +masterDocument= +name=Console +pkg_extIsRegExp=false +pkg_extensions=.cls .sty +src_extIsRegExp=false +src_extensions=.tex .ltx .latex .dtx .ins + +[Tools] +MakeIndex= +QuickBuild= + +[item:bconsole.tex] +archive=true +column=56 +encoding=UTF-8 +highlight=LaTeX +line=1495 +open=true +order=1 + +[item:console.kilepr] +archive=true +column=0 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:console.tex] +archive=true +column=0 +encoding=UTF-8 +highlight=LaTeX +line=9 +open=true +order=0 + +[item:fdl.tex] +archive=true +column=143392992 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:gui.tex] +archive=true +column=0 +encoding= +highlight= +line=0 +open=false +order=-1 + +[item:version.tex] +archive=true +column=0 +encoding= +highlight= +line=0 +open=false +order=-1 diff --git a/docs/manuals/fr/console/console.tex b/docs/manuals/fr/console/console.tex index 69ce36a3..28850d69 100644 --- a/docs/manuals/fr/console/console.tex +++ b/docs/manuals/fr/console/console.tex @@ -6,7 +6,14 @@ %% # $ % & ~ _ ^ \ { } %% -\documentclass[11pt,a4paper]{book} +\documentclass[10pt,a4paper]{book} + +\topmargin -0.5in +\oddsidemargin 0.0in +\evensidemargin 0.0in +\textheight 10in +\textwidth 6.5in + \usepackage{html} \usepackage{float} \usepackage{graphicx} @@ -31,7 +38,7 @@ \parskip 10pt \parindent 0pt -\title{\includegraphics{./bacula-logo.eps} \\ \bigskip +\title{\includegraphics{\idir bacula-logo.eps} \\ \bigskip \Huge{Bacula Console and Operators Guide} \begin{center} \large{It comes in the night and sucks @@ -44,7 +51,7 @@ \date{\vspace{1.0in}\today \\ This manual documents Bacula version \input{version} \\ \vspace{0.2in} - Copyright \copyright 1999-2007, Free Software Foundation Europe + Copyright \copyright 1999-2009, Free Software Foundation Europe e.V. \\ \vspace{0.2in} Permission is granted to copy, distribute and/or modify this document under the terms of the @@ -58,10 +65,6 @@ \clearpage \tableofcontents \clearpage -\listoffigures -\clearpage -\listoftables -\clearpage \include{bconsole} \include{gui} diff --git a/docs/manuals/fr/developers/Makefile.in b/docs/manuals/fr/developers/Makefile.in index 0960d6f4..947656bc 100644 --- a/docs/manuals/fr/developers/Makefile.in +++ b/docs/manuals/fr/developers/Makefile.in @@ -19,7 +19,7 @@ DOC=developers first_rule: all -all: tex web dvipdf mini-clean +all: tex web pdf mini-clean .SUFFIXES: .tex .html .PHONY: @@ -54,25 +54,31 @@ html: fi) latex2html -white -no_subdir -split 0 -toc_stars -white -notransparent \ ${DOC} >tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}.html + @(if [ -f imagename_translations ] ; then \ + ./translate_images.pl --from_meaningful_names ${DOC}.html; \ + fi) + (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} . 2>/dev/null; done) @rm -f *.eps *.gif *.jpg *.old web: @echo "Making ${DOC} web" + @rm -rf ${DOC} @mkdir -p ${DOC} @rm -f ${DOC}/* @cp -fp ${IMAGES}/*.eps . @rm -f next.eps next.png prev.eps prev.png up.eps up.png - @cp -fp ${IMAGES}/*.eps ${IMAGES}/*.png ${DOC}/ - @rm -f ${DOC}/next.eps ${DOC}/next.png ${DOC}/prev.eps ${DOC}/prev.png ${DOC}/up.eps ${DOC}/up.png @(if [ -f ${DOC}/imagename_translations ] ; then \ ./translate_images.pl --to_meaningful_names ${DOC}/Developer*Guide.html; \ fi) @rm -rf ${DOC}/*.html latex2html -split 4 -local_icons -t "Developer's Guide" -long_titles 4 \ - -contents_in_nav -toc_stars -white -notransparent ${DOC} >tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}/Developer*Guide.html - @cp -f ${DOC}/Developers_Guide.html ${DOC}/index.html + -toc_stars -contents_in_nav -init_file latex2html-init.pl \ + -no_antialias -no_antialias_text \ + -white -notransparent ${DOC} >tex.out 2>&1 + @(if [ -f imagename_translations ] ; then \ + ./translate_images.pl --from_meaningful_names ${DOC}.html; \ + fi) + @cp -f ${DOC}/Bacula_Developer_Notes.html ${DOC}/index.html @rm -f *.eps *.gif *.jpg ${DOC}/*.eps *.old @rm -f ${DOC}/idle.png @rm -f ${DOC}/win32-*.png ${DOC}/wx-console*.png ${DOC}/xp-*.png diff --git a/docs/manuals/fr/developers/catalog.tex b/docs/manuals/fr/developers/catalog.tex index f67866b5..4994d378 100644 --- a/docs/manuals/fr/developers/catalog.tex +++ b/docs/manuals/fr/developers/catalog.tex @@ -256,7 +256,7 @@ creates a 7.35 MB database. \hline {LStat } & {tinyblob } & {File attributes in base64 encoding } \\ \hline -{MD5 } & {tinyblob } & {MD5 signature in base64 encoding } +{MD5 } & {tinyblob } & {MD5/SHA1 signature in base64 encoding } \\ \hline \end{longtable} @@ -310,6 +310,8 @@ command in the Console program. \hline {EndTime } & {datetime } & {Time/date when Job ended } \\ \hline +{RealEndTime } & {datetime } & {Time/date when original Job ended } \\ + \hline {JobTDate } & {bigint } & {Start day in Unix format but 64 bits; used for Retention period. } \\ \hline @@ -330,6 +332,8 @@ Retention period. } \\ \hline {FileSetId } & {integer } & {Link to FileSet Record } \\ \hline +{PrioJobId } & {integer } & {Link to prior Job Record when migrated } \\ + \hline {PurgedFiles } & {tiny integer } & {Set when all File records purged } \\ \hline {HasBase } & {tiny integer } & {Set when Base Job run } @@ -368,18 +372,28 @@ The Job Type (or simply Type) can have one of the following values: \hline {B } & {Backup Job } \\ \hline +{M } & {Migrated Job } \\ + \hline {V } & {Verify Job } \\ \hline {R } & {Restore Job } \\ \hline {C } & {Console program (not in database) } \\ \hline +{I } & {Internal or system Job } \\ + \hline {D } & {Admin Job } \\ \hline {A } & {Archive Job (not implemented) } \\ \hline +{C } & {Copy Job } \\ + \hline +{M } & {Migration Job } \\ + \hline \end{longtable} +Note, the Job Type values noted above are not kept in an SQL table. + The JobStatus field specifies how the job terminated, and can be one of the following: @@ -397,6 +411,8 @@ following: \hline {T } & {Terminated normally } \\ \hline +{W } & {Terminated normally with warnings } +\\ \hline {E } & {Terminated in Error } \\ \hline {e } & {Non-fatal error } \\ @@ -407,6 +423,8 @@ following: \hline {A } & {Canceled by the user } \\ \hline +{I } & {Incomplete Job } +\\ \hline {F } & {Waiting on the File daemon } \\ \hline {S } & {Waiting on the Storage daemon } \\ @@ -427,10 +445,18 @@ following: \hline {p } & {Waiting for higher priority job to finish } \\ \hline +{i } & {Doing batch insert file records } +\\ \hline +{a } & {SD despooling attributes } +\\ \hline +{l } & {Doing data despooling } +\\ \hline +{L } & {Committing data (last despool) } +\\ \hline -\end{longtable} -\ + +\end{longtable} \addcontentsline{lot}{table}{File Sets Table Layout} \begin{longtable}{|l|l|l|} @@ -458,7 +484,6 @@ particularly important when doing an incremental update. If the user deletes a file or adds a file, we need to ensure that a Full backup is done prior to the next incremental. -\ \addcontentsline{lot}{table}{JobMedia Table Layout} \begin{longtable}{|l|l|p{2.5in}|} @@ -512,7 +537,6 @@ backup. -\ \addcontentsline{lot}{table}{Media Table Layout} \begin{longtable}{|l|l|p{2.4in}|} @@ -532,6 +556,10 @@ backup. \hline {MediaType } & {tinyblob } & {The MediaType supplied by the user } \\ \hline +{MediaTypeId } & {integer } & {The MediaTypeId } \\ + \hline +{LabelType } & {tinyint } & {The type of label on the Volume } \\ + \hline {FirstWritten } & {datetime } & {Time/date when first written } \\ \hline {LastWritten } & {datetime } & {Time/date when last written } \\ @@ -548,6 +576,8 @@ backup. \hline {VolBytes } & {bigint } & {Number of bytes saved in Job } \\ \hline +{VolParts } & {integer } & {The number of parts for a Volume (DVD) } \\ + \hline {VolErrors } & {integer } & {Number of errors during Job } \\ \hline {VolWrites } & {integer } & {Number of writes to media } \\ @@ -559,9 +589,13 @@ backup. {VolStatus } & {enum } & {Status of media: Full, Archive, Append, Recycle, Read-Only, Disabled, Error, Busy } \\ \hline +{Enabled } {tinyint } & {Whether or not Volume can be written } \\ + \hline {Recycle } & {tinyint } & {Whether or not Bacula can recycle the Volumes: Yes, No } \\ \hline +{ActionOnPurge } & {tinyint } & {What happens to a Volume after purging } \\ + \hline {VolRetention } & {bigint } & {64 bit seconds until expiration } \\ \hline {VolUseDuration } & {bigint } & {64 bit seconds volume can be used } \\ @@ -570,6 +604,35 @@ Yes, No } \\ \hline {MaxVolFiles } & {integer } & {maximume EOF marks to put on Volume } \\ \hline +{InChanger } & {tinyint } & {Whether or not Volume in autochanger } \\ + \hline +{StorageId } & {integer } & {Storage record ID } \\ + \hline +{DeviceId } & {integer } & {Device record ID } \\ + \hline +{MediaAddressing } & {integer } & {Method of addressing media } \\ + \hline +{VolReadTime } & {bigint } & {Time Reading Volume } \\ + \hline +{VolWriteTime } & {bigint } & {Time Writing Volume } \\ + \hline +{EndFile } & {integer } & {End File number of Volume } \\ + \hline +{EndBlock } & {integer } & {End block number of Volume } \\ + \hline +{LocationId } & {integer } & {Location record ID } \\ + \hline +{RecycleCount } & {integer } & {Number of times recycled } \\ + \hline +{InitialWrite } & {datetime } & {When Volume first written } \\ + \hline +{ScratchPoolId } & {integer } & {Id of Scratch Pool } \\ + \hline +{RecyclePoolId } & {integer } & {Pool ID where to recycle Volume } \\ + \hline +{Comment } & {blob } & {User text field } \\ + \hline + \end{longtable} @@ -614,13 +677,32 @@ created for each of the NumVols specified in the Pool resource record. \hline {AutoPrune } & {tinyint } & {yes|no for autopruning } \\ \hline -{Recycle } & {tinyint } & {yes|no for allowing auto recycling of Volume } -\\ +{Recycle } & {tinyint } & {yes|no for allowing auto recycling of Volume } \\ + \hline +{ActionOnPurge } & {tinyint } & {Default Volume ActionOnPurge } \\ \hline {PoolType } & {enum } & {Backup, Copy, Cloned, Archive, Migration } \\ \hline +{LabelType } & {tinyint } & {Type of label ANSI/Bacula } \\ + \hline {LabelFormat } & {Tinyblob } & {Label format } \\ \hline +{Enabled } {tinyint } & {Whether or not Volume can be written } \\ + \hline +{ScratchPoolId } & {integer } & {Id of Scratch Pool } \\ + \hline +{RecyclePoolId } & {integer } & {Pool ID where to recycle Volume } \\ + \hline +{NextPoolId } & {integer } & {Pool ID of next Pool } \\ + \hline +{MigrationHighBytes } & {bigint } & {High water mark for migration } \\ + \hline +{MigrationLowBytes } & {bigint } & {Low water mark for migration } \\ + \hline +{MigrationTime } & {bigint } & {Time before migration } \\ + \hline + + \end{longtable} @@ -659,31 +741,26 @@ number of the Media record for the current volume. The {\bf Client} table contains one entry for each machine backed up by Bacula in this database. Normally the Name is a fully qualified domain name. -\ -\addcontentsline{lot}{table}{Unsaved Files Table Layout} +\addcontentsline{lot}{table}{Storage Table Layout} \begin{longtable}{|l|l|l|} \hline -\multicolumn{3}{|l| }{\bf UnsavedFiles } \\ +\multicolumn{3}{|l| }{\bf Storage } \\ \hline \multicolumn{1}{|c| }{\bf Column Name } & \multicolumn{1}{c| }{\bf Data Type } & \multicolumn{1}{c| }{\bf Remark } \\ \hline -{UnsavedId } & {integer } & {Primary Key } \\ +{StorageId } & {integer } & {Unique Id } \\ \hline -{JobId } & {integer } & {JobId corresponding to this record } \\ +{Name } & {tinyblob } & {Resource name of Storage device } \\ \hline -{PathId } & {integer } & {Id of path } \\ +{AutoChanger } & {tinyint } & {Set if it is an autochanger } \\ \hline -{FilenameId } & {integer } & {Id of filename } -\\ \hline \end{longtable} -The {\bf UnsavedFiles} table contains one entry for each file that was not -saved. Note! This record is not yet implemented. +The {\bf Storage} table contains one entry for each Storage used. -\ \addcontentsline{lot}{table}{Counter Table Layout} \begin{longtable}{|l|l|l|} @@ -709,7 +786,140 @@ saved. Note! This record is not yet implemented. The {\bf Counter} table contains one entry for each permanent counter defined by the user. -\ +\addcontentsline{lot}{table}{Job History Table Layout} +\begin{longtable}{|l|l|p{2.5in}|} + \hline +\multicolumn{3}{|l| }{\bf JobHisto } \\ + \hline +\multicolumn{1}{|c| }{\bf Column Name } & \multicolumn{1}{c| }{\bf Data Type +} & \multicolumn{1}{c| }{\bf Remark } \\ + \hline +{JobId } & {integer } & {Primary Key } \\ + \hline +{Job } & {tinyblob } & {Unique Job Name } \\ + \hline +{Name } & {tinyblob } & {Job Name } \\ + \hline +{Type } & {binary(1) } & {Job Type: Backup, Copy, Clone, Archive, Migration +} \\ + \hline +{Level } & {binary(1) } & {Job Level } \\ + \hline +{ClientId } & {integer } & {Client index } \\ + \hline +{JobStatus } & {binary(1) } & {Job Termination Status } \\ + \hline +{SchedTime } & {datetime } & {Time/date when Job scheduled } \\ + \hline +{StartTime } & {datetime } & {Time/date when Job started } \\ + \hline +{EndTime } & {datetime } & {Time/date when Job ended } \\ + \hline +{RealEndTime } & {datetime } & {Time/date when original Job ended } \\ + \hline +{JobTDate } & {bigint } & {Start day in Unix format but 64 bits; used for +Retention period. } \\ + \hline +{VolSessionId } & {integer } & {Unique Volume Session ID } \\ + \hline +{VolSessionTime } & {integer } & {Unique Volume Session Time } \\ + \hline +{JobFiles } & {integer } & {Number of files saved in Job } \\ + \hline +{JobBytes } & {bigint } & {Number of bytes saved in Job } \\ + \hline +{JobErrors } & {integer } & {Number of errors during Job } \\ + \hline +{JobMissingFiles } & {integer } & {Number of files not saved (not yet used) } +\\ + \hline +{PoolId } & {integer } & {Link to Pool Record } \\ + \hline +{FileSetId } & {integer } & {Link to FileSet Record } \\ + \hline +{PrioJobId } & {integer } & {Link to prior Job Record when migrated } \\ + \hline +{PurgedFiles } & {tiny integer } & {Set when all File records purged } \\ + \hline +{HasBase } & {tiny integer } & {Set when Base Job run } +\\ \hline + +\end{longtable} + +The {bf JobHisto} table is the same as the Job table, but it keeps +long term statistics (i.e. it is not pruned with the Job). + + +\addcontentsline{lot}{table}{Log Table Layout} +\begin{longtable}{|l|l|l|} + \hline +\multicolumn{3}{|l| }{\bf Version } \\ + \hline +\multicolumn{1}{|c| }{\bf Column Name } & \multicolumn{1}{c| }{\bf Data Type +} & \multicolumn{1}{c| }{\bf Remark } \\ + \hline +{LogIdId } & {integer } & {Primary Key } +\\ \hline +{JobId } & {integer } & {Points to Job record } +\\ \hline +{Time } & {datetime } & {Time/date log record created } +\\ \hline +{LogText } & {blob } & {Log text } +\\ \hline + +\end{longtable} + +The {\bf Log} table contains a log of all Job output. + +\addcontentsline{lot}{table}{Location Table Layout} +\begin{longtable}{|l|l|l|} + \hline +\multicolumn{3}{|l| }{\bf Location } \\ + \hline +\multicolumn{1}{|c| }{\bf Column Name } & \multicolumn{1}{c| }{\bf Data Type +} & \multicolumn{1}{c| }{\bf Remark } \\ + \hline +{LocationId } & {integer } & {Primary Key } +\\ \hline +{Location } & {tinyblob } & {Text defining location } +\\ \hline +{Cost } & {integer } & {Relative cost of obtaining Volume } +\\ \hline +{Enabled } & {tinyint } & {Whether or not Volume is enabled } +\\ \hline + +\end{longtable} + +The {\bf Location} table defines where a Volume is physically. + + +\addcontentsline{lot}{table}{Location Log Table Layout} +\begin{longtable}{|l|l|l|} + \hline +\multicolumn{3}{|l| }{\bf LocationLog } \\ + \hline +\multicolumn{1}{|c| }{\bf Column Name } & \multicolumn{1}{c| }{\bf Data Type +} & \multicolumn{1}{c| }{\bf Remark } \\ + \hline +{locLogIdId } & {integer } & {Primary Key } +\\ \hline +{Date } & {datetime } & {Time/date log record created } +\\ \hline +{MediaId } & {integer } & {Points to Media record } +\\ \hline +{LocationId } & {integer } & {Points to Location record } +\\ \hline +{NewVolStatus } & {integer } & {enum: Full, Archive, Append, Recycle, Purged + Read-only, Disabled, Error, Busy, Used, Cleaning } +\\ \hline +{Enabled } & {tinyint } & {Whether or not Volume is enabled } +\\ \hline + + +\end{longtable} + +The {\bf Log} table contains a log of all Job output. + \addcontentsline{lot}{table}{Version Table Layout} \begin{longtable}{|l|l|l|} @@ -728,7 +938,6 @@ The {\bf Version} table defines the Bacula database version number. Bacula checks this number before reading the database to ensure that it is compatible with the Bacula binary file. -\ \addcontentsline{lot}{table}{Base Files Table Layout} \begin{longtable}{|l|l|l|} diff --git a/docs/manuals/fr/developers/coverpage.tex b/docs/manuals/fr/developers/coverpage.tex new file mode 100644 index 00000000..c1aaca82 --- /dev/null +++ b/docs/manuals/fr/developers/coverpage.tex @@ -0,0 +1,28 @@ +\newfont{\bighead}{cmr17 at 36pt} +\parskip 10pt +\parindent 0pt + +\title{\includegraphics{\idir bacula-logo.eps} \\ \bigskip + \Huge{Bacula}$^{\normalsize \textregistered}$ \Huge{Developer's Guide} + \begin{center} + \large{It comes in the night and sucks + the essence from your computers. } + \end{center} +} + + +\author{Kern Sibbald} +\date{\vspace{1.0in}\today \\ + This manual documents Bacula version \fullversion \\ + \vspace{0.2in} + Copyright {\copyright} 1999-2009, Free Software Foundation Europe + e.V. \\ + Bacula {\textregistered} is a registered trademark of Kern Sibbald.\\ + \vspace{0.2in} + Permission is granted to copy, distribute and/or modify this document under the terms of the + GNU Free Documentation License, Version 1.2 published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. + A copy of the license is included in the section entitled "GNU Free Documentation License". +} + +\maketitle diff --git a/docs/manuals/es/developers.kilepr b/docs/manuals/fr/developers/developers.kilepr similarity index 64% rename from docs/manuals/es/developers.kilepr rename to docs/manuals/fr/developers/developers.kilepr index 15883a74..04d798b1 100644 --- a/docs/manuals/es/developers.kilepr +++ b/docs/manuals/fr/developers/developers.kilepr @@ -3,7 +3,7 @@ img_extIsRegExp=false img_extensions=.eps .jpg .jpeg .png .pdf .ps .fig .gif kileprversion=2 kileversion=2.0 -lastDocument= +lastDocument=developers.tex masterDocument= name=Developers pkg_extIsRegExp=false @@ -15,61 +15,61 @@ src_extensions=.tex .ltx .latex .dtx .ins MakeIndex= QuickBuild= -[item:developers.kilepr] +[item:catalog.tex] archive=true -column=64767 +column=120 encoding= highlight= line=0 open=false order=-1 -[item:developers/catalog.tex] +[item:daemonprotocol.tex] archive=true -column=7864440 +column=0 encoding= highlight= line=0 open=false order=-1 -[item:developers/daemonprotocol.tex] +[item:developers.kilepr] archive=true -column=2 -encoding=UTF-8 -highlight=LaTeX +column=114 +encoding= +highlight= line=0 open=false order=-1 -[item:developers/developers.tex] +[item:developers.tex] archive=true -column=30 -encoding=UTF-8 +column=0 +encoding= highlight=LaTeX -line=28 -open=false -order=-1 +line=73 +open=true +order=0 -[item:developers/director.tex] +[item:director.tex] archive=true -column=143924344 +column=0 encoding= highlight= line=0 open=false order=-1 -[item:developers/fdl.tex] +[item:fdl.tex] archive=true -column=147948000 +column=7864421 encoding= highlight= line=0 open=false order=-1 -[item:developers/file.tex] +[item:file.tex] archive=true column=0 encoding= @@ -78,25 +78,43 @@ line=0 open=false order=-1 -[item:developers/generaldevel.tex] +[item:generaldevel.tex] archive=true -column=145894392 +column=62 +encoding= +highlight=LaTeX +line=553 +open=false +order=2 + +[item:git.tex] +archive=true +column=13 +encoding=UTF-8 +highlight=LaTeX +line=339 +open=false +order=-1 + +[item:gui-interface.tex] +archive=true +column=7864421 encoding= highlight= line=0 open=false order=-1 -[item:developers/gui-interface.tex] +[item:md5.tex] archive=true -column=137461472 +column=147078704 encoding= highlight= line=0 open=false order=-1 -[item:developers/md5.tex] +[item:mediaformat.tex] archive=true column=0 encoding= @@ -105,43 +123,43 @@ line=0 open=false order=-1 -[item:developers/mediaformat.tex] +[item:mempool.tex] archive=true -column=18 +column=0 encoding= highlight= line=0 open=false order=-1 -[item:developers/mempool.tex] +[item:netprotocol.tex] archive=true -column=361 +column=0 encoding= highlight= line=0 open=false order=-1 -[item:developers/netprotocol.tex] +[item:platformsupport.tex] archive=true -column=32 +column=7864421 encoding= highlight= line=0 open=false order=-1 -[item:developers/platformsupport.tex] +[item:pluginAPI.tex] archive=true -column=0 +column=32565 encoding= highlight= line=0 open=false order=-1 -[item:developers/porting.tex] +[item:porting.tex] archive=true column=0 encoding= @@ -150,43 +168,43 @@ line=0 open=false order=-1 -[item:developers/regression.tex] +[item:regression.tex] archive=true column=0 encoding= -highlight= +highlight=LaTeX line=0 open=false -order=-1 +order=0 -[item:developers/smartall.tex] +[item:smartall.tex] archive=true -column=19 -encoding=UTF-8 -highlight=LaTeX -line=5 +column=146049728 +encoding= +highlight= +line=0 open=false order=-1 -[item:developers/storage.tex] +[item:storage.tex] archive=true -column=3056701840 +column=0 encoding= highlight= line=0 open=false order=-1 -[item:developers/tls-techdoc.tex] +[item:tls-techdoc.tex] archive=true -column=3056701840 +column=0 encoding= highlight= line=0 open=false order=-1 -[item:developers/version.tex] +[item:version.tex] archive=true column=0 encoding= diff --git a/docs/manuals/fr/developers/developers.tex b/docs/manuals/fr/developers/developers.tex index 840b1a0a..902fa8c8 100644 --- a/docs/manuals/fr/developers/developers.tex +++ b/docs/manuals/fr/developers/developers.tex @@ -1,7 +1,20 @@ %% %% +%% The following characters must be preceded by a backslash +%% to be entered as printable characters: +%% +%% # $ % & ~ _ ^ \ { } +%% + +\documentclass[10pt,a4paper]{book} + +\topmargin -0.5in +\oddsidemargin 0.0in +\evensidemargin 0.0in +\textheight 10in +\textwidth 6.5in + -\documentclass[11pt,a4paper]{report} \usepackage{html} \usepackage{float} \usepackage{graphicx} @@ -11,10 +24,14 @@ \usepackage{index} \usepackage{setspace} \usepackage{hyperref} +% \usepackage[linkcolor=black,colorlinks=true]{hyperref} \usepackage{url} - \makeindex +\newindex{dir}{ddx}{dnd}{Director Index} +\newindex{fd}{fdx}{fnd}{File Daemon Index} +\newindex{sd}{sdx}{snd}{Storage Daemon Index} +\newindex{console}{cdx}{cnd}{Console Index} \newindex{general}{idx}{ind}{General Index} \sloppy @@ -22,44 +39,19 @@ \begin{document} \sloppy -\newfont{\bighead}{cmr17 at 36pt} -\parskip 10pt -\parindent 0pt - -\title{\includegraphics{./bacula-logo.eps} \\ \bigskip - \Huge{Developers' Guide} - \begin{center} - \large{It comes in the night and sucks - the essence from your computers. } - \end{center} -} - - -\author{Kern Sibbald} -\date{\vspace{1.0in}\today \\ - This manual documents Bacula version \input{version} \\ - \vspace{0.2in} - Copyright \copyright 1999-2007, Free Software Foundation Europe - e.V. \\ - \vspace{0.2in} - Permission is granted to copy, distribute and/or modify this document under the terms of the - GNU Free Documentation License, Version 1.2 published by the Free Software Foundation; - with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. - A copy of the license is included in the section entitled "GNU Free Documentation License". -} - - -\maketitle +\include{coverpage} \clearpage +\pagenumbering{roman} \tableofcontents \clearpage -\listoffigures -\clearpage -\listoftables -\clearpage +\pagestyle{myheadings} +\markboth{Bacula Version \version}{Bacula Version \version} +\pagenumbering{arabic} \include{generaldevel} +\include{git} +\include{pluginAPI} \include{platformsupport} \include{daemonprotocol} \include{director} diff --git a/docs/manuals/fr/developers/do_echo b/docs/manuals/fr/developers/do_echo new file mode 100644 index 00000000..04b9f79a --- /dev/null +++ b/docs/manuals/fr/developers/do_echo @@ -0,0 +1,6 @@ +# +# Avoid that @VERSION@ and @DATE@ are changed by configure +# This file is sourced by update_version +# +echo "s%@VERSION@%${VERSION}%g" >${out} +echo "s%@DATE@%${DATE}%g" >>${out} diff --git a/docs/manuals/fr/developers/generaldevel.tex b/docs/manuals/fr/developers/generaldevel.tex index 74a8a2a4..33312af4 100644 --- a/docs/manuals/fr/developers/generaldevel.tex +++ b/docs/manuals/fr/developers/generaldevel.tex @@ -39,28 +39,23 @@ The following text describes some of the requirements for such code. \addcontentsline{toc}{subsubsection}{Patches} Subject to the copyright assignment described below, your patches should be -sent in {\bf diff -u} format relative to the current contents of the Source -Forge GIT repository or SVN repository. The diff -u format is the easiest -for us to understand and integrate. Please be sure to use the Bacula +sent in {\bf git format-patch} format relative to the current contents of the +master branch of the Source Forge Git repository. Please attach the +output file or files generated by the {\bf git format-patch} to the email +rather than include them directory to avoid wrapping of the lines +in the patch. Please be sure to use the Bacula indenting standard (see below) for source code. If you have checked out -the source with GIT or SVN, you can get a diff using. +the source with Git, you can get a diff using. -For the bacula, gui, and regress directories: \begin{verbatim} git pull -git diff >change.patch +git format-patch -M \end{verbatim} -For the docs or rescue directories: -\begin{verbatim} -svn update -svn diff > change.patch -\end{verbatim} - If you plan on doing significant development work over a period of time, after having your first patch reviewed and approved, you will be eligible -for having developer GIT or SVN write access so that you can commit your changes -directly to the GIT or SVN repository. To do so, you will need a userid on Source +for having developer Git write access so that you can commit your changes +directly to the Git repository. To do so, you will need a userid on Source Forge. \subsection{Copyrights} @@ -164,7 +159,7 @@ to confirm reception of the signed FLA. \index{Cycle!Developement} \addcontentsline{toc}{subsubsection}{Development Cycle} -As I noted in previous emails the number of contributions are +As discussed on the email lists, the number of contributions are increasing significantly. We expect this positive trend will continue. As a consequence, we have modified how we do development, and instead of making a list of all the features that we will @@ -302,7 +297,7 @@ Getting code implemented in Bacula works roughly as follows: \item Kern is the project manager, but prefers not to be a "gate keeper". This means that the developers are expected to be self-motivated, - and once they have experience submit directly to the GIT or SVN + and once they have experience submit directly to the Git repositories. However, it is a good idea to have your patches reviewed prior to submitting, and it is a bad idea to submit monster patches because no one will @@ -344,7 +339,7 @@ If you fix a bug in a released version, you should, unless it is an absolutely trivial bug, create and release a patch file for the bug. The procedure is as follows: -Fix the bug in the branch and in the trunk. +Fix the bug in the released branch and in the develpment master branch. Make a patch file for the branch and add the branch patch to the patches directory in both the branch and the trunk. @@ -359,7 +354,8 @@ follows: (input description) (end edit) - git diff >>2.2.4-restore.patch + git format-patch -M + mv 0001-xxx 2.2.4-restore.patch \end{verbatim} check to make sure no extra junk got put into the patch file (i.e. @@ -384,606 +380,6 @@ So, end the end, the patch file is: \end{itemize} -\section{Bacula GIT and SVN repositories} -\index{GIT and SVN} -\addcontentsline{toc}{subsection}{GIT and SVN repositories} -As of August 2009, the Bacula source code has been split into -two repositories. One is a GIT repository that holds the -main Bacula source code with directories {\bf bacula}, {\bf gui}, -and {\bf regress}. The second repository (SVN) contains -the directories {\bf rescue} and {\bf docs}. Both repositories are -hosted on Source Forge. - -Previously everything was in a single SVN repository. -We have split the SVN repository into two because GIT -offers significant advantages for ease of managing and integrating -developer's changes. However, one of the disadvantages of GIT is that you -must work with the full repository, while SVN allows you to checkout -individual directories. If we put everything into a single GIT -repository it would be far bigger than most developers would want -to checkout, so we have left the docs and rescue in the old SVN -repository, and moved only the parts that are most actively -worked on by the developers (bacula, gui, and regress) to a GIT -repository. - -Unfortunately, Bacula developers must now have a certain knowledege -of both GIT and SVN, and if you are a core Bacula developer knowledge of -GIT is particularly important. - -\section{GIT Usage} -\index{GIT Usage} -\addcontentsline{toc}{subsection}{GIT Usage} - -Please note that if you are familiar with SVN, GIT is similar, -(and better), but there can be a few surprising differences that -can lead to damaging the history of the repository (repo) if -you attempt to force pushing data into the GIT repo. - -The GIT repo contains the subdirectories {\bf bacula}, {\bf gui}, -and {\bf regress}. With GIT it is not possible to pull only a -single directory, because of the hash code nature of git, you -must take all or nothing. - -For developers, the most important thing to remember about GIT and -the Source Forge repository is not to "force" a {\bf push} to the -repository, and not to use the {\bf rebase} command on the {\bf -master} branch of the repository. Doing so, will possibly rewrite -the GIT repository history and cause a lot of problems for the -project. - -You may and should use {\bf rebase} on your own branches that you -want to synchronize with the {\bf master} branch, but please -do not use {\bf rebase} on the {\bf master} branch. The proper -way of merging changes will be discussed below. - -You can get a full copy of the Source Forge Bacula GIT repository with the -following command: - -\begin{verbatim} -git clone git://bacula.git.sourceforge.net/gitroot/bacula/bacula trunk -\end{verbatim} - -This will put a read-only copy into the directory {\bf trunk} -in your current directory, and {\bf trunk} will contain -the subdirectories: {\bf bacula}, {\bf gui}, and {\bf regress}. - -If you have write permission, you can get a copy of the GIT -repo with: - -\begin{verbatim} -git clone ssh://@bacula.git.sourceforge.net/gitroot/bacula/bacula trunk -\end{verbatim} - -where you replace \verb++ with your Source Forge login -userid, and you must have previously uploaded your public ssh key -to Source Forge. - -The above command needs to be done only once. Thereafter, you can: - -\begin{verbatim} -cd trunk -git pull origin -\end{verbatim} - -As of August 2009, the size of the repository ({\bf trunk} in the above -example) will be approximately 55 Megabytes. However, if you build -from source in this directory and do a lot of updates and regression -testing, the directory could become several hundred megabytes. - -\subsection{Learning GIT} -\index{Learning GIT} -If you want to learn more about GIT, we recommend that you visit:\\ -\elink{http://book.git-scm.com/}{http://book.git-scm.com/}. - - -\subsection{Publishing your changes} -\index{Publishing} -Since GIT is more complex than SVN, it takes a bit of time to learn how -to use it properly, and if you are not careful, you can potentially create -a new history in the repository. In addition, since GIT is a distributed -version control system, we prefer to receive a full branch submission rather -than simply a patch. To accomplish this, you must create your changes in -a branch, then {\bf push} them to some public repository -- it can be your -own repository that you publish or another. To simplify this phase for you, we -have created a publich Bacula GIT repository on {\bf github} where you can -push your branch containing changes you would like integrated into the Bacula -source code. - -Once you have pushed your branch to {\bf github} or told us where we can pull -from your public repository, one of the senior Bacula devlopers will fetch your -changes, examine them, possibly make comments for changes they would like to -see, and as the final step, the senior developer will commit it to the -Bacula Source Forge GIT repository. - -\subsection{Github} -\index{github} -If you are going to submit before cloning the Bacula Github database, you must create a login on -the Github website:\\ -\elink{http://github.com/}{http://github.com/}\\ -You must also upload your public ssh key. Please see the instructions -at the above link. Then you notify one of the senior Bacula developers, -who will add your Github user name to the Bacula repository. Finally, -you clone the Bacula repository with: - -\begin{verbatim} - git clone git@github.com:/bacula.git -\end{verbatim} - -where you replace \verb++ with the User Name that you created -when you created your Github login, and you replace \verb++ with the name -of a directory that you want git to create to hold your local Bacula git -repository. - -Normally, you will work by creating a branch of the master branch of your -repository, make your modifications, then make sure it is up to date, and finally -push it to Github. Assuming you call the Bacula repository {\bf bacula}, you might -use the following commands: - -\begin{verbatim} -cd bacula -git checkout master -git pull -git branch /newbranch -git checkout /newbranch -(edit, ...) -git add -git commit -m "" -... -\end{verbatim} - -Note, we request you to create the branch name with your github -login name. This guarantees that the branch name will be unique and -easily identified as well. - -When you have completed working on your branch, you will do: - -\begin{verbatim} -cd bacula -git checkout /newbranch -git pull -git rebase master -\end{verbatim} - -If you have completed your edits before anyone has modified the repository, -the {\bf git rebase master} will report that there was nothing to do. Otherwise, -it will merge the changes that were made in the repository before your changes. -If there are any conflicts, git will tell you. Typically resolving conflicts with -git is relatively easy. You simply make a diff: - -\begin{verbatim} -git diff -\end{verbatim} - -Then edit each file that was listed in the {\bf git diff} to remove the -conflict, which will be indicated by lines of: - -\begin{verbatim} -<<<<<<< HEAD -text ->>>>>>>> -other text -===== -\end{verbatim} - -where {\bf text} is what is in the Bacula repository, and {\bf other text} -is what you have changed. - -Once you have eliminated the conflict, the {\bf git diff} will show nothing, -and you must do a: - -\begin{verbatim} -git add -\end{verbatim} - -Once you have fixed all the files with conflicts in the above manner, you enter: - -\begin{verbatim} -git rebase --continue -\end{verbatim} - -and your rebase will be complete. - -If for some reason, before doing the --continue, you want to abort the rebase and return to what you had, you enter: - -\begin{verbatim} -git rebase --abort -\end{verbatim} - -Finally to upload your branch, you do: - -\begin{verbatim} -git push origin /newbranch -\end{verbatim} - -If you wish to delete it later, you can use: - -\begin{verbatim} -git push origin :/newbranch -\end{verbatim} - - - -\section{SVN Usage} -\index{SVN Usage} -\addcontentsline{toc}{subsection}{SVN Usage} - -Note: this section is somewhat out of date, since the SVN now -contains only the docs and rescue subdirectories. The bacula, -gui, and regress directories are now maintained in a GIT -repository. - -Please note that if you are familiar with CVS, SVN is very -similar (and better), but there can be a few surprising -differences. - -The Bacula SourceForge.net Subversion repository that contains -the documentation and the rescue scripts checked out through SVN with the -following command: - -\begin{verbatim} -svn checkout https://bacula.svn.sourceforge.net/svnroot/bacula bacula -\end{verbatim} - -With the above command, you will get everything, which is a very large -amount of data: - -\begin{verbatim} -branches/ - Branch-1.32a/ - ... - Branch-2.0/ - import/ - vendor/ -tags/ - Release-1.1/ - ... - Release-2.0.2/ -trunk/ - bacula/ - docs/ - gui/ - regress/ - rescue/ -\end{verbatim} - -Note, you should NEVER commit code to any checkout that you have -done of a tag. All tags (e.g. Release-1.1, ... Release-2.0.2) -should be considered read-only. - -You may commit code to the most recent item in -branches (in the above the most recent one is Branch-2.0). If -you want to commit code to an older branch, then please contact -Kern first. - -You may create your own tags and/or branches, but they should -have a name clearly distinctive from Branch-, Release-, or Beta-, -which are official names used by the project. If you create a -tag, then you should NEVER commit code to it, for the same -reason noted above -- it should serve as a marker for something -you released. If you create a branch, then you are free to -commit to it as you wish. - -You may, of course, commit to the trunk. - -In summary: - -\begin{verbatim} -branches - Branch-nnn -tags - Release-nnn - Beta-nnn -\end{verbatim} - -are reserved names to be created only by the project manager (or -with his OK), where the nnn is any sequence of numbers and -periods (e.g. 2.0, 2.0.1, ...). - -In addition all tags even those that you create are read-only -forever. Typically tags represent release points either in the -trunk or in a branch. - - -Coming back to getting source code. -If you only want the current Bacula source code, you should see -the above section that describes the GIT repository. - -To view what is in the SVN, point your browser at the following URL: -http://bacula.svn.sourceforge.net/viewvc/bacula/ - -Many of the Subversion (svn) commands are almost identical to those that -you have used for cvs, but some (such as a checkout) can have surprising -results, so you should take a careful look at the documentation. - -The following documentation on the new -svn repository will help you know how to use it: - -Here is the list of branches: -\begin{verbatim} - Branch-1.32a - Branch-1.32e - Branch-1.34.2 - Branch-1.34.5 - Branch-1.36 - Branch-1.36.1 - Branch-1.36.2 - Branch-1.38 - Branch-2.0 - import - vendor -\end{verbatim} - -The list of tags is: -\begin{verbatim} - Release-1.1 Release-1.19 Release-1.19a Release-1.19b - Release-1.20 Release-1.21 Release-1.22 Release-1.23 - Release-1.23a Release-1.24 Release-1.25 Release-1.25a - Release-1.26 Release-1.27 Release-1.27a Release-1.27b - Release-1.27c Release-1.28 Release-1.29 Release-1.30 - Release-1.31 Release-1.31a Release-1.32 Release-1.32a - Release-1.32b Release-1.32c Release-1.32d Release-1.32e - Release-1.32f Release-1.32f-2 Release-1.32f-3 Release-1.32f-4 - Release-1.32f-5 Release-1.34.0 Release-1.34.1 Release-1.34.3 - Release-1.34.4 Release-1.34.5 Release-1.34.6 Release-1.35.1 - Release-1.35.2 Release-1.35.3 Release-1.35.6 Release-1.35.7 - Release-1.35.8 Release-1.36.0 Release-1.36.1 Release-1.36.2 - Release-1.36.3 Release-1.38.0 Release-1.38.1 Release-1.38.10 - Release-1.38.11 Release-1.38.2 Release-1.38.3 Release-1.38.4 - Release-1.38.5 Release-1.38.6 Release-1.38.7 Release-1.38.8 - Release-1.38.9 Release-1.8.1 Release-1.8.2 Release-1.8.3 - Release-1.8.4 Release-1.8.5 Release-1.8.6 Release-2.0.0 - Release-2.0.1 Release-2.0.2 -\end{verbatim} - -Here is a list of commands to get you started. The recommended book is -"Version Control with Subversion", by Ben Collins-Sussmann, -Brian W. Fitzpatrick, and Michael Pilato, O'Reilly. The book is -Open Source, so it is also available on line at: - -\begin{verbatim} - http://svnbook.red-bean.com -\end{verbatim} - -Get a list of commands - -\begin{verbatim} - svn help -\end{verbatim} - -Get a help with a command - -\begin{verbatim} - svn help command -\end{verbatim} - -Checkout the HEAD revision of all modules from the project into the -directory bacula-new - -\begin{verbatim} - svn co https://bacula.svn.sourceforge.net/svnroot/bacula/trunk bacula.new -\end{verbatim} - -Checkout the HEAD revision of the bacula module into the bacula subdirectory - -\begin{verbatim} - svn checkout https://bacula.svn.sourceforge.net/svnroot/bacula/trunk/bacula -\end{verbatim} - -See which files have changed in the working copy - -\begin{verbatim} - svn status -\end{verbatim} - -See which files are out of date - -\begin{verbatim} - svn status -u -\end{verbatim} - -Add a new file file.c - -\begin{verbatim} - svn add file.c -\end{verbatim} - -Create a new directory - -\begin{verbatim} - svn mkdir newdir -\end{verbatim} - -Delete an obsolete file - -\begin{verbatim} - svn delete file.c -\end{verbatim} - -Rename a file - -\begin{verbatim} - svn move file.c newfile.c -\end{verbatim} - -Move a file to a new location - -\begin{verbatim} - svn move file.c ../newdir/file.c -\end{verbatim} - -Copy a file retaining the original history in the new file - -\begin{verbatim} - svn copy file.c newfile.c -\end{verbatim} - -Update the working copy with the outstanding changes - -\begin{verbatim} - svn update -\end{verbatim} - -Compare working copy with the repository - -\begin{verbatim} - svn diff file.c -\end{verbatim} - -Commit the changes in the local working copy - -\begin{verbatim} - svn commit -\end{verbatim} - -Specify which files are ignored in the current directory - -\begin{verbatim} - svn propedit svn:ignore . -\end{verbatim} - -Mark a file to be executable - -\begin{verbatim} - svn propset svn:executable '*' prog.sh -\end{verbatim} - -Unmark a file as executable - -\begin{verbatim} - svn propdel svn:executable prog.sh -\end{verbatim} - -List a file's properties - -\begin{verbatim} - svn proplist file.c -\end{verbatim} - -Create a branch for a new version - -\begin{verbatim} - svn copy https://bacula.svn.sourceforge.net/svnroot/bacula/trunk \ - https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.1 -\end{verbatim} - -Tag a version for a new release - -\begin{verbatim} - svn copy https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.1 \ - https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Release-2.1 -\end{verbatim} - - -Let's say you are working in the directory scripts. You would then do: - -\begin{verbatim} -cd scripts -(edit some files) -\end{verbatim} - -when you are happy with your changes, you can do the following: - -\begin{verbatim} -cd bacula (to your top level directory) -svn diff my-changes.patch -\end{verbatim} - -When the command is done, you can look in the file my-changes.patch -and you will see all the changes you have made to your copy of the -repository. Make sure that you understand all the changes that -it reports before proceeding. If you modified files that you do -do not want to commit to the main repository, you can simply delete -them from your local directory, and they will be restored from the -repository with the "svn update" that is shown below. Normally, you -should not find changes to files that you do not want to commit, and -if you find yourself in that position a lot, you are probably doing -something wrong. - -Let's assume that now you want to commit your changes to the main -SVN repository. - -First do: - -\begin{verbatim} -cd bacula -svn update -\end{verbatim} - -When you do this, it will pull any changes made by other developers into -your local copy of the repository, and it will check for conflicts. If there -are any, it will tell you, and you will need to resolve them. The problems -of resolving conflicts are a bit more than this document can cover, but -you can examine the files it claims have conflicts and look for \lt{}\lt{}\lt{}\lt{} -or look in the .rej files that it creates. If you have problems, just ask -on the developer's list. - -Note, doing the above "svn update" is not absolutely necessary. There are -times when you may be working on code and you want to commit it, but you -explicitly do not want to move up to the latest version of the code in -the SVN. If that is the case, you can simply skip the "svn update" and -do the commit shown below. If the commit fails because of a conflict, it -will tell you, and you must resolve the conflict before it will permit -you to do the commit. - -Once your local copy of the repository has been updated, you can now -commit your changes: - -\begin{verbatim} -svn commit -m "Some comment about what you changed" -\end{verbatim} - -or if you really only want to commit a single file, you can -do: - -\begin{verbatim} -svn commit -m "comment" scripts/file-I-edited -\end{verbatim} - -Note, if you have done a build in your directory, or you have added -other new files, the commit will update only the files that are -actually in the repository. For example, none of the object files -are stored in the repository, so when you do a commit, those object -files will simply be ignored. - -If you want to add new files or remove files from the main SVN -repository, and you are not experienced with SVN, please ask Kern -to do it. If you follow the simple steps above, it is unlikely that -you will do any damage to the repository, and if you do, it is always -possible for us to recover, but it can be painful. - -If you are only working in one subdirectory of say the bacula project, -for example, the scripts directory, you can do your commit from -that subdirectory, and only the changes in that directory and all its -subdirectories will be committed. This can be helpful for translators. -If you are doing a French translation, you will be working in -docs/manual-fr, and if you are always cd'ed into that directory when -doing your commits, your commit will effect only that directory. As -long as you are careful only to change files that you want changed, -you have little to worry about. - -\section{Subversion Resources} -\index{Subversion (svn) Resources} -\addcontentsline{toc}{subsection}{Subversion Resources} - -Main Subversion Web Page -\elink{http://subversion.tigris.org}{http://subversion.tigris.org} - -Subversion Book -\elink{http://svnbook.red-bean.com}{http://svnbook.red-bean.com} - -Subversion Clients -\elink{http://subversion.tigris.org/project\_packages.html}{http://subversion.tigris.org/project\_packages.html} - - (For Windows users the TortoiseSVN package is awesome) - -GUI UNIX client link -\elink{http://rapidsvn.tigris.org/}{http://rapidsvn.tigris.org/} - -A nice KDE GUI client: -kdesvn - - - \section{Developing Bacula} \index{Developing Bacula} \index{Bacula!Developing} diff --git a/docs/manuals/fr/developers/git.tex b/docs/manuals/fr/developers/git.tex new file mode 100644 index 00000000..6674441c --- /dev/null +++ b/docs/manuals/fr/developers/git.tex @@ -0,0 +1,372 @@ +\chapter{Bacula Git Usage} +\label{_GitChapterStart} +\index{Git} +\index{Git!Repo} +\addcontentsline{toc}{section}{Bacula Bit Usage} + +This chapter is intended to help you use the Git source code +repositories to obtain, modify, and submit Bacula source code. + + +\section{Bacula Git repositories} +\index{Git} +\addcontentsline{toc}{subsection}{Git repositories} +As of September 2009, the Bacula source code has been split into +three Git repositories. One is a repository that holds the +main Bacula source code with directories {\bf bacula}, {\bf gui}, +and {\bf regress}. The second repository contains +the directories {\bf docs} directory, and the third repository +contains the {\bf rescue} directory. All three repositories are +hosted on Source Forge. + +Previously everything was in a single SVN repository. +We have split the SVN repository into three because Git +offers significant advantages for ease of managing and integrating +developer's changes. However, one of the disadvantages of Git is that you +must work with the full repository, while SVN allows you to checkout +individual directories. If we put everything into a single Git +repository it would be far bigger than most developers would want +to checkout, so we have separted the docs and rescue into their own +repositories, and moved only the parts that are most actively +worked on by the developers (bacula, gui, and regress) to a the +Git Bacula repository. + +Bacula developers must now have a certain knowledege of Git. + +\section{Git Usage} +\index{Git Usage} +\addcontentsline{toc}{subsection}{Git Usage} + +Please note that if you are familiar with SVN, Git is similar, +(and better), but there can be a few surprising differences that +can be very confusing (nothing worse than converting from CVS to SVN). + +The main Bacula Git repo contains the subdirectories {\bf bacula}, {\bf gui}, +and {\bf regress}. With Git it is not possible to pull only a +single directory, because of the hash code nature of Git, you +must take all or nothing. + +For developers, the most important thing to remember about Git and +the Source Forge repository is not to "force" a {\bf push} to the +repository. Doing so, can possibly rewrite +the Git repository history and cause a lot of problems for the +project. + +You can get a full copy of the Source Forge Bacula Git repository with the +following command: + +\begin{verbatim} +git clone git://bacula.git.sourceforge.net/gitroot/bacula/bacula trunk +\end{verbatim} + +This will put a read-only copy into the directory {\bf trunk} +in your current directory, and {\bf trunk} will contain +the subdirectories: {\bf bacula}, {\bf gui}, and {\bf regress}. +Obviously you can use any name an not just {\bf trunk}. In fact, +once you have the repository in say {\bf trunk}, you can copy the +whole directory to another place and have a fully functional +git repository. + +If you have write permission to the Source Forge +repository, you can get a copy of the Git repo with: + +\begin{verbatim} +git clone ssh://@bacula.git.sourceforge.net/gitroot/bacula/bacula trunk +\end{verbatim} + +where you replace \verb++ with your Source Forge login +userid, and you must have previously uploaded your public ssh key +to Source Forge. + +The above command needs to be done only once. Thereafter, you can: + +\begin{verbatim} +cd trunk +git pull # refresh my repo with the latest code +\end{verbatim} + +As of August 2009, the size of the repository ({\bf trunk} in the above +example) will be approximately 55 Megabytes. However, if you build +from source in this directory and do a lot of updates and regression +testing, the directory could become several hundred megabytes. + +\subsection{Learning Git} +\index{Learning Git} +If you want to learn more about Git, we recommend that you visit:\\ +\elink{http://book.git-scm.com/}{http://book.git-scm.com/}. + +Some of the differences between Git and SVN are: +\begin{itemize} +\item Your main Git directory is a full Git repository to which you can + and must commit. In fact, we suggest you commit frequently. +\item When you commit, the commit goes into your local Git + database. You must use another command to write it to the + master Source Forge repository (see below). +\item The local Git database is kept in the directory {\bf .git} at the + top level of the directory. +\item All the important Git configuration information is kept in the + file {\bf .git/config} in ASCII format that is easy to manually edit. +\item When you do a {\bf commit} the changes are put in {\bf .git} + rather but not in the main Source Forge repository. +\item You can push your changes to the external repository using + the command {\bf git push} providing you have write permission + on the repository. +\item We restrict developers just learning git to have read-only + access until they feel comfortable with git before giving them + write access. +\item You can download all the current changes in the external repository + and merge them into your {\bf master} branch using the command + {\bf git pull}. +\item The command {\bf git add} is used to add a new file to the + repository AND to tell Git that you want a file that has changed + to be in the next commit. This has lots of advantages, because + a {\bf git commit} only commits those files that have been + explicitly added. Note with SVN {\bf add} is used only + to add new files to the repo. +\item You can add and commit all files modifed in one command + using {\bf git commit -a}. +\item This extra use of {\bf add} allows you to make a number + of changes then add only a few of the files and commit them, + then add more files and commit them until you have committed + everything. This has the advantage of allowing you to more + easily group small changes and do individaual commits on them. + By keeping commits smaller, and separated into topics, it makes + it much easier to later select certain commits for backporting. +\item If you {\bf git pull} from the main repository and make + some changes, and before you do a {\bf git push} someone + else pushes changes to the Git repository, your changes will + apply to an older version of the repository you will probably + get an error message such as: + +\begin{verbatim} + git push + To git@github.com:bacula/bacula.git + ! [rejected] master -> master (non-fast forward) + error: failed to push some refs to 'git@github.com:bacula/bacula.git' +\end{verbatim} + + which is Git's way of telling you that the main repository has changed + and that if you push your changes, they will not be integrated properly. + This is very similar to what happens when you do an "svn update" and + get merge conflicts. + As we have noted above, you should never ask Git to force the push. + See below for an explanation of why. +\item To integrate (merge) your changes properly, you should always do + a {\bf git pull} just prior to doing a {\bf git push}. +\item If Git is unable to merge your changes or finds a conflict it + will tell you and you must do conflict resolution, which is much + easier in Git than in SVN. +\item Resolving conflicts is described below in the {\bf github} section. +\end{itemize} + +\section{Step by Step Modifying Bacula Code} +Suppose you want to download Bacula source code, build it, make +a change, then submit your change to the Bacula developers. What +would you do? + +\begin{itemize} +\item Download the Source code:\\ +\begin{verbatim} +git clone ssh://@bacula.git.sourceforge.net/gitroot/bacula/bacula trunk +\end{verbatim} + +\item Configure and Build Bacula:\\ +\begin{verbatim} +./configure (all-your-normal-options) +make +\end{verbatim} + +\item Create a branch to work on: +\begin{verbatim} +cd trunk/bacula +git checkout -b bugfix master +\end{verbatim} + +\item Edit, build, Test, ...\\ +\begin{verbatim} +edit file jcr.h +make +test +\end{verbatim} + +\item commit your work: +\begin{verbatim} +git commit -am "Short comment on what I did" +\end{verbatim} + +\item Possibly repeat the above two items + +\item Switch back to the master branch:\\ +\begin{verbatim} +git checkout master +\end{verbatim} + +\item Pull the latest changes:\\ +\begin{verbatim} +git pull +\end{verbatim} + +\item Get back on your bugfix branch:\\ +\begin{verbatim} +git checkout bugfix +\end{verbatim} + +\item Merge your changes and correct any conflicts:\\ +\begin{verbatim} +git rebase master bugfix +\end{verbatim} + +\item Fix any conflicts:\\ +You will be notified if there are conflicts. The first +thing to do is: + +\begin{verbatim} +git diff +\end{verbatim} + +This will produce a diff of only the files having a conflict. +Fix each file in turn. When it is fixed, the diff for that file +will go away. + +For each file fixed, you must do the same as SVN, inform git with: + +\begin{verbatim} +git add (name-of-file-no-longer-in-conflict) +\end{verbatim} + +\item When all files are fixed do: +\begin{verbatim} +git rebase --continue +\end{verbatim} + +\item When you are ready to send a patch, do the following:\\ +\begin{verbatim} +git checkout bugfix +git format-patch -M master +\end{verbatim} +Look at the files produced. They should be numbered 0001-xxx.patch +where there is one file for each commit you did, number sequentially, +and the xxx is what you put in the commit comment. + +\item If the patch files are good, send them by email to the developers +as attachments. + +\end{itemize} + + + +\subsection{More Details} + +Normally, you will work by creating a branch of the master branch of your +repository, make your modifications, then make sure it is up to date, and finally +create format-patch patches or push it to the Source Forge repo. Assuming +you call the Bacula repository {\bf trunk}, you might use the following +commands: + +\begin{verbatim} +cd trunk +git checkout master +git pull +git checkout -b newbranch master +(edit, ...) +git add +git commit -m "" +... +\end{verbatim} + +When you have completed working on your branch, you will do: + +\begin{verbatim} +cd trunk +git checkout newbranch # ensure I am on my branch +git pull # get latest source code +git rebase master # merge my code +\end{verbatim} + +If you have completed your edits before anyone has modified the repository, +the {\bf git rebase master} will report that there was nothing to do. Otherwise, +it will merge the changes that were made in the repository before your changes. +If there are any conflicts, Git will tell you. Typically resolving conflicts with +Git is relatively easy. You simply make a diff: + +\begin{verbatim} +git diff +\end{verbatim} + +Then edit each file that was listed in the {\bf git diff} to remove the +conflict, which will be indicated by lines of: + +\begin{verbatim} +<<<<<<< HEAD +text +>>>>>>>> +other text +===== +\end{verbatim} + +where {\bf text} is what is in the Bacula repository, and {\bf other text} +is what you have changed. + +Once you have eliminated the conflict, the {\bf git diff} will show nothing, +and you must do a: + +\begin{verbatim} +git add +\end{verbatim} + +Once you have fixed all the files with conflicts in the above manner, you enter: + +\begin{verbatim} +git rebase --continue +\end{verbatim} + +and your rebase will be complete. + +If for some reason, before doing the --continue, you want to abort the rebase and return to what you had, you enter: + +\begin{verbatim} +git rebase --abort +\end{verbatim} + +Finally to make a set of patch files + +\begin{verbatim} +git format-patch -M master +\end{verbatim} + +When you see your changes have been integrated and pushed to the +main repo, you can delete your branch with: + +\begin{verbatim} +git checkout master +git branch -D newbranch +\end{verbatim} + + +\section{Forcing Changes} +If you want to understand why it is not a good idea to force a +push to the repository, look at the following picture: + +\includegraphics[width=0.85\textwidth]{\idir git-edit-commit.eps} + +The above graphic has three lines of circles. Each circle represents +a commit, and time runs from the left to the right. The top line +shows the repository just before you are going to do a push. Note the +point at which you pulled is the circle on the left, your changes are +represented by the circle labeled {\bf Your mods}. It is shown below +to indicate that the changes are only in your local repository. Finally, +there are pushes A and B that came after the time at which you pulled. + +If you were to force your changes into the repository, Git would place them +immediately after the point at which you pulled them, so they would +go before the pushes A and B. However, doing so would rewrite the history +of the repository and make it very difficult for other users to synchronize +since they would have to somehow wedge their changes at some point before the +current HEAD of the repository. This situation is shown by the second line of +pushes. + +What you really want to do is to put your changes after Push B (the current HEAD). +This is shown in the third line of pushes. The best way to accomplish this is to +work in a branch, pull the repository so you have your master equal to HEAD (in first +line), then to rebase your branch on the current master and then commit it. The +exact commands to accomplish this are shown in the next couple of sections. diff --git a/docs/manuals/fr/developers/gui-interface.tex b/docs/manuals/fr/developers/gui-interface.tex new file mode 100644 index 00000000..2733cda9 --- /dev/null +++ b/docs/manuals/fr/developers/gui-interface.tex @@ -0,0 +1,102 @@ +%% +%% + +\chapter*{Implementing a GUI Interface} +\label{_ChapterStart} +\index[general]{Interface!Implementing a Bacula GUI } +\index[general]{Implementing a Bacula GUI Interface } +\addcontentsline{toc}{section}{Implementing a Bacula GUI Interface} + +\section{General} +\index[general]{General } +\addcontentsline{toc}{subsection}{General} + +This document is intended mostly for developers who wish to develop a new GUI +interface to {\bf Bacula}. + +\subsection{Minimal Code in Console Program} +\index[general]{Program!Minimal Code in Console } +\index[general]{Minimal Code in Console Program } +\addcontentsline{toc}{subsubsection}{Minimal Code in Console Program} + +Until now, I have kept all the Catalog code in the Directory (with the +exception of dbcheck and bscan). This is because at some point I would like to +add user level security and access. If we have code spread everywhere such as +in a GUI this will be more difficult. The other advantage is that any code you +add to the Director is automatically available to both the tty console program +and the GNOME program. The major disadvantage is it increases the size of the +code -- however, compared to Networker the Bacula Director is really tiny. + +\subsection{GUI Interface is Difficult} +\index[general]{GUI Interface is Difficult } +\index[general]{Difficult!GUI Interface is } +\addcontentsline{toc}{subsubsection}{GUI Interface is Difficult} + +Interfacing to an interactive program such as Bacula can be very difficult +because the interfacing program must interpret all the prompts that may come. +This can be next to impossible. There are are a number of ways that Bacula is +designed to facilitate this: + +\begin{itemize} +\item The Bacula network protocol is packet based, and thus pieces of +information sent can be ASCII or binary. +\item The packet interface permits knowing where the end of a list is. +\item The packet interface permits special ``signals'' to be passed rather +than data. +\item The Director has a number of commands that are non-interactive. They +all begin with a period, and provide things such as the list of all Jobs, +list of all Clients, list of all Pools, list of all Storage, ... Thus the GUI +interface can get to virtually all information that the Director has in a +deterministic way. See \lt{}bacula-source\gt{}/src/dird/ua\_dotcmds.c for +more details on this. +\item Most console commands allow all the arguments to be specified on the +command line: e.g. {\bf run job=NightlyBackup level=Full} +\end{itemize} + +One of the first things to overcome is to be able to establish a conversation +with the Director. Although you can write all your own code, it is probably +easier to use the Bacula subroutines. The following code is used by the +Console program to begin a conversation. + +\footnotesize +\begin{verbatim} +static BSOCK *UA_sock = NULL; +static JCR *jcr; +... + read-your-config-getting-address-and-pasword; + UA_sock = bnet_connect(NULL, 5, 15, "Director daemon", dir->address, + NULL, dir->DIRport, 0); + if (UA_sock == NULL) { + terminate_console(0); + return 1; + } + jcr.dir_bsock = UA_sock; + if (!authenticate_director(\&jcr, dir)) { + fprintf(stderr, "ERR=%s", UA_sock->msg); + terminate_console(0); + return 1; + } + read_and_process_input(stdin, UA_sock); + if (UA_sock) { + bnet_sig(UA_sock, BNET_TERMINATE); /* send EOF */ + bnet_close(UA_sock); + } + exit 0; +\end{verbatim} +\normalsize + +Then the read\_and\_process\_input routine looks like the following: + +\footnotesize +\begin{verbatim} + get-input-to-send-to-the-Director; + bnet_fsend(UA_sock, "%s", input); + stat = bnet_recv(UA_sock); + process-output-from-the-Director; +\end{verbatim} +\normalsize + +For a GUI program things will be a bit more complicated. Basically in the very +inner loop, you will need to check and see if any output is available on the +UA\_sock. For an example, please take a look at the GNOME GUI interface code +in: \lt{}bacula-source\>/src/gnome-console/console.c diff --git a/docs/manuals/fr/developers/pluginAPI.tex b/docs/manuals/fr/developers/pluginAPI.tex new file mode 100644 index 00000000..8996cecc --- /dev/null +++ b/docs/manuals/fr/developers/pluginAPI.tex @@ -0,0 +1,854 @@ +%% +%% + +\chapter{Bacula FD Plugin API} +To write a Bacula plugin, you create a dynamic shared object program (or dll on +Win32) with a particular name and two exported entry points, place it in the +{\bf Plugins Directory}, which is defined in the {\bf bacula-fd.conf} file in +the {\bf Client} resource, and when the FD starts, it will load all the plugins +that end with {\bf -fd.so} (or {\bf -fd.dll} on Win32) found in that directory. + +\section{Normal vs Command Plugins} +In general, there are two ways that plugins are called. The first way, is when +a particular event is detected in Bacula, it will transfer control to each +plugin that is loaded in turn informing the plugin of the event. This is very +similar to how a {\bf RunScript} works, and the events are very similar. Once +the plugin gets control, it can interact with Bacula by getting and setting +Bacula variables. In this way, it behaves much like a RunScript. Currently +very few Bacula variables are defined, but they will be implemented as the need +arrises, and it is very extensible. + +We plan to have plugins register to receive events that they normally would +not receive, such as an event for each file examined for backup or restore. +This feature is not yet implemented. + +The second type of plugin, which is more useful and fully implemented in the +current version is what we call a command plugin. As with all plugins, it gets +notified of important events as noted above (details described below), but in +addition, this kind of plugin can accept a command line, which is a: + +\begin{verbatim} + Plugin = +\end{verbatim} + +directive that is placed in the Include section of a FileSet and is very +similar to the "File = " directive. When this Plugin directive is encountered +by Bacula during backup, it passes the "command" part of the Plugin directive +only to the plugin that is explicitly named in the first field of that command +string. This allows that plugin to backup any file or files on the system that +it wants. It can even create "virtual files" in the catalog that contain data +to be restored but do not necessarily correspond to actual files on the +filesystem. + +The important features of the command plugin entry points are: +\begin{itemize} + \item It is triggered by a "Plugin =" directive in the FileSet + \item Only a single plugin is called that is named on the "Plugin =" directive. + \item The full command string after the "Plugin =" is passed to the plugin + so that it can be told what to backup/restore. +\end{itemize} + + +\section{Loading Plugins} +Once the File daemon loads the plugins, it asks the OS for the +two entry points (loadPlugin and unloadPlugin) then calls the +{\bf loadPlugin} entry point (see below). + +Bacula passes information to the plugin through this call and it gets +back information that it needs to use the plugin. Later, Bacula + will call particular functions that are defined by the +{\bf loadPlugin} interface. + +When Bacula is finished with the plugin +(when Bacula is going to exit), it will call the {\bf unloadPlugin} +entry point. + +The two entry points are: + +\begin{verbatim} +bRC loadPlugin(bInfo *lbinfo, bFuncs *lbfuncs, pInfo **pinfo, pFuncs **pfuncs) + +and + +bRC unloadPlugin() +\end{verbatim} + +both these external entry points to the shared object are defined as C entry +points to avoid name mangling complications with C++. However, the shared +object can actually be written in any language (preferrably C or C++) providing +that it follows C language calling conventions. + +The definitions for {\bf bRC} and the arguments are {\bf +src/filed/fd-plugins.h} and so this header file needs to be included in +your plugin. It along with {\bf src/lib/plugins.h} define basically the whole +plugin interface. Within this header file, it includes the following +files: + +\begin{verbatim} +#include +#include "config.h" +#include "bc_types.h" +#include "lib/plugins.h" +#include +\end{verbatim} + +Aside from the {\bf bc\_types.h} and {\bf confit.h} headers, the plugin +definition uses the minimum code from Bacula. The bc\_types.h file is required +to ensure that the data type defintions in arguments correspond to the Bacula +core code. + +The return codes are defined as: +\begin{verbatim} +typedef enum { + bRC_OK = 0, /* OK */ + bRC_Stop = 1, /* Stop calling other plugins */ + bRC_Error = 2, /* Some kind of error */ + bRC_More = 3, /* More files to backup */ +} bRC; +\end{verbatim} + + +At a future point in time, we hope to make the Bacula libbac.a into a +shared object so that the plugin can use much more of Bacula's +infrastructure, but for this first cut, we have tried to minimize the +dependence on Bacula. + +\section{loadPlugin} +As previously mentioned, the {\bf loadPlugin} entry point in the plugin +is called immediately after Bacula loads the plugin when the File daemon +itself is first starting. This entry point is only called once during the +execution of the File daemon. In calling the +plugin, the first two arguments are information from Bacula that +is passed to the plugin, and the last two arguments are information +about the plugin that the plugin must return to Bacula. The call is: + +\begin{verbatim} +bRC loadPlugin(bInfo *lbinfo, bFuncs *lbfuncs, pInfo **pinfo, pFuncs **pfuncs) +\end{verbatim} + +and the arguments are: + +\begin{description} +\item [lbinfo] +This is information about Bacula in general. Currently, the only value +defined in the bInfo structure is the version, which is the Bacula plugin +interface version, currently defined as 1. The {\bf size} is set to the +byte size of the structure. The exact definition of the bInfo structure +as of this writing is: + +\begin{verbatim} +typedef struct s_baculaInfo { + uint32_t size; + uint32_t version; +} bInfo; +\end{verbatim} + +\item [lbfuncs] +The bFuncs structure defines the callback entry points within Bacula +that the plugin can use register events, get Bacula values, set +Bacula values, and send messages to the Job output or debug output. + +The exact definition as of this writing is: +\begin{verbatim} +typedef struct s_baculaFuncs { + uint32_t size; + uint32_t version; + bRC (*registerBaculaEvents)(bpContext *ctx, ...); + bRC (*getBaculaValue)(bpContext *ctx, bVariable var, void *value); + bRC (*setBaculaValue)(bpContext *ctx, bVariable var, void *value); + bRC (*JobMessage)(bpContext *ctx, const char *file, int line, + int type, utime_t mtime, const char *fmt, ...); + bRC (*DebugMessage)(bpContext *ctx, const char *file, int line, + int level, const char *fmt, ...); + void *(*baculaMalloc)(bpContext *ctx, const char *file, int line, + size_t size); + void (*baculaFree)(bpContext *ctx, const char *file, int line, void *mem); +} bFuncs; +\end{verbatim} + +We will discuss these entry points and how to use them a bit later when +describing the plugin code. + + +\item [pInfo] +When the loadPlugin entry point is called, the plugin must initialize +an information structure about the plugin and return a pointer to +this structure to Bacula. + +The exact definition as of this writing is: + +\begin{verbatim} +typedef struct s_pluginInfo { + uint32_t size; + uint32_t version; + const char *plugin_magic; + const char *plugin_license; + const char *plugin_author; + const char *plugin_date; + const char *plugin_version; + const char *plugin_description; +} pInfo; +\end{verbatim} + +Where: + \begin{description} + \item [version] is the current Bacula defined plugin interface version, currently + set to 1. If the interface version differs from the current version of + Bacula, the plugin will not be run (not yet implemented). + \item [plugin\_magic] is a pointer to the text string "*FDPluginData*", a + sort of sanity check. If this value is not specified, the plugin + will not be run (not yet implemented). + \item [plugin\_license] is a pointer to a text string that describes the + plugin license. Bacula will only accept compatible licenses (not yet + implemented). + \item [plugin\_author] is a pointer to the text name of the author of the program. + This string can be anything but is generally the author's name. + \item [plugin\_date] is the pointer text string containing the date of the plugin. + This string can be anything but is generally some human readable form of + the date. + \item [plugin\_version] is a pointer to a text string containing the version of + the plugin. The contents are determined by the plugin writer. + \item [plugin\_description] is a pointer to a string describing what the + plugin does. The contents are determined by the plugin writer. + \end{description} + +The pInfo structure must be defined in static memory because Bacula does not +copy it and may refer to the values at any time while the plugin is +loaded. All values must be supplied or the plugin will not run (not yet +implemented). All text strings must be either ASCII or UTF-8 strings that +are terminated with a zero byte. + +\item [pFuncs] +When the loadPlugin entry point is called, the plugin must initialize +an entry point structure about the plugin and return a pointer to +this structure to Bacula. This structure contains pointer to each +of the entry points that the plugin must provide for Bacula. When +Bacula is actually running the plugin, it will call the defined +entry points at particular times. All entry points must be defined. + +The pFuncs structure must be defined in static memory because Bacula does not +copy it and may refer to the values at any time while the plugin is +loaded. + +The exact definition as of this writing is: + +\begin{verbatim} +typedef struct s_pluginFuncs { + uint32_t size; + uint32_t version; + bRC (*newPlugin)(bpContext *ctx); + bRC (*freePlugin)(bpContext *ctx); + bRC (*getPluginValue)(bpContext *ctx, pVariable var, void *value); + bRC (*setPluginValue)(bpContext *ctx, pVariable var, void *value); + bRC (*handlePluginEvent)(bpContext *ctx, bEvent *event, void *value); + bRC (*startBackupFile)(bpContext *ctx, struct save_pkt *sp); + bRC (*endBackupFile)(bpContext *ctx); + bRC (*startRestoreFile)(bpContext *ctx, const char *cmd); + bRC (*endRestoreFile)(bpContext *ctx); + bRC (*pluginIO)(bpContext *ctx, struct io_pkt *io); + bRC (*createFile)(bpContext *ctx, struct restore_pkt *rp); + bRC (*setFileAttributes)(bpContext *ctx, struct restore_pkt *rp); + bRC (*checkFile)(bpContext *ctx, char *fname); +} pFuncs; +\end{verbatim} + +The details of the entry points will be presented in +separate sections below. + +Where: + \begin{description} + \item [size] is the byte size of the structure. + \item [version] is the plugin interface version currently set to 3. + \end{description} + +Sample code for loadPlugin: +\begin{verbatim} + bfuncs = lbfuncs; /* set Bacula funct pointers */ + binfo = lbinfo; + *pinfo = &pluginInfo; /* return pointer to our info */ + *pfuncs = &pluginFuncs; /* return pointer to our functions */ + + return bRC_OK; +\end{verbatim} + +where pluginInfo and pluginFuncs are statically defined structures. +See bpipe-fd.c for details. + + + +\end{description} + +\section{Plugin Entry Points} +This section will describe each of the entry points (subroutines) within +the plugin that the plugin must provide for Bacula, when they are called +and their arguments. As noted above, pointers to these subroutines are +passed back to Bacula in the pFuncs structure when Bacula calls the +loadPlugin() externally defined entry point. + +\subsection{newPlugin(bpContext *ctx)} + This is the entry point that Bacula will call + when a new "instance" of the plugin is created. This typically + happens at the beginning of a Job. If 10 Jobs are running + simultaneously, there will be at least 10 instances of the + plugin. + + The bpContext structure will be passed to the plugin, and + during this call, if the plugin needs to have its private + working storage that is associated with the particular + instance of the plugin, it should create it from the heap + (malloc the memory) and store a pointer to + its private working storage in the {\bf pContext} variable. + Note: since Bacula is a multi-threaded program, you must not + keep any variable data in your plugin unless it is truely meant + to apply globally to the whole plugin. In addition, you must + be aware that except the first and last call to the plugin + (loadPlugin and unloadPlugin) all the other calls will be + made by threads that correspond to a Bacula job. The + bpContext that will be passed for each thread will remain the + same throughout the Job thus you can keep your privat Job specific + data in it ({\bf bContext}). + +\begin{verbatim} +typedef struct s_bpContext { + void *pContext; /* Plugin private context */ + void *bContext; /* Bacula private context */ +} bpContext; + +\end{verbatim} + + This context pointer will be passed as the first argument to all + the entry points that Bacula calls within the plugin. Needless + to say, the plugin should not change the bContext variable, which + is Bacula's private context pointer for this instance (Job) of this + plugin. + +\subsection{freePlugin(bpContext *ctx)} +This entry point is called when the +this instance of the plugin is no longer needed (the Job is +ending), and the plugin should release all memory it may +have allocated for this particular instance (Job) i.e. the pContext. +This is not the final termination +of the plugin signaled by a call to {\bf unloadPlugin}. +Any other instances (Job) will +continue to run, and the entry point {\bf newPlugin} may be called +again if other jobs start. + +\subsection{getPluginValue(bpContext *ctx, pVariable var, void *value)} +Bacula will call this entry point to get +a value from the plugin. This entry point is currently not called. + +\subsection{setPluginValue(bpContext *ctx, pVariable var, void *value)} +Bacula will call this entry point to set +a value in the plugin. This entry point is currently not called. + +\subsection{handlePluginEvent(bpContext *ctx, bEvent *event, void *value)} +This entry point is called when Bacula +encounters certain events (discussed below). This is, in fact, the +main way that most plugins get control when a Job runs and how +they know what is happening in the job. It can be likened to the +{\bf RunScript} feature that calls external programs and scripts, +and is very similar to the Bacula Python interface. +When the plugin is called, Bacula passes it the pointer to an event +structure (bEvent), which currently has one item, the eventType: + +\begin{verbatim} +typedef struct s_bEvent { + uint32_t eventType; +} bEvent; +\end{verbatim} + + which defines what event has been triggered, and for each event, + Bacula will pass a pointer to a value associated with that event. + If no value is associated with a particular event, Bacula will + pass a NULL pointer, so the plugin must be careful to always check + value pointer prior to dereferencing it. + + The current list of events are: + +\begin{verbatim} +typedef enum { + bEventJobStart = 1, + bEventJobEnd = 2, + bEventStartBackupJob = 3, + bEventEndBackupJob = 4, + bEventStartRestoreJob = 5, + bEventEndRestoreJob = 6, + bEventStartVerifyJob = 7, + bEventEndVerifyJob = 8, + bEventBackupCommand = 9, + bEventRestoreCommand = 10, + bEventLevel = 11, + bEventSince = 12, +} bEventType; + +\end{verbatim} + +Most of the above are self-explanatory. + +\begin{description} + \item [bEventJobStart] is called whenever a Job starts. The value + passed is a pointer to a string that contains: "Jobid=nnn + Job=job-name". Where nnn will be replaced by the JobId and job-name + will be replaced by the Job name. The variable is temporary so if you + need the values, you must copy them. + + \item [bEventJobEnd] is called whenever a Job ends. No value is passed. + + \item [bEventStartBackupJob] is called when a Backup Job begins. No value + is passed. + + \item [bEventEndBackupJob] is called when a Backup Job ends. No value is + passed. + + \item [bEventStartRestoreJob] is called when a Restore Job starts. No value + is passed. + + \item [bEventEndRestoreJob] is called when a Restore Job ends. No value is + passed. + + \item [bEventStartVerifyJob] is called when a Verify Job starts. No value + is passed. + + \item [bEventEndVerifyJob] is called when a Verify Job ends. No value + is passed. + + \item [bEventBackupCommand] is called prior to the bEventStartBackupJob and + the plugin is passed the command string (everything after the equal sign + in "Plugin =" as the value. + + Note, if you intend to backup a file, this is an important first point to + write code that copies the command string passed into your pContext area + so that you will know that a backup is being performed and you will know + the full contents of the "Plugin =" command (i.e. what to backup and + what virtual filename the user wants to call it. + + \item [bEventRestoreCommand] is called prior to the bEventStartRestoreJob and + the plugin is passed the command string (everything after the equal sign + in "Plugin =" as the value. + + See the notes above concerning backup and the command string. This is the + point at which Bacula passes you the original command string that was + specified during the backup, so you will want to save it in your pContext + area for later use when Bacula calls the plugin again. + + \item [bEventLevel] is called when the level is set for a new Job. The value + is a 32 bit integer stored in the void*, which represents the Job Level code. + + \item [bEventSince] is called when the since time is set for a new Job. The + value is a time\_t time at which the last job was run. +\end{description} + +During each of the above calls, the plugin receives either no specific value or +only one value, which in some cases may not be sufficient. However, knowing +the context of the event, the plugin can call back to the Bacula entry points +it was passed during the {\bf loadPlugin} call and get to a number of Bacula +variables. (at the current time few Bacula variables are implemented, but it +easily extended at a future time and as needs require). + +\subsection{startBackupFile(bpContext *ctx, struct save\_pkt *sp)} +This entry point is called only if your plugin is a command plugin, and +it is called when Bacula encounters the "Plugin = " directive in +the Include section of the FileSet. +Called when beginning the backup of a file. Here Bacula provides you +with a pointer to the {\bf save\_pkt} structure and you must fill in +this packet with the "attribute" data of the file. + +\begin{verbatim} +struct save_pkt { + int32_t pkt_size; /* size of this packet */ + char *fname; /* Full path and filename */ + char *link; /* Link name if any */ + struct stat statp; /* System stat() packet for file */ + int32_t type; /* FT_xx for this file */ + uint32_t flags; /* Bacula internal flags */ + bool portable; /* set if data format is portable */ + char *cmd; /* command */ + int32_t pkt_end; /* end packet sentinel */ +}; +\end{verbatim} + +The second argument is a pointer to the {\bf save\_pkt} structure for the file +to be backed up. The plugin is responsible for filling in all the fields +of the {\bf save\_pkt}. If you are backing up +a real file, then generally, the statp structure can be filled in by doing +a {\bf stat} system call on the file. + +If you are backing up a database or +something that is more complex, you might want to create a virtual file. +That is a file that does not actually exist on the filesystem, but represents +say an object that you are backing up. In that case, you need to ensure +that the {\bf fname} string that you pass back is unique so that it +does not conflict with a real file on the system, and you need to +artifically create values in the statp packet. + +Example programs such as {\bf bpipe-fd.c} show how to set these fields. You +must take care not to store pointers the stack in the pointer fields such as +fname and link, because when you return from your function, your stack entries +will be destroyed. The solution in that case is to malloc() and return the +pointer to it. In order to not have memory leaks, you should store a pointer to +all memory allocated in your pContext structure so that in subsequent calls or +at termination, you can release it back to the system. + +Once the backup has begun, Bacula will call your plugin at the {\bf pluginIO} +entry point to "read" the data to be backed up. Please see the {\bf bpipe-fd.c} +plugin for how to do I/O. + +Example of filling in the save\_pkt as used in bpipe-fd.c: + +\begin{verbatim} + struct plugin_ctx *p_ctx = (struct plugin_ctx *)ctx->pContext; + time_t now = time(NULL); + sp->fname = p_ctx->fname; + sp->statp.st_mode = 0700 | S_IFREG; + sp->statp.st_ctime = now; + sp->statp.st_mtime = now; + sp->statp.st_atime = now; + sp->statp.st_size = -1; + sp->statp.st_blksize = 4096; + sp->statp.st_blocks = 1; + p_ctx->backup = true; + return bRC_OK; +\end{verbatim} + +Note: the filename to be created has already been created from the +command string previously sent to the plugin and is in the plugin +context (p\_ctx->fname) and is a malloc()ed string. This example +creates a regular file (S\_IFREG), with various fields being created. + +In general, the sequence of commands issued from Bacula to the plugin +to do a backup while processing the "Plugin = " directive are: + +\begin{enumerate} + \item generate a bEventBackupCommand event to the specified plugin + and pass it the command string. + \item make a startPluginBackup call to the plugin, which + fills in the data needed in save\_pkt to save as the file + attributes and to put on the Volume and in the catalog. + \item call Bacula's internal save\_file() subroutine to save the specified + file. The plugin will then be called at pluginIO() to "open" + the file, and then to read the file data. + Note, if you are dealing with a virtual file, the "open" operation + is something the plugin does internally and it doesn't necessarily + mean opening a file on the filesystem. For example in the case of + the bpipe-fd.c program, it initiates a pipe to the requested program. + Finally when the plugin signals to Bacula that all the data was read, + Bacula will call the plugin with the "close" pluginIO() function. +\end{enumerate} + + +\subsection{endBackupFile(bpContext *ctx)} +Called at the end of backing up a file for a command plugin. If the plugin's +work is done, it should return bRC\_OK. If the plugin wishes to create another +file and back it up, then it must return bRC\_More (not yet implemented). This +is probably a good time to release any malloc()ed memory you used to pass back +filenames. + +\subsection{startRestoreFile(bpContext *ctx, const char *cmd)} +Called when the first record is read from the Volume that was +previously written by the command plugin. + +\subsection{createFile(bpContext *ctx, struct restore\_pkt *rp)} +Called for a command plugin to create a file during a Restore job before +restoring the data. +This entry point is called before any I/O is done on the file. After +this call, Bacula will call pluginIO() to open the file for write. + +The data in the +restore\_pkt is passed to the plugin and is based on the data that was +originally given by the plugin during the backup and the current user +restore settings (e.g. where, RegexWhere, replace). This allows the +plugin to first create a file (if necessary) so that the data can +be transmitted to it. The next call to the plugin will be a +pluginIO command with a request to open the file write-only. + +This call must return one of the following values: + +\begin{verbatim} + enum { + CF_SKIP = 1, /* skip file (not newer or something) */ + CF_ERROR, /* error creating file */ + CF_EXTRACT, /* file created, data to extract */ + CF_CREATED /* file created, no data to extract */ +}; +\end{verbatim} + +in the restore\_pkt value {\bf create\_status}. For a normal file, +unless there is an error, you must return {\bf CF\_EXTRACT}. + +\begin{verbatim} + +struct restore_pkt { + int32_t pkt_size; /* size of this packet */ + int32_t stream; /* attribute stream id */ + int32_t data_stream; /* id of data stream to follow */ + int32_t type; /* file type FT */ + int32_t file_index; /* file index */ + int32_t LinkFI; /* file index to data if hard link */ + uid_t uid; /* userid */ + struct stat statp; /* decoded stat packet */ + const char *attrEx; /* extended attributes if any */ + const char *ofname; /* output filename */ + const char *olname; /* output link name */ + const char *where; /* where */ + const char *RegexWhere; /* regex where */ + int replace; /* replace flag */ + int create_status; /* status from createFile() */ + int32_t pkt_end; /* end packet sentinel */ + +}; +\end{verbatim} + +Typical code to create a regular file would be the following: + +\begin{verbatim} + struct plugin_ctx *p_ctx = (struct plugin_ctx *)ctx->pContext; + time_t now = time(NULL); + sp->fname = p_ctx->fname; /* set the full path/filename I want to create */ + sp->type = FT_REG; + sp->statp.st_mode = 0700 | S_IFREG; + sp->statp.st_ctime = now; + sp->statp.st_mtime = now; + sp->statp.st_atime = now; + sp->statp.st_size = -1; + sp->statp.st_blksize = 4096; + sp->statp.st_blocks = 1; + return bRC_OK; +\end{verbatim} + +This will create a virtual file. If you are creating a file that actually +exists, you will most likely want to fill the statp packet using the +stat() system call. + +Creating a directory is similar, but requires a few extra steps: + +\begin{verbatim} + struct plugin_ctx *p_ctx = (struct plugin_ctx *)ctx->pContext; + time_t now = time(NULL); + sp->fname = p_ctx->fname; /* set the full path I want to create */ + sp->link = xxx; where xxx is p_ctx->fname with a trailing forward slash + sp->type = FT_DIREND + sp->statp.st_mode = 0700 | S_IFDIR; + sp->statp.st_ctime = now; + sp->statp.st_mtime = now; + sp->statp.st_atime = now; + sp->statp.st_size = -1; + sp->statp.st_blksize = 4096; + sp->statp.st_blocks = 1; + return bRC_OK; +\end{verbatim} + +The link field must be set with the full cononical path name, which always +ends with a forward slash. If you do not terminate it with a forward slash, +you will surely have problems later. + +As with the example that creates a file, if you are backing up a real +directory, you will want to do an stat() on the directory. + +Note, if you want the directory permissions and times to be correctly +restored, you must create the directory {\bf after} all the file directories +have been sent to Bacula. That allows the restore process to restore all the +files in a directory using default directory options, then at the end, restore +the directory permissions. If you do it the other way around, each time you +restore a file, the OS will modify the time values for the directory entry. + +\subsection{setFileAttributes(bpContext *ctx, struct restore\_pkt *rp)} +This is call not yet implemented. Called for a command plugin. + +See the definition of {\bf restre\_pkt} in the above section. + +\subsection{endRestoreFile(bpContext *ctx)} +Called when a command plugin is done restoring a file. + +\subsection{pluginIO(bpContext *ctx, struct io\_pkt *io)} +Called to do the input (backup) or output (restore) of data from or to a file +for a command plugin. These routines simulate the Unix read(), write(), open(), +close(), and lseek() I/O calls, and the arguments are passed in the packet and +the return values are also placed in the packet. In addition for Win32 systems +the plugin must return two additional values (described below). + +\begin{verbatim} + enum { + IO_OPEN = 1, + IO_READ = 2, + IO_WRITE = 3, + IO_CLOSE = 4, + IO_SEEK = 5 +}; + +struct io_pkt { + int32_t pkt_size; /* Size of this packet */ + int32_t func; /* Function code */ + int32_t count; /* read/write count */ + mode_t mode; /* permissions for created files */ + int32_t flags; /* Open flags */ + char *buf; /* read/write buffer */ + const char *fname; /* open filename */ + int32_t status; /* return status */ + int32_t io_errno; /* errno code */ + int32_t lerror; /* Win32 error code */ + int32_t whence; /* lseek argument */ + boffset_t offset; /* lseek argument */ + bool win32; /* Win32 GetLastError returned */ + int32_t pkt_end; /* end packet sentinel */ +}; +\end{verbatim} + +The particular Unix function being simulated is indicated by the {\bf func}, +which will have one of the IO\_OPEN, IO\_READ, ... codes listed above. The +status code that would be returned from a Unix call is returned in {\bf status} +for IO\_OPEN, IO\_CLOSE, IO\_READ, and IO\_WRITE. The return value for IO\_SEEK +is returned in {\bf offset} which in general is a 64 bit value. + +When there is an error on Unix systems, you must always set io\_error, and +on a Win32 system, you must always set win32, and the returned value from +the OS call GetLastError() in lerror. + +For all except IO\_SEEK, {\bf status} is the return result. In general it is +a positive integer unless there is an error in which case it is -1. + +The following describes each call and what you get and what you +should return: + +\begin{description} + \item [IO\_OPEN] + You will be passed fname, mode, and flags. + You must set on return: status, and if there is a Unix error + io\_errno must be set to the errno value, and if there is a + Win32 error win32 and lerror. + + \item [IO\_READ] + You will be passed: count, and buf (buffer of size count). + You must set on return: status to the number of bytes + read into the buffer (buf) or -1 on an error, + and if there is a Unix error + io\_errno must be set to the errno value, and if there is a + Win32 error, win32 and lerror must be set. + + \item [IO\_WRITE] + You will be passed: count, and buf (buffer of size count). + You must set on return: status to the number of bytes + written from the buffer (buf) or -1 on an error, + and if there is a Unix error + io\_errno must be set to the errno value, and if there is a + Win32 error, win32 and lerror must be set. + + \item [IO\_CLOSE] + Nothing will be passed to you. On return you must set + status to 0 on success and -1 on failure. If there is a Unix error + io\_errno must be set to the errno value, and if there is a + Win32 error, win32 and lerror must be set. + + \item [IO\_LSEEK] + You will be passed: offset, and whence. offset is a 64 bit value + and is the position to seek to relative to whence. whence is one + of the following SEEK\_SET, SEEK\_CUR, or SEEK\_END indicating to + either to seek to an absolute possition, relative to the current + position or relative to the end of the file. + You must pass back in offset the absolute location to which you + seeked. If there is an error, offset should be set to -1. + If there is a Unix error + io\_errno must be set to the errno value, and if there is a + Win32 error, win32 and lerror must be set. + + Note: Bacula will call IO\_SEEK only when writing a sparse file. + +\end{description} + +\subsection{bool checkFile(bpContext *ctx, char *fname)} +If this entry point is set, Bacula will call it after backing up all file +data during an Accurate backup. It will be passed the full filename for +each file that Bacula is proposing to mark as deleted. Only files +previously backed up but not backed up in the current session will be +marked to be deleted. If you return {\bf false}, the file will be be +marked deleted. If you return {\bf true} the file will not be marked +deleted. This permits a plugin to ensure that previously saved virtual +files or files controlled by your plugin that have not change (not backed +up in the current job) are not marked to be deleted. This entry point will +only be called during Accurate Incrmental and Differential backup jobs. + + +\section{Bacula Plugin Entrypoints} +When Bacula calls one of your plugin entrypoints, you can call back to +the entrypoints in Bacula that were supplied during the xxx plugin call +to get or set information within Bacula. + +\subsection{bRC registerBaculaEvents(bpContext *ctx, ...)} +This Bacula entrypoint will allow you to register to receive events +that are not autmatically passed to your plugin by default. This +entrypoint currently is unimplemented. + +\subsection{bRC getBaculaValue(bpContext *ctx, bVariable var, void *value)} +Calling this entrypoint, you can obtain specific values that are available +in Bacula. The following Variables can be referenced: +\begin{itemize} +\item bVarJobId returns an int +\item bVarFDName returns a char * +\item bVarLevel returns an int +\item bVarClient returns a char * +\item bVarJobName returns a char * +\item bVarJobStatus returns an int +\item bVarSinceTime returns an int (time\_t) +\item bVarAccurate returns an int +\end{itemize} + +\subsection{bRC setBaculaValue(bpContext *ctx, bVariable var, void *value)} +Calling this entrypoint allows you to set particular values in +Bacula. The only variable that can currently be set is +{\bf bVarFileSeen} and the value passed is a char * that points +to the full filename for a file that you are indicating has been +seen and hence is not deleted. + +\subsection{bRC JobMessage(bpContext *ctx, const char *file, int line, + int type, utime\_t mtime, const char *fmt, ...)} +This call permits you to put a message in the Job Report. + + +\subsection{bRC DebugMessage(bpContext *ctx, const char *file, int line, + int level, const char *fmt, ...)} +This call permits you to print a debug message. + + +\subsection{void baculaMalloc(bpContext *ctx, const char *file, int line, + size\_t size)} +This call permits you to obtain memory from Bacula's memory allocator. + + +\subsection{void baculaFree(bpContext *ctx, const char *file, int line, void *mem)} +This call permits you to free memory obtained from Bacula's memory allocator. + +\section{Building Bacula Plugins} +There is currently one sample program {\bf example-plugin-fd.c} and +one working plugin {\bf bpipe-fd.c} that can be found in the Bacula +{\bf src/plugins/fd} directory. Both are built with the following: + +\begin{verbatim} + cd + ./configure + make + ... + cd src/plugins/fd + make + make test +\end{verbatim} + +After building Bacula and changing into the src/plugins/fd directory, +the {\bf make} command will build the {\bf bpipe-fd.so} plugin, which +is a very useful and working program. + +The {\bf make test} command will build the {\bf example-plugin-fd.so} +plugin and a binary named {\bf main}, which is build from the source +code located in {\bf src/filed/fd\_plugins.c}. + +If you execute {\bf ./main}, it will load and run the example-plugin-fd +plugin simulating a small number of the calling sequences that Bacula uses +in calling a real plugin. This allows you to do initial testing of +your plugin prior to trying it with Bacula. + +You can get a good idea of how to write your own plugin by first +studying the example-plugin-fd, and actually running it. Then +it can also be instructive to read the bpipe-fd.c code as it is +a real plugin, which is still rather simple and small. + +When actually writing your own plugin, you may use the example-plugin-fd.c +code as a template for your code. + diff --git a/docs/manuals/fr/developers/regression.tex b/docs/manuals/fr/developers/regression.tex new file mode 100644 index 00000000..2d4c90ba --- /dev/null +++ b/docs/manuals/fr/developers/regression.tex @@ -0,0 +1,619 @@ +%% +%% + +\chapter{Bacula Regression Testing} +\label{_ChapterStart8} +\index{Testing!Bacula Regression} +\index{Bacula Regression Testing} +\addcontentsline{toc}{section}{Bacula Regression Testing} + +\section{General} +\index{General} +\addcontentsline{toc}{section}{General} + +This document is intended mostly for developers who wish to ensure that their +changes to Bacula don't introduce bugs in the base code. However, you +don't need to be a developer to run the regression scripts, and we +recommend them before putting your system into production, and before each +upgrade, especially if you build from source code. They are +simply shell scripts that drive Bacula through bconsole and then typically +compare the input and output with {\bf diff}. + +You can find the existing regression scripts in the Bacula developer's +{\bf git} repository on SourceForge. We strongly recommend that you {\bf +clone} the repository because afterwards, you can easily get pull the +updates that have been made. + +To get started, we recommend that you create a directory named {\bf +bacula}, under which you will put the current source code and the current +set of regression scripts. Below, we will describe how to set this up. + +The top level directory that we call {\bf bacula} can be named anything you +want. Note, all the standard regression scripts run as non-root and can be +run on the same machine as a production Bacula system (the developers run +it this way). + +To create the directory structure for the current trunk and to +clone the repository, do the following (note, we assume you +are working in your home directory in a non-root account): + +\footnotesize +\begin{verbatim} +cd +git clone git://bacula.git.sourceforge.net/gitroot/bacula bacula +\end{verbatim} +\normalsize + +This will create the directory {\bf bacula} and populate it with +three directories: {\bf bacula}, {\bf gui}, and {\bf regress}. +{\bf bacula} contains the Bacula source code; {\bf gui} contains +certain gui programs that you will not need, and {\bf regress} contains +all the regression scripts. The above should be needed only +once. Thereafter to update to the latest code, you do: + +\footnotesize +\begin{verbatim} +cd bacula +git pull +\end{verbatim} +\normalsize + +If you want to test with SQLite and it is not installed on your system, +you will need to download the latest depkgs release from Source Forge and +unpack it into {\bf depkgs}, then simply: + +\footnotesize +\begin{verbatim} +cd depkgs +make +\end{verbatim} +\normalsize + + +There are two different aspects of regression testing that this document will +discuss: 1. Running the Regression Script, 2. Writing a Regression test. + +\section{Running the Regression Script} +\index{Running the Regression Script} +\index{Script!Running the Regression} +\addcontentsline{toc}{section}{Running the Regression Script} + +There are a number of different tests that may be run, such as: the standard +set that uses disk Volumes and runs under any userid; a small set of tests +that write to tape; another set of tests where you must be root to run them. +Normally, I run all my tests as non-root and very rarely run the root +tests. The tests vary in length, and running the full tests including disk +based testing, tape based testing, autochanger based testing, and multiple +drive autochanger based testing can take 3 or 4 hours. + +\subsection{Setting the Configuration Parameters} +\index{Setting the Configuration Parameters} +\index{Parameters!Setting the Configuration} +\addcontentsline{toc}{subsection}{Setting the Configuration Parameters} + +There is nothing you need to change in the source directory. + +To begin: + +\footnotesize +\begin{verbatim} +cd bacula/regress +\end{verbatim} +\normalsize + + +The +very first time you are going to run the regression scripts, you will +need to create a custom config file for your system. +We suggest that you start by: + +\footnotesize +\begin{verbatim} +cp prototype.conf config +\end{verbatim} +\normalsize + +Then you can edit the {\bf config} file directly. + +\footnotesize +\begin{verbatim} + +# Where to get the source to be tested +BACULA_SOURCE="${HOME}/bacula/bacula" + +# Where to send email !!!!! Change me !!!!!!! +EMAIL=your-name@your-domain.com +SMTP_HOST="localhost" + +# Full "default" path where to find sqlite (no quotes!) +SQLITE3_DIR=${HOME}/depkgs/sqlite3 +SQLITE_DIR=${HOME}/depkgs/sqlite + +TAPE_DRIVE="/dev/nst0" +# if you don't have an autochanger set AUTOCHANGER to /dev/null +AUTOCHANGER="/dev/sg0" +# For two drive tests -- set to /dev/null if you do not have it +TAPE_DRIVE1="/dev/null" + +# This must be the path to the autochanger including its name +AUTOCHANGER_PATH="/usr/sbin/mtx" + +# Set your database here +#WHICHDB="--with-sqlite=${SQLITE_DIR}" +#WHICHDB="--with-sqlite3=${SQLITE3_DIR}" +#WHICHDB="--with-mysql" +WHICHDB="--with-postgresql" + +# Set this to "--with-tcp-wrappers" or "--without-tcp-wrappers" +TCPWRAPPERS="--with-tcp-wrappers" + +# Set this to "" to disable OpenSSL support, "--with-openssl=yes" +# to enable it, or provide the path to the OpenSSL installation, +# eg "--with-openssl=/usr/local" +OPENSSL="--with-openssl" + +# You may put your real host name here, but localhost is valid also +# and it has the advantage that it works on a non-newtworked machine +HOST="localhost" + +\end{verbatim} +\normalsize + +\begin{itemize} +\item {\bf BACULA\_SOURCE} should be the full path to the Bacula source code + that you wish to test. It will be loaded configured, compiled, and + installed with the "make setup" command, which needs to be done only + once each time you change the source code. + +\item {\bf EMAIL} should be your email addres. Please remember to change this + or I will get a flood of unwanted messages. You may or may not want to see + these emails. In my case, I don't need them so I direct it to the bit bucket. + +\item {\bf SMTP\_HOST} defines where your SMTP server is. + +\item {\bf SQLITE\_DIR} should be the full path to the sqlite package, must + be build before running a Bacula regression, if you are using SQLite. This + variable is ignored if you are using MySQL or PostgreSQL. To use PostgreSQL, + edit the Makefile and change (or add) WHICHDB?=``\verb{--{with-postgresql''. For + MySQL use ``WHICHDB=''\verb{--{with-mysql``. + + The advantage of using SQLite is that it is totally independent of any + installation you may have running on your system, and there is no + special configuration or authorization that must be done to run it. + With both MySQL and PostgreSQL, you must pre-install the packages, + initialize them and ensure that you have authorization to access the + database and create and delete tables. + +\item {\bf TAPE\_DRIVE} is the full path to your tape drive. The base set of + regression tests do not use a tape, so this is only important if you want to + run the full tests. Set this to /dev/null if you do not have a tape drive. + +\item {\bf TAPE\_DRIVE1} is the full path to your second tape drive, if + have one. The base set of + regression tests do not use a tape, so this is only important if you want to + run the full two drive tests. Set this to /dev/null if you do not have a + second tape drive. + +\item {\bf AUTOCHANGER} is the name of your autochanger control device. Set this to + /dev/null if you do not have an autochanger. + +\item {\bf AUTOCHANGER\_PATH} is the full path including the program name for + your autochanger program (normally {\bf mtx}. Leave the default value if you + do not have one. + +\item {\bf TCPWRAPPERS} defines whether or not you want the ./configure + to be performed with tcpwrappers enabled. + +\item {\bf OPENSSL} used to enable/disable SSL support for Bacula + communications and data encryption. + +\item {\bf HOST} is the hostname that it will use when building the + scripts. The Bacula daemons will be named -dir, -fd, + ... It is also the name of the HOST machine that to connect to the + daemons by the network. Hence the name should either be your real + hostname (with an appropriate DNS or /etc/hosts entry) or {\bf + localhost} as it is in the default file. + +\item {\bf bin} is the binary location. + +\item {\bf scripts} is the bacula scripts location (where we could find + database creation script, autochanger handler, etc.) + +\end{itemize} + +\subsection{Building the Test Bacula} +\index{Building the Test Bacula} +\index{Bacula!Building the Test} +\addcontentsline{toc}{subsection}{Building the Test Bacula} + +Once the above variables are set, you can build the Makefile by entering: + +\footnotesize +\begin{verbatim} +./config xxx.conf +\end{verbatim} +\normalsize + +Where xxx.conf is the name of the conf file containing your system parameters. +This will build a Makefile from Makefile.in, and you should not need to +do this again unless you want to change the database or other regression +configuration parameter. + + +\subsection{Setting up your SQL engine} +\index{Setting up your SQL engine} +\addcontentsline{toc}{subsection}{Setting up your SQL engine} +If you are using SQLite or SQLite3, there is nothing more to do; you can +simply run the tests as described in the next section. + +If you are using MySQL or PostgreSQL, you will need to establish an +account with your database engine for the user name {\bf regress} and +you will need to manually create a database named {\bf regress} that can be +used by user name regress, which means you will have to give the user +regress sufficient permissions to use the database named regress. +There is no password on the regress account. + +You have probably already done this procedure for the user name and +database named bacula. If not, the manual describes roughly how to +do it, and the scripts in bacula/regress/build/src/cats named +create\_mysql\_database, create\_postgresql\_database, grant\_mysql\_privileges, +and grant\_postgresql\_privileges may be of a help to you. + +Generally, to do the above, you will need to run under root to +be able to create databases and modify permissions within MySQL and +PostgreSQL. + + +\subsection{Running the Disk Only Regression} +\index{Regression!Running the Disk Only} +\index{Running the Disk Only Regression} +\addcontentsline{toc}{subsection}{Running the Disk Only Regression} + +The simplest way to copy the source code, configure it, compile it, link +it, and run the tests is to use a helper script: + +\footnotesize +\begin{verbatim} +./do_disk +\end{verbatim} +\normalsize + + + + +This will run the base set of tests using disk Volumes. +If you are testing on a +non-Linux machine several of the of the tests may not be run. In any case, +as we add new tests, the number will vary. It will take about 1 hour +and you don't need to be root +to run these tests (I run under my regular userid). The result should be +something similar to: + +\footnotesize +\begin{verbatim} +Test results + ===== auto-label-test OK 12:31:33 ===== + ===== backup-bacula-test OK 12:32:32 ===== + ===== bextract-test OK 12:33:27 ===== + ===== bscan-test OK 12:34:47 ===== + ===== bsr-opt-test OK 12:35:46 ===== + ===== compressed-test OK 12:36:52 ===== + ===== compressed-encrypt-test OK 12:38:18 ===== + ===== concurrent-jobs-test OK 12:39:49 ===== + ===== data-encrypt-test OK 12:41:11 ===== + ===== encrypt-bug-test OK 12:42:00 ===== + ===== fifo-test OK 12:43:46 ===== + ===== backup-bacula-fifo OK 12:44:54 ===== + ===== differential-test OK 12:45:36 ===== + ===== four-concurrent-jobs-test OK 12:47:39 ===== + ===== four-jobs-test OK 12:49:22 ===== + ===== incremental-test OK 12:50:38 ===== + ===== query-test OK 12:51:37 ===== + ===== recycle-test OK 12:53:52 ===== + ===== restore2-by-file-test OK 12:54:53 ===== + ===== restore-by-file-test OK 12:55:40 ===== + ===== restore-disk-seek-test OK 12:56:29 ===== + ===== six-vol-test OK 12:57:44 ===== + ===== span-vol-test OK 12:58:52 ===== + ===== sparse-compressed-test OK 13:00:00 ===== + ===== sparse-test OK 13:01:04 ===== + ===== two-jobs-test OK 13:02:39 ===== + ===== two-vol-test OK 13:03:49 ===== + ===== verify-vol-test OK 13:04:56 ===== + ===== weird-files2-test OK 13:05:47 ===== + ===== weird-files-test OK 13:06:33 ===== + ===== migration-job-test OK 13:08:15 ===== + ===== migration-jobspan-test OK 13:09:33 ===== + ===== migration-volume-test OK 13:10:48 ===== + ===== migration-time-test OK 13:12:59 ===== + ===== hardlink-test OK 13:13:50 ===== + ===== two-pool-test OK 13:18:17 ===== + ===== fast-two-pool-test OK 13:24:02 ===== + ===== two-volume-test OK 13:25:06 ===== + ===== incremental-2disk OK 13:25:57 ===== + ===== 2drive-incremental-2disk OK 13:26:53 ===== + ===== scratch-pool-test OK 13:28:01 ===== +Total time = 0:57:55 or 3475 secs + +\end{verbatim} +\normalsize + +and the working tape tests are run with + +\footnotesize +\begin{verbatim} +make full_test +\end{verbatim} +\normalsize + + +\footnotesize +\begin{verbatim} +Test results + + ===== Bacula tape test OK ===== + ===== Small File Size test OK ===== + ===== restore-by-file-tape test OK ===== + ===== incremental-tape test OK ===== + ===== four-concurrent-jobs-tape OK ===== + ===== four-jobs-tape OK ===== +\end{verbatim} +\normalsize + +Each separate test is self contained in that it initializes to run Bacula from +scratch (i.e. newly created database). It will also kill any Bacula session +that is currently running. In addition, it uses ports 8101, 8102, and 8103 so +that it does not intefere with a production system. + +Alternatively, you can do the ./do\_disk work by hand with: + +\footnotesize +\begin{verbatim} +make setup +\end{verbatim} +\normalsize + +The above will then copy the source code within +the regression tree (in directory regress/build), configure it, and build it. +There should be no errors. If there are, please correct them before +continuing. From this point on, as long as you don't change the Bacula +source code, you should not need to repeat any of the above steps. If +you pull down a new version of the source code, simply run {\bf make setup} +again. + + +Once Bacula is built, you can run the basic disk only non-root regression test +by entering: + +\footnotesize +\begin{verbatim} +make test +\end{verbatim} +\normalsize + + +\subsection{Other Tests} +\index{Other Tests} +\index{Tests!Other} +\addcontentsline{toc}{subsection}{Other Tests} + +There are a number of other tests that can be run as well. All the tests are a +simply shell script keep in the regress directory. For example the ''make +test`` simply executes {\bf ./all-non-root-tests}. The other tests, which +are invoked by directly running the script are: + +\begin{description} + +\item [all\_non-root-tests] + \index{all\_non-root-tests} + All non-tape tests not requiring root. This is the standard set of tests, +that in general, backup some data, then restore it, and finally compares the +restored data with the original data. + +\item [all-root-tests] + \index{all-root-tests} + All non-tape tests requiring root permission. These are a relatively small +number of tests that require running as root. The amount of data backed up +can be quite large. For example, one test backs up /usr, another backs up +/etc. One or more of these tests reports an error -- I'll fix it one day. + +\item [all-non-root-tape-tests] + \index{all-non-root-tape-tests} + All tape test not requiring root. There are currently three tests, all run +without being root, and backup to a tape. The first two tests use one volume, +and the third test requires an autochanger, and uses two volumes. If you +don't have an autochanger, then this script will probably produce an error. + +\item [all-tape-and-file-tests] + \index{all-tape-and-file-tests} + All tape and file tests not requiring root. This includes just about +everything, and I don't run it very often. +\end{description} + +\subsection{If a Test Fails} +\index{Fails!If a Test} +\index{If a Test Fails} +\addcontentsline{toc}{subsection}{If a Test Fails} + +If you one or more tests fail, the line output will be similar to: + +\footnotesize +\begin{verbatim} + !!!!! concurrent-jobs-test failed!!! !!!!! +\end{verbatim} +\normalsize + +If you want to determine why the test failed, you will need to rerun the +script with the debug output turned on. You do so by defining the +environment variable {\bf REGRESS\_DEBUG} with commands such as: + +\begin{verbatim} +REGRESS_DEBUG=1 +export REGRESS_DEBUG +\end{verbatim} + +Then from the "regress" directory (all regression scripts assume that +you have "regress" as the current directory), enter: + +\begin{verbatim} +tests/test-name +\end{verbatim} + +where test-name should be the name of a test script -- for example: +{\bf tests/backup-bacula-test}. + +\section{Testing a Binary Installation} +\index{Test!Testing a Binary Installation} + +If you have installed your Bacula from a binary release such as (rpms or debs), +you can still run regression tests on it. +First, make sure that your regression {\bf config} file uses the same catalog backend as +your installed binaries. Then define the variables \texttt{bin} and \texttt{scripts} variables +in your config file. + +Example: +\begin{verbatim} +bin=/opt/bacula/bin +scripts=/opt/bacula/scripts +\end{verbatim} + +The \texttt{./scripts/prepare-other-loc} will tweak the regress scripts to use +your binary location. You will need to run it manually once before you run any +regression tests. + +\begin{verbatim} +$ ./scripts/prepare-other-loc +$ ./tests/backup-bacula-test +... +\end{verbatim} + +All regression scripts must be run by hand or by calling the test scripts. +These are principally scripts that begin with {\bf all\_...} such as {\bf all\_disk\_tests}, +{\bf ./all\_test} ... +None of the +{\bf ./do\_disk}, {\bf ./do\_all}, {\bf ./nightly...} scripts will work. + +If you want to switch back to running the regression scripts from source, first +remove the {\bf bin} and {\bf scripts} variables from your {\bf config} file and +rerun the {\bf make setup} step. + +\section{Running a Single Test} +\index{Running a Single Test} +\addcontentsline{toc}{section}{Running a Single Test} + +If you wish to run a single test, you can simply: + +\begin{verbatim} +cd regress +tests/ +\end{verbatim} + +or, if the source code has been updated, you would do: + +\begin{verbatim} +cd bacula +git pull +cd regress +make setup +tests/backup-to-null +\end{verbatim} + + +\section{Writing a Regression Test} +\index{Test!Writing a Regression} +\index{Writing a Regression Test} +\addcontentsline{toc}{section}{Writing a Regression Test} + +Any developer, who implements a major new feature, should write a regression +test that exercises and validates the new feature. Each regression test is a +complete test by itself. It terminates any running Bacula, initializes the +database, starts Bacula, then runs the test by using the console program. + +\subsection{Running the Tests by Hand} +\index{Hand!Running the Tests by} +\index{Running the Tests by Hand} +\addcontentsline{toc}{subsection}{Running the Tests by Hand} + +You can run any individual test by hand by cd'ing to the {\bf regress} +directory and entering: + +\footnotesize +\begin{verbatim} +tests/ +\end{verbatim} +\normalsize + +\subsection{Directory Structure} +\index{Structure!Directory} +\index{Directory Structure} +\addcontentsline{toc}{subsection}{Directory Structure} + +The directory structure of the regression tests is: + +\footnotesize +\begin{verbatim} + regress - Makefile, scripts to start tests + |------ scripts - Scripts and conf files + |-------tests - All test scripts are here + | + |------------------ -- All directories below this point are used + | for testing, but are created from the + | above directories and are removed with + | "make distclean" + | + |------ bin - This is the install directory for + | Bacula to be used testing + |------ build - Where the Bacula source build tree is + |------ tmp - Most temp files go here + |------ working - Bacula working directory + |------ weird-files - Weird files used in two of the tests. +\end{verbatim} +\normalsize + +\subsection{Adding a New Test} +\index{Adding a New Test} +\index{Test!Adding a New} +\addcontentsline{toc}{subsection}{Adding a New Test} + +If you want to write a new regression test, it is best to start with one of +the existing test scripts, and modify it to do the new test. + +When adding a new test, be extremely careful about adding anything to any of +the daemons' configuration files. The reason is that it may change the prompts +that are sent to the console. For example, adding a Pool means that the +current scripts, which assume that Bacula automatically selects a Pool, will +now be presented with a new prompt, so the test will fail. If you need to +enhance the configuration files, consider making your own versions. + +\subsection{Running a Test Under The Debugger} +\index{Debugger} +\addcontentsline{toc}{subsection}{Running a Test Under The Debugger} +You can run a test under the debugger (actually run a Bacula daemon +under the debugger) by first setting the environment variable +{\bf REGRESS\_WAIT} with commands such as: + +\begin{verbatim} +REGRESS_WAIT=1 +export REGRESS_WAIT +\end{verbatim} + +Then executing the script. When the script prints the following line: + +\begin{verbatim} +Start Bacula under debugger and enter anything when ready ... +\end{verbatim} + +You start the Bacula component you want to run under the debugger in a +different shell window. For example: + +\begin{verbatim} +cd .../regress/bin +gdb bacula-sd +(possibly set breakpoints, ...) +run -s -f +\end{verbatim} + +Then enter any character in the window with the above message. +An error message will appear saying that the daemon you are debugging +is already running, which is the case. You can simply ignore the +error message. diff --git a/docs/manuals/fr/developers/smartall.tex b/docs/manuals/fr/developers/smartall.tex index 41f66f08..9bb13845 100644 --- a/docs/manuals/fr/developers/smartall.tex +++ b/docs/manuals/fr/developers/smartall.tex @@ -3,7 +3,7 @@ \addcontentsline{lof}{figure}{Smart Memory Allocation with Orphaned Buffer Detection} -\includegraphics{./smartall.eps} +\includegraphics{\idir smartall.eps} \chapter{Smart Memory Allocation} \label{_ChapterStart4} diff --git a/docs/manuals/fr/install/Makefile.save b/docs/manuals/fr/install/Makefile.save deleted file mode 100644 index 8a1708ab..00000000 --- a/docs/manuals/fr/install/Makefile.save +++ /dev/null @@ -1,101 +0,0 @@ -# -# -# Makefile for LaTeX -# -# To build everything do -# make tex -# make web -# make html -# make dvipdf -# -# or simply -# -# make -# - -IMAGES=../../../images - -first_rule: bacula - -bacula: tex web html dvipdf - -.SUFFIXES: .tex .html -.PHONY: -.DONTCARE: - - -tex: - @cp -fp ${IMAGES}/hires/*.eps . - touch install.idx installi-general.tex - -latex -interaction=batchmode install.tex - makeindex install.idx >/dev/null 2>/dev/null - -latex -interaction=batchmode install.tex - -pdf: - @echo "Making install pdf" - @cp -fp ${IMAGES}/hires/*.eps . - dvipdf install.dvi install.pdf - @rm -f *.eps *.old - -dvipdf: - @echo "Making install pdfm" - @cp -fp ${IMAGES}/hires/*.eps . - dvipdfm -p a4 install.dvi - @rm -f *.eps *.old - -html: - @echo "Making install html" - @cp -fp ${IMAGES}/*.eps . - @rm -f next.eps next.png prev.eps prev.png up.eps up.png - @(if [ -f imagename_translations ] ; then \ - ./translate_images.pl --from_meaningful_names install.html; \ - fi) - latex2html -white -no_subdir -split 0 -toc_stars -white -notransparent \ - install >/dev/null - ./translate_images.pl --to_meaningful_names install.html - @rm -f *.eps *.gif *.jpg *.old - -web: - @echo "Making install web" - @mkdir -p install - @rm -f install/* - @cp -fp ${IMAGES}/*.eps . - @rm -f next.eps next.png prev.eps prev.png up.eps up.png - @cp -fp ${IMAGES}/*.eps ${IMAGES}/*.png install/ - @rm -f install/next.eps install/next.png install/prev.eps install/prev.png install/up.eps install/up.png - @(if [ -f install/imagename_translations ] ; then \ - ./translate_images.pl --to_meaningful_names install/Bacula_Users_Guide.html; \ - fi) - @rm -rf install/*.html - latex2html -split 3 -local_icons -t "Developer's Guide" \ - -long_titles 4 -contents_in_nav -toc_stars -white \ - -notransparent install >/dev/null - ./translate_images.pl --to_meaningful_names install/install_Guide.html - @cp -f install/install_Guide.html install/index.html - @rm -f *.eps *.gif *.jpg install/*.eps *.old - @rm -f install/idle.png - @rm -f install/win32-*.png install/wx-console*.png install/xp-*.png - @rm -f install/*.pl install/*.log install/*.aux install/*.idx - @rm -f install/*.out WARNINGS - -texcheck: - ./check_tex.pl install.tex - -main_configs: - pic2graph -density 100 main_configs.png - -clean: - @rm -f 1 2 3 - @rm -f *.png *.gif *.jpg *.eps - @rm -f *.pdf *.aux *.cp *.fn *.ky *.log *.pg - @rm -f *.html *.backup *.pdf *.ps *.dvi *.ilg *.lof *.lot - @rm -f *.cdx *.cnd *.ddx *.ddn *.fdx *.fnd *.ind *.sdx *.snd - @rm -f *.dnd imagename_translations - @rm -f *.old WARNINGS *.out *.toc *.idx - @rm -f images.pl labels.pl internals.pl - @rm -rf install - @rm -f images.tex installi-general.tex - - -distclean: clean - @rm -f install.html install.pdf diff --git a/docs/manuals/fr/install/install.css b/docs/manuals/fr/install/install.css deleted file mode 100644 index d1824aff..00000000 --- a/docs/manuals/fr/install/install.css +++ /dev/null @@ -1,30 +0,0 @@ -/* Century Schoolbook font is very similar to Computer Modern Math: cmmi */ -.MATH { font-family: "Century Schoolbook", serif; } -.MATH I { font-family: "Century Schoolbook", serif; font-style: italic } -.BOLDMATH { font-family: "Century Schoolbook", serif; font-weight: bold } - -/* implement both fixed-size and relative sizes */ -SMALL.XTINY { font-size : xx-small } -SMALL.TINY { font-size : x-small } -SMALL.SCRIPTSIZE { font-size : smaller } -SMALL.FOOTNOTESIZE { font-size : small } -SMALL.SMALL { } -BIG.LARGE { } -BIG.XLARGE { font-size : large } -BIG.XXLARGE { font-size : x-large } -BIG.HUGE { font-size : larger } -BIG.XHUGE { font-size : xx-large } - -/* heading styles */ -H1 { } -H2 { } -H3 { } -H4 { } -H5 { } - -/* mathematics styles */ -DIV.displaymath { } /* math displays */ -TD.eqno { } /* equation-number cells */ - - -/* document-specific styles come next */ diff --git a/docs/manuals/fr/install/installation.tex b/docs/manuals/fr/install/installation.tex deleted file mode 100644 index 12989c2c..00000000 --- a/docs/manuals/fr/install/installation.tex +++ /dev/null @@ -1,1518 +0,0 @@ -%% -%% - -\chapter{Installer Bacula} -\label{_ChapterStart17} -\index[general]{Installer Bacula } -\index[general]{Bacula!Installer } -\addcontentsline{toc}{section}{Installer Bacula} - -\section{Pr\'erequis} -\index[general]{Pr\'erequis } -\addcontentsline{toc}{section}{Pr\'erequis} - -En g\'en\'eral, il vous faudra les sources de la version courante de Bacula, -et si vous souhaitez ex\'ecuter un client Windows, vous aurez besoin de la -version binaire du client Bacula pour Windows. Par ailleurs, Bacula a besoin -de certains paquetages externes (tels {\bf SQLite}, {\bf MySQL} ou {\bf -PostgreSQL}) pour compiler correctement en accord avec les options que vous -aurez choisies. Pour vous simplifier la t\^ache, nous avons combin\'e -plusieurs de ces programmes dans deux paquetages {\bf depkgs} (paquetages de -d\'ependances). Ceci peut vous simplifier la vie en vous fournissant tous les -paquets n\'ecessaires plut\^ot que de vous contraindre \`a les trouver sur la -Toile, les charger et installer. - -\section{Distribution des fichiers source} -\index[general]{fichiers source} -\index[general]{distrribution fichiers} -\addcontentsline{toc}{section}{Distribution des fichiers source} -A partir de la version 1.38.0, le code source est \'eclat\'e en quatre -fichiers tar correspondant \`a quatre modules diff\'erents dans le CVS -Bacula. Ces fichiers sont : - -\begin{description} -\item [bacula-1.38.0.tar.gz] - Il s'agit de la distribution primaire de Bacula. Pour chaque nouvelle - version, le num\'ero de version (ici, 1.38.0) sera mise \`a jour. - -\item [bacula-docs-1.38.0.tar.gz] - Ce fichier contient une copie du r\'epertoire docs, avec les documents - pr\'e-construits : R\'epertoire html anglais, fichier html unique et - fichier pdf. Les traductions allemande et fran\c {c}aise sont en cours mais - ne sont pas pr\'e-construites. - -\item [bacula-gui-1.38.0.tar.gz] - Ce fichier contient les programmes graphique en dehors du coeur - de l'application. Actuellement, il contient bacula-web, un programme - PHP pour produire une vue d'ensemble des statuts de vos jobs - Bacula consultable dans un navigateur ; et bimagemgr, un programme - qui permet de graver des images de CDROMS depuis un navigateur avec - les volumes Bacula. - -\item [bacula-rescue-1.8.1.tar.gz] - Ce fichier contient le code du CDROM de secours Bacula. Notez - que le num\'ero de version de ce paquetage n'est pas li\'e \`a celui - de Bacula. En utilisant ce code, vous pouvez graver un CDROM contenant - la configuration de votre syst\`eme et une version statiquement li\'ee du - File Daemon. Ceci peut vous permettre de repartitionner et reformater - ais\'ement vos disques durs et de recharger votre syst\`eme avec Bacula - en cas de d\'efaillance du disque dur. - -\item [winbacula-1.38.0.exe] - Ce fichier est l'installeur 32 bits Windows pour l'installation du - client Windows (File Daemon) sur une machine Windows. - A partir de la version 1.39.20, cet exécutable contiendra aussi - le Director Win32 et le Storage Daemon Win32. -\end{description} - -\label{upgrading1} - -\section{Mettre Bacula \`a jour} -\index[general]{Mettre Bacula \`a jour } -\index[general]{Jour!Mettre Bacula \`a } -\addcontentsline{toc}{section}{Mettre Bacula \`a jour} - -Si vous faites une mise \`a jour de Bacula, vous devriez d'abord lire -attentivement les ReleaseNotes de toutes les versions entre votre version -install\'ee et celle vers laquelle vous souhaitez mettre \`a jour. Si la base -de donn\'ees du catalogue a \'et\'e mise \`a jour (c'est presque toujours le cas -à chaque nouvelle version majeure), vous devrez soit -r\'einitialiser votre base de donn\'ees et repartir de z\'ero, soit en -sauvegarder une copie au format ASCII avant de proc\'eder \`a sa mise \`a -jour. Ceci est normalement fait lorsque Bacula est compil\'e et install\'e par : - -\begin{verbatim} -cd (default /etc/bacula) -./update_bacula_tables -\end{verbatim} - -Ce script de mise \`a jour peut aussi \^etre trouv\'e dans le r\'epertoire -src/cats des sources de Bacula. - -S'il y a eu plusieurs mises \`a jour de la base de donn\'ees entre votre -version et celle vers laquelle vous souhaitez \'evoluer, il faudra appliquer -chaque script de mise \`a jour de base de donn\'ees. Vous pouvez trouver tous -les anciens scripts de mise \`a jour dans le r\'epertoire {\bf upgradedb} des -sources de Bacula. Il vous faudra \'editer ces scripts pour qu'ils -correspondent \`a votre configuration. Le script final, s'il y en a un, sera -dans le r\'epertoire {\bf src/cats} comme indiqu\'e dans la ReleaseNote. - -Si vous migrez d'une version majeure vers une autre, vous devrez remplacer -tous vos composants ({\it daemons}) en m\^eme temps car, g\'en\'eralement, le -protocole inter-{\it daemons} aura chang\'e. Par contre, entre deux versions -mineures d'une m\^eme majeure (par exemple les versions 1.32.x), \`a moins -d'un bug, le protocole inter-{\it daemons} ne changera pas. Si cela vous -semble confus, lisez simplement les ReleaseNotes tr\`es attentivement, elles -signaleront si les {\it daemons} doivent \^etre mis \`a jour simultan\'ement. - -Enfin, notez qu'il n'est g\'en\'eralement pas n\'ecessaire d'utiliser -{\bf make uninstall} avant de proc\'eder \`a une mise \`a jour. En fait, si vous le -faites vous effacerez probablement vos fichiers de configuration, ce qui -pourrait \^etre d\'esastreux. La proc\'edure normale de mise \`a jour est simplement : -\begin{verbatim} -./configure (your options) -make -make install -\end{verbatim} - - En principe, aucun de vos fichiers .conf ou .sql ne devrait \^etre \'ecras\'e, - et vous devez exécuter les deux commandes {\bf make} et {\bf make install}. - {\bf make install} sans un {\bf make} préalable ne fonctionnera pas. - -Pour plus d'informations sur les mises \`a jour, veuillez consulter la partie -\ilink{Upgrading Bacula Versions}{upgrading} du chapitre Astuces de ce manuel - -\section{Paquetage de D\'ependences} -\label{Dependency} -\index[general]{Paquetage de D\'ependences} -\index[general]{Paquetage!D\'ependences} -\addcontentsline{toc}{section}{Paquetage de D\'ependences} - -Comme nous l'\'evoquions plus haut, nous avons combin\'e une s\'erie de -programmes dont Bacula peut avoir besoin dans les paquets {\bf depkgs} et {\bf -depkgs1}. Vous pouvez, bien sur, obtenir les paquets les plus r\'ecents -directement des auteurs. Le fichier README dans chaque paquet indique o\`u les -trouver. Pourtant, il faut noter que nous avons test\'e la compatibilit\'e des -paquets contenus dans les fichiers depkgs avec Bacula. - -Vous pouvez, bien sur, obtenir les dernieres versions de ces paquetages de -leurs auteurs. Les r\'ef\'erences n\'ecessaires figurent dans le README de -chaque paquet. Quoi qu'il en soit, soyez conscient du fait que nous avons -test\'e la compatibilit\'e des paquetages des fichiers depkgs. - -Typiquement, un paquetage de d\'ependances sera nomm\'e {\bf -depkgs-ddMMMyy.tar.gz} et {\bf depkgs1-ddMMMyy.tar.gz} o\`u {\bf dd} est le -jour o\`u n'ous l'avons publi\'e, {\bf MMM} l'abbr\'eviation du mois et {\bf -yy} l'ann\'ee. Par exemple: {\bf depkgs-07Apr02.tar.gz}. Pour installer et -construire ce paquetage (s'il est requis), vous devez: - -\begin{enumerate} -\item Cr\'eer un r\'epertoire {\bf bacula}, dans lequel vous placerez les - sources de Bacula et le paquetage de d\'ependances. -\item D\'esarchiver le {\bf depkg} dans le r\'epertoire {\bf bacula}. -\item vous d\'eplacer dans le r\'epertoire obtenu: cd bacula/depkgs -\item ex\'ecuter make - \end{enumerate} - -La composition exacte des paquetages de d\'ependance est susceptible de -changer de temps en temps, voici sa composition actuelle : - -\begin{longtable}{|l|l|l|} - \hline -\multicolumn{1}{|c| }{\bf Paquets externes } & \multicolumn{1}{c| }{\bf depkgs -} & \multicolumn{1}{c| }{\bf depkgs1 } \\ - \hline -{SQLite } & \multicolumn{1}{c| }{X } & \multicolumn{1}{c| }{- } \\ - \hline -{SQLite3 } & \multicolumn{1}{c| }{X } & \multicolumn{1}{c| }{- } \\ - \hline -{mtx } & \multicolumn{1}{c| }{X } & \multicolumn{1}{c| }{- } \\ - \hline -{readline } & \multicolumn{1}{c| }{- } & \multicolumn{1}{c| }{X } \\ - \hline -{pthreads } & \multicolumn{1}{c| }{- } & \multicolumn{1}{c| }{- } \\ - \hline -{zlib } & \multicolumn{1}{c| }{- } & \multicolumn{1}{c| }{- } \\ - \hline -{wxWidgets } & \multicolumn{1}{c| }{- } & \multicolumn{1}{c| }{- } \\ -\hline - -\end{longtable} - -Notez que certains de ces paquets sont de taille respectable, si bien que -l'\'etape de compilation peut prendre un certain temps. Les instructions -ci-dessous construiront tous les paquets contenus dans le r\'epertoire. -Cependant, la compilation de Bacula, ne prendra que les morceaux dont Bacula a -effectivement besoin. - -Une alternative consiste \`a ne construire que les paquets n\'ecessaires. Par -exemple, - -\footnotesize -\begin{verbatim} -cd bacula/depkgs -make sqlite -\end{verbatim} -\normalsize - -configurera et construira SQLite et seulement SQLite. - -Vous devriez construire les paquets requis parmi {\bf depkgs} et/ou {\bf -depkgs1} avant de configurer et compiler Bacula car Bacula en aura besoin -d\`es la compilation. - -M\^eme si vous n'utilisez pas SQLite, vous pourriez trouver le paquet {\bf -depkgs} pratique pour construire {\bf mtx} car le programme {\bf tapeinfo} qui -vient avec peut souvent vous fournir de pr\'ecieuses informations sur vos -lecteurs de bandes SCSI (e.g. compression, taille min/max des blocks,...). - -Le paquet {\bf depkgs-win32} est obsolète à partir de la version 1.39 de Bacula. -Il était autrefois utilisé pour compiler le client natif Win32 qui est -désormais construit sur Linux grâce à un mécanisme de compilation croisée. -Tous les outils et librairies tierces sont automatiquement téléchargées -par l'exécution de scripts apropriés. Lisez le fichier src/win32/README.mingw32 -pour plus de détails. - -\section{Syst\`emes Support\'es} -\label{Systems} -\index[general]{Syst\`emes Support\'es } -\addcontentsline{toc}{section}{Syst\`emes Support\'es} - -Veuillez consulter la section -\ilink{ Syst\`emes support\'es}{SupportedOSes} du chapitre -D\'emarrer avec Bacula de ce manuel. - -\section{Construire Bacula \`a partir des sources} -\label{Building} -\index[general]{Construire Bacula \`a partir des sources } -\index[general]{Sources!Construire Bacula \`a partir des } -\addcontentsline{toc}{section}{Construire Bacula \`a partir des sources} - -L'installation basique est plut\^ot simple. - -\begin{enumerate} -\item Installez et construisez chaque {\bf depkgs} comme indiqu\'e plus haut. - - -\item Configurez et installez MySQL ou PostgreSQL (si vous le souhaitez): - \ilink{Installer et configurer MySQL Phase I}{_ChapterStart} ou - \ilink{Installer et configurer PostgreSQL Phase -I}{_ChapterStart10}. Si vous installez depuis des rpms, et -utilisez MySQL, veillez \`a installer {\bf mysql-devel}, afin que les -fichiers d'en-t\^etes de MySQL soient disponibles pour la compilation de -Bacula. De plus, la librairie client MySQL requi\`ert la librairie de -compression gzip {\bf libz.a} ou {\bf libz.so}. Ces librairies sont dans le -paquet {\bf libz-devel}. Sur Debian, vous devrez charger le paquet {\bf -zlib1g-dev}. Si vous n'utilisez ni rpms, ni debs, il vous faudra trouver le -paquetage adapt\'e \`a votre syst\`eme. - -Notez que si vous avez dej\`a MySQL -ou PostgreSQL sur votre syst\`eme vous pouvez sauter cette phase pourvu que -vous ayez construit "the thread safe libraries'' et que vous ayez d\'ej\`a -install\'e les rpms additionnels sus-mentionn\'es. - -\item En alternative \`a MySQL et PostgreSQL, configurez et installez SQLite, - qui fait partie du paquetage {\bf depkgs}. - \ilink{Installer et configurer SQLite}{_ChapterStart33}. - SQLite n'est probablement pas adapt\'e \`a un environnement de production - de taille respectable, en raison de sa lenteur par rapport \`a MySQL, et de la - pauvret\'e de ses outils de reconstruction de base de donn\'ees endommag\'ee. - -\item D\'esarchivez les sources de Bacula, de pr\'ef\'erence dans le - r\'epertoire {\bf bacula} \'evoqu\'e ci-dessus. - -\item D\'eplacez-vous dans ce r\'epertoire. - -\item Ex\'ecutez ./configure (avec les options appropri\'ees comme d\'ecrit - ci-dessus) - -\item Examinez tr\`es attentivement la sortie de ./configure, - particuli\`erement les r\'epertoires d'installation des binaires et des - fichiers de configuration. La sortie de ./configure est stock\'ee dans le -fichier {\bf config.out} et peut \^etre affich\'ee \`a volont\'e sans -relancer ./configure par la commande {\bf cat config.out}. - -\item Vous pouvez relancer ./configure avec des options diff\'erentes apr\`es - une premi\`ere ex\'ecution, cela ne pose aucun probl\`eme, mais vous devriez - d'abord ex\'ecuter: - -\footnotesize -\begin{verbatim} - make distclean -\end{verbatim} -\normalsize - -afin d'\^etre certain de repartir de z\'ero et d'\'eviter d'avoir un m\'elange -avec vos premi\`eres options. C'est n\'ecessaire parce que ./configure met -en cache une bonne partie des informations. {\bf make distclean} est aussi -recommand\'e si vous d\'eplacez vos fichiers source d'une machine \`a une -autre. Si {\bf make distclean} \'echoue, ignorez-le et continuez. - -\item make - - Si vous obtenez des erreurs durant le {\it linking} dans le r\'epertoire du -Storage Daemon (/etc/stored), c'est probablement parce que vous avez charg\'e -la librairie statique sur votre syst\`eme. J'ai remarqu\'e ce probl\`eme sur -un Solaris. Pour le corriger, assurez-vous de ne pas avoir ajout\'e l'option -{\bf \verb{--{enable-static-tools} \`a la commande {\bf ./configure}. - -Si vous ignorez cette \'etape ({\bf make}) et poursuivez imm\'ediatement avec -{\bf make install}, vous commettez deux erreurs s\'erieuses : d'abord, votre -installation va \'echouer car Bacula a besoin d'un {\bf make} avant un -{\bf make install} ; ensuite, vous vous privez de la possibilit\'e de vous -assurer qu'il n'y a aucune erreur avant de commencer \`a \'ecrire les fichiers dans -vos r\'epertoires syst\`eme. - -\item make install -Avant de lancer cette commande, v\'erifiez consciencieusement que vous avez bien -ex\'ecut\'e la commande {\bf make} et que tout a \'et\'e compil\'e proprement et li\'e -sans erreur. - -\item Si vous \^etes un nouvel utilisateur de Bacula, nous vous recommandons - {\bf fortement} de sauter l'\'etape suivante et d'utiliser le fichier de - configuration par d\'efaut, puis d'ex\'ecuter le jeu d'exemples du prochain -chapitre avant de revenir modifier vos fichier de configuration pour qu'ils -satisfassent vos besoins. - -\item Modifiez les fichiers de configuration de chacun des trois {\it daemons} - (Directory, File, Storage) et celui de la Console. Pour plus de d\'etails, - consultez le chapitre -\ilink{Fichiers de Configuration de Bacula}{_ChapterStart16} Nous -vous recommandons de commencer par modifier les fichiers de configuration -fournis par d\'efaut, en faisant les changements minima indispensables. Vous -pourrez proc\'eder \`a une adaptation compl\`ete une fois que Bacula -fonctionnera correctement. Veuillez prendre garde \`a modifier les mots de -passe qui sont g\'en\'er\'es al\'eatoirement, ainsi que les noms car ils -doivent s'accorder entre les fichiers de configuration pour des raisons de -s\'ecurit\'e. - -\item Cr\'eez la base de donn\'ees Bacula MySQL et ses tables (si vous - utilisez MySQL) - \ilink{Installer et configurer MySQL Phase II}{mysql_phase2} ou -cr\'eez la base de donn\'ees Bacula PostgreSQL et ses tables -\ilink{Installer et configurer PostgreSQL Phase -II}{PostgreSQL_phase2} (si vous utilisez PostgreSQL) ou -encore -\ilink{Installer et configurer SQLite Phase II}{phase2} (si vous -utilisez SQLite) - -\item D\'emarrez Bacula ({\bf ./bacula start}) Notez: Le prochain chapitre - expose ces \'etapes en d\'etail. - -\item Lancez la Console pour communiquer avec Bacula. - -\item Pour les deux \'el\'ements pr\'ec\'edents, veuillez suivre les - instructions du chapitre - \ilink{Ex\'ecuter Bacula}{_ChapterStart1} o\`u vous ferez une -simple sauvegarde et une restauration. Faites ceci avant de faire de lourdes -modifications aux fichiers de configuration, ainsi vous serez certain que -Bacula fonctionne, et il vous sera plus familier. Apr\`es quoi il vous sera -plus facile de changer les fichiers de configuration. -\item Si apr\`es l'installation de Bacula, vous d\'ecidez de le d\'eplacer, - c'est \`a dire de l'installer dans un jeu de r\'epertoires diff\'erents, - proc\'edez comme suit : - -\footnotesize -\begin{verbatim} - make uninstall - make distclean - ./configure (vos-nouvelles-options) - make - make install - -\end{verbatim} -\normalsize - -\end{enumerate} - -Si tout se passe bien, {\bf ./configure} d\'eterminera correctement votre -syst\`eme et configurera correctement le code source. Actuellement, FreeBSD, -Linux (RedHat), et Solaris sont support\'es. Des utilisateurs rapportent que -le client Bacula fonctionne sur MacOS X 10.3 tant que le support readline est -d\'esactiv\'e. - -Si vous installez Bacula sur plusieurs syst\`emes identiques, vous pouvez -simplement transf\'erer le r\'epertoire des sources vers ces autres syst\`emes -et faire un "make install''. Cependant s'il y a des diff\'erences dans les -librairies, ou les versions de syst\`emes, ou si vous voulez installer sur un -syst\`eme diff\'erent, vous devriez recommencer \`a partir de l'archive tar -compress\'ee originale. Si vous transf\'erez un r\'epertoire de sources o\`u -vous avez d\'ej\`a ex\'ecut\'e la commande ./configure, vous DEVEZ faire: - -\footnotesize -\begin{verbatim} -make distclean -\end{verbatim} -\normalsize - -avant d'ex\'ecuter \`a nouveau ./configure. Ceci est rendu n\'ecessaire par -l'outil GNU autoconf qui met la configuration en cache, de sorte que si vous -r\'eutilisez la configuration d'une machine Linux sur un Solaris, vous pouvez -\^etre certain que votre compilation \'echouera. Pour l'\'eviter, comme -mentionn\'e plus haut, recommencez depuis l'archive tar, ou faites un "make -distclean''. - -En g\'en\'eral, vous voudrez probablement sophistiquer votre {\bf configure} -pour vous assurer que tous les modules que vous souhaitez soient construits et -que tout soit plac\'e dans les bons r\'epertoires. - -Par exemple, sur Fedora, RedHat ou SuSE, on pourrait utiliser ceci: - -\footnotesize -\begin{verbatim} -CFLAGS="-g -Wall" \ - ./configure \ - --sbindir=$HOME/bacula/bin \ - --sysconfdir=$HOME/bacula/bin \ - --with-pid-dir=$HOME/bacula/bin/working \ - --with-subsys-dir=$HOME/bacula/bin/working \ - --with-mysql \ - --with-working-dir=$HOME/bacula/bin/working \ - --with-dump-email=$USER -\end{verbatim} -\normalsize - -Notez: l'avantage de cette configuration pour commencer, est que tout sera mis -dans un seul r\'epertoire, que vous pourrez ensuite supprimer une fois que -vous aurez ex\'ecut\'e les exemples du prochain chapitre, et appris comment -fonctionne Bacula. De plus, ceci peut \^etre install\'e et ex\'ecut\'e sans -\^etre root. - -Pour le confort des d\'eveloppeurs, j'ai ajout\'e un script {\bf -defaultconfig} au r\'epertoire {\bf examples}. Il contient les r\'eglages que -vous devriez normalement utiliser, et chaque d\'eveloppeur/utilisateur devrait -le modifier pour l'accorder \`a ses besoins. Vous trouverez d'autres exemples -dans ce r\'epertoire. - -Les options {\bf \verb{--{enable-conio} ou {\bf \verb{--{enable-readline} sont utiles car -elles conf\`erent un historique de lignes de commandes et des capacit\'es -d'\'edition \`a la Console. Si vous avez inclus l'une ou l'autre option, l'un -des deux paquets {\bf termcap} ou {\bf ncurses} sera n\'ecessaire pour -compiler. Sur la plupart des syst\`emes, y compris RedHat et SuSE, vous -devriez inclure le paquet ncurses. Si Le processus de configuration de -Bacula le d\'etecte, il l'utilisera plut\^ot que la librairie termcap. -Sur certains syst\`emes, tels que SUSE, la librairie termcap n'est -pas dans le r\'epertoire standard des librairies par cons\'equent, l'option -devrait \^etre d\'esactiv\'ee ou vous aurez un message tel que: - -\footnotesize -\begin{verbatim} -/usr/lib/gcc-lib/i586-suse-linux/3.3.1/.../ld: -cannot find -ltermcap -collect2: ld returned 1 exit status -\end{verbatim} -\normalsize - -lors de la compilation de la Console Bacula. Dans ce cas, il vous faudra -placer la variable d'environnement {\bf LDFLAGS} avant de compiler. - -\footnotesize -\begin{verbatim} -export LDFLAGS="-L/usr/lib/termcap" -\end{verbatim} -\normalsize - -Les m\^emes contraintes de librairies s'appliquent si vous souhaitez utiliser -les sous-programmes readlines pour l'\'edition des lignes de commande et -l'historique, ou si vous utilisez une librairie MySQL qui requiert le -chiffrement. Dans ce dernier cas, vous pouvez exporter les librairies -additionnelles comme indiqu\'e ci-dessus ou, alternativement, les inclure -directement en param\`etres de la commande ./configure comme ci-dessous : - - \footnotesize - \begin{verbatim} - LDFLAGS="-lssl -lcyrpto" \ - ./configure - \end{verbatim} -\normalsize - - -Veuillez noter que sur certains syst\`emes tels que Mandriva, readline tend -\`a "avaler'' l'invite de commandes, ce qui le rend totalement inutile. Si -cela vous arrive, utilisez l'option "disable'', ou si vous utilisez une -version post\'erieure \`a 1.33 essayez {\bf \verb{--{enable-conio} pour utiliser une -alternative \`a readline int\'egr\'ee. Il vous faudra tout de m\^eme termcap -ou ncurses, mais il est peu probable que le paquetage {\bf conio} gobe vos -invites de commandes. - -Readline n'est plus support\'e depuis la version 1.34. Le code reste -disponible, et si des utilisateurs soumettent des patches, je serai heureux de -les appliquer. Cependant, \'etant donn\'e que chaque version de readline -semble incompatible avec les pr\'ec\'edentes, et qu'il y a des diff\'erences -significatives entre les syst\`emes, je ne puis plus me permettre de le -supporter. - -\section{Quelle base de donn\'ees utiliser ?} -\label{DB} -\index[general]{Utiliser!Quelle base de donn\'ees } -\index[general]{Quelle base de donn\'ees utiliser ? } -\addcontentsline{toc}{section}{Quelle base de donn\'ees utiliser ?} - -Avant de construire Bacula, vous devez d\'ecider si vous voulez utiliser -SQLite, MySQL ou PostgreSQL. Si vous n'avez pas d\'ej\`a MySQL ou PostgreSQL -sur votre machine, nous vous recommandons de d\'emarrer avec SQLite. Ceci vous -facilitera beaucoup l'installation car SQLite est compil\'e dans Bacula et ne -requiert aucune administration. SQLite fonctionne bien et sied bien aux -petites et moyennes configurations (maximum 10-20 machines). Cependant, il nous -faut signaler que plusieurs utilisateurs ont subi des corruptions inexpliqu\'ees -de leur catalogue SQLite. C'est pourquoi nous recommandons de choisir MySQL -ou PostgreSQL pour une utilisation en production. - -Si vous souhaitez utiliser MySQL pour votre catalogue Bacula, consultez le -chapitre -\ilink{Installer et Configurer MySQL}{_ChapterStart} de ce manuel. -Vous devrez installer MySQL avant de poursuivre avec la configuration de -Bacula. MySQL est une base de donn\'ees de haute qualit\'e tr\`es efficace et -qui convient pour des configurations de toutes tailles. MySQL est -l\'eg\`erement plus complexe \`a installer et administrer que SQLite en raison -de ses nombreuses fonctions sophistiqu\'ees telles que userids et mots de -passe. MySQL fonctionne en tant que processus distinct, est r\'eellement une -solution professionnelle et peut prendre en charge des bases de donn\'ees de -dimension quelconque. - -Si vous souhaitez utiliser PostgreSQL pour votre catalogue Bacula, consultez -le chapitre -\ilink{Installer et Configurer PostgreSQL}{_ChapterStart10} de ce -manuel. Vous devrez installer PostgreSQL avant de poursuivre avec la -configuration de Bacula. PostgreSQL est tr\`es similaire \`a MySQL bien que -tendant \`a \^etre un peu plus conforme \`a SQL92. PostgreSQL poss\`ede -beaucoup plus de fonctions avanc\'ees telles que les transactions, les -proc\'edures stock\'ees, etc. PostgreSQL requiert une certaine connaissance -pour son installation et sa maintenance. - -Si vous souhaitez utiliser SQLite pour votre catalogue Bacula, consultez le -chapitre -\ilink{Installer et Configurer SQLite}{_ChapterStart33} de ce manuel. - -\section{D\'emarrage rapide} -\index[general]{D\'emarrage rapide } -\index[general]{Rapide!D\'emarrage } -\addcontentsline{toc}{section}{D\'emarrage rapide} - -Il y a de nombreuses options et d'importantes consid\'erations donn\'ees -ci-dessous que vous pouvez passer pour le moment si vous n'avez eu aucun -probl\`eme lors de la compilation de Bacula avec une configuration -simplifi\'ee comme celles montr\'ees plus haut. - -Si le processus ./configure ne parvient pas \`a trouver les librairies -sp\'ecifiques (par exemple libintl), assurez vous que le paquetage appropri\'e -est install\'e sur votre syst\`eme. S'il est install\'e dans un r\'epertoire non -standard (au moins pour Bacula), il existe dans la plupart des cas une -option parmi celles \'enum\'er\'ees ci-dessous (ou avec "./configure {-}{-}help") -qui vous permettra de sp\'ecifier un r\'epertoire de recherche. D'autres options -vous permettent de d\'esactiver certaines fonctionnalit\'es (par exemple -{-}{-}disable-nls). - -Si vous souhaitez vous jeter \`a l'eau, nous vous conseillons de passer -directement au chapitre suivant, et d'ex\'ecuter le jeu d'exemples. Il vous -apprendra beaucoup sur Bacula, et un Bacula de test peut \^etre install\'e -dans un unique r\'epertoire (pour une destruction ais\'ee) et ex\'ecut\'e sans -\^etre root. Revenez lire les d\'etails de ce chapitre si vous avez un -quelconque probl\`eme avec les exemples, ou lorsque vous voudrez effectuer une -installation r\'eelle. - -TAQUET MISE A JOUR - -\section{Options de la commande {\bf configure}} -\label{Options} -\index[general]{Options de la commande configure } -\index[general]{Configure!Options de la commande } -\addcontentsline{toc}{section}{Options de la commande configure} - -Les options en ligne de commande suivantes sont disponibles pour {\bf -configure} afin d'adapter votre installation \`a vos besoins. - -\begin{description} - -\item [{-}{-}sysbindir=\lt{}binary-path\gt{}] - \index[dir]{{-}{-}sysbindir } - D\'efinit l'emplacement des binaires Bacula. - -\item [{-}{-}sysconfdir=\lt{}config-path\gt{}] - \index[dir]{{-}{-}sysconfdir } - D\'efinit l'emplacement des fichiers de configuration de Bacula. - -\item [ {-}{-}mandir=\lt{}path\gt{}] - \index[general]{{-}{-}mandir} - Notez qu'\`a partir de la version 1.39.14, tout chemin sp\'ecifi\'e - est d\'esormais compris comme le niveau le plus \'elev\'e du - r\'epertoire man. Pr\'ec\'edemment, le {\bf mandir} sp\'ecifiait le - chemin absolu o\`u vous souhaitiez instaler les pages de manuel. - Les fichiers man sont install\'es au format gzipp\'e sous - mandir/man1 et mandir/man8 comme il convient. - Pour que l'installation se d\'eroule normalement, vous devez - disposer de {\bf gzip} sur votre syst\`eme - - Par d\'efaut, Bacula installe une simple page de manuel dans - /usr/share/man. Si vous voulez qu'elle soit install\'ee ailleurs, - utilisez cette options pour sp\'ecifier le chemin voulu. Notez - que les principaux documents Bacula en HTML et PDF sont dans une - archive tar distincte des sources de distribution de Bacula. - -\item [ {-}{-}datadir=\lt{}path\gt{}] - \index[general]{{-}{-}datadir} - Si vous traduisez Bacula ou des parties de Bacula dans une autre - langue, vous pouvez sp\'ecifier l'emplacement des fichiers .po avec - l'option {\bf {-}{-}datadir}. Vous devez installer manuellement tout - fichier .po qui n'est pas (encore) install\'e automatiquement. - -\item [{-}{-}enable-smartalloc ] - \index[dir]{{-}{-}enable-smartalloc } - Permet l'inclusion du code Smartalloc de d\'etection de tampons orphelins -(NDT : orphaned buffer). Cette option est vivement recommand\'ee. Nous n'avons -jamais compil\'e sans elle, aussi vous pourriez subir des d\'esagr\'ements si -vous ne l'activez pas. Dans ce cas, r\'eactivez simplement cette option. Nous -la recommandons car elle aide \`a d\'etecter les fuites de m\'emoire. Ce -param\`etre est utilis\'e lors de la compilation de Bacula. - -\item [{-}{-}enable-gnome ] - \index[dir]{{-}{-}enable-gnome } - Si vous avez install\'e GNOME sur votre ordinateur, vous devez sp\'ecifier -cette option pour utiliser la Console graphique GNOME. Vous trouverez les -binaires dans le r\'epertoire {\bf src/gnome-console}. - -\item [{-}{-}enable-bwx-console ] - \index[general]{{-}{-}enable-bwx-console } - Si vous avez install\'e wxWidgets sur votre ordinateur, vous devez -sp\'ecifier cette option pour utiliser la Console graphique bwx-console. Vous -trouverez les binaires dans le r\'epertoire {\bf src/wx-console}. Ceci peut -\^etre utile aux utilisateurs qui veulent une Console graphique, mais ne -souhaitent pas installer Gnome, car wxWidgets peut fonctionner avec les -librairies GTK+, Motif ou m\^eme X11. - -\item [{-}{-}enable-tray-monitor ] - \index[general]{{-}{-}enable-tray-monitor } - Si vous avez install\'e GTK sur votre ordinateur et utilisez un gestionnaire -de fen\^etre compatible avec le syst\`eme de notification standard FreeDesktop -(tels KDE et GNOME), vous pouvez utiliser une interface graphique pour -surveiller les {\it daemons} Bacula en activant cette option. Les binaires -seront plac\'es dans le r\'epertoire {\bf src/tray-monitor}. - -\item [{-}{-}enable-static-tools] - \index[general]{{-}{-}enable-static-tools } - Avec cette option, les utilitaires relatifs au Storage Daemon ({\bf bls}, -{\bf bextract}, et {\bf bscan}) seront li\'es statiquement, ce qui vous permet -de les utiliser m\^eme si les librairies partag\'ees ne sont pas charg\'ees. -Si vous avez des difficult\'es de type "linking'' \`a la compilation du -r\'epertoire {\bf src/stored}, assurez-vous d'avoir d\'esactiv\'e cette -option, en ajoutant \'eventuellement {\bf \verb{--{disable-static-tools}. - -\item [{-}{-}enable-static-fd] - \index[fd]{{-}{-}enable-static-fd } - Avec cette option, la compilation produira un {\bf static-bacula-fd} en plus -du File Daemon standard. Cette version qui inclut les librairies statiquement -li\'ees est requise pour la reconstruction compl\`ete d'une machine apr\`es -un d\'esastre. Cette option est largement surpass\'ee par l'usage de {\bf -make static-bacula-fd} du r\'epertoire {\bf src/filed}. L'option {\bf -\verb:--:enable-client-only} d\'ecrite plus loin est aussi int\'eressante -pour compiler un simple client sans les autres parties du programme. - -Pour lier un binaire statique, l'\'editeur de liens a besoin des versions -statiques de toutes les librairies utilis\'ees, aussi les utilisateurs -rencontrent fr\'equemment des erreurs d'\'edition de liens \`a l'utilisation -de cette option. La premi\`ere chose \`a faire est de s'assurer d'avoir la -librairie glibc statiquement li\'ee sur votre syst\`eme. Ensuite, il faut -s'assurer de ne pas utiliser les options {\bf {-}{-}openssl} ou -{\bf {-}{-}with-python} de la commande configure, car elle requierent des -librairies suppl\'ementaires. Vous devriez pouvoir activer ces options, mais -il vous faudra charger les librairies statiques additionnelles correspondantes. - -\item [{-}{-}enable-static-sd] - \index[sd]{{-}{-}enable-static-sd } - Avec cette option, la compilation produira un {\bf static-bacula-sd} en plus -du Storage Daemon standard. Cette version qui inclut les librairies -statiquement li\'ees peut se r\'ev\'eler utile pour la reconstruction -compl\`ete d'une machine apr\`es un d\'esastre. - -Pour lier un binaire statique, l'\'editeur de liens a besoin des versions -statiques de toutes les librairies utilis\'ees, aussi les utilisateurs -rencontrent fr\'equemment des erreurs d'\'edition de liens \`a l'utilisation -de cette option. La premi\`ere chose \`a faire est de s'assurer d'avoir la -librairie glibc statiquement li\'ee sur votre syst\`eme. Ensuite, il faut -s'assurer de ne pas utiliser les options {\bf {-}{-}openssl} ou -{\bf {-}{-}with-python} de la commande configure, car elle requierent des -librairies suppl\'ementaires. Vous devriez pouvoir activer ces options, mais -il vous faudra charger les librairies statiques additionnelles correspondantes. - -\item [{-}{-}enable-static-dir] - \index[dir]{{-}{-}enable-static-dir } - Avec cette option, la compilation produira un {\bf static-bacula-dir} en plus -du Director Daemon standard. Cette version qui inclut les librairies -statiquement li\'ees peut se r\'ev\'eler utile pour la reconstruction -compl\`ete d'une machine apr\`es un d\'esastre. - -Pour lier un binaire statique, l'\'editeur de liens a besoin des versions -statiques de toutes les librairies utilis\'ees, aussi les utilisateurs -rencontrent fr\'equemment des erreurs d'\'edition de liens \`a l'utilisation -de cette option. La premi\`ere chose \`a faire est de s'assurer d'avoir la -librairie glibc statiquement li\'ee sur votre syst\`eme. Ensuite, il faut -s'assurer de ne pas utiliser les options {\bf {-}{-}openssl} ou -{\bf {-}{-}with-python} de la commande configure, car elle requierent des -librairies suppl\'ementaires. Vous devriez pouvoir activer ces options, mais -il vous faudra charger les librairies statiques additionnelles correspondantes. - -\item [{-}{-}enable-static-cons] - \index[dir]{{-}{-}enable-static-cons } - Avec cette option, la compilation produira une {\bf static-console} et une -{\bf static-gnome-console} en plus de la Console standard standard. Cette -version qui inclut les librairies statiquement li\'ees peut se r\'ev\'eler -utile pour la reconstruction compl\`ete d'une machine apr\`es un d\'esastre. - -Pour lier un binaire statique, l'\'editeur de liens a besoin des versions -statiques de toutes les librairies utilis\'ees, aussi les utilisateurs -rencontrent fr\'equemment des erreurs d'\'edition de liens \`a l'utilisation -de cette option. La premi\`ere chose \`a faire est de s'assurer d'avoir la -librairie glibc statiquement li\'ee sur votre syst\`eme. Ensuite, il faut -s'assurer de ne pas utiliser les options {\bf {-}{-}openssl} ou -{\bf {-}{-}with-python} de la commande configure, car elle requierent des -librairies suppl\'ementaires. Vous devriez pouvoir activer ces options, mais -il vous faudra charger les librairies statiques additionnelles correspondantes. - -\item [{-}{-}enable-client-only] - \index[general]{{-}{-}enable-client-only } - Avec cette option, la compilation produira seulement le File Daemon et les -librairies qui lui sont n\'ecessaires. Aucun des autres {\it daemons}, outils -de stockage, ni la console ne sera compil\'e. De m\^eme, un {\bf make -install} installera seulement le File Daemon. Pour obtenir tous les {\it -daemons}, vous devez la d\'esactiver. Cette option facilite grandement la -compilation sur les simples clients. - -Pour lier un binaire statique, l'\'editeur de liens a besoin des versions -statiques de toutes les librairies utilis\'ees, aussi les utilisateurs -rencontrent fr\'equemment des erreurs d'\'edition de liens \`a l'utilisation -de cette option. La premi\`ere chose \`a faire est de s'assurer d'avoir la -librairie glibc statiquement li\'ee sur votre syst\`eme. Ensuite, il faut -s'assurer de ne pas utiliser les options {\bf {-}{-}openssl} ou -{\bf {-}{-}with-python} de la commande configure, car elle requierent des -librairies suppl\'ementaires. Vous devriez pouvoir activer ces options, mais -il vous faudra charger les librairies statiques additionnelles correspondantes. - -\item [ {-}{-}enable-build-dird] - \index[general]{{-}{-}enable-build-dird} -Avec cette option activ\'ee (ce qui est le cas par d\'efaut), le processus make -compile le Director ainsi que les outils du Director. Vous pouvez d\'esactiver -la compilation du Director en utilisant {\bf {-}{-}disable-build-dird}. - -\item [ {-}{-}enable-build-stored] - \index[general]{{-}{-}enable-build-stored} -Avec cette option activ\'ee (ce qui est le cas par d\'efaut), le processus make -compile le Storage Daemon. Vous pouvez d\'esactiver -la compilation du Storage Daemon en utilisant {\bf {-}{-}disable-build-stored}. - -\item [{-}{-}enable-largefile] - \index[general]{{-}{-}enable-largefile } - Cette option (activ\'ee par d\'efaut) provoque la compilation de Bacula avec -le support d'adressage de fichiers 64 bits s'il est disponible sur votre -syst\`eme. Ainsi Bacula peut lire et \'ecrire des fichiers de plus de 2 -GBytes. Vous pouvez d\'esactiver cette option et revenir \`a un adressage de -fichiers 32 bits en utilisant {\bf \verb{--{disable-largefile}. - -\item [ {-}{-}disable-nls] - \index[general]{{-}{-}disable-nls} - Bacula utilise par d\'efaut les librairies {\it GNU Native Language Support} (NLS). - Sur certaines machines, ces librairies peuvent \^etre inexistante, ou ne pas - fonctionner correctement (particuli\`erement sur les impl\'ementations non Linux). - dans ce genre de situations, vous pouvez neutraliser l'utilisation de ces librairies - avec l'option {\bf {-}{-}disable-nls}. Dans ce cas, Bacula reviendra \`a l'usage de l'anglais. - -\item [{-}{-}with-sqlite=\lt{}sqlite-path\gt{}] - \index[general]{{-}{-}with-sqlite } - Cette option permet l'utilisation de la base de donn\'ees SQLite versions 2.8.x. Il n'est, -en principe, pas n\'ecessaire de sp\'ecifier le chemin {\bf sqlite-path} car -Bacula recherche les composants requis dans les r\'epertoires standards ({\bf -depkgs/sqlite}). voyez -\ilink{Installer et Configurer SQLite}{_ChapterStart33} pour plus de -d\'etails. - -Voyez aussi la note ci-dessous, apr\`es le paragraphe --with-postgreSQL - -\item [{-}{-}with-sqlite3=\lt{}sqlite3-path\gt{}] - \index[general]{{-}{-}with-sqlite3 } - Cette option permet l'utilisation de la base de donn\'ees SQLite versions 3.x. Il n'est, -en principe, pas n\'ecessaire de sp\'ecifier le chemin {\bf sqlite3-path} car -Bacula recherche les composants requis dans les r\'epertoires standards ({\bf -depkgs/sqlite3}). voyez -\ilink{Installer et Configurer SQLite}{_ChapterStart33} pour plus de -d\'etails. - -Voyez aussi la note ci-dessous, apr\`es le paragraphe --with-postgreSQL - -\item [{-}{-}with-mysql=\lt{}mysql-path\gt{}] - \index[general]{{-}{-}with-mysql } - Cette option permet la compilation des services de Catalogue de Bacula. Elle -implique que MySQL tourne d\'ej\`a sur votre syst\`eme, et qu'il soit -install\'e dans le chemin {\bf mysql-path} que vous avez sp\'ecifi\'e. Si -cette option est absente, Bacula sera compil\'e automatiquement avec le code -de la base Bacula interne. Nous recommandons d'utiliser cette option si -possible. Si vous souhaitez utilisez cette option, veuillez proc\'eder \`a -l'installation de MySQL ( -\ilink{Installer and Configurer MySQL}{_ChapterStart}) avant de -proc\'eder \`a la configuration. - -Voyez aussi la note ci-dessous, apr\`es le paragraphe --with-postgreSQL - -\item [{-}{-}with-postgresql=\lt{}postgresql-path\gt{}] - \index[general]{{-}{-}with-postgresql } - Cette option d\'eclare un chemin explicite pour les librairies PostgreSQL si -Bacula ne les trouve pas dans le r\'epertoire par d\'efaut. - -Notez que pour que Bacula soit configur\'e correctement, vous devez sp\'ecifier l'une des -quatre options de bases de donn\'ees support\'ees : {-}{-}with-sqlite, {-}{-}with-sqlite3, -{-}{-}with-mysql, ou {-}{-}with-postgresql, faute de quoi ./configure \'echouera. - -\item [ {-}{-}with-openssl=\lt{}path\gt{}] - Cette option est requise si vous souhaitez activer TLS (ssl) qui chiffre les - communications entre les daemons Bacula ou si vous voulez utiliser le chiffrement - PKI des données du File Daemon.Normalement, la sp\'ecification du chemin {\bf path} - n'est pas n\'ecessaire car le processus de - configuration recherche les librairies OpenSSL dans les emplacements standard du - syst\`eme. L'activation d'OpenSSL dans Bacula permet des communications s\'ecuris\'ees - entre les {\it daemons}. Pour plus d'informations sur l'usage de TLS, consultez le - chapitre \ilink{Bacula TLS}{_ChapterStart61} de ce manuel. Pour plus d'informations - sur l'usage du chiffrement des données PKI, veuillez consulter le chapitre - \ilink{Bacula PKI -- Data Encryption}{Chiffrement des données} de ce manuel. - -\item [ {-}{-}with-python=\lt{}path\gt{}] - \index[general]{{-}{-}with-python } - Cette option active le support Python dans Bacula. Si le chemin n'est pas - sp\'ecifi\'e, le processus de configuration recherchera les librairies Python - dans leurs emplacements standard. S'il ne peut trouver les librairies , il vous faudra - fournir le chemin vers votre r\'epertoire de librairies Python. Voyez le - \ilink{chapitre Python}{_ChapterStart60} pour plus de d\'etails sur l'utilisation de - scripts Python. - -\item [ {-}{-}with-libintl-prefix=\lt{}DIR\gt{}] - \index[general]{{-}{-}with-libintl-prefix} - Cette option peut \^etre utilis\'ee pour indiquer \`a Bacula de rechercher dans DIR/include - et DIR/lib les fichiers d'en t\^ete libintl et les librairies requises pour - Native Language Support (NLS). - -\item [{-}{-}enable-conio] - \index[general]{{-}{-}enable-conio } - Cette option permet la compilation d'une petite et l\'eg\`ere routine en -alternative \`a readline, beaucoup plus facile \`a configurer, m\^eme si elle -n\'ecessite aussi les librairies termcap ou ncurses. - -\item [{-}{-}with-readline=\lt{}readline-path\gt{}] - \index[general]{{-}{-}with-readline } - Sp\'ecifie l'emplacement de {\bf readline}. En principe, Bacula devrait le -trouver s'il est dans une librairie standard. Sinon, et si l'option -\verb{--{with-readline n'est pas renseign\'ee, readline sera d\'esactiv\'e. Cette -option affecte la compilation de Bacula. Readline fournit le programme -Console avec un historique des lignes de commandes et des capacit\'es -d'\'edition. Readline n'est d\'esormais plus support\'e, ce qui signifie que -vous l'utilisez \`a vos risques et p\'erils - -\item [{-}{-}enable-readline] - \index[general]{{-}{-}enable-readline } - Active le support readline. D\'esactiv\'e par d\'efaut en raison de nombreux -probl\`emes de configuration, et parce que le paquetage semble devenir -incompatible. - -\item [{-}{-}with-tcp-wrappers=\lt{}path\gt{}] - \index[general]{{-}{-}with-tcp-wrappers} - \index[general]{TCP Wrappers} - \index[general]{Wrappers!TCP} - \index[general]{libwrappers} - Cette option pr\'ecise que vous voulez TCP wrappers (man hosts\_access(5)) -compil\'e dans Bacula. Le chemin est facultatif puisque Bacula devrait, en -principe, trouver les librairies dans les r\'epertoires standards. Cette -option affecte la compilation. Lorsque vous sp\'ecifierez vos restrictions -dans les fichiers {\bf /etc/hosts.allow} ou {\bf /etc/hosts.deny}, n'utilisez -pas l'option {\bf twist} (man hosts\_options(5)) ou le processus Bacula sera -stopp\'e. - -Pour plus d'informations sur la configuration et les tests de TCP wrappers, -consultez la section -\ilink{Configurer et Tester TCP Wrappers}{wrappers} du chapitre -sur la s\'ecurit\'e. - -Sur SuSE, les librairies libwrappers requises pour lier Bacula appartiennent -au paquet tcpd-devel. Sur RedHat, le paquet se nomme tcp\_wrappers. - -\item [{-}{-}with-working-dir=\lt{}working-directory-path\gt{}] - \index[dir]{{-}{-}with-working-dir } - Cette option est obligatoire et sp\'ecifie un r\'epertoire dans lequel Bacula -peut placer en toute s\'ecurit\'e les fichiers qui resteront d'une -ex\'ecution \`a l'autre. Par exemple, si la base de donn\'ees interne est -utilis\'ee, Bacula stockera ces fichiers dans ce r\'epertoire. Cette option -n'est utilis\'ee que pour modifier les fichiers de configuration de Bacula. -Vous pourrez \'eventuellement effectuer cette modification directement en les -\'editant plus tard. Le r\'epertoire sp\'ecifi\'e ici n'est pas -automatiquement cr\'e\'e par le processus d'installation, aussi vous devez -veiller \`a ce qu'il existe avant votre premi\`ere utilisation de Bacula. - -\item [{-}{-}with-base-port=\lt{}port=number\gt{}] - \index[dir]{{-}{-}with-base-port } - Bacula a besoin de trois ports TCP/IP pour fonctionner (un pour la Console, -un pour le Storage Daemon et un pour le File Daemon). L'option {\bf -\verb{--{with-baseport} permet d'assigner automatiquement trois ports cons\'ecutifs -\`a partir du port de base sp\'ecifi\'e. Vous pouvez aussi changer les -num\'eros de ports dans les fichiers de configuration. Cependant, vous devez -prendre garde \`a ce que les num\'eros de ports se correspondent fid\`element -dans chacun des trois fichiers de configuration. Le port de base par d\'efaut -est 9101, ce qui assigne les ports 9101 \`a 9103. Ces ports (9101, 9102 et -9103) ont \'et\'e officiellement assign\'e \`a Bacula par l'IANA. Cette -option n'est utilis\'ee que pour modifier les fichiers de configuration de -Bacula. Vous pouvez \`a tout moment faire cette modification en \'editant -directement ces fichiers. - -\item [{-}{-}with-dump-email=\lt{}email-address\gt{}] - \index[dir]{{-}{-}with-dump-email } - Cette option sp\'ecifie l'adresse e-mail qui recevra tous les {\it core dump}. - Cette option n'est en principe utilis\'ee que par les d\'eveloppeurs. - -\item [{-}{-}with-pid-dir=\lt{}PATH\gt{} ] - \index[dir]{{-}{-}with-pid-dir } - Ceci pr\'ecise le r\'epertoire de stockage du fichier d'id de processus lors -de l'ex\'ecution. La valeur par d\'efaut est : {\bf /var/run}. Le r\'epertoire -sp\'ecifi\'e ici n'est pas automatiquement cr\'e\'e par le processus -d'installation, aussi vous devez veiller \`a ce qu'il existe avant votre -premi\`ere utilisation de Bacula. - -\item [{-}{-}with-subsys-dir=\lt{}PATH\gt{} ] - \index[dir]{{-}{-}with-subsys-dir } - Cette option pr\'ecise le r\'epertoire de stockage des fichiers verrous du -sous-syst\`eme lors de l'ex\'ecution. Le r\'epertoire par d\'efaut est {\bf -/var/run/subsys}. Veillez \`a ne pas sp\'ecifier le m\^eme r\'epertoire que -pour l'option {\bf sbindir}. Ce r\'epertoire n'est utilis\'e que par les -scripts de d\'emarrage automatique. Le r\'epertoire sp\'ecifi\'e ici n'est -pas automatiquement cr\'e\'e par le processus d'installation, aussi vous devez -veiller \`a ce qu'il existe avant votre premi\`ere utilisation de Bacula. - -\item [{-}{-}with-dir-password=\lt{}Password\gt{} ] - \index[dir]{{-}{-}with-dir-password } - Cette option vous permet de pr\'eciser le mot de passe d'acc\`es au Director -(contact\'e, en principe, depuis la console). S'il n'est pas pr\'ecis\'e, -configure en cr\'e\'e un al\'eatoirement. - -\item [{-}{-}with-fd-password=\lt{}Password\gt{} ] - \index[fd]{{-}{-}with-fd-password } - Cette option vous permet de pr\'eciser le mot de passe d'acc\`es au File -Daemon (contact\'e, en principe, depuis le Director). S'il n'est pas -pr\'ecis\'e, configure en cr\'e\'e un al\'eatoirement. - -\item [{-}{-}with-sd-password=\lt{}Password\gt{} ] - \index[sd]{{-}{-}with-sd-password } - Cette option vous permet de pr\'eciser le mot de passe d'acc\`es au Storage -Daemon (contact\'e, en principe, depuis le File Daemon). S'il n'est pas -pr\'ecis\'e, configure en cr\'e\'e un al\'eatoirement. - -\item [{-}{-}with-dir-user=\lt{}User\gt{} ] - \index[dir]{{-}{-}with-dir-user } - Cette option vous permet de sp\'ecifier l'UserId utilis\'e pour l'ex\'ecution -du Director. Le Director doit \^etre d\'emarr\'e en tant que root, mais n'a -pas besoin d'\^etre ex\'ecut\'e en tant que root. Apr\`es avoir effectu\'e les -op\'erations d'initialisation pr\'eliminaires, il peut redescendre au niveau -de l'UserId sp\'ecifi\'e dans cette option. Si vous utilisez cette option, vous -devez cr\'eer l'utilisateur User avant d'ex\'ecuter {\bf make install}, car le -r\'epertoire de travail de Bacula appartiendra \`a cet utilisateur. - -\item [{-}{-}with-dir-group=\lt{}Group\gt{} ] - \index[dir]{{-}{-}with-dir-group } - Cette option vous permet de sp\'ecifier le GroupId utilis\'e pour -l'ex\'ecution du Director. Le Director doit \^etre d\'emarr\'e en tant que -root, mais n'a pas besoin d'\^etre ex\'ecut\'e en tant que root. Apr\`es avoir -effectu\'e les op\'erations d'initialisation pr\'eliminaires, il peut -redescendre au niveau du GroupId sp\'ecifi\'e dans cette option. -Si vous utilisez cette option, vous -devez cr\'eer le groupe Group avant d'ex\'ecuter {\bf make install}, car le -r\'epertoire de travail de Bacula appartiendra \`a ce groupe. - -\item [{-}{-}with-sd-user=\lt{}User\gt{} ] - \index[sd]{{-}{-}with-sd-user } - Cette option vous permet de sp\'ecifier l'UserId utilis\'e pour ex\'ecuter le -Storage Daemon. Le Storage Daemon doit \^etre d\'emarr\'e en tant que root, -mais n'a pas besoin d'\^etre ex\'ecut\'e en tant que root. Apr\`es avoir -effectu\'e les op\'erations d'initialisation pr\'eliminaires, il peut -redescendre au niveau de l'UserId sp\'ecifi\'e dans cette option. Si vous -utilisez cette option, veillez \`a ce que le Storage Daemon ait acc\`es \`a -tous les p\'eriph\'eriques de stockage dont il a besoin. - -\item [{-}{-}with-sd-group=\lt{}Group\gt{} ] - \index[sd]{{-}{-}with-sd-group } - Cette option vous permet de sp\'ecifier le GroupId utilis\'e pour ex\'ecuter -le Storage Daemon. Le Storage Daemon doit \^etre d\'emarr\'e en tant que -root, mais n'a pas besoin d'\^etre ex\'ecut\'e en tant que root. Apr\`es avoir -effectu\'e les op\'erations d'initialisation pr\'eliminaires, il peut -redescendre au niveau du GroupId sp\'ecifi\'e dans cette option. - -\item [{-}{-}with-fd-user=\lt{}User\gt{} ] - \index[fd]{{-}{-}with-fd-user } - Cette option vous permet de sp\'ecifier l'UserId utilis\'e pour ex\'ecuter le -File Daemon. Le File Daemon doit \^etre d\'emarr\'e et, dans la plupart des -cas, ex\'ecut\'e en tant que root, de sorte que cette option n'est utilis\'ee -que dans des cas bien particuliers. Malgr\'e tout, apr\`es avoir effectu\'e -les op\'erations d'initialisation pr\'eliminaires, il peut redescendre au -niveau de l'UserId sp\'ecifi\'e dans cette option. - -\item [{-}{-}with-fd-group=\lt{}Group\gt{} ] - \index[fd]{{-}{-}with-fd-group } - Cette option vous permet de sp\'ecifier le GroupId utilis\'e pour ex\'ecuter -le File Daemon. Le File Daemon doit \^etre d\'emarr\'e et, dans la plupart -des cas, ex\'ecut\'e en tant que root, de sorte que cette option n'est -utilis\'ee que dans des cas bien particuliers. Malgr\'e tout, apr\`es avoir -effectu\'e les op\'erations d'initialisation pr\'eliminaires, il peut -redescendre au niveau du GroupId sp\'ecifi\'e dans cette option. -\end{description} - -Notez: de nombreuses options suppl\'ementaires vous sont pr\'esent\'ees -lorsque vous entrez {\bf ./configure \verb{--{help}, mais elles ne sont pas -impl\'ement\'ees. - -\section{Options recommand\'ees pour la plupart des syst\`emes} -\index[general]{Options recommand\'ees pour la plupart des syst\`emes } -\addcontentsline{toc}{section}{Options recommand\'ees pour la plupart des -syst\`emes} - -Pour la plupart des syst\`emes, nous recommandons de commencer avec les -options suivantes : - -\footnotesize -\begin{verbatim} -./configure \ - --enable-smartalloc \ - --sbindir=$HOME/bacula/bin \ - --sysconfdir=$HOME/bacula/bin \ - --with-pid-dir=$HOME/bacula/bin/working \ - --with-subsys-dir=$HOME/bacula/bin/working \ - --with-mysql=$HOME/mysql \ - --with-working-dir=$HOME/bacula/working -\end{verbatim} -\normalsize - -Si vous souhaitez installer Bacula dans un r\'epertoire d'installation -plut\^ot que de l'ex\'ecuter depuis le r\'epertoire de compilation, (comme le -feront les d\'eveloppeurs la plupart du temps), vous devriez aussi inclure les -options \verb{--{sbindir et \verb{--{sysconfdir avec les chemins appropri\'es. Aucune n'est -n\'ecessaire si vous ne vous servez pas de "make install'', comme c'est le -cas pour la plupart des travaux de d\'eveloppement. Le processus -d'installation va cr\'eer les r\'epertoires sbindir et sysconfdir s'ils -n'existent pas, mais il ne cr\'eera pas les r\'epertoires pid-dir, subsys-dir -ni working-dir, aussi assurez vous qu'ils existent avant de lancer Bacula. -L'exemple ci-dessous montre la fa\c{c}on de proc\'eder de Kern. - -\section{RedHat} -\index[general]{RedHat } -\addcontentsline{toc}{section}{RedHat} - -Avec SQLite: - -\footnotesize -\begin{verbatim} - -CFLAGS="-g -Wall" ./configure \ - --sbindir=$HOME/bacula/bin \ - --sysconfdir=$HOME/bacula/bin \ - --enable-smartalloc \ - --with-sqlite=$HOME/bacula/depkgs/sqlite \ - --with-working-dir=$HOME/bacula/working \ - --with-pid-dir=$HOME/bacula/bin/working \ - --with-subsys-dir=$HOME/bacula/bin/working \ - --enable-gnome \ - --enable-conio -\end{verbatim} -\normalsize - -ou - -\footnotesize -\begin{verbatim} - -CFLAGS="-g -Wall" ./configure \ - --sbindir=$HOME/bacula/bin \ - --sysconfdir=$HOME/bacula/bin \ - --enable-smartalloc \ - --with-mysql=$HOME/mysql \ - --with-working-dir=$HOME/bacula/working - --with-pid-dir=$HOME/bacula/bin/working \ - --with-subsys-dir=$HOME/bacula/bin/working - --enable-gnome \ - --enable-conio -\end{verbatim} -\normalsize - -ou une installation RedHat compl\`etement traditionnelle : - -\footnotesize -\begin{verbatim} -CFLAGS="-g -Wall" ./configure \ - --prefix=/usr \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc/bacula \ - --with-scriptdir=/etc/bacula \ - --enable-smartalloc \ - --enable-gnome \ - --with-mysql \ - --with-working-dir=/var/bacula \ - --with-pid-dir=$HOME/var/run \ - --enable-conio -\end{verbatim} -\normalsize - -Notez que Bacula suppose que les r\'epertoires /var/bacula, /var/run et -/var/lock/subsys existent, ils ne seront pas cr\'ees par le processus -d'installation. - -D'autre part, avec gcc 4.0.1 20050727 (Red Hat 4.0.1-5) sur processeur AMD64 -et sous CentOS4 64 bits, un bug du compilateur g\'en\`ere du code erron\'e qui -conduit Bacula \`a des erreurs de segmentation. Typiquement, vous le rencontrerez -d'abord avec le Storage Daemon. La solution consiste \`a s'assurer que Bacula est -compil\'e sans optimisation (normalement -O2) - -\section{Solaris} -\index[general]{Solaris } -\addcontentsline{toc}{section}{Solaris} - -Pour installer Bacula depuis les sources, il vous faudra les paquetages suivants -sur votre syst\`eme (ils ne sont pas install\'es par d\'efaut) : libiconv, gcc 3.3.2, stdc++, libgcc -( pour les librairies stdc++ and gcc\_s ), make 3.8 ou plus r\'ecent. - -Il vous faudra probablement aussi ajouter /usr/local/bin et /usr/css/bin \`a PATH pour ar. - -\footnotesize -\begin{verbatim} -#!/bin/sh -CFLAGS="-g" ./configure \ - --sbindir=$HOME/bacula/bin \ - --sysconfdir=$HOME/bacula/bin \ - --with-mysql=$HOME/mysql \ - --enable-smartalloc \ - --with-pid-dir=$HOME/bacula/bin/working \ - --with-subsys-dir=$HOME/bacula/bin/working \ - --with-working-dir=$HOME/bacula/working -\end{verbatim} -\normalsize - -Comme mentionn\'e ci-dessus, le processus d'installation va cr\'eer les -r\'epertoires sbindir et sysconfdir s'ils n'existent pas, mais il ne cr\'eera -pas les r\'epertoires pid-dir, subsys-dir ni working-dir, aussi assurez vous -qu'ils existent avant de lancer Bacula. - -Notez que vous pouvez aussi avoir besoin des paquetages suivants pour installer Bacula -depuis les sources : -\footnotesize -\begin{verbatim} -SUNWbinutils, -SUNWarc, -SUNWhea, -SUNWGcc, -SUNWGnutls -SUNWGnutls-devel -SUNWGmake -SUNWgccruntime -SUNWlibgcrypt -SUNWzlib -SUNWzlibs -SUNWbinutilsS -SUNWGmakeS -SUNWlibm - -export -PATH=/usr/bin::/usr/ccs/bin:/etc:/usr/openwin/bin:/usr/local/bin:/usr/sfw/bin:/opt/sfw/bin:/usr/ucb:/usr/sbin -\end{verbatim} -\normalsize - - -\section{FreeBSD} -\index[general]{FreeBSD } -\addcontentsline{toc}{section}{FreeBSD} - -Veuillez consulter: -\elink{The FreeBSD Diary}{http://www.freebsddiary.org/bacula.php} pour une -description d\'etaill\'ee de la m\'ethode pour faire fonctionner Bacula sur -votre syst\`eme. De plus, les utilisateurs de versions de FreeBSD -ant\'erieures \`a la 4.9-STABLE du lundi 29 d\'ecembre 2003 15:18:01 qui -envisagent d'utiliser des lecteurs de bandes doivent consulter le chapitre -\ilink{Tester son lecteur de bandes}{FreeBSDTapes} de ce -manuel pour d'{\bf importantes} informations sur la configuration des lecteurs -pour qu'ils soient compatibles avec Bacula. - -Si vous utilisez Bacula avec MySQL, vous devriez prendre garde \`a compiler -MySQL avec les threads natifs de FreeBSD plut\^ot qu'avec ceux de Linux, car -c'est avec ceux l\`a qu'est compil\'e Bacula et le m\'elange des deux ne -fonctionnera probablement pas. - -\section{Win32} -\index[general]{Win32 } -\addcontentsline{toc}{section}{Win32} - -Pour installer la version binaire Win32 du File Daemon, consultez le chapitre -\ilink{ Installation sur syst\`emes Win32}{_ChapterStart7} de ce -document. - -\section{Syst\`emes Windows avec CYGWIN install\'e} -\label{Win32} -\index[general]{Syst\`emes Windows avec CYGWIN install\'e } -\addcontentsline{toc}{section}{Syst\`emes Windows avec CYGWIN install\'e} - -A partir de la version 1.34, Bacula n'utilise plus CYGWIN pour le client -Win32. Il est cependant encore compil\'e sous un environnement CYGWIN -- Bien -que vous puissiez probablement le faire avec seulement VC Studio. Si vous -souhaitez compiler le client Win32 depuis les sources, il vous faudra -Microsoft C++ version 6.0 ou sup\'erieur. Dans les versions de Bacula -ant\'erieures \`a la 1.33, CYGWIN \'etait utilis\'e. - -Notez qu'en d\'epit du fait que la plupart des \'el\'ements de Bacula puissent -compiler sur les syst\`emes Windows, la seule partie que nous avons test\'ee -et utilis\'ee est le File Daemon. - -Finalement, vous devriez suivre les instructions d'installation de la section -\ilink{Win32 Installation sur syst\`emes Win32}{_ChapterStart7} de ce -document en occultant la partie qui d\'ecrit la d\'ecompression de la version -binaire. - -\section{Le script Configure de Kern} -\index[general]{Le script Configure de Kern } -\index[general]{Kern!Le script Configure de } -\addcontentsline{toc}{section}{Le script Configure de Kern} - -Voici le script que j'utilise pour compiler sur mes machines Linux de -"production'': - -\footnotesize -\begin{verbatim} -#!/bin/sh -# This is Kern's configure script for Bacula -CFLAGS="-g -Wall" \ - ./configure \ - --sbindir=$HOME/bacula/bin \ - --sysconfdir=$HOME/bacula/bin \ - --enable-smartalloc \ - --enable-gnome \ - --with-pid-dir=$HOME/bacula/bin/working \ - --with-subsys-dir=$HOME/bacula/bin/working \ - --with-mysql=$HOME/mysql \ - --with-working-dir=$HOME/bacula/bin/working \ - --with-dump-email=$USER \ - --with-smtp-host=mail.your-site.com \ - --with-baseport=9101 -exit 0 -\end{verbatim} -\normalsize - -Notez que je fixe le port de base \`a 9101, ce qui signifie que Bacula -utilisera le port 9101 pour la console Director, le port 9102 pour le File -Daemon, et le 9103 pour le Storage Daemon. Ces ports devraient \^etre -disponibles sur tous les syst\`emes \'etant donn\'e qu'ils ont \'et\'e -officiellement attribu\'es \`a Bacula par l'IANA (Internet Assigned Numbers -Authority). Nous recommandons fortement de n'utiliser que ces ports pour -\'eviter tout conflit avec d'autres programmes. Ceci est en fait la -configuration par d\'efaut si vous n'utilisez pas l'option {\bf -\verb{--{with-baseport}. - -Vous pouvez aussi ins\'erer les entr\'ees suivantes dans votre fichier {\bf -/etc/services} de fa\c{c}on \`a rendre les connections de Bacula plus -ais\'ees \`a rep\'erer (i.e. netstat -a): - -\footnotesize -\begin{verbatim} -bacula-dir 9101/tcp -bacula-fd 9102/tcp -bacula-sd 9103/tcp -\end{verbatim} -\normalsize - -\section{Installer Bacula} -\index[general]{Installer Bacula } -\index[general]{Bacula!Installer } -\addcontentsline{toc}{section}{Installer Bacula} - -Avant de personnaliser vos fichiers de configuration, vous voudrez installer -Bacula dans son r\'epertoire d\'efinitif. tapez simplement: - -\footnotesize -\begin{verbatim} -make install -\end{verbatim} -\normalsize - -Si vous avez pr\'ec\'edemment install\'e Bacula, les anciens binaires seront -\'ecras\'es, mais les anciens fichiers de configuration resteront inchang\'es, -et les "nouveaux'' recevront l'extension {\bf .new}. G\'en\'eralement, si -vous avez d\'ej\`a install\'e et ex\'ecut\'e Bacula, vous pr\'ef\`ererez -supprimer ou ignorer les fichiers de configuration avec l'extension {\bf .new} - - -\section{Compiler un File Daemon (ou Client)} -\index[general]{Compiler un File Daemon (ou Client) } -\index[general]{Client!Compiler un File Daemon ou } -\addcontentsline{toc}{section}{Compiler un File Daemon (ou Client)} - -Si vous ex\'ecutez le Director et le Storage Daemon sur une machine et si vous -voulez sauvegarder une autre machine, vous devez avoir un File Daemon sur -cette machine. Si la machine et le syst\`eme sont identiques, vous pouvez -simplement copier le binaire du File Daemon {\bf bacula-fd} ainsi que son -fichier de configuration {\bf bacula-fd.conf}, puis modifier le nom et le mot -de passe dans {\bf bacula-fd.conf} de fa\c{c}on \`a rendre ce fichier unique. -Veillez \`a faire les modifications correspondantes dans le fichier de -configuration du Director ({\bf bacula-dir.conf}). - -Si les architectures, les syst\`emes, ou les versions de syst\`emes -diff\`erent, il vous faudra compiler un File Daemon sur la machine cliente. -Pour ce faire, vous pouvez utiliser la m\^eme commande {\bf ./configure} que -celle utilis\'ee pour construire le programme principal, soit en partant d'une -copie fraiche du r\'epertoire des sources, soit en utilisant {\bf make\ -distclean} avant de lancer {\bf ./configure}. - -Le File Daemon n'ayant pas d'acc\`es au catalogue, vous pouvez supprimer les -option {\bf \verb{--{with-mysql} ou {\bf \verb{--{with-sqlite}. Ajoutez l'option {\bf -\verb{--{enable-client-only}. Ceci va compiler seulement les librairies et programmes -clients, et donc \'eviter d'avoir \`a installer telle ou telle base de -donn\'ees. Lancez make avec cette configuration, et seul le client sera -compil\'e. -\label{autostart} - -\section{D\'emarrage automatique des Daemons} -\index[general]{Daemons!D\'emarrage automatique des } -\index[general]{D\'emarrage automatique des Daemons } -\addcontentsline{toc}{section}{D\'emarrage automatique des Daemons} - -Si vous souhaitez que vos {\it daemons} soient lanc\'es automatiquement au -d\'emarrage de votre syst\`eme (une bonne id\'ee !), une \'etape -suppl\'ementaire est requise. D'abord, le processus ./configure doit -reconna{\^\i}tre votre syst\`eme -- ce qui signifie que ce doit \^etre une -plate-forme support\'ee et non {\bf inconnue}, puis vous devez installer les -fichiers d\'ependants de la plate-forme comme suit : - -\footnotesize -\begin{verbatim} -(devenez root) -make install-autostart -\end{verbatim} -\normalsize - -Notez que la fonction d'autod\'emarrage n'est impl\'ement\'ee que pour les -syst\`emes que nous supportons officiellement (actuellement FreeBSD, RedHat -Linux, et Solaris), et n'a \'et\'e pleinement test\'ee que sur RedHat Linux. - -{\bf make install-autostart} installe les scripts de d\'emarrage apropri\'es -ainsi que les liens symboliques n\'ecessaires. Sur RedHat Linux, Ces scripts -r\'esident dans {\bf /etc/rc.d/init.d/bacula-dir} {\bf -/etc/rc.d/init.d/bacula-fd}, et {\bf /etc/rc.d/init.d/bacula-sd}. Toutefois, -leur localisation exacte d\'epend de votre syst\`eme d'exploitation. - -Si vous n'installez que le File Daemon, tapez: - -\footnotesize -\begin{verbatim} -make install-autostart-fd -\end{verbatim} -\normalsize - -\section{Autres notes concernant la compilation} -\index[general]{Autres notes concernant la compilation } -\index[general]{Compilation!Autres notes concernant la } -\addcontentsline{toc}{section}{Autres notes concernant la compilation} - -Pour recompiler tout ex\'ecutable, tapez - -\footnotesize -\begin{verbatim} -make -\end{verbatim} -\normalsize - -dans le r\'epertoire correspondant.. Afin d'\'eliminer tous les objets et -binaires (y compris les fichiers temporaires nomm\'es 1,2 ou 3 qu'utilise -Kern), tapez - -\footnotesize -\begin{verbatim} -make clean -\end{verbatim} -\normalsize - -Pour un nettoyage exhaustif en vue de distribution, entrez: - -\footnotesize -\begin{verbatim} -make distclean -\end{verbatim} -\normalsize - -Notez que cette commande supprime les Makefiles. Elle est en principe -lanc\'ee depuis la racine du r\'epertoire des sources pour les pr\'eparer \`a -la distribution. Pour revenir de cet \'etat, vous devez r\'eex\'ecuter la -commande {\bf ./configure} \`a la racine des sources puisque tous les -Makefiles ont \'et\'e d\'etruits. - -Pour ajouter un nouveau fichier dans un sous-r\'epertoire, \'editez -Makefile.in dans ce sous-r\'epertoire, puis faites un simple {\bf make}. Dans -la plupart des cas, le make reconstruira le Makefile \`a partir du nouveau -Makefile.in. Dans certains cas, il peut \^etre n\'ecessaire d'ex\'ecuter {\bf -make} une deuxi\`eme fois. Dans les cas extr\`emes, remontez \`a la racine des -sources et entrez {\bf make Makefiles}. - -Pour ajouter des d\'ependances: - -\footnotesize -\begin{verbatim} -make depend -\end{verbatim} -\normalsize - -La commande {\bf make depend} ins\`ere les fichiers d'en-t\^etes de -d\'ependances aux Makefile et Makefile.in pour chaque fichier objet. Cette -commande devrait \^etre lanc\'ee dans chaque r\'epertoire o\`u vous modifiez -les d\'ependances. En principe, il suffit de l'ex\'ecuter lorsque vous ajoutez -ou supprimez des sources ou fichiers d'en-t\^etes. {\bf make depend} est -invoqu\'e automatiquement durant le processus de configuration. - -Pour installer: - -\footnotesize -\begin{verbatim} -make install -\end{verbatim} -\normalsize - -En principe, vous n'utilisez pas cette commande si vous \^etes en train de -d\'evelopper Bacula, mais si vous vous appr\'etez \`a l'ex\'ecuter pour -sauvegarder vos syst\`emes. - -Apr\`es avoir lanc\'e {\bf make install}, les fichiers suivants seront -install\'es sur votre syst\`eme (\`a peu de choses pr\`es). La liste exacte -des fichiers install\'es et leur localisation d\'epend de votre commande {\bf -c./configure} (e.g. gnome-console et gnome-console.conf ne sont pas -install\'es si vous ne configurez pas GNOME. De m\^eme, si vous utilisez -SQLite plut\^ot que MySQL, certains fichiers seront diff\'erents. - -\footnotesize -\begin{verbatim} -bacula -bacula-dir -bacula-dir.conf -bacula-fd -bacula-fd.conf -bacula-sd -bacula-sd.conf -bacula-tray-monitor -tray-monitor.conf -bextract -bls -bscan -btape -btraceback -btraceback.gdb -bconsole -bconsole.conf -create_mysql_database -dbcheck -delete_catalog_backup -drop_bacula_tables -drop_mysql_tables -fd -gnome-console -gnome-console.conf -make_bacula_tables -make_catalog_backup -make_mysql_tables -mtx-changer -query.sql -bsmtp -startmysql -stopmysql -bwx-console -bwx-console.conf -\end{verbatim} -\normalsize - -\label{monitor} - -\section{Installer Tray Monitor} -\index[general]{Monitor!Installer Tray } -\index[general]{Installer Tray Monitor } -\addcontentsline{toc}{section}{Installer Tray Monitor} - -Le Tray Monitor est d\'ej\`a install\'e si vous avez utilis\'e l'option {\bf -\verb{--{enable-tray-monitor} de la commande configure et ex\'ecut\'e {\bf make -install}. - -Comme vous n'ex\'ecutez pas votre environnement graphique en tant que root (si -vous le faites, vous devriez changer cette mauvaise habitude), n'oubliez pas -d'autoriser votre utilisateur \`a lire {\bf tray-monitor.conf}, et ex\'ecuter -{\bf bacula-tray-monitor} (ceci ne constitue pas une faille de s\'ecurit\'e). - -Puis, connectez vous \`a votre environnement graphique (KDE, Gnome, ou autre), -lancez {\bf bacula-tray-monitor} avec votre utilisateur et observez si l'icone -d'une cartouche appara{\^\i}t quelque part sur l'\'ecran, usuellement dans la -barre des t\^aches. -Sinon, suivez les instructions suivantes relatives \`a votre gestionnaire de -fen\^etres. - -\subsection{GNOME} -\index[general]{GNOME } -\addcontentsline{toc}{subsection}{GNOME} - -System tray, ou zone de notification si vous utilisez la terminologie GNOME, -est support\'e par GNOME depuis la version 2.2. Pour l'activer, faites un -click droit sur un de vos espaces de travail, ouvrez le menu {\bf Ajouter \`a -ce bureau}, puis {\bf Utilitaire} et enfin, cliquez sur {\bf Zone de -notification}. (NDT: A valider) - -\subsection{KDE} -\index[general]{KDE } -\addcontentsline{toc}{subsection}{KDE} - -System tray est support\'e par KDE depuis la version 3.1. Pour l'activer, -faites un click droit sur la barre de t\^aches, ouvrez le menu {\bf Ajouter}, -puis {\bf Applet}, enfin cliquez sur {\bf System Tray}. - -\subsection{Autres gestionnaires de fen\^etres} -\index[general]{Autres gestionnaires de fen\^etres } -\addcontentsline{toc}{subsection}{Autres gestionnaires de fen\^etres} - -Lisez la documentation pour savoir si votre gestionnaire de fen\^etres -supporte le standard {\it systemtray} de FreeDesktop, et comment l'activer le -cas \'ech\'eant. - -\section{Modifier les fichiers de configuration de Bacula} -\index[general]{Modifier les fichiers de configuration de Bacula } -\index[general]{Bacula!Modifier les fichiers de configuration de } -\addcontentsline{toc}{section}{Modifier les fichiers de configuration de -Bacula} - -Consultez le chapitre -\ilink{Configurer Bacula}{_ChapterStart16} de ce manuel pour les -instructions de configuration de Bacula. diff --git a/docs/manuals/fr/install/messagesres.tex b/docs/manuals/fr/install/messagesres.tex deleted file mode 100644 index 49d313e3..00000000 --- a/docs/manuals/fr/install/messagesres.tex +++ /dev/null @@ -1,347 +0,0 @@ -%% -%% - -\chapter{La ressource Messages} -\label{_ChapterStart15} -\index[general]{Ressource!Messages} -\index[general]{Messages Ressource} -\addcontentsline{toc}{section}{Ressource Messages} - -\section{La ressource Messages} -\label{MessageResource} -\index[general]{Ressource!Messages} -\index[general]{Messages Ressource} -\addcontentsline{toc}{section}{La ressource Messages} - -La ressource Messages d\'efinit la fa\c{c}on dont les messages doivent \^etre construits -et vers quelles destinations ils doivent \^etre transmis. - -Bien que chaque {\it daemon} int\`egre un gestionnaire de messages pleinement -fonctionnel, vous choisirez certainement de centraliser les messages appropri\'es -des File Daemons et du Storage Daemon vers le Director. Ainsi, tous les messages -associ\'es \`a un job donn\'e peuvent \^etre combin\'es et envoy\'es en un simple courrier -\'electronique vers l'utilisateur, ou enregistr\'e dans quelque fichier de logs. - -Chaque message g\'en\'er\'e par un {\it daemon} Bacula poss\`ede un type associ\'e tel -que INFO, WARNING, ERROR, FATAL, etc. La ressource Messages vous permet de -stipuler les types de messages que vous voulez voir, et o\`u les envoyer. De plus, -un message peut \^etre exp\'edi\'e vers plusieurs destinations. Par exemple, vous -pouvez faire en sorte quque tous les messages d'erreur soient consign\'es dans un -fichier de logs tout en vous \'etant envoy\'es par courrier \'elecronique. En -d\'efinissant plusieurs ressources Messages, vous pouvez profiter de diff\'erents -modes de prise en charge pour chaque type de job (par exemple, selon qu'il -s'agit d'une full ou d'un incr\'ementale). - -En g\'en\'eral, les messages sont attach\'es \`a un job et sont inclus dans le rapport de job. -Il existe de rares situations o\`u ce n'est pas possible, par exemple lorsqu'aucun -job n'est en cours d'ex\'ecution, ou si une erreur de communication se produit -entre un daemon et le Director. Dans ce genre de situations, le message demeure -dans le syst\`eme et devrait \^etre purg\'e \`a la fin job suivant. Cependant, comme de tels -messages ne sont pas attach\'es \`a un job, tous ceux qui sont envoy\'es par courrier -\'electronique sont envoy\'es \`a {\bf /usr/lib/sendmail}. Si sur votre syst\`eme, comme c'est -le cas de FreeBSD, sendmail r\'eside en un autre emplacement, veillez \`a le lier -depuis l'emplacement ci-dessus. - -Les enregistrements contenus dans une ressource Messages consistent en une -sp\'ecification de {\bf destination} suivie d'une liste de types de messages -{\bf message-types} au format : - -\begin{description} - -\item [destination = message-type1, message-type2, message-type3, ... ] - \index[dir]{destination} - \end{description} - -ou, pour ces destinations qui n\'ecessitent de sp\'ecifier une adresse (e-mail, par exemple) : - -\begin{description} - -\item [destination = address = message-type1, message-type2, - message-type3, ... ] - \index[dir]{destination} - -o\`u {\bf destination} est l'un des mots-clef pr\'ed\'efinis qui pr\'ecise o\`u le message -doit \^etre exp\'edi\'e ({\bf stdout}, {\bf file}, ...), {\bf message-type} est l'un des -mots-clef pr\'ed\'efinis qui pr\'ecise le type de messages g\'en\'er\'e par Bacula ({\bf ERROR}, -{\bf WARNING}, {\bf FATAL}, ...) et {\bf address} varie selon le mot clef {\bf destination} -mais peut typiquement \^etre une adresse de courrier \'electronique ou un nom de fichier. - -\end{description} - -Voici la liste des directives disponibles pour d\'efinir des ressources Messages : - - -\begin{description} - -\item [Messages] - \index[dir]{Messages} - D\'ebut des enregistrements de Messages - -\item [Name = \lt{}name\gt{}] - \index[dir]{Name} - Le nom de la ressource Message. Ce nom sera utilis\'e pour lier cette ressource -Message \`a un job et/ou au un daemon. - -\label{mailcommand} - -\item [MailCommand = \lt{}command\gt{}] - \index[dir]{MailCommand} -En l'absence de cette directive, Bacula enverra tous ses messages avec la -commande suivante : - -{\bf mail -s "Bacula Message" \lt{}recipients\gt{}} -Dans de nombreusx cas, selon votre machine, cette commande peut ne pas fonctionner. -La directive {\bf MailCommand} vous permet de stipuler pr\'ecis\'ement la fa\c{c}on -d'envoyer vos courrier \'electroniques. Lors de l'ex\'ecution de la commande -{\bf command}, sp\'ecifi\'ee entre guillemets, les substitutions suivantes sont -effectu\'ees : - -\begin{itemize} - \item \%\% = \% - \item \%c = Le nom du client - \item \%d = Le nom du Director - \item \%e = Le code de sortie du job (OK, Error, ...) - \item \%i = L'Id du Job - \item \%j = Le nom unique du job - \item \%l = Le niveau (Full, differential, ...) du job - \item \%n = Le om du job - \item \%r = Les destinataires - \item \%t = Le type du job (Backup, verify, ...) -\end{itemize} - -Voici la commande que j'utilise (Kern) : - -{\bf mailcommand = "/home/kern/bacula/bin/bsmtp -h mail.example.com -f -\textbackslash{}"\textbackslash{}(Bacula\textbackslash{}) -\%r\textbackslash{}" -s \textbackslash{}"Bacula: \%t \%e of \%c -\%l\textbackslash{}" \%r"} - -Notez que la commande enti\`ere devrait appara\^itre sur une seulle ligne plut\^ot -que d\'ecoup\'ee comme ici pour des raisons de pr\'esentation. - -Le programme {\bf bsmtp} est fourni en tant que partie de Bacula. Pour plus -de d\'etails, consultez la section \ilink{ bsmtp -- Personnaliser l'envoi -de vos message par courrier \'electronique}{bsmtp}. Testez soigneusement -toute commande {\bf mailcommand} pour vous assurer que votre passerelle -bsmtp accepte le format d'adressage que vous utilisez. Certains programmes -tels Exim peut se montrer tr\`es s\'electif en ce qui concerne les format -autoris\'es, particuli\`erement en ce qui concerne le champ "from". - -\item [OperatorCommand = \lt{}command\gt{}] - \index[fd]{OperatorCommand} - Cette directive est analogue \`a {\bf MailCommand}, mais elle est utilis\'ee pour - les messages destin\'es \`a l'op\'erateur. Les substitutions effectu\'ees pour la - directive {\bf MailCommand} sont aussi effectu\'ees pour celle-ci. Normalement, - vous mettrez ici la m\^eme valeur que pour {\bf MailCommand}. - -\item [Debug = \lt{}debug-level\gt{}] - \index[fd]{Debug} - Cette directive r\`egle le niveau de d\'ebogage des messages. C'est un entier. - Plus sa valeur est grande, plus grande est la quantit\'e d'informations de - d\'ebogages produites. Nous vous conseillons de ne pas utiliser cette directive - car elle sera bient\^ot obsol\`ete. - -\item [\lt{}destination\gt{} = \lt{}message-type1\gt{}, - \lt{}message-type2\gt{}, ...] - \index[fd]{\lt{}destination\gt{}} - -O\`u la {\bf destination} peut \^etre l'une des suivantes : - -\begin{description} - -\item [stdout] - \index[fd]{stdout} - Envoie le message vers la sortie standard. - -\item [stderr] - \index[fd]{stderr} - Envoie le message vers l'erreur standard - -\item [console] - \index[console]{console} - Envoie le message vers la console Bacula. Ces messages sont gard\'es en attente - jusqu'\`a ce que la console contacte le Director. -\end{description} - -\item {\bf \lt{}destination\gt{} = \lt{}address\gt{} = - \lt{}message-type1\gt{}, \lt{}message-type2\gt{}, ...} - \index[console]{\lt{}destination\gt{}} - -O\`u {\bf address} d\'epend de la {\bf destination}, qui peut \^etre l'une des suivantes : - -\begin{description} - -\item [director] - \index[dir]{director} - Envoie le message vers le Director dont le nom est sp\'ecifi\'e dans le champ - {\bf address}. Notez que dans l'impl\'ementation actuelle, le nom du Director - est ignor\'e, le message \'etant envoy\'e au Directr qui a lanc\'e le job. - -\item [file] - \index[dir]{file} - Envoie le message vers le fichier d\'esign\'e dans le champ {\bf address}. Si le - fichier existe, il est \'ecras\'e. - -\item [append] - \index[dir]{append} - Ajoute le message \`a la suite du fichier d\'esign\'e dans le champ {\bf address}. - Si le fichier n'existe pas encore, il est cr\'e\'e. - -\item [syslog] - \index[fd]{syslog} - Envoie le message vers le syst\`eme de journalisation (syslog) en utilisant le - service d\'esign\'e par le champ {\bf address} Notez que, pour le moment, le champ - {\bf address} est ignor\'e, et que le message est toujours envoy\'e au service - LOG\_DAEMON avec le niveau LOG\_ERR. Consultez la page {\bf man 3 syslog} - pour plus de d\'etails. Exemple : - -\begin{verbatim} - syslog = all, !skipped, !saved -\end{verbatim} - -\item [mail] - \index[fd]{mail} - Exp\'edie le message vers les adresses \'electroniques - sp\'ecifi\'ees dans le champ {\bf address} (s\'epar\'ees par des points-virgule). - Les messages sont rassembl\'es au cours du job, puis exp\'edi\'es lorsqu'il prend - fin en un seul courrier \'electronique. L'avantage de cette Destination est - que vous recevez une notification de chaque job ex\'ecut\'e. Toutefois, si vous - sauvegardez cinq ou dix machines chaque nuit, la quantit\'e de courrier - \'electronique peut devenir importante. Certains utilisateurs mettent en oeuvre - des filtres de courrier tels {\bf procmail} pour classer automatiquement ces - courriers en fonction des codes de fin de job (voyez la commande {\bf mailcommand} - -\item [mail on error] - \index[fd]{mail on error} - Exp\'edie le message vers les adresses \'electroniques - sp\'ecifi\'ees dans le champ {\bf address} (s\'epar\'ees par des points-virgule) - si le job se termine avec un code d'erreur. Les messages MailOnError sont - rassembl\'es au cours du job, puis exp\'edi\'es lorsqu'il prend fin en un seul - courrier \'electronique. Cette Destination diff\`ere de la Destination {\bf mail} - en ce que si le job s'ach\`eve normalement, le message est compl\`etement - abandonn\'e (pour cette Destination). En utilisant d'autres Destinations, telles - que {\bf append}, vous pouvez vous assurer que les informations de sorties - ne seront pas perdues m\^eme si le job se termine normalement. - -\item [operator] - \index[fd]{operator} - Exp\'edie le message vers les adresses \'electroniques - sp\'ecifi\'ees dans le champ {\bf address} (s\'epar\'ees par des points virgule). - Cette directive est similaire \`a {\bf mail} d\'ecrite plus haut, sauf que - chaque message est envoy\'e aussit\^ot re\c{c}u, de sorte qu'il y a un courrier - \'electronique par message . Ceci est surtout utile pour les messages de - type {\bf mount} (voir ci-dessous). - -\end{description} - Pour toutes les Destinations, le champ "type de message" {\bf message-type} est - une liste des types (ou classes) de messages suivants s\'epar\'es par des - points-virgule : - -\begin{description} - -\item [info] - \index[fd]{info} - Messages d'information g\'en\'erale. - -\item [warning] - \index[fd]{warning} - Messages d'avertissement. En g\'en\'eral, il s'agit de quelque situation inhabituelle - sans toutefois \^etre tr\`es s\'erieuse. - -\item [error] - \index[fd]{error} - Messages d'erreur non-fatale. Le job se poursuit. Tout message d'erreur devrait - \^etre suivi d'investigations, car il signifie que quelque chose est all\'e de travers. - -\item [fatal] - \index[fd]{fatal} - Messages d'erreur fatale. Ces erreurs pr\'ecipitent la fin du job. - -\item [terminate] - \index[fd]{terminate} - Messages g\'en\'er\'es lorsque le daemon s'arr\`ete. - -\item [saved] - \index[fd]{saved} - Fichiers sauvegard\'es normalement. - -\item [notsaved] - \index[fd]{notsaved} - Fichiers non sauvegard\'es en raison d'une erreur, en g\'en\'eral, parce que le - fichier n'a pu \^etre acc\'ed\'e (il n'existait pas ou n'\'etait pas mont\'e). - -\item [skipped] - \index[fd]{skipped} - Fichiers qui ont \'et\'e laiss\'es de cot\'e en raison d'une option pos\'ee par un - utilisateur (par exemple le niveau d'une sauvegarde ou une option - d'exclusion. Ceci n'est pas consid\'er\'e comme une condition d'erreur au m\^eme - titre que pour le type {\bf notsaved} puisque le fichier de configuration - stipule explicitement que ces fichiers ne doivent pas \^etre sauvegard\'es. - Des cas typiques de fichiers de type {\bf skipped} : fichiers inchang\'es - lors d'une incr\'ementale, sous-r\'epertoires si l'option {\bf no recursion} - est activ\'ee... - -\item [mount] - \index[dir]{mount} - Montage d'un volume ou intervention d'un op\'erateur requis par le Storage Daemon. - Ces requ\^etes n\'ecessitent une intervention sp\'ecifique de l'op\'erateur pour que le - job puisse se poursuivre. - -\item [restored] - \index[dir]{restored} - La liste, fa\c{c}on {\bf ls}, de tous les fichiers restaur\'es est envoy\'ee vers - cette classe de messages. - -\item [all] - \index[fd]{all} - Tous les types de messages. - -\item [*security] - \index[fd]{*security} - Messages d'information ou d'avertissement relatifs \`a la s\'ecurit\'e, - essentiellement les tentatives de connection non-autoris\'ees. -\end{description} - -\end{description} - -Voici un exemple d'une d\'efinition de ressource Messages valide, o\`u tous les -messages sont envoy\'es par courrier \'electronique \`a enforcement@sec.com \`a -l'exception de ceux concernant les fichiers explicitement exclus (skipped), -et des messages d'arr\^et de daemon (terminate). De plus, tous les messages -de type mount sont envoy\'es \`a l'op\'erateur (courrier \`a enforcement@sec.com). -Enfin, tous les messages autres que ceux relatifs aux fichiers explicitement -exclus et aux fichiers sauvegard\'es sont envoy\'es vers la console : - -\footnotesize -\begin{verbatim} -Messages { - Name = Standard - mail = enforcement@sec.com = all, !skipped, !terminate - operator = enforcement@sec.com = mount - console = all, !skipped, !saved -} -\end{verbatim} -\normalsize - -A l'exception de l'adresse \'electronique (modifi\'ee pour \'eviter le spam), -voici la ressource Message du Director de Kern. Notez que les commandes -{\bf mailcommand} et {\bf operatorcommand} sont sur une seule ligne et -non coup\'ees comme ici pour des besoins de mise en page. - -\footnotesize -\begin{verbatim} -Messages { - Name = Standard - mailcommand = "bacula/bin/bsmtp -h mail.example.com \ - -f \"\(Bacula\) %r\" -s \"Bacula: %t %e of %c %l\" %r" - operatorcommand = "bacula/bin/bsmtp -h mail.example.com \ - -f \"\(Bacula\) %r\" -s \"Bacula: Intervention needed \ - for %j\" %r" - MailOnError = security@example.com = all, !skipped, \ - !terminate - append = "bacula/bin/log" = all, !skipped, !terminate - operator = security@example.com = mount - console = all, !skipped, !saved -} -\end{verbatim} -\normalsize diff --git a/docs/manuals/fr/install/quickstart.tex b/docs/manuals/fr/install/quickstart.tex deleted file mode 100644 index 07c045db..00000000 --- a/docs/manuals/fr/install/quickstart.tex +++ /dev/null @@ -1,415 +0,0 @@ -%% -%% - -\chapter{D\'emarrer avec Bacula} -\label{_ChapterStart37} -\index[general]{Bacula!D\'emarrer avec } -\index[general]{D\'emarrer avec Bacula } - -Si vous \^etes comme moi, vous voulez faire fonctionner Bacula imm\'ediatement -pour en avoir un aper\c{c}u, puis, plus tard, vous reviendrez en arri\`ere -pour lire et conna{\^\i}tre tous les d\'etails. C'est exactement ce que ce -chapitre se propose d'accomplir : vous faire avancer rapidement sans tous les -d\'etails. Si vous voulez sauter la section sur les Pools, Volumes et Labels, -vous pourrez toujours y revenir, mais s'il vous pla\^it, veuillez lire ce -chapitre jusqu'\`a la fin, et en particulier suivre les instructions pour -tester votre lecteur de bandes. - -Nous supposons que vous \^etes parvenus \`a construire et installer Bacula, -sinon, vous devriez d'abord jeter un oeil aux -\ilink{Pr\'erequis (syst\`eme)}{SysReqs} puis au chapitre -\ilink{Compiler et installer Bacula}{_ChapterStart17} de ce manuel. - -\label{JobsandSchedules} -\section{Comprendre les Jobs et Schedules} -\index[general]{Jobs!Comprendre} -\index[general]{Schedules!Comprendre} -\addcontentsline{toc}{section}{Comprendre les Jobs et Schedules} - -Afin de rendre Bacula aussi flexible que possible, les directives lui sont -donn\'ees en plusieurs endroits. L'instruction principale est la ressource Job, -qui d\'efinit un job. Un job de type sauvegarde consiste en g\'en\'eral en un -FileSet, un client, un Schedule pour un ou plusieurs niveaux ou horaires de sauvegardes, -un Pool, ainsi que des instructions additionnelles. Un autre point de vue -est de consid\'erer le FileSet comme "Que sauvegarder ?", le Client comme -"Qui sauvegarder ?", le Schedule comme "Quand sauvegarder ?" et le Pool -comme "O\`u sauvegarder ?" (c'est \`a dire, "Sur quel volume ?) - -Typiquement, une combinaison FileSet/Client aura un job correspondant. La plupart -des directives, telles que les FileSets, Pools, Schedules, peuvent \^etre -m\'elang\'ees et partag\'ees entre les jobs. Ainsi, vous pouvez avoir deux d\'efinitions -(ressources) de jobs sauvegardant diff\'erents serveurs et utilisant les m\^emes -Schedule, FileSet (sauvegardant donc les m\^emes r\'epertoires sur les deux -machines) et peut-\^etre m\^eme les m\^emes Pools. Le Schedule d\'efinira quel -type de sauvegarde sera ex\'ecut\'e et \`a quel moment (par exemple les Full le -mercredi, les incr\'ementales le reste de la semaine), et lorsque plus d'un job -utilise le m\^eme Schedule la priorit\'e du job d\'etermine lequel d\'emarre en premier. -Si vous avez de nombreux jobs, vous devriez utiliser la directive JobDefs, -qui vous permet de d\'efinir des param\`etres par d\'efaut pour vos jobs, qui peuvent \^etre -chang\'es au sein de la ressource Job, mais qui vous \'evitent de r\'e\'ecrire les m\^emes -param\`etres pour chaque job. En plus des FileSets que vous voulez sauvegarder, -vous devriez aussi avoir un job qui sauvegarde votre catalogue. - -Enfin, sachez qu'en plus des jobs de type Backup, vous pouvez aussi utiliser -des jobs de type restore, verify, admin, qui ont chacun des exigences -diff\'erentes. - -\label{PoolsVolsLabels} - -\section{Comprendre les Pools, Volumes et Labels} -\index[general]{Comprendre les Pools, Volumes et Labels } -\index[general]{Labels!Comprendre les Pools Volumes et } -\addcontentsline{toc}{section}{Comprendre les Pools, Volumes et Labels} - -Si vous avez utilis\'e un programme tel que {\bf tar} pour sauvegarder votre -syst\`eme, les notions de Pools, Volumes et labels peuvent vous sembler un peu -confuses au premier abord. Un Volume est un simple support physique -(cartouche, ou simple fichier) sur lequel Bacula \'ecrit vos donn\'ees de -sauvegarde. Les Pools regroupent les Volumes de sorte qu'une sauvegarde n'est -pas restreinte \`a la capacit\'e d'un unique Volume. Par cons\'equent, -plut\^ot que de nommer explicitement les Volumes dans votre Job, vous -sp\'ecifiez un Pool, et Bacula se chargera de s\'electionner le prochain -Volume utilisable du Pool et vous demandera de le monter. - -Bien que les options de base soient sp\'ecifi\'ees dans la ressource Pool du -fichier de configuration du Director, le Pool {\bf r\'eel} est g\'er\'e par le -Catalogue Bacula. Il contient les informations de la ressource Pool -(bacula-dir.conf) ainsi que les informations concernant tous les Volumes qui -ont \'et\'e ajout\'es au Pool. L'ajout de Volumes se fait en principe -manuellement depuis la Console gr\^ace \`a la commande {\bf label}. - -Pour chaque Volume, Bacula g\`ere une quantit\'e d'informations consid\'erable -telles que les premi\`ere et derni\`ere date et heure d'\'ecriture, le nombre -de fichiers sur le Volume, le nombre de bytes sur le Volume, le nombre de -montages, etc. - -Pour que Bacula puisse lire ou \'ecrire sur un Volume physique, celui-ci doit -avoir re\c{c}u un \'etiquettage logiciel afin que Bacula soit assur\'e que le -bon Volume est mont\'e. Ceci s'effectue en principe manuellement depuis la -Console gr\^ace \`a la commande {\bf label}. - -Les \'etapes de cr\'eation de Pool, ajout de Volumes \`a ce Pool, et -\'ecriture d'\'etiquettes logicielles sur les Volumes, peuvent sembler -p\'enibles au premier abord, mais en fait, elles sont tout \`a fait simples -\`a franchir, et elles vous permettent d'utiliser plusieurs Volumes (plut\^ot -que d'\^etre limit\'e \`a la capacit\'e d'un seul). Les Pools vous procurent -aussi une flexibilit\'e importante pour votre politique de sauvegarde. Par -exemple, vous pouvez avoir un Pool de Volumes "Daily" pour vos sauvegardes -Incr\'ementales et un Pool de Volumes "Weekly" pour vos sauvegardes -compl\`etes (Full). En sp\'ecifiant le Pool appropri\'e dans les Jobs de -sauvegarde quotidiens et hebdomadaires, vous garantissez qu'aucun Job -quotidien n'\'ecrira jamais sur un Volume du Pool r\'eserv\'e aux sauvegardes -hebdomadaire et vice versa, et Bacula vous dira quelle cartouche est requise, -et quand. - -Pour plus de d\'etails concernant les Pools, consultez la section -\ilink{Ressource Pool}{PoolResource} du chapitre sur la -configuration du Director, ou poursuivez votre lecture, nous reviendrons plus -tard sur ce sujet. - -\section{Param\'etrage des fichiers de configuration de Bacula} -\label{config} -\index[general]{Param\'etrage des fichiers de configuration de Bacula } -\index[general]{Bacula!Param\'etrage des fichiers de configuration de } -\addcontentsline{toc}{section}{Param\'etrage des fichiers de configuration -de Bacula} - -Apr\`es avoir ex\'ecut\'e la commande {\bf ./configure} {\it ad hoc}, {\bf -make} et {\bf make install}, si c'est la premi\`ere fois que vous ex\'ecutez -Bacula, vous devez cr\'eer des fichiers de configuration valides pour le -Director, le File Daemon, le Storage Daemon et le programme Console. Si vous -avez suivi nos recommandations, des fichiers de configuration par d\'efaut -ainsi que les binaires des {\it daemons} seront situ\'es dans votre -r\'epertoire d'installation. Dans tous les cas les binaires se trouvent dans -le r\'epertoire que vous avez sp\'ecifi\'e au niveau de l'option {\bf -\verb{--{sbindir} de la commande {\bf ./configure}, et les fichiers de configuration -se trouvent dans le r\'epertoire que vous avez sp\'ecifi\'e au niveau de -l'option {\bf \verb{--{sysconfdir}. - -Lors des param\'etrages initiaux de Bacula, il vous faudra investir un peu de -temps pour modifier les fichiers de configuration par d\'efaut afin de -les adapter \`a votre environnement. Ceci peut n\'ecessiter de red\'emarrer -Bacula plusieurs fois jusqu'\`a ce que tout fonctionne correctement. Ne -c\'edez pas au d\'esespoir. Une fois que vous aurez cr\'e\'e vos fichiers de -configuration, vous n'aurez que rarement besoin de les changer et de -red\'emarrer Bacula. Le gros du travail consistera \`a changer la cartouche -quand elle est pleine. - -\subsection{ -\ilink{Configurer le programme Console}{_ChapterStart36}} -\index[general]{Console!Configurer le programme } -\index[general]{Configurer le programme Console } -\addcontentsline{toc}{subsection}{Configurer le programme Console} - -Le programme console est utilis\'e par l'administrateur pour interagir avec le -Director et pour arr\^eter et d\'emarrer manuellement des jobs, ou encore pour -obtenir des informations sur les jobs en cours d'ex\'ecution ou programm\'es. - -Le fichier de configuration de la Console se trouve dans le r\'epertoire que -vous avez sp\'ecifi\'e au niveau de l'option {\bf \verb{--{sysconfdir} de la commande -{\bf ./configure} et par d\'efaut se nomme {\bf console.conf}. - -Si vous avez choisi de construire la Console GNOME avec l'option {\bf -\verb{--{enable-gnome}, vous y trouverez \'egalement son fichier de configuration par -d\'efaut, nomm\'e {\bf gnome-console.conf}. - -Il en va de m\^eme pour la console wxWidgets, qui est construite par l'option -{\bf \verb{--{enable-bwx-console}, et le nom du fichier de configuration par d\'efaut -est, dans ce cas, {\bf bwx-console.conf}. - -Normalement, pour les nouveaux -utilisateurs, aucune modification n'est requise pour ces fichiers. Les -r\'eglages par d\'efaut sont raisonnables. - -\subsection{ -\ilink{Configurer le programme Monitor}{_ChapterStart35}} -\index[general]{Monitor!Configurer le programme } -\index[general]{Configurer le programme Monitor } -\addcontentsline{toc}{subsection}{Configurer le programme Monitor} - -Le programme Monitor est typiquement une ic\^one dans la barre des t\^aches. -Cependant, lorsque l'ic\^one est \'etendue en une fen\`etre, l'administrateur ou -l'utilisateur peut obtenir des informations concernant le Director ou l'\'etat -des sauvegardes sur la machine locale ou n'importe quelle autre {\it daemon} -Bacula configur\'e. - -\includegraphics{./Bacula-tray-monitor.eps} - -L'image montre le tray-monitor configur\'e pour trois {\it daemons}. En -cliquant sur les boutons radio dans le coin en haut \`a gauche de l'image, -vous pouvez voir l'\'etat de chacun des {\it daemons}. L'image montre l'\'etat -du Storage Daemon (MainSD) s\'electionn\'e. - -Le fichier de configuration du Monitor se trouve dans le r\'epertoire -sp\'ecifi\'e au niveau de l'option {\bf \verb{--{sysconfdir} de la commande {\bf -./configure} et se nomme par d\'efaut {\bf tray-monitor.conf}. En principe, -pour les nouveaux utilisateurs, il suffit de changer les permissions de ce -fichier pour permettre aux utilisateurs non-root d'ex\'ecuter le Monitor, en -effet cette application doit \^etre ex\'ecut\'e par le m\^eme utilisateur que -l'environnement graphique (n'oubliez pas de donner aux non-root le droit -d'ex\'ecuter {\bf bacula-tray-monitor}). Ceci ne constitue pas une faille de -s\'ecurit\'e tant que vous utilisez les r\'eglages par d\'efaut. - -\subsection{ -\ilink{Configurer le File Daemon}{_ChapterStart25}} -\index[general]{Configurer le File Daemon } -\index[general]{Daemon!Configurer le File } -\addcontentsline{toc}{subsection}{Configurer le File Daemon} - -Le File Daemon, est le programme qui s'ex\'ecute sur chaque machine cliente. A -la demande du Director, il d\'etermine les fichiers \`a sauvegarder et les -exp\'edie au Storage Daemon. - -Le fichier de configuration du File Daemon se trouve dans le r\'epertoire -sp\'ecifi\'e au niveau de l'option {\bf \verb{--{sysconfdir} de la commande {\bf -./configure} et se nomme par d\'efaut {\bf bacula-fd.conf}. Normalement, pour -les nouveaux utilisateurs, aucune modification n'est requise pour ce fichier. -Les r\'eglages par d\'efaut sont raisonnables. Cependant, si vous envisagez de -sauvegarder plus d'une machine, il vous faudra installer le File Daemon avec -un fichier de configuration sp\'ecifique sur chaque machine \`a sauvegarder. -Les informations concernant chaque File Daemon doivent appara{\^\i}tre dans le -fichier de configuration du Director. - -\subsection{ -\ilink{Configurer le Director}{_ChapterStart40}} -\index[general]{Director!Configurer le } -\index[general]{Configurer le Director } -\addcontentsline{toc}{subsection}{Configurer le Director} - -Le director est le programme central qui contr\^ole tous les autres {\it -daemons}. Il planifie et surveille les jobs \`a ex\'ecuter. - -Le fichier de configuration du Director se trouve dans le r\'epertoire -sp\'ecifi\'e au niveau de l'option {\bf \verb{--{sysconfdir} de la commande {\bf -./configure} et se nomme par d\'efaut {\bf bacula-dir.conf}. - -En g\'en\'eral, la seule modification n\'ecessaire consiste \`a faire en sorte -que la directive {\bf Include} de la Ressource FileSet contienne au moins une -ligne avec un nom de fichier ou de r\'epertoire valide \`a sauvegarder. - -Si vous ne poss\'edez pas de lecteur DLT, vous voudrez probablement modifier -la ressource Storage pour donner un nom plus repr\'esentatif de votre -p\'eriph\'erique de stockage. Vous pouvez toujours utiliser les noms existants -puisque vous \^etes libre de les assigner arbitrairement, mais ils doivent -s'accorder avec les noms correspondants dans le fichier de configuration du -Storage Daemon. - -Vous pouvez aussi changer l'adresse \'electronique pour les notifications vers -votre propre adresse e-mail plut\^ot que vers celle de {\bf root} -(configuration par d\'efaut). - -Enfin, si vous avez plusieurs syst\`emes \`a sauvegarder, il vous faudra -sp\'ecifier un File Daemon (ou client) pour chaque syst\`eme sauvegard\'e, -pr\'ecisant ses nom, adresse et mot de passe. Nous estimons que baptiser vos -{\it daemons} du nom de vos syst\`emes suffix\'es avec {\bf -fd} aide beaucoup -\`a corriger les erreurs. Ainsi, si votre syst\`eme est {\bf foobaz}, vous -nommerez le {\it daemon} {\bf foobaz-fd}. Pour le Director, vous pourriez -utiliser {\bf foobaz-dir}, et {\bf foobaz-sd} pour le Storage Daemon. -Chacun de vos composants de Bacula {\bf doit} avoir un nom unique -Si vous les nommez tous \`a l'identique, en plus de ne jamais savoir -quel {\it daemon} envoie quel message, s'ils partagent le m\^eme r\'epertoire -de travail (working directory), les noms de fichiers temporaires des {\it daemons} -ne seront pas uniques et vous aurez d'\'etranges erreurs. - -\subsection{ -\ilink{Configurer le Storage Daemon}{_ChapterStart31}} -\index[general]{Daemon!Configurer le Storage } -\index[general]{Configurer le Storage Daemon } -\addcontentsline{toc}{subsection}{Configurer le Storage Daemon} - -Le Storage Daemon est responsable, sur demande du Director, de la r\'eception -des donn\'ees en provenance des File Daemons, et de leur \'ecriture sur le -medium de stockage, ou, dans le cas d'une restauration, de trouver les -donn\'ees pour les envoyer vers le File Daemon. - -Le fichier de configuration du Storage Daemon se trouve dans le r\'epertoire -sp\'ecifi\'e au niveau de l'option {\bf \verb{--{sysconfdir} de la commande {\bf -./configure} et se nomme par d\'efaut {\bf bacula-sd.conf}. Modifiez ce -fichier pour accorder les noms de p\'eriph\'eriques de stockage \`a ceux que -vous poss\'edez. Si le processus d'installation a convenablement d\'etect\'e -votre syst\`eme, elles seront d\'ej\`a correctement r\'egl\'ees. Ces -ressources de stockage "Name" et "Media Type" doivent \^etre les m\^emes -que leurs correspondantes du fichier de configuration du Director {\bf -bacula-dir.conf}. Si vous souhaitez sauvegarder vers un fichier plut\^ot que -sur des bandes, la ressource Device doit pointer vers un r\'epertoire o\`u des -fichiers seront cr\'e\'es en guise de Volumes lorque vous \'etiquetterez -(label) vos Volumes. -\label{ConfigTesting} - -\section{Tester vos Fichiers de Configuration} -\index[general]{Configuration!Tester vos Fichiers de } -\index[general]{Tester vos Fichiers de Configuration } -\addcontentsline{toc}{section}{Tester vos Fichiers de Configuration} - -Vous pouvez tester la validit\'e syntaxique de vos fichiers de configuration, -afficher tout message d'erreur et terminer. Par exemple, en supposant que vous -avez install\'e vos binaires et fichiers de configuration dans le m\^eme -r\'epertoire, - -\footnotesize -\begin{verbatim} -cd -./bacula-dir -t -c bacula-dir.conf -./bacula-fd -t -c bacula-fd.conf -./bacula-sd -t -c bacula-sd.conf -./bconsole -t -c bconsole.conf -./gnome-console -t -c gnome-console.conf -./bwx-console -t -c wx-console.conf -su -c "./bacula-tray-monitor -t -c tray-monitor.conf" -\end{verbatim} -\normalsize - -testera le fichier de configuration de chacun des principaux programmes. Si le -fichier de configuration est correct, le programme se termine -sans rien afficher. Veuillez noter que selon les options de configuration que -vous avez choisies, il se peut qu'aucune des commandes ci-dessus ne soit -valable sur votre syst\`eme. Si vous avez install\'e les binaires dans les -r\'epertoires traditionnels d'Unix plut\^ot que dans un simple r\'epertoire, -il vous faudra modifier les commandes ci-dessus en cons\'equence (pas de -"./" devant les commandes, et un chemin devant les fichiers de -configuration). -\label{TapeTesting} - -\section{Tester la compatibilit\'e de Bacula avec votre lecteur de bandes} -\index[general]{Tester la compatibilit\'e de Bacula avec votre lecteur de -bandes } -\index[general]{Bandes!Tester la compatibilit\'e de Bacula avec votre lecteur -de } -\addcontentsline{toc}{section}{Tester la compatibilit\'e de Bacula avec -votre lecteur de bandes} - -Avant de gaspiller votre temps avec Bacula pour finalement constater qu'il ne -fonctionne pas avec votre lecteur de bandes, veuillez s'il vous pla\^it lire le -chapitre -\ilink{btape -- Tester votre lecteur de bandes}{_ChapterStart27} -de ce manuel. Si vous poss\'edez un lecteur standard SCSI moderne sur un Linux -ou un Solaris, fort probablement, il fonctionnera, mais mieux vaut tester que -d'\^etre d\'e\c{c}u. Pour FreeBSD (et probablement les autres xBSD), la -lecture du chapitre mentionn\'e ci-dessus est un devoir. Pour FreeBSD, -consultez aussi -\elink{The FreeBSD Diary}{http://www.freebsddiary.org/bacula.php} pour une -description d\'etaill\'ee de la m\'ethode pour faire fonctionner Bacula sur -votre syst\`eme. De plus, les utilisateurs de versions de FreeBSD -ant\'erieures \`a 4.9-STABLE dat\'ee du lundi 29 d\'ecembre 2003 15:18:01 UTC -qui pr\'evoient d'utiliser des lecteurs de bandes sont invit\'es \`a lire le -fichier {\bf platforms/freebsd/pthreads-fix.txt} du r\'epertoire principal de -Bacula, qui contient d'importantes informations sur la compatibilit\'e de -Bacula avec leur syst\`eme. -\label{notls} - -\section{D\'ebarrassez-vous du r\'epertoire /lib/tls} -\index[general]{D\'ebarrassez-vous du r\'epertoire /lib/tls } -\addcontentsline{toc}{section}{D\'ebarrassez-vous du r\'epertoire /lib/tls} - -La nouvelle librairie pthreads {\bf /lib/tls} install\'ee par d\'efaut sur les -syst\`emes Red Hat r\'ecents (kernels 2.4.x) est d\'efectueuse. Vous devez la -supprimer ou la renommer, puis rebooter votre syst\`eme avant d'ex\'ecuter -Bacula, faute de quoi, apr\`es environ une semaine de fonctionnement, Bacula -se bloquera pour de longues p\'eriodes, voire d\'efinitivement. Veuillez consulter -le chapitre \ilink{Syst\`emes support\'es}{SupportedOSes} pour plus -d'informations sur ce probl\`eme. - -Ce probl\`eme n'existe plus avec les noyaux 2.6. - -\label{Running1} - -\section{Ex\'ecuter Bacula} -\index[general]{Bacula!Ex\'ecuter } -\index[general]{Ex\'ecuter Bacula } -\addcontentsline{toc}{section}{Ex\'ecuter Bacula} - -La partie la plus importante de l'ex\'ecution de Bacula est probablement la -capacit\'e de restaurer les fichiers. Si vous n'avez pas essay\'e de -r\'ecup\'erer des fichiers au moins une fois, vous subirez une bien plus forte -pression le jour o\`u vous devrez r\'eellement le faire, et serez enclin \`a -commettre des erreurs que vous n'auriez pas commises si vous aviez d\'ej\`a -essay\'e. - -Pour avoir rapidement une bonne id\'ee de la fa\c{c}on d'utiliser Bacula, -nous vous recommandons {\bf fortement} de suivre les exemples du -\ilink{chapitre ex\'ecuter Bacula}{_ChapterStart1} de ce manuel, -o\`u vous trouverez des informations d\'etaill\'ees sur l'ex\'ecution de -Bacula. - -\section{Rotation des logs} -\index[general]{Logs!Rotation des } -\index[general]{Rotation des logs } -\addcontentsline{toc}{section}{Rotation des logs} - -Si vous utilisez le {\bf bacula-dir.conf} par d\'efaut ou une variante, vous -constaterez qu'il r\'ecup\`ere toutes les sorties de Bacula dans un fichier. -Pour \'eviter que ce fichier ne croisse sans limites, nous vous recommandons -de copier le fichier {\bf logrotate} depuis {\bf scripts/logrotate} vers {\bf -/etc/logrotate.d/bacula}. Ainsi les fichiers de logs subiront une rotation -mensuelle et seront conserv\'es pour une dur\'ee maximum de cinq mois. Vous -pouvez \'editer ce fichier pour adapter la rotation \`a votre convenance. - -\section{Log Watch} -\index[general]{Watch!Log} -\index[general]{Log Watch} -\addcontentsline{toc}{section}{Log Watch} -Certains syst\`emes tels que RedHat et Fedora ex\'ecutent le programme -logwatch chaque nuit pour analyser vos fichiers de log et vous -envoyer un rapport par mail. Si vous souhaitez inclure la sortie -de vos jobs Bacula dans ce rapport, veuillez regarder dans le r\'epertoire -{\bf scripts/logwatch}. Le fichier {\bf README} fournit une br\`eve -explication sur la fa\c {c}on d'installer le script, et quelle genre -de r\'esultats en attendre. - -\section{Reprise d'activit\'e apr\`es un d\'esastre (disaster recovery)} -\index[general]{Recovery!Reprise d'activit\'e apr\`es un d\'esastre disaster } -\index[general]{Reprise d'activit\'e apr\`es un d\'esastre (disaster recovery) -} -\addcontentsline{toc}{section}{Reprise d'activit\'e apr\`es un d\'esastre -(disaster recovery)} - -Si vous avez l'intention d'utiliser Bacula en tant qu'outil de disaster -recovery plut\^ot que comme un simple programme pour restaurer les fichiers -perdus, vous serez int\'eress\'e par le -\ilink{chapitre Plan de reprise d'activit\'e avec -Bacula}{_ChapterStart38} de ce manuel. - -De toute fa\c{c}on, vous \^etes fortement invit\'e \`a tester soigneusement -la restauration de quelques fichiers que vous aurez pr\'ealablement -sauvegard\'es, plut\^ot que d'attendre qu'un d\'esastre ne frappe. Ainsi, vous -serez pr\'epar\'e. diff --git a/docs/manuals/fr/install/security.tex b/docs/manuals/fr/install/security.tex deleted file mode 100644 index c800ffc7..00000000 --- a/docs/manuals/fr/install/security.tex +++ /dev/null @@ -1,336 +0,0 @@ -%% -%% - -\chapter{Consid\'erations sur la s\'ecurit\'e de Bacula} -\label{_ChapterStart14} -\index[general]{Bacula!Consid\'erations sur la s\'ecurit\'e de} -\index[general]{Consid\'erations sur la s\'ecurit\'e de Bacula} -\index[general]{S\'ecurit\'e} - -\begin{itemize} -\item La s\'ecurit\'e, c'est de pouvoir restaurer vos fichiers, aussi, lisez - attentivement le chapitre \ilink{Critical Items Chapter}{Critical} de - ce manuel. -\item Le client ({\bf bacula-fd}) doit \^etre ex\'ecut\'e en tant que root - afin d'avoir l'acc\`es \`a tous les fichiers du syst\`eme. -\item Il n'est pas n\'ecessaire d'ex\'ecuter le Director en tant que root. -\item Il n'est pas n\'ecessaire d'ex\'ecuter le Storage Daemon en tant que - root, mais vous devez vous assurer qu'l peut utiliser le lecteur de bandes, - dont l'acc\`es est presque toujours r\'eserv\'e \`a root par d\'efaut. - De plus, si vous n'ex\'ecutez pas le Storage Daemon en tant que root, il sera - dans l'incapacit\'e de r\'egler automatiquement les param\`etres de votre lecteur - de bandes. En effet, ces fonctions requi\`erent les droits root sur la plupart - des syst\`emes d'exploitation. -\item Vous devriez restreindre l'acc\`es au fichiers de configuration de - Bacula, de sorte que les mots de passe ne soient pas lisibles par tous. Les - {\it daemons} {\bf Bacula} sont prot\'eg\'es par des mots de passe et CRAM-MD5 -(i.e. les mots de passe ne sont pas envoy\'es sur le r\'eseau). Ceci assure -que tout le monde ne peut acc\'eder aux {\it daemons}. C'est une protection -raisonnablement bonne, mais qui peut \^etre craqu\'ee par un expert. -\item Si vous utilisez les ports recommand\'es 9101,9102 et 9103, vous voudrez - probablement prot\'eger ces ports des acc\`es externes \`a l'aide d'un - firewall et/ou en utilisant tcp wrappers ({\bf etc/hosts.allow}). -\item Actuellement, toutes les donn\'ees sont envoy\'ees sur le r\'eseau sans - chiffrement. Par cons\'equent, \`a moins que vous n'utilisiez {\bf ssh} ou {\bf - stunnel} pour la transmission de port (NDT: port forwarding), il n'est pas -recommand\'e de faire des sauvegardes \`a travers un r\'eseau non -s\'ecuris\'e (par exemple, Internet). Nous pr\'evoyons d'int\'egrer le -chiffrage {\bf ssl} dans une version future. -\item Vous devriez vous assurer que seuls les {\it daemons} de Bacula ont - acc\`es en lecture et \'ecriture aux r\'epertoires de travail de Bacula. -\item Si vous utilisez {\bf MySQL}, il n'est pas n\'ecessaire de l'ex\'ecuter - en tant que root -\item Le script par d\'efaut de Bacula {\bf grant-mysql-permissions} accorde - toutes les permissions d'utilisation de la base de donn\'ees MySQL sans mot - de passe. Si vous voulez la s\'ecurit\'e, affinez ceci ! -\item N'oubliez pas que Bacula est un programme r\'eseau, ainsi quiconque sur - le r\'eseau dispose du programme console et du mot de passe du Director peut - acc\'eder \`a Bacula et aux donn\'ees sauvegard\'ees. -\item Vous pouvez restreindre les adresses IP avec auxquelles Bacula se - connectera en utilisant les enregistrements appropri\'es {\bf DirAddress}, - {\bf FDAddress}, ou {\bf SDAddress} dans les fichiers de configurations -respectifs des {\it daemons} -\item Soyez conscient que si vous sauvegardez votre catalogue avec le script - par d\'efaut, et si l'acc\`es \`a votre catalogue est prot\'eg\'e par un mot de passe, - ce dernier est transmis en tant qu'option de ligne de commande \`a ce script, - ce qui le rend visible \`a tout utilisateur du syst\`eme. Si vous voulez - s\'ecuriser ce point, vous devez le passer via une variable d'environnement - ou un fichier s\'ecuris\'e. -\end{itemize} - -\section{Compatibilit\'e ascendante} -\index[general]{Compatibilit\'e ascendante} -\addcontentsline{toc}{section}{Compatibilit\'e ascendante} -L'un des principaux objectifs de Bacula est de garantir que vous pouvez -restaurer depuis des cartouches (ou depuis des volumes disque) \'ecrites des ann\'ees -auparavant. Ceci implique que chaque nouvelle version de Bacula devrait \^etre -capable de relire les anciens formats de cartouches. Le premier probl\`eme est de -s'assurer que le mat\'eriel fonctionne encore malgr\'e les ann\'ees, et que les supports -sont encore valides. Ensuite, votre syst\`eme d'exploitation doit \^etre capable -de s'interfacer avec le p\'eriph\'erique et finalement, Bacula doit \^etre capable -de reconna\^itre les anciens formats. De tous ces probl\`emes, nous ne pouvons -prendre en charge que le dernier, pour les autres, vous devez vous pr\'eparer -consciencieusement. - -Depuis les tous premiers stades de Bacula (janvier 2000) jusqu'\`a aujourd'hui -(D\'ecembre 2005), Bacula a connu deux formats majeurs d'\'ecriture sur les -cartouches. Le second format a \'et\'e introduit dans la version 1.27 en -novembre 2002, et n'a pas chang\'e depuis. En principe, Bacula devrait encore pouvoir -lire le format d'origine, mais j'avoue ne pas avoir essay\'e depuis longtemps... - -Bien que le format des cartouches soit fix\'e, les types de donn\'ees qui peuvent \^etre -\'ecrites sur les cartouches sont extensibles, ce qui nous a permis d'ajouter de -nouvelles fonctionnalit\'es telles que les ACLs, les donn\'ees Win32, les donn\'ees -chiffr\'ees... Naturellement, une ancienne version de Bacula ne saurait lire des -nouveaux flux de donn\'ees, mais chaque nouvelle version de Bacula est en principe -capable de lire les anciens flux. - -Si vous voulez \^etre absolument certain de pouvoir lire vos vieilles cartouches, -vous devriez : - -1. Essayer de lire les vieilles cartouches de temps en temps, une fois par an -par exemple. - -2. Conserver une copie statiquement li\'ee de chaque version de Bacula que vous -avez utilis\'ee en production. Ainsi, si pour quelque raison nous venions \`a -abandonner la compatibilit\'e avec les anciens formats de cartouches, vous pourriez -toujours remettre en service une vieille copie de Bacula... - -Le second point est probablement excessif, en toute rigueur, il pourrait vous -sauver un jour. - -\label{wrappers} - -\section{Configurer et tester TCP Wrappers} -\index[general]{Configurer et tester TCP Wrappers} -\index[general]{Bacula!Configurer et tester TCP Wrappers} -\index[general]{TCP Wrappers} -\index[general]{Wrappers!TCP} -\index[general]{libwrappers} -\addcontentsline{toc}{section}{Configurer et tester TCP Wrappers} - -Les TCP Wrappers sont impl\'ement\'es si vous les activez lors de la -configuration ({\bf ./configure \verb{:--:{with-tcp-wrappers}). Avec ce code activ\'e, vous -pourrez contr\^oler qui peut acc\'eder \`a vos {\it daemons}. Ce contr\^ole -est obtenu par la modification du fichier {\bf /etc/hosts.allow}. Le nom de -programme qu'utilise {\bf Bacula} pour appliquer ces restrictions est celui -que vous avez sp\'ecifi\'e dans le fichier de configuration du {\it daemon}. -Vous ne devez pas utiliser l'option {\bf twist} dans votre {\bf -/etc/hosts.allow} car elle stopperait les {\it daemons} Bacula lorsqu'une -connection est refus\'ee. - -Le nom exact du paquet requis pour compiler avec le support TCP wrappers -d\'epend du syst\`eme. Il s'agit, par exemple, de tcpd-devel sur SuSE, et de -tcp\_wrappers sur RedHat. - -Dan Langille a fourni les informations suivantes concernant la configuration -et les tests de TCP Wrappers avec Bacula. - -Si vous lisez hosts\_options(5), vous verrez une option nomm\'ee twist. Cette -option remplace le processus courant par une instance de la commande shell -sp\'ecifi\'ee. Voici un exemple typique de son utilisation : - -\footnotesize -\begin{verbatim} -ALL : ALL \ - : severity auth.info \ - : twist /bin/echo "Vous n'\^etes pas autoris\'e \`a utiliser %d depuis %h." -\end{verbatim} -\normalsize - -\label{question-1} -Le code libwrap tente d'\'eviter {\bf twist} s'il est -ex\'ecut\'e dans un processus r\'esident. Il en r\'esulte que le processus (e.g. -bacula-fd, bacula-sd, bacula-dir) sera stopp\'e si la premi\`ere connection -\`a son port provoque l'invocation de l'option twist. Le risque est qu'une -attaque provoque l'arr\^et des {\it daemons}. Cette situation est \'evit\'ee si votre -fichier /etc/hosts.allow contient un jeu de r\`egles appropri\'e. L'exemple -suivant est suffisant : - -\footnotesize -\begin{verbatim} -undef-fd : localhost : allow -undef-sd : localhost : allow -undef-dir : localhost : allow -undef-fd : ALL : deny -undef-sd : ALL : deny -undef-dir : ALL : deny -\end{verbatim} -\normalsize - -Vous devez accorder les noms des {\it daemons} \`a ceux sp\'ecifi\'es dans leurs -fichiers de configuration respectifs. Ce ne sont, en g\'en\'eral, pas les noms -des fichiers binaires des {\it daemons}. Il n'est pas possible d'utiliser -les noms des binaires car plusieurs {\it daemons} peuvent \^etre ex\'ecut\'es -sur une machine avec des fichiers de configuration distincts. - -Dans ces exemples, le Director est undef-dir, le -Storage Daemon est undef-sd, et le File Daemon est undef-fd. Ajustez ces noms pour -qu'ils conviennent \`a votre configuration. L'exemple de r\`egles ci-dessus suppose que -SD, FD et DIR sont tous sur la m\^eme machine. Si vous avez un client FD -distant, il vous suffira de placer le jeu de r\`egles suivant sur ce client : - -\footnotesize -\begin{verbatim} -undef-fd : director.example.org : allow -undef-fd : ALL : deny -\end{verbatim} -\normalsize - -O\`u director.example.org est l'h\^ote qui contactera le client (i.e. la -machine sur laquelle le Bacula Director tourne). L'usage de "ALL : deny" -assure que l'option twist (si pr\'esente) n'est pas invoqu\'ee. Pour tester -correctement votre configuration, d\'emarrez le(s) {\it daemon(s)}, puis -essayez de vous y connecter depuis une adresse IP qui devrait \^etre capable -de le faire. Vous devriez voir quelque chose comme : - -\footnotesize -\begin{verbatim} -$ telnet undef 9103 -Trying 192.168.0.56... -Connected to undef.example.org. -Escape character is '^]'. -Connection closed by foreign host. -$ -\end{verbatim} -\normalsize - -C'est la r\'eponse correcte. Si vous voyez ceci : - -\footnotesize -\begin{verbatim} -$ telnet undef 9103 -Trying 192.168.0.56... -Connected to undef.example.org. -Escape character is '^]'. -You are not welcome to use undef-sd from xeon.example.org. -Connection closed by foreign host. -$ -\end{verbatim} -\normalsize - -Alors, twist a \'et\'e invoqu\'ee, et votre configuration est incorrecte. vous -devez ajouter la directive "deny". Il est important de noter que vos tests -doivent inclure le red\'emarrage des {\it daemons} apr\`es chaque tentative de -connexion. Vous pouvez aussi tcpdchk(8) et tcpdmatch(8) pour valider jeu de -r\`egles /etc/hosts.allow. Voici un test simple avec tcpdmatch : - -\footnotesize -\begin{verbatim} -$ tcpdmatch undef-dir xeon.example.org -warning: undef-dir: no such process name in /etc/inetd.conf -client: hostname xeon.example.org -client: address 192.168.0.18 -server: process undef-dir -matched: /etc/hosts.allow line 40 -option: allow -access: granted -\end{verbatim} -\normalsize - -Si vous ex\'ecutez Bacula en tant que {\it standalone daemon}, les -avertissements ci-dessus peuvent \^etre ignor\'es sans scrupules. Voici un -exemple qui r\'ev\`ele que "deny" fait defaut \`a vos r\`egles, et que -l'option twist a \'et\'e invoqu\'ee. - -\footnotesize -\begin{verbatim} -$ tcpdmatch undef-dir 10.0.0.1 -warning: undef-dir: no such process name in /etc/inetd.conf -client: address 10.0.0.1 -server: process undef-dir -matched: /etc/hosts.allow line 91 -option: severity auth.info -option: twist /bin/echo "You are not welcome to use - undef-dir from 10.0.0.1." -access: delegated -\end{verbatim} -\normalsize - -\section{Ex\'ecuter Bacula sans \^etre root} -\index[general]{Root!Ex\'ecuter Bacula sans \^etre } -\index[general]{Ex\'ecuter Bacula sans \^etre root } -\addcontentsline{toc}{section}{Ex\'ecuter Bacula sans \^etre root} - -Voici quelques recommandations de Dan Languille : - -C'est une bonne id\'ee d'ex\'ecuter vos {\it daemons} avec des privil\`eges -aussi faibles que possible. En d'autres termes, si vous pouvez, n'ex\'ecutez -pas d'applications en tant que root si elle n'ont pas besoin d'\^etre -ex\'ecut\'ees en tant que root. Le Storage Daemon et le Director Daemon n'ont -pas besoin d'\^etre ex\'ecut\'es en tant que root. Le File Daemon en a besoin -pour acc\'eder \`a l'ensemble des fichiers du syst\`eme. Pour vous passer des -privil\`eges root, il vous faut cr\'eer un utilisateur et un groupe. Choisir -{\tt bacula} pour l'un et l'autre me semble une bonne id\'ee. - -Le port FreeBSD cr\'ee cet utilisateur et ce groupe pour vous. (En fait, au -moment ou j'\'ecris ces lignes, ce n'est pas encore le cas, mais \c{c}a le -sera bient\^ot). Voici \`a quoi ressemblent ces entr\'ees sur mon portable -FreeBSD : - -\footnotesize -\begin{verbatim} -bacula:*:1002:1002::0:0:Bacul Daemon:/var/db/bacula:/sbin/nologin -\end{verbatim} -\normalsize - -J'ai utilis\'e vipw pour cr\'eer ces entr\'ees. J'ai utilis\'e un User ID et -un Group ID disponibles sur mon syst\`eme : 1002. - -J'ai aussi cr\'e\'e un groupe dans /etc/group: - -\footnotesize -\begin{verbatim} -bacula:*:1002: -\end{verbatim} -\normalsize - -L'utilisateur bacula, contrairement au {\it daemon} Bacula, aura un -r\'epertoire d\'edi\'e (home directory) : {\tt /var/db/bacula} qui est le -r\'epertoire standard pour le catalogue de Bacula. - -A pr\'esent, vous avez un utilisateur et un groupe bacula, et vous pouvez -s\'ecuriser le r\'epertoire d\'edi\'e de bacula en utilisant cette commande : - -\footnotesize -\begin{verbatim} -chown -R bacula:bacula /var/db/bacula/ -\end{verbatim} -\normalsize - -Celle-ci assure que seul l'utilisateur bacula peut acc\'eder \`a ce -r\'epertoire. Elle signifie aussi que si nous ex\'ecutons le Director et le -Storage Daemon en tant que bacula, ces {\it daemons} auront aussi des acc\`es -restreints. Ce ne serait pas le cas s'ils \'etaient ex\'ecut\'es en tant que -root. - -Il est important de noter que le Storage Daemon a vraiment besoin -d'appartenir au groupe operator pour un acc\`es normal aux lecteurs de bandes. -(au moins sur FreeBSD, c'est ainsi que les choses sont configur\'ees par -d\'efaut). De tels p\'eriph\'eriques sont en principe attribu\'es \`a -root:operator. Il est plus facile et moins dangereux de faire de bacula un -membre de ce groupe que de jouer avec les permissions du syst\`eme. - -D\'emarrer les {\it daemons} bacula - -Pour d\'emarrer les {\it daemons} bacula sur FreeBSD, utilisez la commande : - -\footnotesize -\begin{verbatim} -/usr/local/etc/rc.d/bacula.sh start -\end{verbatim} -\normalsize - -Pour vous assurer que tous fonctionnent : - -\footnotesize -\begin{verbatim} -$ ps auwx | grep bacula -root\ 63416\ 0.0\ 0.3\ 2040 1172\ ??\ Ss\ 4:09PM 0:00.01 - /usr/local/sbin/bacula-sd -v -c /usr/local/etc/bacula-sd.conf -root\ 63418\ 0.0\ 0.3\ 1856 1036\ ??\ Ss\ 4:09PM 0:00.00 - /usr/local/sbin/bacula-fd -v -c /usr/local/etc/bacula-fd.conf -root\ 63422\ 0.0\ 0.4\ 2360 1440\ ??\ Ss\ 4:09PM 0:00.00 - /usr/local/sbin/bacula-dir -v -c /usr/local/etc/bacula-dir.conf -\end{verbatim} -\normalsize diff --git a/docs/manuals/fr/install/setup.sm b/docs/manuals/fr/install/setup.sm deleted file mode 100644 index 7c88dc61..00000000 --- a/docs/manuals/fr/install/setup.sm +++ /dev/null @@ -1,23 +0,0 @@ -/* - * html2latex - */ - -available { - sun4_sunos.4 - sun4_solaris.2 - rs_aix.3 - rs_aix.4 - sgi_irix -} - -description { - From Jeffrey Schaefer, Geometry Center. Translates HTML document to LaTeX -} - -install { - bin/html2latex /afs/rpi.edu/dept/acs/rpinfo/filters/GChtml2latex/html2latex - bin/html2latex.tag /afs/rpi.edu/dept/acs/rpinfo/filters/GChtml2latex/html2latex.tag - bin/html2latex-local.tag /afs/rpi.edu/dept/acs/rpinfo/filters/GChtml2latex/html2latex-local.tag - bin/webtex2latex.tag /afs/rpi.edu/dept/acs/rpinfo/filters/GChtml2latex/webtex2latex.tag - man/man1/html2latex.1 /afs/rpi.edu/dept/acs/rpinfo/filters/GChtml2latex/html2latex.1 -} diff --git a/docs/manuals/fr/install/storedconf.tex b/docs/manuals/fr/install/storedconf.tex deleted file mode 100644 index 3bd46486..00000000 --- a/docs/manuals/fr/install/storedconf.tex +++ /dev/null @@ -1,1269 +0,0 @@ -%% -%% - -\chapter{Configuration du Storage Daemon} -\label{_ChapterStart31} -\index[general]{Configuration du Storage Daemon} -\index[general]{Configuration!Storage Daemon} - -\section{General} -\index[general]{General} -\addcontentsline{toc}{section}{General} -Le fichier de configuration du Storage Daemon a relativement peu de d\'efinitions -de resources. Cependant, en raison du nombre pl\'ethorique de media et de syst\`emes, -il doit \^etre hautement param\'etrable. Par cons\'equent, il existe un nombre assez important -de directives dans la d\'efinition de ressource Devices qui vous permettent de d\'efinir -toutes les caract\'eristiques de votre p\'eriph\'erique de stockage. Heureusement, avec les -mat\'eriels modernes, les valeurs par d\'efaut sont g\'en\'eralement suffisantes, et tr\`es -peu de directives sont r\'eellement indispensables. - -Des exemples de directives de ressources device connues pour fonctionner pour -beaucoup de lecteurs de bandes communs peuvent \^etre trouv\'es dans le r\'epertoire : -\lt{}bacula-src\gt{}/examples/devices. La plupart seront \'enum\'er\'es ici. - -Pour une discussion g\'en\'erale concernant les fichiers de configuration de Bacula, -les ressources et les types de donn\'ees reconnus, veuillez consulter le -chapitre \ilink{Configuration}{_ChapterStart16} de ce manuel. Les d\'efinitions de -ressources Storage suivantes doivent \^etre d\'efinies : - -\begin{itemize} -\item - \ilink{Storage}{StorageResource} -- Pour d\'efinir le nom du Storage Daemon. -\item - \ilink{Director}{DirectorResource1} -- Pour d\'efinir le nom du Director et le mot - de passe permettant d'y acc\'eder. -\item - \ilink{Device}{DeviceResource} -- Pour d\'efinir les caract\'eristiques de votre - p\'eriph\'erique de stockage. -\item - \ilink{Messages}{_ChapterStart15} -- Pour d\'efinir o\`u les messages d'erreurs - et d'information doivent \^etre exp\'edi\'es. -\end{itemize} - -\section{Ressource Storage} -\label{StorageResource} -\index[general]{Ressource!Storage} -\index[general]{Ressource Sorage} -\addcontentsline{toc}{section}{Ressource Storage} - -En g\'en\'eral, les propri\'et\'es sp\'ecifi\'ees au niveau de la ressource Storage d\'efinissent -des propri\'et\'es globales du Storage Daemon. Chaque fichier de configuration de -Storage Daemon doit avoir sa propre d\'efinition de ressource Storage. - -\begin{description} - -\item [Name = \lt{}Storage-Daemon-Name\gt{}] - \index[sd]{Name} - \index[sd]{Directive!Name} - Sp\'ecifie le nom du Storage Daemon. Cette directive est requise. -\item [Working Directory = \lt{}R\'epertoire\gt{}] - \index[sd]{Working Directory} - \index[sd]{Directive!Working Directory} - Cette directive sp\'ecifie un r\'epertoire o\`u le Storage Daemon peut placer ses fichiers - d'\'etat. Ce r\'epertoire ne devrait \^etre utilis\'e que par Bacula, mais peut \^etre - partag\'e par d'autres daemons Bacula, pourvu que les noms donn\'es \`a chaque daemon - soient uniques. Cette directive est requise. - -\item [Pid Directory = \lt{}R\'epertoire\gt{}] - \index[sd]{Pid Directory} - \index[sd]{Directive!Pid Directory} - Cette directive sp\'ecifie un r\'epertoire o\`u le Storage Daemon peut d\'eposer son fichier -d'Id de processus. Ce fichier est utilis\'e pour stopper Bacula et pr\'evenir l'ex\'ecution -simultan\'ee de plusieurs copies de Bacula. Les substitutions shell standard sont -effectu\'ees \`a la lecture du fichier de configuration, de sorte que des valeurs -telles que {\bf \$HOME} seront correctement substitu\'ees. - -Typiquement, sur les syst\`emes Linux, vous utiliserez ici {\bf /var/run}. Si vous -n'installez pas Bacula dans les r\'epertoires syst\`eme, vous pouvez utiliser le -r\'epertoire de travail {\bf Working Directory} d\'efini plus haut. -Cette directive est requise. - -\item [Heartbeat Interval = \lt{}P\'eriode\gt{}] - \index[sd]{Heartbeat Interval} - \index[sd]{Directive!Heartbeat Interval} - \index[general]{Heartbeat Interval} - \index[general]{Broken pipe} - Cette directive d\'efinit la p\'eriode des pulsations \'emises par le Storage Daemon - vers le File Daemon lorqu'il (le SD) se trouve en situation d'attente du montage - d'une cartouche par l'op\'erateur. La valeur par d\'efaut est z\'ero, ce qui d\'esactive - les pulsations. Cette fonctionnalit\'e est particuli\`erement utile si vous avez un - routeur (tel que les 3Com) qui ne suit pas les standards Internet et expire une - connection valide apr\`es une courte dur\'ee, bien que {\it keepalive} soit activ\'e. - Ceci produit habituellement un message d'erreur du type {\it broken pipe}. - -\item [Maximum Concurrent Jobs = \lt{}nombre\gt{}] - \index[sd]{Maximum Concurrent Jobs} - \index[sd]{Directive!Maximum Concurrent Jobs} - O\`u \lt{}nombre\gt{} est nombre maximal de jobs qui peuvent \^etre ex\'ecut\'es - simultan\'ement. La valeur par d\'efaut est fix\'ee \`a 10, mais vous pouvez d\'efinir - une valeur plus grande. Chaque connexion depuis le Director (par exemple - une requ\^ete de statut, le lancement d'un job...) est consid\'er\'ee comme un job, - aussi, si vous voulez conserver la possibilit\'e d'utiliser la commande - {\bf status} dans la console alors qu'un job est en cours d'ex\'ecution, vous - devez utiliser une valeur strictement sup\'erieure \`a 1. Pour ex\'ecuter plusieurs - jobs simultan\'ement, vous devez param\'etrer plusieurs autres directives dans le - fichier de configuration du Director. Selon ce que vous voulez faire, il faudra - intervenir sur l'un ou l'autre param\`etre, mais vous devrez presque surement - r\'egler le param\`etre {\bf Maximum Concurrent Jobs} de la ressource Storage du - fichier de configuration du Director, et peut-\^etre aussi ceux des ressources - Job et Client. - -\item [SDAddresses = \lt{}Adresse IP\gt{}] - \index[sd]{SDAddresses} - \index[sd]{Directive!SDAddresses} - Pr\'ecise les ports et adresses sur lesquels le Storage Daemon est \`a - l'\'ecoute de connections du Director. En principe, les valeurs par d\'efaut sont - suffisantes, et vous n'avez pas besoin d'utiliser cette directive. La meilleure - explication du fonctionnement de cette directive est certainement un exemple : - -\footnotesize -\begin{verbatim} - SDAddresses = { ip = { - addr = 1.2.3.4; port = 1205; } - ipv4 = { - addr = 1.2.3.4; port = http; } - ipv6 = { - addr = 1.2.3.4; - port = 1205; - } - ip = { - addr = 1.2.3.4 - port = 1205 - } - ip = { - addr = 1.2.3.4 - } - ip = { - addr = 201:220:222::2 - } - ip = { - addr = bluedot.thun.net - } -} -\end{verbatim} -\normalsize - -o\`u "ip", "ip4", "ip6", "addr", et "port" sont des mots-clef. Notez que les adresses -peuvent \^etre sp\'ecifi\'ees sous forme de quadruplets point\'es, de nom symboliques -(uniquement dans la sp\'ecification "ip") ou en notation IPv6 \`a double points. Le port -peut quand \`a lui \^etre sp\'ecifi\'e par son num\'ero, ou par sa valeur mn\'emonique du -fichier /etc/services. Si un port n'est pas sp\'ecifi\'e, la valeur par d\'efaut est -utilis\'ee. Si une section ip est sp\'ecifi\'ee, la r\'esolution peut \^etre r\'ealis\'ee -par ipv4 ou ipv6. En revanche, si ip4 ou ip6 est sp\'ecifi\'ee, seule la r\'esolution -correspondante fonctionne. - -Vous pouvez, avec ces directives, remplacer les valeurs des directives SDPort et -SDAddress montr\'ees ci-dessous. - -\item [SDPort = \lt{}Num\'ero de port\gt{}] - \index[sd]{SDPort} - \index[sd]{Directive!SDPort} - Sp\'ecifie le num\'ero de port sur lequel le Storage Daemon \'ecoute les connexions - en provenance du Director. La valeur par d\'efaut est 9103. - -\item [SDAddress = \lt{}Adresse IP\gt{}] - \index[sd]{SDAddress} - \index[sd]{Directive!SDAddress} - Cette directive est optionnelle. Lorsqu'elle est sp\'ecifi\'ee, le Storage Daemon n'accepte - de connections (de Director(s) ou de File(s) Daemon(s)) que de l'adresse sp\'ecifi\'ee - {\bf Adresse-IP}, qui peut \^etre - soit un nom de domaine, soit une adresse IP au format quadruplet point\'e. - Si cette directive n'est pas sp\'ecifi\'ee, le Storage Daemon acceptera des connections de - de toute adresse valide. - -\end{description} - -Voici une d\'efinition typique d'une ressource Storage du Storage Daemon : - - -\footnotesize -\begin{verbatim} -# -# "Global" Storage daemon configuration specifications appear -# under the Storage resource. -# -Storage { - Name = "Storage daemon" - Address = localhost - WorkingDirectory = "~/bacula/working" - Pid Directory = "~/bacula/working" -} -\end{verbatim} -\normalsize - -\section{La ressource Director} -\label{DirectorResource1} -\index[general]{Ressource Director} -\index[general]{Resource!Director} -\addcontentsline{toc}{section}{La ressource Director} - -La ressource Director sp\'ecifie le nom du Director qui est autoris\'e -\`a utiliser les services du Storage Daemon. Il peut exister plusieurs -ressources Director. Le nom et le mot de passe du Director doivent -s'accorder avec leurs homologues dans le fichier de configuration -du Storage Daemon. - -\begin{description} - -\item [Name = \lt{}Nom-du-Director\gt{}] - \index[sd]{Name} - \index[sd]{Directive!Name} - Sp\'ecifie le nom du Director autoris\'e \`a se connecter au Storage Daemon. - Cette directive est requise. - -\item [Password = \lt{}Mot-de-passe-du-Director\gt{}] - \index[sd]{Password} - \index[sd]{Directive!Password} - Sp\'ecifie le mot de passe qui doit \^etre soumis par le Director susnomm\'e. - Cette directive est requise. - -\item [Monitor = \lt{}yes|no\gt{}] - \index[sd]{Monitor} - \index[sd]{Directive!Monitor} - Si cette directive est d\'esactiv\'ee ({\bf no}), ce qui est le cas par d\'efaut, - ce Director dispose d'un acc\`es illimit\'e \`a ce Storage Daemon. Dans le cas - contraire, ce Director est brid\'e de fa\c {c}on \`a pouvoir seulement r\'ecup\'erer le - statut courant de ce Storage Daemon. - - Si ce Director est utilis\'e par un superviseur, nous vous recommandons - fortement d'activer cette directive pour \'eviter de s\'erieux probl\`emes de - s\'ecurit\'e. - -\end{description} - -Voici un exemple d'une d\'efinition de ressource Director valide : - -\footnotesize -\begin{verbatim} -Director { - Name = MainDirector - Password = my_secret_password -} -\end{verbatim} -\normalsize - -\label{DeviceResource} -\section{La Ressource Device} -\index[general]{Resource!Device} -\index[general]{Ressource Device} -\addcontentsline{toc}{section}{Ressource Device} - -La ressource Device sp\'ecifie les d\'etails de chaque p\'eriph\'erique (en g\'en\'eral, -un lecteur de bandes) qui peut \^etre utilis\'e par le Storage Daemon. Un -Storage Daemon peut disposer de plusieurs ressources Device. En g\'en\'eral, -les propri\'et\'es sp\'ecifi\'ees dans la ressource Device sont sp\'ecifiques -au p\'eriph\'erique. - -\begin{description} - -\item [Name = {\it Nom-de-p\'eriph\'erique}] - \index[sd]{Name} - \index[sd]{Directive!Name} - Sp\'ecifie le nom que le Director devra utiliser pour d\'esigner ce p\'eriph\'erique. - Il s'agit d'un nom logique, c'est une cha\^ine qui peut comporter jusqu'\`a 127 - caract\`eres. C'est en g\'en\'eral une bonne id\'ee d'utiliser un nom qui corresponde - au nom "humain" du p\'eriph\'erique (NDT: la vo dit "the english name"). Le nom - physique du p\'eriph\'erique est sp\'ecifi\'e au niveau de la directive {\bf Archive Device} - d\'ecrite ci-dessous. Le nom que vous sp\'ecifiez ici est aussi utilis\'e dans le - fichier de configuration de votre Director au niveau de la - \ilink{directive Device}{StorageResource2} de sa ressource Storage. - -\item [Archive Device = {\it cha\^ine-nom}] - \index[sd]{Archive Device} - \index[sd]{Directive!Archive Device} - La {\bf cha\^ine-nom} (NDT : name-string dans la vo) sp\'ecifie le nom de fichier syst\`eme - du p\'eriph\'erique de stockage g\'er\'e par ce daemon. Il s'agit en g\'en\'eral d'un nom - de p\'eriph\'erique amovible, par exemple un lecteur de bande d\'esign\'e par "{\bf /dev/nst0}" - ou "{\bf /dev/rmt/0mbn}". Dans le cas d'un graveur de DVD, ce sera par exemple - {\bf /dev/hdc}. Ce peut \^etre aussi un un nom de r\'epertoire si vous sauvegardez - sur disque. Dans ce cas, vous devez soumettre le chemin absolu vers ce - r\'epertoire. Lorsque vous utilisez un lecteur de bandes, il est pr\'ef\'erable - d'utiliser la variante "non-rewind" du fichier de p\'eriph\'erique. De plus, sur les - syst\`emes tels que Sun, qui disposent de plusieurs m\'ethodes d'acc\`es aux cartouches, - prenez soin de sp\'ecifier l'usage de la convention I/O Berkeley avec les p\'eriph\'eriques. - le {\bf b} de la sp\'ecification {\bf /dev/rmt/0mbn} Solaris (Sun) est ce qui est - requis dans ce cas. Bacula ne supporte pas le comportement SysV des lecteurs de bandes. - - Comme mentionn\'e plus haut,Archive Device est, en principe, le nom d'un lecteur de bandes, - mais vous pouvez tout aussi bien sp\'ecifier le chemin absolu vers un r\'epertoire - existant. Dans ce cas, Bacula utilisera un fichier pour stocker les donn\'ees dans - le r\'epertoire sp\'ecifi\'e, le nom de fichier utilis\'e sera celui du volume tel que - sp\'ecifi\'e dans le catalogue. Si vous souhaitez \'ecrire dans plusieurs r\'epertoires - (dans le but de r\'epartir la charge sur plusieurs disques), vous devez d\'efinir deux ressources - Device, chacune comportant une Archive Device avec un r\'epertoire diff\'erent. - - Une troisi\`eme possibilit\'e consiste \`a sp\'ecifier le nom d'un FIFO. Un FIFO est un - fichier sp\'ecial qui connecte deux programmes via la m\'emoire du noyau. Si vous - sp\'ecifiez un FIFO en guise d'Archive Device, vous devez avoir un programme qui - lit ce que Bacula \'ecrit dans le FIFO. Lorsque le Storage Daemon d\'emarre le job, - il attend que le programme lecteur commence \`a lire pendant un d\'elai maximal de - de {\bf MaximumOpenWait} secondes, au del\`a duquel le job est termin\'e. Par cons\'equent, - il est pr\'ef\'erable de lancer le programme lecteur au d\'ebut du job, par exemple - gr\^ace \`a la directive {\bf RunBeforeJob}. Pour ce type de p\'eriph\'erique, vous ne devez - jamais sp\'ecifier {\bf AlwaysOpen}, puisque vous voulez que le Storage Daemon - ne l'ouvre que lorsqu'un job d\'emarre, aussi veuillez attribuer explicitement - la valeur {\bf No} \`a cette directive. Puisqu'un FIFO est un p\'eriph\'erique \`a sens - unique, Bacula ne tente pas d'en lire le label, il se contente d'y \'ecrire. Pour - cr\'eer un volume FIFO dans le catalogue, utilisez la commande {\bf add} plut\^ot - que la commande {\bf label} afin d'\'eviter de tenter d'\'ecrire un label. - - Lors d'une op\'eration de restauration, si l'Archive Device est un FIFO, Bacula - tente de lire le FIFO, aussi vous devez avoir un programme externe qui \'ecrit dans - le FIFO. Bacula attend que ce programme commence \`a \'ecrire pendant un d\'elai - maximal de {\bf MaximumOpenWait} secondes apr\`es quoi il termine le job. Comme - mentionn\'e ci-dessus, vous pouvez utiliser la directive {\bf RunBeforeJob} pour - lancer ce programme auteur d\`es le d\'ebut du job. - - La directive Archive Device est requise. - -\item [Device Type = {\it Sp\'ecification-de-type}] - \index[sd]{Device Type} - \index[sd]{Directive!Device Type} - La sp\'ecification Device Type de d\'eclarer explicitement \`a Bacula quel type - de p\'eriph\'erique vous d\'efinissez. La valeur de {\it Sp\'ecification-de-type} peut - \^etre l'une des suivantes : - \begin{description} - \item [File] - Indique \`a Bacula que le p\'eriph\'erique est un fichier. Ce peut \^etre - un fichier d\'efini sur un m\'edium fixe ou au contraire amovible (par exemple, un - p\'eriph\'erique USB). Tous les fichiers doivent \^etre des p\'eriph\'eriques en acc\`es - s\'electif (NDT : traduction Google sans doute \`a revoir de "random access") - \item[tape] - Indique \`a Bacula que le p\'eriph\'erique est un lecteur de bandes, donc \`a - acc\`es s\'equentiel. Ces p\'eriph\'eriques sont control\'e par les appels - ioctl(). - \item[Fifo] - Indique \`a Bacula que le p\'eriph\'erique est un p\'eriph\'erique \`a acc\`es - s\'equentiel "first-in-first-out" (premier entr\'e, premier sorti) en - lecture seule ou en \'ecriture seule. - \item[DVD] - Indique \`a Bacula que le p\'eriph\'erique est un DVD. Les DVDs sont \`a acc\`es - s\'equentiel en \'ecriture et \`a acc\`es s\'electif (NDT : traduction Google sans - doute \`a revoir de "random access") en lecture. - \end{description} - - La directive Device Type n'est pas requise, et si elle n'est pas sp\'ecifi\'ee, - Bacula tentera de deviner cette information selon la sp\'ecification Archive - Device fournie. Il existe plusieurs avantages \`a sp\'ecifier explicitement - le type de p\'eriph\'erique. D'abord, sur certains syst\`emes, les p\'eriph\'eriques - bloc et caract\`ere ont le m\^eme type, ce qui signifie que sur ces syst\`emes, - Bacula est probablement incapable de deviner qu'un p\'eriph\'erique est un DVD. - Ensuite, si vous sp\'ecifiez explicitement le type de p\'eriph\'erique, le point de - montage n'a pas besoin d'\^etre d\'efini jusqu'\`a ce que le p\'eriph\'erique soit ouvert. - C'est le cas de la plupart des p\'eriph\'eriques amovibles tels que les USB mont\'es - par le daemon HAL. Au contraire, si le type de p\'eriph\'erique n'est pas - sp\'ecifi\'e explicitement, le point de montage doit exister d\`es le - d\'emarrage du Storage Daemon. - - Cette directive est apparue avec la version 1.38.6 de Bacula. - -\item [Media Type = {\it name-string}] - \index[sd]{Media Type} - \index[sd]{Directive!Media Type} - La cha\^ine {\bf name-string} sp\'ecifi\'ee baptise le type de m\'edia support\'e par - ce p\'eriph\'erique, par exemple, "DLT7000". Les noms de type de m\'edia sont - arbitraires, vous pouvez utiliser le nom de votre choix, mais ils doivent - \^etre connus du catalogue pour qu'il puisse garder trace de quel daemon - peut lire quel type de m\'edia. En g\'en\'eral, chaque type de stockage devrait - avoir un type de m\'edia unique associ\'e. Le m\^eme nom {\bf name-string} doit - appara\^itre dans la d\'efinition de ressource Storage appropri\'ee du fichier - de configuration du Director. - - M\^eme si les noms que vous assignez sont arbitraires, vous devriez les choisir - avec circonspection, car le Media Type est utilis\'e pour d\'eterminer le - p\'eriph\'erique de stockage \`a s\'electionner lors d'une restauration. Ainsi, vous - devriez certainement utiliser le m\^eme Media Type pour tous les lecteurs - dont les cartouches sont interchangeables. Ce n'est g\'en\'eralement pas un - probl\`eme si vous n'avez qu'un Storage Daemon, mais c'en est un avec plusieurs - Storage Daemon, surtout s'ils utilisent des m\'edia incompatibles. - - Si, par exemple, vous sp\'ecifiez le Media Type "DDS-4", Bacula pourra lors de - restaurations s\'electionner tout Storage Daemon qui supporte les "DDS-4". - Si vous avez une librairie, vous voudrez peut-\^etre baptiser son Media Type - d'un nom qui lui soit unique, \`a moins que vous souhaitiez pouvoir utiliser - ses volumes dans d'autres lecteurs. Vous devriez aussi vous assurer d'avoir - des noms de Media Type uniques si les media ne sont pas compatibles d'un - lecteur \`a l'autre. Cette sp\'ecification est requise pour tous les - p\'eriph\'eriques. - - Enfin, si vous utilisez le stockage sur disque, sachez que chaque ressource - Device a g\'en\'eralement un point de montage (ou r\'epertoire) diff\'erent. Afin - que Bacula puisse s\'electionner correctement la ressource Device \`a utiliser, - chacun doit avoir un Media Type distinct. - -\label{Autochanger} -\item [Autochanger = {\it Yes|No}] - \index[sd]{Autochanger} - \index[sd]{Directive!Autochanger} - Si cette directive est \`a {\bf yes}, alors Bacula consid\`ere que le p\'eriph\'erique - concern\'e est dans une librairie, et il vous faut sp\'ecifier une ressource - {\bf Autochanger} qui pointe vers les ressources {\bf Device}. Vous devez - aussi renseigner la directive {\bf Changer Device}. Si la directive est \`a {\bf No} - (valeur par d\'efaut), les volumes doivent \^etre chang\'es manuellement. Vous devriez - aussi avoir une directive identique \`a la \ilink{Storage resource}{Autochanger1} dans - le fichier de configuration du Director, de sorte que Bacula vous demande le slot - lors de l'\'etiquetage des cartouches. - -\item [Changer Device = {\it cha\^ine-nom}] - \index[sd]{Changer Device} - \index[sd]{Directive!Changer Device} - La {\bf cha\^ine-nom} sp\'ecifi\'ee doit \^etre le nom de p\'eriph\'erique {\bf SCSI g\'en\'erique} - associ\'e \`a l'{\bf Archive Device} sp\'ecifi\'ee dans la ressource Device. Ce nom de - p\'eriph\'erique SCSI g\'en\'erique devrait \^etre sp\'ecifi\'e si vous avez une librairie - ou si vous n'avez qu'un lecteur standard mais souhaitez utiliser la {\bf commande - Alert} (voir ci-dessous). Par exemple, sur les syst\`emes Linux, vous sp\'ecifierez - certainement {\bf /dev/nst0} pour le nom d'Archive Device, et {\bf /den/sg0} pour - le nom de Changer Device. Selon votre configuration, le nombre de librairies dont - vous disposez et leurs types, le nom que vous serez amen\'e \`a sp\'ecifier ici peut varier. - Cette directive est optionnelle. Consultez le chapitre - \ilink{Utiliser une librairie}{_ChapterStart18} de ce manuel pour plus de d\'etails - concernant les directives relatives aux librairies. - -\item [Changer Command = {\it cha\^ine nom}] - \index[sd]{Changer Command} - \index[sd]{Directive!Changer Command} - La {\bf cha\^ine-nom} d\'esigne un programme externe qui aura pour t\^ache le - changement des volumes \`a la demande de Bacula. En principe, cette directive - n'est sp\'ecifi\'ee qu'au niveau de la ressource {\bf AutoChanger}, qui est alors - utilis\'ee pour tous les p\'eriph\'eriques. Cependant, vous pouvez parfaitement - utiliser une commande {\bf Changer Command} diff\'erente pour chaque ressource Device. - La plupart du temps, vous sp\'ecifierez le script {\bf mtx-changer} fourni avec - Bacula de la fa\c {c}on suivante : - -\footnotesize -\begin{verbatim} -Changer Command = "/path/mtx-changer %c %o %S %a %d" -\end{verbatim} -\normalsize - - Et vous installerez le programme {\bf mtx} sur votre syst\`eme (paquetage tiers). - Un exemple de cette commande figure dans le fichier de configuration par d\'efaut - du Storage Daemon, bacula-sd.conf. Pour plus de d\'etails concernant les - substitutions de caract\`eres qui peuvent \^etre utilis\'ees pour configurer - votre librairie, veuillez consulter le chapitre sur - l'\ilink{utilisation des Librairies}{_ChapterStart18}. Les utilisateurs - de FreeBSD voudront probablement jeter un oeil aux quelques scripts - fournis dans le r\'epertoire {\bf examples/autochangers}. - -\item [Alert Command = {\it name-string}] - \index[sd]{Alert Command} - La {\bf cha\^ine-nom} d\'esigne un programme externe \`a appeler au terme - de chaque job apr\`es que le p\'eriph\'erique ait \'et\'e lib\'er\'e. Le but de cette - commande est de r\'ecup\'erer d'\'eventuels messages d'alerte du lecteur pour - vous pr\'evenir si quelque chose ne fonctionne pas correctement (ces messages - existent au moins sur la plupart des lecteurs modernes). Les m\^emes - substitutions que celles d\'ecrites au niveau de la {\bf Changer command} - peuvent \^etre utilis\'ees ici. Pour plus d'informations, veuillez consulter - le chapitre sur les \ilink{Librairies}{_ChapterStart18} de ce manuel. - - Notez que vous pouvez trouver un usage \`a cette commande sans n\'ecessairement - poss\'eder une librairie. L'exemple ci-dessous utilise le programme {\bf tapeinfo} - qui vient avec le paquet {\bf mtx} mais peut \^etre utilis\'e avec n'importe quel - lecteur. Vous devrez tout de m\^eme sp\'ecifier une directive {\bf Changer Device} - dans votre ressource Device (voir ci-dessus) afin que le p\'eriph\'erique SCSI - g\'en\'erique puisse \^etre \'edit\'e dans la commande (avec \%c). - - Voici un exemple qui affiche les alertes en provenance du lecteur dans les - rapports de jobs : - -\footnotesize -\begin{verbatim} -Alert Command = "sh -c 'tapeinfo -f %c | grep TapeAlert'" - -\end{verbatim} -\normalsize - -Et un exemple de ce qui peut en sortir lorqu'il y a un probl\`eme : - -\footnotesize -\begin{verbatim} -bacula-sd Alert: TapeAlert[32]: Interface: Problem with SCSI interface - between tape drive and initiator. - -\end{verbatim} -\normalsize - -\item [Drive Index = {\it number}] - \index[sd]{Drive Index} - \index[sd]{Directive!Drive Index} - Le num\'ero de lecteur, ou {\bf Drive Index}, que vous sp\'ecifiez ici est - pass\'e au script {\bf mtx-changer} et donc au programe {\bf mtx}. - Par d\'efaut, le Drive Index vaut z\'ero, aussi, si vous n'avez qu'un - lecteur dans votre librairie, tout fonctionnera correctement. - Si en revanche vous avez plusieurs lecteurs, vous devez sp\'ecifier - plusieurs ressources Device (une par lecteur). - Il n'est pas n\'ecessaire de sp\'ecifier la valeur z\'ero pour la directive - Drive Index dans la premi\`ere de ces ressources (valeur par d\'efaut). Par - contre, la seconde devrait contenir une directive Drive Index \'egale \`a 1, - la troisi\`eme une directive Drive Index \'egale \`a 2, et ainsi de suite. - A partir de la version 1.38.0, en utilisant la ressource {\bf Autochanger}, - Bacula s'assure qu'un seul lecteur \`a la fois utilise le script d'autochargement - (script mtx-changer), aussi vous n'avez plus besoin de scripts de verrouillage - comme ce fut le cas dans le pass\'e -- Le script mtx-change fourni avec Bacula - fonctionne avec un nombre quelconque de lecteurs. - -\item [Autoselect = {\it Yes|No}] - \index[sd]{Autoselect} - \index[sd]{Directive!Autoselect} - Si cette directive vaut {\bf yes} (valeur par d\'efaut), et si le p\'eriph\'erique - appartient \`a une librairie, alors lorsque la librairie est r\'ef\'erenc\'ee par - le Director, ce p\'eriph\'erique peut \^etre automatiquement s\'electionn\'e. - Si cette directive vaut {\bf no}, alors le p\'eriph\'erique peut seulement - \^etre d\'esign\'e par son nom de p\'eriph\'erique (Device Name) dans le - Director. Ceci permet de r\'eserver un lecteur pour une t\^ache particuli\`ere, - comme une sauvegarde hautement prioritaire, ou des op\'erations de restaurations. - -\item [Maximum Changer Wait = {\it time}] - \index[sd]{Maximum Changer Wait} - \index[sd]{Directive!Maximum Changer Wait} - Cette directive sp\'ecifie le d\'elai maximum, en secondes, pendant lequel Bacula - peut attendre d'une librairie qu'elle change de volume. Au del\`a de ce d\'elai, - Bacula invalide le num\'ero de slot r\'ef\'erenc\'e dans le catalogue et essaye \`a - nouveau. Si aucun autre volume n'est disponible dans la librairie, Bacula - r\'eclame l'intervention d'un op\'erateur. La valeur par d\'efaut est 5 minutes. - -\item [Maximum Rewind Wait = {\it time}] - \index[sd]{Maximum Rewind Wait} - \index[sd]{Directive!Maximum Rewind Wait} - Cette directive sp\'ecifie le d\'elai maximum, en secondes, pendant lequel Bacula - peut attendre d'un lecteur qu'il rembobine une cartouche. Au del\`a de ce d\'elai, - le job est effac\'e. La valeur par d\'efaut est 5 minutes. - -\item [Maximum Open Wait = {\it time}] - \index[sd]{Maximum Open Wait} - \index[sd]{Directive!Maximum Open Wait} - Cette directive sp\'ecifie le d\'elai maximum, en secondes, pendant lequel Bacula - peut attendre apr\`es une commande Open.Au del\`a de ce d\'elai, - le job est effac\'e. La valeur par d\'efaut est 5 minutes. - -\item [Always Open = {\it Yes|No}] - \index[sd]{Always Open} - \index[sd]{Directive!Always Open} - Si la valeur sp\'ecifi\'ee ici est {\bf Yes} (valeur par d\'efaut), Bacula garde le - p\'eriph\'erique ouvert, \`a moins qu'il ne soit explicitement d\'emont\'e ({\bf unmounted}) - depuis la console Bacula. Ceci permet \`a Bacula de s'assurer que le lecteur est - toujours disponible. Si vous r\'eglez {\bf AlwaysOpen} \`a {\bf no} {\bf Bacula}, - Bacula ouvre le lecteur seulement lorsque n\'ecessaire, et le lib\`ere \`a la fin du - job, si aucun autre job ne l'utilise. Lors de l'utilisation suivante, Bacula - doit rembobiner la cartouche et se repositionner au bon endroit. Pour \'eviter - ces rembnobinages inutiles et les interventions de l'op\'erateur, il est - hautement recommand\'e de garder la valeur {\bf Always Open = yes}. Ceci assure - aussi que le lecteur est disponible lorsque Bacula en a besoin. - - Si vous avez sp\'ecifi\'e {\bf Always Open = yes} (comme recommand\'e) et si vous - voulez utiliser le lecteur pour autre chose, lib\'erez-le simplement avec la - commande {\bf unmount} dans la console Bacula. N'oubliez-pas ensuite de - remonter le lecteur avec la commande {\bf mount} afin que Bacula soit pr\`et - \`a prendre en charge le prochain job planifi\'e. - - Pour le stockage sur disque (File Storage), cette directive est ignor\'ee. Dans le - cas d'un stockage FIFO, vous devez mettre cette directive \`a {\bf No}. - - Notez bien que si vous mettez cette directive \`a {\bf No}, Bacula lib\`ere le - lecteur entre chaque job, obligeant le lecteur \`a rembobiner la cartouche, et - \`a replacer la bande \`a la fin de la zone de donn\'ees, ce qui peut prendre - beaucoup de temps. - -\item [Volume Poll Interval = {\it p\'eriode}] - \index[sd]{Volume Poll Interval} - \index[sd]{Directive!Volume Poll Interval} - Si la p\'eriode sp\'ecifi\'ee pour cette directive est non nulle alors, apr\`es avoir - demand\'e \`a l'op\'erateur de monter un nouveau volume, Bacula retentera - p\'eriodiquement de lire le lecteur selon la p\'eriode sp\'ecifi\'ee au cas o\`u un - nouveau volume aurait \'et\'e mont\'e. Si la valeur sp\'ecifi\'ee est z\'ero, ces - tentatives de lecture n'ont pas lieu. Cette directive est utile lorsque - vous souhaitez \'eviter l'intervention d'un op\'erateur \`a la console. Au lieu de - quoi l'op\'erateur se contente de sortir la cartouche pr\'ec\'edente et de monter la - nouvelle qui sera reconnue \`a la prochaine tentative. Soyez conscient que si vous - sp\'ecifiez une p\'eriode trop courte, vous risquez de solliciter excessivement - votre lecteur si la cartouche pr\'ec\'edente demeure dans le lecteur, puisque Bacula - la lira \`a chaque tentative. Vous pouvez \'eviter ceci en \'ejectant la cartouche avec - les directives {\bf Offline On Unmount} et {\bf Close on Poll}. - Cependant, si vous utilisez un noyau Linux 2.6 ou un autre syst\`eme d'exploitation tel - FreeBSD ou Solaris, les commandes Offline ou Unmount laisseront le lecteur sans cartouche, - et Bacula, incapable de d'ouvrir correctement le lecteur, pourrait \'echouer ses jobs. - Pour plus d'informations sur ce probl\`eme, veuillez consulter la section - \ilink{description of Offline On Unmount}{NoTapeInDrive} du chapitre relatif - aux tests des lecteurs de bandes. - -\item [Close on Poll= {\it Yes|No}] - \index[sd]{Close on Poll} - \index[sd]{Directive!Close on Poll} - Si cette directive est \`a {\bf Yes}, Bacula ferme le p\'eriph\'erique et le r\'eouvre - \`a chaque tentative (ce qui est \'equivalent \`a unmount, sauf qu'il n'est pas - n\'ecessaire d'utiliser mount ensuite). En principe, cette directive n'est - pas tr\`es utile \`a moins que vous ayez activ\'e la directive {\bf Offline on Unmount}, - auquel cas le lecteur sera consid\'er\'e hors-ligne (NDT : offline) pr\'evenant ainsi - de nombreux mouvements inutiles de la bande lors de chaque tentative de lecture. - Une fois que l'op\'erateur aura charg\'e une nouvelle cartouche, Bacula - sera en mesure de s'en rendre compte \`a la prochaine tentative et poursuivra - automatiquement la sauvegarde. Voyez ci-dessus pour plus de d\'etails. - -\item [Maximum Open Wait = {\it time}] - \index[sd]{Maximum Open Wait} - \index[sd]{Directive!Maximum Open Wait} - Cette directive sp\'ecifie le d\'elai maximum, en secondes que Bacula - accorde \`a un p\'eriph\'erique occup\'e. La valeur par d\'efaut est 5 minutes. - Si le p\'eriph\'erique ne peut \^etre obtenu, le job en cours est termin\'e en erreur. - Bacula tentera \`a nouveau d'ouvrir le lecteur lorsqu'un nouveau job le - r\'eclamera. - -\item [Removable media = {\it Yes|No}] - \index[sd]{Removable media} - \index[sd]{Directive!Removable media} - R\'eglez cette directive \`a {\bf Yes} si le p\'eriph\'erique concern\'e supporte des - m\'edia amovibles (par exemple des cartouches ou des CDROMs). Dans le cas de - m\'edia inamovibles (par exemple, une zone de sauvegardes interm\'ediaires sur un - disque dur), mettez {\bf Removable media = No} - -\item [Random access = {\it Yes|No}] - \index[sd]{Random access} - \index[sd]{Directive!Random access} - Si cette directive est \`a {\bf Yes}, le p\'eriph\'erique de stockage est consid\'er\'e - comme \'etant un m\'edium \`a acc\`es al\'eatoire (NDT : random access medium) qui - supporte les commodit\'es {\bf lseek} (ou {\bf lseek64} si l'option Largefile - a \'et\'e activ\'ee lors de la compilation). - -\item [Minimum block size = {\it size-in-bytes}] - \index[sd]{Minimum block size} - \index[sd]{Directive!Minimum block size} - Sur la plupart des lecteurs modernes, vous n'aurez pas besoin de cette - directive, dont le but est d'utiliser des blocs de taille fixe. Cette - directive ne s'applique qu'aux p\'eriph\'eriques \`a acc\`es s\'equentiel (NDT : - non-random access devices) comme, par exemple, les lecteurs de bandes. - Les blocs \'ecrits par le Storage Daemon sur un p\'eriph\'erique \`a acc\`es - s\'equentiel ne seront jamais de taille inf\'erieure \`a la taille sp\'ecifi\'ee - {\bf size-in-bytes}. Le Storage Daemon tente de remplir au mieux les blocs - avec les donn\'ees re\c {c}ues, mais il compl\`ete si n\'ecessaire pour atteindre - la taille minimum requise {\bf Minimum block size} . - - Pour contraindre la taille des blocs \`a \^etre fixe, comme c'est le cas de - certains p\'eriph\'eriques \`a acc\`es s\'equentiel, stipulez des tailles de blocs - minimum {\bf Minimum block size} et maximum {\bf Maximum block size} - identiques. Le param\'etrage par d\'efaut est 0 pour les deux directives - et la taille de bloc par d\'efaut est de 64 512 octets. - - Par exemple, si vous souhaitez fixer la taille des blocs \`a 100K octets, sp\'ecifiez : - -\footnotesize -\begin{verbatim} - - Minimum block size = 100K - Maximum block size = 100K - -\end{verbatim} -\normalsize - Notez que si vous sp\'ecifiez une taille de blocs fixe comme ci-dessus, le - lecteur doit \^etre r\'egl\'e soit en mode "taille de blocs variable", soit en - mode "taille de blocs fixe" avec imp\'erativement la m\^eme taille de blocs - fixe que celle sp\'ecifi\'ee dans Bacula (ce param\`etre se r\`egle g\'en\'eralement - au niveau du lecteur avec {\bf mt}), faute de quoi vous aurez des erreurs \`a - la relecture de vos cartouches. - - Si vous voulez que votre taille de blocs soit variable mais comprise entre - 64 Ko et 200 Ko, sp\'ecifiez : - -\footnotesize -\begin{verbatim} - - Minimum block size = 64K - Maximum blocksize = 200K - -\end{verbatim} -\normalsize - -\item [Maximum block size = {\it size-in-bytes}] - \index[sd]{Maximum block size} - \index[sd]{Directive!Maximum block size} - Sur la plupart des lecteurs modernes, vous n'aurez pas besoin de cette - directive. Dans le cas contraire, ce sera probablement pour utiliser - des blocs de taille fixe (voir la directive Minimum block size ci dessus). - Le Storage Daemon tente d'\'ecrire des blocs de la taille sp\'ecifi\'ee - {\bf size-in-bytes} sur le p\'eriph\'erique. Par cons\'equent cette - directive fixe \`a la fois la taille maximale et la taille par d\'efaut - des blocs. La taille \'ecrite n'exc\`ede jamais la taille sp\'ecifi\'ee ici. - Lorsque l'ajout de donn\'ees provoquerait un d\'epassement, le bloc est - \'ecrit sur le p\'eriph\'erique, et un nouveau bloc est entam\'e. - avec les donn\'ees re\c {c}ues, mais il compl\`ete si n\'ecessaire pour atteindre - - Si aucune valeur n'est sp\'ecifi\'ee (ou si la valeur sp\'ecifi\'ee est 0), le - Storage Daemon utilise la valeur par d\'efaut de 64 512 octets. - -\item [Hardware End of Medium = {\it Yes|No}] - \index[sd]{Hardware End of Medium} - \index[sd]{Directive!Hardware End of Medium} - Si la valeur attribu\'ee \`a cette directive est {\bf No}, le p\'eriph\'erique de - stockage n'a pas besoin de supporter les requ\^etes ioctl "fin de m\'edium", - le Storage Daemon utilisant la fonction d'avance jusqu'au prochain espace - pour trouver la fin du m\'edium. Si la valeur est {\bf Yes}, le p\'eriph\'erique - doit supporter l'appel {\tt ioctl} {\tt MTEOM} qui positionne la cartouche - \`a la fin des donn\'ees enregistr\'ees. De plus, votre driver SCSI doit garder trace - du nombre de fichiers enregistr\'es sur la cartouche, et le retourner correctement - \`a l'appel {\bf MTIOCGET} ioctl. Notez que certains pilotes SCSI savent se - positionner correctement \`a la fin de la zone de donn\'ees enregistr\'ees sur la cartouche, - mais ne gardent pas trace du nombre de fichiers. Sur les machines Linux, le - driver SCSI a une option {\bf fast-eod} qui, si elle est utilis\'ee - provoque la perte du nombre de fichiers. assurez-vous toujours que cette - option est bien d\'esactiv\'ee (\`a l'aide du programme {\bf mt}). - - Le r\'eglage par d\'efaut de cette directive est {\bf Yes}. Cette option est utilis\'ee - lors de l'\'ecriture \`a la suite d'une cartouche, pour s'assurer que les donn\'ees - pr\'ec\'edemment \'ecrites ne seront pas corrompues. Nous vous recommandons, si vous - avez un lecteur non-standard ou inhabituel, de le tester avec le programme - {\bf btape} pour v\'erifier s'il supporte ou non cette fonction. Tous les lecteurs - modernes (au del\`a de 1998) la supportent. - -\item [Fast Forward Space File = {\it Yes|No}] - \index[sd]{Fast Forward Space File} - \index[sd]{Directive!Fast Forward Space File} - Si la valeur attribu\'ee \`a cette directive est {\bf No}, le p\'eriph\'erique de - stockage n'a pas besoin de supporter les requ\^etes ioctl {\bf MTIOCGET} - "nombre de fichiers" lors du d\'eplacement sur la bande jusqu'au prochain espace. Si au contraire - vous sp\'ecifiez {\bf yes}, le lecteur doit supporter l'appel {\tt ioctl} {\tt MTFSF}, - que presque tous les pilotes supportent, mais de plus votre pilote SCSI doit - garder trace et retourner correctement le nombre de fichiers \`a l'appel - ioctl {\bf MTIOCGET} . Notez que certains pilotes SCSI ex\'ecutent correctement - les d\'eplacements sur bande "jusqu'au prochain espace" sans toutefois garder trace - du nombre de fichiers enregistr\'es, et m\^eme plus grave pour certains : sans - signaler la fin du support. - - La valeur par d\'efaut de cette directive est {\bf Yes}. - -\item [Use MTIOCGET = {\it Yes|No}] - \index[sd]{Use MTIOCGET} - \index[sd]{Directive!Use MTIOCGET} - Si la valeur attribu\'ee \`a cette directive est {\bf No}, le syst\`eme d'exploitation - n'a pas besoin de garder trace du nombre de fichiers sur la cartouche, ni de - le retourner \`a l'appel ioctl {\bf MTIOCGET}. La valeur par d\'efaut est {\bf Yes}. - Si vous devez mettre No ici, Bacula prendra en charge la d\'etermination des - positions de fichiers, mais cela implique des mouvements tr\`es inefficaces de la - bande. Heureusement, cette d\'eficience du syst\`eme d'exploitation semble n'\^etre - l'apanage que de quelques *BSD. Solaris, Linux et FreeBSD sont connus pour - fonctionner correctement. - -\item [BSF at EOM = {\it Yes|No}] - \index[sd]{BSF at EOM} - \index[sd]{Directive!BSF at EOM} - Si cette directive est \`a {\bf No} (valeur par d\'efaut), Bacula n'entreprend - aucune action particuli\`ere lorsque la fin du m\'edium est atteinte car - la cartouche est positionn\'ee apr\`es la derni\`ere marque de fin de fichier EOF, - et Bacula peut \'ecrire \`a la suite. Cependant, sur certains syst\`emes tels que - FreeBSD, lorsque Bacula lit la marque de fin de cartouche, la cartouche est - positionn\'ee apr\`es la seconde marque de fin de fichier EOF (deux marques EOF - successives indiquent la fin du support). Si Bacula \'ecrit au del\`a de cette - marque, toutes les donn\'ees ajout\'ees seront perdues. La solutions pour ces syst\`emes - consiste \`a sp\'ecifier {\bf BSF at EOM}, ainsi Bacula recule en \'ecrasant la - seconde marque de fin de fichier. Pour savoir si vous avez besoin de cette - directive, utilisez la commande {\bf test} du programme {\bf btape}. - -(NDT : Paragraphe \`a revoir VO ci dessous) - If {\bf No}, the default, no special action is taken by Bacula with the End - of Medium (end of tape) is reached because the tape will be positioned after - the last EOF tape mark, and Bacula can append to the tape as desired. - However, on some systems, such as FreeBSD, when Bacula reads the End of - Medium (end of tape), the tape will be positioned after the second EOF tape - mark (two successive EOF marks indicated End of Medium). If Bacula appends - from that point, all the appended data will be lost. The solution for such - systems is to specify {\bf BSF at EOM} which causes Bacula to backspace over - the second EOF mark. Determination of whether or not you need this directive - is done using the {\bf test} command in the {\bf btape} program. - -\item [TWO EOF = {\it Yes|No}] - \index[sd]{TWO EOF} - \index[sd]{Directive!TWO EOF} - Si cette directive est \`a {\bf Yes}, Bacula \'ecrit deux marques de fin de fichier EOF - lorsqu'il a fini d'utiliser une cartouche -- c'est \`a dire apr\`es le dernier - job, ou \`a la fin de la cartouche. Dans le cas contraire (la valeur par d\'efaut), - Bacula n'\'ecrit qu'une marque de fin de fichier pour terminer une cartouche. - -\item [Backward Space Record = {\it Yes|No}] - \index[sd]{Backward Space Record} - \index[sd]{Directive!Backward Space Record} - Si cette directive est \`a {\bf Yes}, le p\'eriph\'erique supporte {\tt MTBSR ioctl} - pour reculer dans les enregistrements. Sinon, cet appel n'est pas utilis\'e - et la bande doit \^etre rembobin\'ee puis avanc\'ee de fichier en fichier jusqu'\`a - la position d\'esir\'ee. La valeur par d\'efaut est {\bf Yes} pour un p\'eriph\'erique - \`a acc\`es s\'equentiel. Cette fonction, si activ\'ee, est utilis\'ee \`a la fin des - volumes apr\`es \'ecriture d'une marque fin de fichier et de toute \'etiquette - ANSI/IBM pour d\'eterminer si oui ou non le dernier bloc a \'et\'e \'ecrit - correctement. Si vous d\'esactivez cette fonction, le test ne sera pas fait. - Ce n'est pas un probl\`eme car le processus de relecture est une - pr\'ecaution plut\^ot qu'une n\'ecessit\'e. - -\item [Backward Space File = {\it Yes|No}] - \index[sd]{Backward Space File} - \index[sd]{Directive!Backward Space File} - Si cette directive est \`a {\bf Yes}, le p\'eriph\'erique supporte les appels - {\bf MTBSF} et {\bf ioctl MTBSF} pour reculer en-de\c{c}a d'un marque de fin de fichier - et se replacer au d\'ebut du fichier. Si cette directive est \`a {\bf No}, ces appels - ne sont pas utilis\'es et le lecteur doit rembobiner la cartouche, puis avancer - de fichier en fichier jusqu'\`a la position d\'esir\'ee. La valeur par d\'efaut est - {\bf Yes} pour les p\'eriph\'eriques \`a acc\`es s\'equentiel. - -\item [Forward Space Record = {\it Yes|No}] - \index[sd]{Forward Space Record} - \index[sd]{Directive!Forward Space Record} - Si cette directive est \`a {\bf Yes}, le p\'eriph\'erique doit supporter les appels - {\bf MTFSR ioctl} pour avancer \`a travers les - enregistrements. Si la valeur est {\bf No}, les donn\'ees doivent \^etre lues dans l'ordre - pour positionner la cartouche. La valeur par d\'efaut est - {\bf Yes} pour les p\'eriph\'eriques \`a acc\`es s\'equentiel. - -\item [Forward Space File = {\it Yes|No}] - \index[sd]{Forward Space File} - \index[sd]{Directive!Forward Space File} - Si cette directive est \`a {\bf Yes}, le p\'eriph\'erique doit supporter les appels - {\tt MTFSF ioctl} pour d\'eplacer la bande en se rep\'erant aux marques de fichiers. - Si la valeur est {\bf No}, les donn\'ees doivent \^etre lues pour positionner la - bande. La valeur par d\'efaut est - {\bf Yes} pour les p\'eriph\'eriques \`a acc\`es s\'equentiel. - -\item [Offline On Unmount = {\it Yes|No}] - \index[sd]{Offline On Unmount} - \index[sd]{Directive!Offline On Unmount} - Si cette directive est \`a {\bf Yes}, le p\'eriph\'erique doit supporter les appels - {\tt MTOFFL ioctl} pour rembobiner et placer le volume \`a l'\'etat {\it offline}. - Dans ce cas, Bacula lance requ\^ete {\it eject} avant de fermer le lecteur lors - de la commande {\bf unmount}. Si la valeur est {\bf No} (valeur par d\'efaut), - Bacula ne tente pas de mettre la cartouche \`a l'\'etat {\it offline} avant de - la d\'emonter. Apr\`es que la cartouche ait \'et\'e mise hors ligne, elle est \'eject\'ee - requ\'erant ainsi {\bf l'intervention d'un op\'erateur} pour poursuivre. Certains - syst\`emes exigent que la commande de chargement {\bf mt -f /dev/xxx load} - soit lanc\'ee avant de pouvoir reconna\^itre la cartouche. Si vous utilisez une - librairie, sachez que certaines requi\`erent de passer le lecteur \`a l'\'etat - {\it offline} pour pouvoir changer de cartouche. Cependant, la plupart n'en - on pas besoin et pourraient \^etre d\'erout\'es si cette directive est \`a {\bf Yes}. - - Si vous utilisez un noyau Linux 2.6, ou un syst\`eme tel que FreeBSD ou Solaris, - la directive Offline On Unmount abandonnera votre lecteur sans cartouche, et Bacula - incapable de l'utiliser. Pour plus d'informations sur ce probl\`eme, - consultez la section \ilink{description de Offline On Unmount}{NoTapeInDrive} dans le - chapitre sur les tests de lecteurs. - -\item [Maximum Volume Size = {\it size}] - \index[sd]{Maximum Volume Size} - \index[sd]{Directive!Maximum Volume Size} - Avec cette directive, vous pouvez imposer une limite au poids de donn\'ees - \`a \'ecrire sur chaque volume. La valeur {\bf size} repr\'esente le nombre d'octets - autoris\'es. Cette directive est surtout utilis\'ee \`a des fins de tests pour - simuler des petits volumes, mais elle peut aussi se r\'ev\'eler utile si voulez - limiter la taille de vos volumes, par exemple \`a 2 Go. Certains rares lecteurs - vraiment anciens ne signalent pas correctement lorsque la fin de la - cartouche est atteinte lors d'une op\'eration d'\'ecriture (Bien que j'aie lu des - choses au sujet de tels lecteurs, je n'en n'ai jamais rencontr\'e moi-m\^eme). Notez - que cette directive est obsol\`ete, rendue inutile par la - directive {\bf Maximum Volume Bytes} d\'efinie dans le fichier de configuration - du Director. - -\item [Maximum File Size = {\it size}] - \index[sd]{Maximum File Size} - \index[sd]{Directive!Maximum File Size} - Cette directive vous permet d'imposer une limite au poids des fichiers logiques - sur le volume. La valeur {\bf size} repr\'esente le nombre d'octets autoris\'es - par fichier. Une fois cette valeur atteinte, une marque de fin de fichier est - plac\'ee sur le volume et les donn\'ees suivantes sont plac\'ees dans un nouveau - fichier. Ce d\'ecoupage des longues s\'equences de donn\'ees en blocs plus petits - permet un positionnement plus rapide du lecteur au d\'ebut d'un flux de donn\'ees - et peut contribuer \`a pr\'evenir les erreurs de lecture sur la cartouche lors des - restaurations. La valeur par d\'efaut est 1 Go. - -\item [Block Positioning = {\it yes|no}] - \index[sd]{Block Positioning} - \index[sd]{Directive!Block Positioning} - Cette directive n'est pas utilis\'ee en fonctionnement normal (et n'a pas encore - \'et\'e test\'ee). Son r\^ole est d'enjoindre Bacula \`a ne plus utiliser le - positionnement par blocs lors de la lecture des cartouches. Ceci peut rendre - les op\'erations de restauration {\bf extr\`emement} lentes. Vous utiliserez cette - directive si vous avez \'ecrit vos cartouches avec Bacula en mode "taille de blocs - variable" tandis que votre lecteur \'etait en taille de blocs fixe. Si tout - fonctionne comme je l'esp\`ere, Bacula sera capable de relire vos cartouches. - -\item [Maximum Network Buffer Size = {\it bytes}] - \index[sd]{Maximum Network Buffer Size} - \index[sd]{Directive!Maximum Network Buffer Size} - Cette directive permet de sp\'ecifier la taille initiale du tampon r\'eseau \`a - utiliser avec le File Daemon. La valeur {\bf bytes} est la taille exprim\'ee - en octets. Cette valeur es appel\'ee \`a \^etre ajust\'ee \`a la baisse si elle est - trop importante, jusqu'\`a ce qu'elle soit accep\'ee par le syst\`eme d'exploitation. - Soyez circonspect dans l'usage de cette directive, car si vous utilisez une - valeur trop grande, elle sera diminu\'ee par incr\'ements de 521 octets jusqu'\`a - satisfaction du syst\`eme d'exploitation, ce qui peut n\'ecessiter un grand nombre - d'appels syst\`eme. La valeur par d\'efaut est 32 768 octets. - - La valeur par d\'efaut a \'et\'e choisie relativement importante, mais pas trop, - au cas ou vous transmettriez vos donn\'ees via Internet. Il est clair que sur - un r\'eseau local rapide, vous pouvez augmenter cette valeur et am\'eliorer les - performances. Par exemple, certains utilisateurs ont obtenu des facteurs - d'acc\'el\'eration de l'ordre de 5 \`a 10 en utilisant un tampon r\'eseau initial de - 65 536 octets. La plupart des utilisateurs indiquent que des valeurs plus - grandes ne semblent pas am\'eliorer les performances. Si vous voulez am\'eliorer - la viteese de vos sauvegardes, cette directive est probablement le meilleur - endroit pour exp\'erimenter. Vous voudrez probablement effectuer les - modifications correspondantes dans les fichiers de configuration de chacun - des File Daemons. - -\item [Maximum Spool Size = {\it bytes}] - \index[sd]{Maximum Spool Size} - \index[sd]{Directive!Maximum Spool Size} - Cette directive limite \`a la valeur sp\'ecifi\'ee (en octets) le volume occup\'e par - le tampon (NDT : spool) disque pour tous les jobs en ex\'ecution. Par d\'efaut, il n'y a - pas de limite. - -\item [Maximum Job Spool Size = {\it bytes}] - \index[sd]{Maximum Job Spool Size} - \index[sd]{Directive!Maximum Job Spool Size} - Cette directive limite \`a la valeur sp\'ecifi\'ee (en octets) le volume occup\'e par - le tampon disque pour chaque job. Par d\'efaut, il n'y a pas de limite. Cette - directive est apparue avel la version 1.37. - -\item [Spool Directory = {\it directory}] - \index[sd]{Spool Directory} - \index[sd]{Directive!Spool Directory} - Cette directive sp\'ecifie le nom du r\'epertoire \`a utiliser en tant que tampon - disque pour ce p\'eriph\'erique. Ce r\'epertoire est aussi utilis\'e pour stocker - les fichiers partiels lors de l'\'ecriture sur des supports qui requi\`erent - un montage (DVD). Le comportement par d\'efaut est d'utiliser le r\'epertoire - de travail de Bacula (working directory). - -\item [Maximum Part Size = {\it bytes}] - \index[sd]{Maximum Part Size} - \index[sd]{Directive!Maximum Part Size} - Cette directive pr\'ecise la taille maximale (en octets) d'un fichier partiel. Par d\'efaut, - il n'y a pas de limite. Cette directive est apparue avec la version 1.37. - - Si le p\'eriph\'erique requiert un montage, l'ordre de montage est transmis lorsque - cette valeur est atteinte. Dans ce cas, vous devez vous assurer d'avor suffisament - d'espace dans votre r\'epertoire tampon, faute de quoi vos donn\'ees resteront dans le - r\'epertoire tampon. - - Cette directive est ignor\'ee pour les lecteurs de bandes et les FIFO. - -\end{description} - -\section{P\'eriph\'eriques qui requi\`erent un montage (DVD)} -\index[general]{P\'eriph\'eriques qui requi\`erent un montage (DVD)} -\index[general]{DVD!P\'eriph\'eriques qui requi\`erent un montage} -\addcontentsline{toc}{section}{P\'eriph\'eriques qui requi\`erent un montage (DVD)} - -Toutes les directives d\'ecrites dans cette section sont impl\'ement\'ees dans Bacula -\`a partir de la version 1.37. - -A partir de la version 1.39.5, les directives "Requires Mount", "Mount Point", -"Mount Command", et "Unmount Command" s'appliquent aux syst\`emes de fichiers -amovibles tels que les p\'erih\'eriques USB, et plus seulement aux DVDs. - -\begin{description} - -\item [Requires Mount = {\it Yes|No}] - \index[sd]{Requires Mount} - \index[sd]{Directive!Requires Mount} - Cette directive doit \^etre \`a {\bf yes} pour les graveurs de DVDs, et \`a {\bf no} - pour tous les autres p\'eriph\'eriques (cartouches/fichiers). Elle indique si - le p\'eriph\'erique n\'ecessite d'\^etre mont\'e pour \^etre lu, et si un moyen particulier - doit \^etre employ\'e pour y \'ecrire. Si vous activez cette directive, vous devez aussi - d\'efinir les directives {\bf Mount Point}, {\bf Mount Command}, {\bf Unmount Command} - et {\bf Write Part Command}. - -\item [Mount Point = {\it directory}] - \index[sd]{Mount Point} - \index[sd]{Directive!Mount Point} - Cette directive sp\'ecifie le r\'epertoire o\`u le p\'eriph\'erique peut \^etre mont\'e. - (le point de montage) - -\item [Mount Command = {\it name-string}] - \index[sd]{Mount Command} - \index[sd]{Directive!Mount Command} - Cette directive sp\'ecifie la commande \`a ex\'ecuter pour monter le p\'eriph\'erique. - Avant l'ex\'ecution de la commande, \%a est remplac\'e par le p\'eriph\'erique de - stockage, et \%m par le point de montage (Mount Point). - - La plupart du temps, vous le d\'efinirez ainsi : - -\footnotesize -\begin{verbatim} - Mount Command = "/bin/mount -t iso9660 -o ro %a %m" -\end{verbatim} -\normalsize - -\item [Unmount Command = {\it name-string}] - \index[sd]{Unmount Command} - \index[sd]{Directive!Unmount Command} - Cette directive sp\'ecifie la commande \`a ex\'ecuter pour d\'emonter le p\'eriph\'erique. - Avant l'ex\'ecution de la commande, \%a est remplac\'e par le p\'eriph\'erique de - stockage, et \%m par le point de montage (Mount Point). - - La plupart du temps, vous le d\'efinirez ainsi : - -\footnotesize -\begin{verbatim} - Unmount Command = "/bin/umount %m" -\end{verbatim} -\normalsize - -\item [Write Part Command = {\it name-string}] - \index[sd]{Write Part Command} - \index[sd]{Directive!Write Part Command} - Cette directive sp\'ecifie la commande \`a ex\'ecuter pour \'ecrire une partition (NDT : Revoir cette partie, VO ci-dessous) - sur le p\'eriph\'erique. Avant l'ex\'ecution de la commande, \%a est remplac\'e par le p\'eriph\'erique de - stockage, \%m par le point de montage, \%e par 1 s'il s'agit de la premi\`ere - partition, 0 sinon, et \%v avec le nom de fichier de la partition courante. - - Pour un DVD, vous utiliserez la plupart du temps le script fourni {\bf dvd-handler} - comme suit : - -Command that must be executed to write a part to the device. Before the - command is executed, \%a is replaced with the Archive Device, \%m with the - Mount Point, \%e is replaced with 1 if we are writing the first part, - and with 0 otherwise, and \%v with the current part filename. - - For a DVD, you will most frequently specify the Bacula supplied {\bf - dvd-handler} script as follows: - -\footnotesize -\begin{verbatim} - Write Part Command = "/path/dvd-handler %a write %e %v" -\end{verbatim} -\normalsize - - O\`u {\bf /path} est le chemin vers votre r\'epertoire de scripts, et - dvd-handler est le script fourni avec Bacula. Cette commande est d\'ej\`a pr\'esente - quoique comment\'ee dans le fichier de configuration du Storage Daemon. Pour l'utiliser, - il vous suffit de supprimer le caract\`ere \#. - -\item [Free Space Command = {\it name-string}] - \index[sd]{Free Space Command} - \index[sd]{Directive!Free Space Command} - Cette directive sp\'ecifie la commande \`a ex\'ecuter pour contr\^oler l'espace disponible - sur le p\'eriph\'erique. Avant l'ex\'ecution de la commande, \%a est remplac\'e par le p\'eriph\'erique de - stockage, \%m par le point de montage, \%e par 1 s'il s'agit de la premi\`ere - partition, 0 sinon, et \%v avec le nom de fichier de la partition courante. - - Pour un DVD, vous utiliserez la plupart du temps le script fourni {\bf dvd-handler} - comme suit : - -\footnotesize -\begin{verbatim} - Free Space Command = "/path/dvd-handler %a free" -\end{verbatim} -\normalsize - - O\`u {\bf /path} est le chemin vers votre r\'epertoire de scripts, et - dvd-handler est le script fourni avec Bacula. Si vous voulez - sp\'ecifier votre propre commande, examinez le code de dvd-handler afin de - voir le type de retour attendu par Bacula. Cette commande est d\'ej\`a pr\'esente - quoique comment\'ee dans le fichier de configuration du Storage Daemon. Pour l'utiliser, - il vous suffit de supprimer le caract\`ere \#. - - Si vous n'utilisez pas cette directive, Bacula s'attendra \`a ce qu'il y ait - toujours de la place dur le p\'eriph\'erique. - -\end{description} - -%% This pulls in the Autochanger resource from another file. -\label{AutochangerRes} -\label{AutochangerResource1} -\input{autochangerres} - - -\section{Possibilit\'es} -\index[general]{Possibilit\'es} -\addcontentsline{toc}{section}{Possibilit\'es} - -\begin{description} - -\item [Label media = {\it Yes|No}] - \index[sd]{Label media} - \index[sd]{Directive!Label media} - Si cette directive est activ\'ee ({\bf Yes}), alors ce p\'eriph\'erique est - habilit\'e \`a \'etiqueter les media libres sans ordre explicite de l'op\'erateur. - Ceci est r\'ealis\'e selon un algorithme interne et suivant le format - d\'efini par l'enregistrement \ilink{Label Format}{Label} de chaque - ressource Pool. Si cette directive est \`a {\bf No} (valeur par d\'efaut), - Bacula n'\'etiquette les cartouches que sur instruction expresse de - l'op\'erateur (commande {\bf label} de la Console) ou lorsqu'une cartouche - a \'et\'e recycl\'ee. Cette fonctionnalit\'e est plus utile dans le cas de sauvegardes - sur disque qu'avec des cartouches. - -\item [Automatic mount = {\it Yes|No}] - \index[sd]{Automatic mount} - \index[sd]{Directive!Automatic mount} - Si cette directive est activ\'ee (c'est le cas par d\'efaut), le Storage Daemon - est autoris\'e \`a examiner le p\'eriph\'erique afin de d\'eterminer s'il contient - un volume \'etiquet\'e Bacula. Ceci est alors fait au d\'emarrage du {\it daemon}, - et au d\'ebut de chaque job. Cette directive est particuli\`erement importante - si vous avez sp\'ecifi\'e {\bf Always Open = no} car elle permet \`a - Bacula de tenter de lire le p\'eriph\'erique avant de demander \`a l'op\'erateur - de monter une cartouche. Notez cependant que la cartouche doit \^etre - mont\'ee avant le lancement du job. - -\end{description} - -\section{La ressource Messages} -\label{MessagesResource1} -\index[general]{Ressource!Messages} -\index[general]{Ressource Messages} -\addcontentsline{toc}{section}{Resource Messages} - -Pour une description de la ressource Messages, veuillez consulter -le chapitre \ilink{La ressource Messages}{_ChapterStart15} de ce -manuel. - -\section{Un exemple de fichier de configuration du Storage Daemon} -\label{SampleConfiguration} -\index[general]{Fichier!Exemple configuration Storage Daemon} -\index[general]{Exemple fichier configuration Storage Daemon} -\addcontentsline{toc}{section}{Exemple fichier configuration Storage Daemon} - -Voici un exemple de fichier de configuration du Storage Daemon : - -\footnotesize -\begin{verbatim} -# -# Default Bacula Storage Daemon Configuration file -# -# For Bacula release 1.37.2 (07 July 2005) -- gentoo 1.4.16 -# -# You may need to change the name of your tape drive -# on the "Archive Device" directive in the Device -# resource. If you change the Name and/or the -# "Media Type" in the Device resource, please ensure -# that bacula-dir.conf has corresponding changes. -# -Storage { # definition of myself - Name = rufus-sd - Address = rufus - WorkingDirectory = "$HOME/bacula/bin/working" - Pid Directory = "$HOME/bacula/bin/working" - Maximum Concurrent Jobs = 20 -} -# -# List Directors who are permitted to contact Storage daemon -# -Director { - Name = rufus-dir - Password = "ZF9Ctf5PQoWCPkmR3s4atCB0usUPg+vWWyIo2VS5ti6k" -} -# -# Restricted Director, used by tray-monitor to get the -# status of the storage daemon -# -Director { - Name = rufus-mon - Password = "9usxgc307dMbe7jbD16v0PXlhD64UVasIDD0DH2WAujcDsc6" - Monitor = yes -} -# -# Devices supported by this Storage daemon -# To connect, the Director's bacula-dir.conf must have the -# same Name and MediaType. -# -Autochanger { - Name = Autochanger - Device = Drive-1 - Device = Drive-2 - Changer Command = "/home/kern/bacula/bin/mtx-changer %c %o %S %a %d" - Changer Device = /dev/sg0 -} - -Device { - Name = Drive-1 # - Drive Index = 0 - Media Type = DLT-8000 - Archive Device = /dev/nst0 - AutomaticMount = yes; # when device opened, read it - AlwaysOpen = yes; - RemovableMedia = yes; - RandomAccess = no; - AutoChanger = yes - Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'" -} - -Device { - Name = Drive-2 # - Drive Index = 1 - Media Type = DLT-8000 - Archive Device = /dev/nst1 - AutomaticMount = yes; # when device opened, read it - AlwaysOpen = yes; - RemovableMedia = yes; - RandomAccess = no; - AutoChanger = yes - Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'" -} - -Device { - Name = "HP DLT 80" - Media Type = DLT8000 - Archive Device = /dev/nst0 - AutomaticMount = yes; # when device opened, read it - AlwaysOpen = yes; - RemovableMedia = yes; -} -#Device { -# Name = SDT-7000 # -# Media Type = DDS-2 -# Archive Device = /dev/nst0 -# AutomaticMount = yes; # when device opened, read it -# AlwaysOpen = yes; -# RemovableMedia = yes; -#} -#Device { -# Name = Floppy -# Media Type = Floppy -# Archive Device = /mnt/floppy -# RemovableMedia = yes; -# Random Access = Yes; -# AutomaticMount = yes; # when device opened, read it -# AlwaysOpen = no; -#} -#Device { -# Name = FileStorage -# Media Type = File -# Archive Device = /tmp -# LabelMedia = yes; # lets Bacula label unlabeled media -# Random Access = Yes; -# AutomaticMount = yes; # when device opened, read it -# RemovableMedia = no; -# AlwaysOpen = no; -#} -#Device { -# Name = "NEC ND-1300A" -# Media Type = DVD -# Archive Device = /dev/hda -# LabelMedia = yes; # lets Bacula label unlabeled media -# Random Access = Yes; -# AutomaticMount = yes; # when device opened, read it -# RemovableMedia = yes; -# AlwaysOpen = no; -# MaximumPartSize = 800M; -# RequiresMount = yes; -# MountPoint = /mnt/cdrom; -# MountCommand = "/bin/mount -t iso9660 -o ro %a %m"; -# UnmountCommand = "/bin/umount %m"; -# SpoolDirectory = /tmp/backup; -# WritePartCommand = "/etc/bacula/dvd-handler %a write %e %v" -# FreeSpaceCommand = "/etc/bacula/dvd-handler %a free" -#} -# -# A very old Exabyte with no end of media detection -# -#Device { -# Name = "Exabyte 8mm" -# Media Type = "8mm" -# Archive Device = /dev/nst0 -# Hardware end of medium = No; -# AutomaticMount = yes; # when device opened, read it -# AlwaysOpen = Yes; -# RemovableMedia = yes; -#} -# -# Send all messages to the Director, -# mount messages also are sent to the email address -# -Messages { - Name = Standard - director = rufus-dir = all - operator = root = mount -} -\end{verbatim} -\normalsize diff --git a/docs/manuals/fr/main.tex b/docs/manuals/fr/main.tex new file mode 100644 index 00000000..245c6ccf --- /dev/null +++ b/docs/manuals/fr/main.tex @@ -0,0 +1,167 @@ +%% +%% +%% The following characters must be preceded by a backslash +%% to be entered as printable characters: +%% +%% # $ % & ~ _ ^ \ { } +%% + +\documentclass[10pt,a4paper]{book} + +\topmargin -0.5in +\oddsidemargin 0.0in +\evensidemargin 0.0in +\textheight 10in +\textwidth 6.5in + + +\usepackage{html} +\usepackage{float} +\usepackage{graphicx} +\usepackage{bacula} +\usepackage{longtable} +\usepackage{makeidx} +\usepackage{index} +\usepackage{setspace} +\usepackage{hyperref} +% \usepackage[linkcolor=black,colorlinks=true]{hyperref} +\usepackage{url} + +\makeindex +\newindex{dir}{ddx}{dnd}{Director Index} +\newindex{fd}{fdx}{fnd}{File Daemon Index} +\newindex{sd}{sdx}{snd}{Storage Daemon Index} +\newindex{console}{cdx}{cnd}{Console Index} +\newindex{general}{idx}{ind}{General Index} + +\sloppy + +\begin{document} +\sloppy + +\newfont{\bighead}{cmr17 at 36pt} +\parskip 10pt +\parindent 0pt + +\title{\includegraphics{\idir bacula-logo.eps} \\ \bigskip + \Huge{Bacula}$^{\normalsize \textregistered}$ \Huge{Concepts and Overview Guide} + \begin{center} + \large{It comes in the night and sucks + the essence from your computers. } + \end{center} +} + + +\author{Kern Sibbald} +\date{\vspace{1.0in}\today \\ + This manual documents Bacula version \fullversion \\ + \vspace{0.2in} + Copyright {\copyright} 1999-2009, Free Software Foundation Europe + e.V. \\ + Bacula {\textregistered} is a registered trademark of Kern Sibbald.\\ + \vspace{0.2in} + Permission is granted to copy, distribute and/or modify this document under the terms of the + GNU Free Documentation License, Version 1.2 published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. + A copy of the license is included in the section entitled "GNU Free Documentation License". +} + +\maketitle + +\clearpage +\pagenumbering{roman} +\tableofcontents +\clearpage + +\pagestyle{myheadings} +\markboth{Bacula Version \version}{Bacula Version \version} +\pagenumbering{arabic} + +\part{Concepts and Overview} +\include{concepts/general} +\include{concepts/newfeatures} +\include{concepts/pluginAPI} +\include{concepts/state} +\include{concepts/requirements} +\include{concepts/supportedoses} +\include{concepts/supporteddrives} +\include{concepts/tutorial} +\include{concepts/restore} +\include{concepts/recycling} +\include{concepts/disk} +\include{concepts/pools} +\include{concepts/migration} +\include{concepts/strategies} +\include{concepts/autochangers} +\include{concepts/supportedchangers} +\include{concepts/spooling} +\include{concepts/statistics} +\include{concepts/ansi-labels} +\include{concepts/win32} +\include{concepts/rescue} +\include{concepts/tls} +\include{concepts/dataencryption} +\include{concepts/verify} +\include{concepts/bootstrap} + +\part{Installation and Configuration} +\include{install/quickstart} +\include{install/installation} +\include{install/critical} +\include{install/configure} +\include{install/dirdconf} +\include{install/filedconf} +\include{install/storedconf} +\include{install/messagesres} +\include{install/consoleconf} +\include{install/monitorconf} +\include{install/security} + +\part{Console and Operators} +\include{console/bconsole} +\include{console/gui} + +\part{Catalog Database} +\include{catalog/catmaintenance} +\include{catalog/mysql} +\include{catalog/postgresql} +\include{catalog/sqlite} + +\part{Problem and Resolution} +\include{problems/faq} +\include{problems/tips} +\include{problems/tapetesting} +\include{problems/firewalls} +\include{problems/kaboom} + +\part{Utility Programs} +\include{utility/progs} +\include{utility/bimagemgr-chapter} +\include{utility/rpm-faq} + +\part{Miscellaneous} +\include{misc/python} +\include{misc/vars} +\include{misc/stunnel} +\include{misc/dvd} +\include{misc/internaldb} + +\part{Annexes} +\include{concepts/license} +\include{concepts/fdl} +\include{concepts/gpl} +\include{concepts/lesser} +\include{concepts/projects} +\include{concepts/thanks} +\include{concepts/bugs} + + +% pull in the index +\clearpage +\printindex[general] +\printindex[dir] +\printindex[fd] +\printindex[sd] +\printindex[console] + +\end{document} diff --git a/docs/manuals/es/install/Makefile b/docs/manuals/fr/main/Makefile.in similarity index 81% rename from docs/manuals/es/install/Makefile rename to docs/manuals/fr/main/Makefile.in index 63152755..e7d83401 100644 --- a/docs/manuals/es/install/Makefile +++ b/docs/manuals/fr/main/Makefile.in @@ -1,6 +1,5 @@ # -# -# Makefile for LaTeX +# Makefile for Bacula LaTeX Manual # # To build everything do # make tex @@ -36,7 +35,8 @@ IMAGES=../../../images -DOC=install +DOC=main +MAINDOC=Bacula_Main_Reference.html first_rule: all @@ -81,24 +81,26 @@ html: fi) latex2html -white -no_subdir -split 0 -toc_stars -white -notransparent \ -init_file latex2html-init.pl ${DOC} >tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}.html - (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} .; done) + @(if [ -f imagename_translations ] ; then \ + ./translate_images.pl --from_meaningful_names ${DOC}.html; \ + fi) + (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} . 2>/dev/null; done) @echo "Done making html" web: @echo "Making web" + @rm -rf ${DOC} @mkdir -p ${DOC} @cp -fp ${IMAGES}/*.eps . @rm -f next.eps next.png prev.eps prev.png up.eps up.png - @cp -fp ${IMAGES}/*.eps ${DOC}/ - @cp -fp ${IMAGES}/*.eps ${IMAGES}/*.png ${DOC}/ - @rm -f ${DOC}/xp-*.png - @rm -f ${DOC}/next.eps ${DOC}/next.png ${DOC}/prev.eps ${DOC}/prev.png ${DOC}/up.eps ${DOC}/up.png - @rm -rf ${DOC}/*.html - latex2html -split 3 -local_icons -t "Bacula Installation and Configuration Guide" -long_titles 4 \ - -toc_stars -contents_in_nav -init_file latex2html-init.pl -white -notransparent ${DOC} >tex.out 2>&1 - ./translate_images.pl --to_meaningful_names ${DOC}/Bacula_Instal_Config_Guide.html - (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} .; done) + latex2html -split 3 -local_icons -t "Bacula Main Reference" -long_titles 4 \ + -toc_stars -contents_in_nav -init_file latex2html-init.pl \ + -no_antialias -no_antialias_text \ + -white -notransparent ${DOC} >tex.out 2>&1 + @(if [ -f imagename_translations ] ; then \ + ./translate_images.pl --from_meaningful_names ${DOC}.html; \ + fi) + @cp -f ${DOC}/${MAINDOC} ${DOC}/index.html @echo "Done making web" show: xdvi ${DOC} diff --git a/docs/manuals/fr/main/STYLE b/docs/manuals/fr/main/STYLE new file mode 100644 index 00000000..ccdf2368 --- /dev/null +++ b/docs/manuals/fr/main/STYLE @@ -0,0 +1,75 @@ +TODO + +maybe spell out "config" to "configuration" as appropriate + +Use American versus British spelling + +not critical, but for later consider cleaning out some use of +"there" and rewrite to not be so passive. + +make sure use of \elink shows URL in printed book + +get rid of many references of "Red Hat" -- too platform specific? + +remove references to names, like "Dan Langille shared ..." +just put their names in credits for book + +don't refer to very old software by specific version such as +"Red Hat 7" or FreeBSD 4.9 because is too old to put in book. It may be +relevant, but may be confusing. Maybe just remove the version number +if applicable. + +maybe fine, but discuss point-of-view: don't use personal "I" or +possessive "my" unless that is consistent style for book. + +replace "32 bit" and "64 bit" with "32-bit" and "64-bit" respectively. +It seems like more popular style standard + +be consistent with "Note" and "NOTE". maybe use tex header for this + +get rid of redundant or noisy exclamation marks + +style for "ctl-alt-del" and "ctl-d"? and be consisten with formatting + +be consistent for case for ext3, ext2, EXT3, or EXT2. + +fix spelling of "inspite" in source and in docs (maybe use "regardless +in one place where I already changed to "in spite" + +be consistent with software names, like postgres, postgresql, PostreSQL +and others + +instead of using whitehouse for examples, use example.org (as that is defined +for that usage); also check other hostnames and maybe IPs and networks + +use section numbers and cross reference by section number or page number +no underlining in book (this is not the web :) + +some big gaps between paragraphs or between section headers and paragraphs +-- due to tex -- adjust as necessary to look nice + +don't include the GPL and LGPL in book. This will save 19 (A4) pages. +For 6x9 book this will save 30 pages. (Keep GFDL though.) + +many index items are too long + +appendices not listed as appendix + +some how consolidate indexes into one? on 6x9, the indexes are over 30 pages + +don't refer to some website without including URL also +(such as "this FreeBSD Diary article") + +get rid of (R) trademark symbols -- only use on first use; for example +don't put on the RPM Packaging FAQ + +split up very long paragraphs, such as "As mentioned above, you will need ..." +(on my page 783). + +use smaller font or split up long lines (especially from +console output which is wider than printed page) + +don't assume all BSD is "FreeBSD" + +don't assume all "kernel" is Linux. If it is Linux, be clear. + diff --git a/docs/manuals/fr/main/ansi-labels.tex b/docs/manuals/fr/main/ansi-labels.tex new file mode 100644 index 00000000..7d6e14fe --- /dev/null +++ b/docs/manuals/fr/main/ansi-labels.tex @@ -0,0 +1,58 @@ + +\chapter{ANSI and IBM Tape Labels} +\label{AnsiLabelsChapter} +\index[general]{ANSI and IBM Tape Labels} +\index[general]{Labels!Tape} + +Bacula supports ANSI or IBM tape labels as long as you +enable it. In fact, with the proper configuration, you can +force Bacula to require ANSI or IBM labels. + +Bacula can create an ANSI or IBM label, but if Check Labels is +enabled (see below), Bacula will look for an existing label, and +if it is found, it will keep the label. Consequently, you +can label the tapes with programs other than Bacula, and Bacula +will recognize and support them. + +Even though Bacula will recognize and write ANSI and IBM labels, +it always writes its own tape labels as well. + +When using ANSI or IBM tape labeling, you must restrict your Volume +names to a maximum of six characters. + +If you have labeled your Volumes outside of Bacula, then the +ANSI/IBM label will be recognized by Bacula only if you have created +the HDR1 label with {\bf BACULA.DATA} in the Filename field (starting +with character 5). If Bacula writes the labels, it will use +this information to recognize the tape as a Bacula tape. This allows +ANSI/IBM labeled tapes to be used at sites with multiple machines +and multiple backup programs. + + +\section{Director Pool Directive} + +\begin{description} +\item [ Label Type = ANSI | IBM | Bacula] + This directive is implemented in the Director Pool resource and in the SD Device + resource. If it is specified in the SD Device resource, it will take + precedence over the value passed from the Director to the SD. The default + is Label Type = Bacula. +\end{description} + +\section{Storage Daemon Device Directives} + +\begin{description} +\item [ Label Type = ANSI | IBM | Bacula] + This directive is implemented in the Director Pool resource and in the SD Device + resource. If it is specified in the the SD Device resource, it will take + precedence over the value passed from the Director to the SD. + +\item [Check Labels = yes | no] + This directive is implemented in the the SD Device resource. If you intend + to read ANSI or IBM labels, this *must* be set. Even if the volume is + not ANSI labeled, you can set this to yes, and Bacula will check the + label type. Without this directive set to yes, Bacula will assume that + labels are of Bacula type and will not check for ANSI or IBM labels. + In other words, if there is a possibility of Bacula encountering an + ANSI/IBM label, you must set this to yes. +\end{description} diff --git a/docs/manuals/fr/install/autochangerres.tex b/docs/manuals/fr/main/autochangerres.tex similarity index 100% rename from docs/manuals/fr/install/autochangerres.tex rename to docs/manuals/fr/main/autochangerres.tex diff --git a/docs/manuals/fr/main/autochangers.tex b/docs/manuals/fr/main/autochangers.tex new file mode 100644 index 00000000..d3fa47e0 --- /dev/null +++ b/docs/manuals/fr/main/autochangers.tex @@ -0,0 +1,1011 @@ +%% +%% + +\chapter{Autochanger Support} +\label{AutochangersChapter} +\index[general]{Support!Autochanger } +\index[general]{Autochanger Support } + +Bacula provides autochanger support for reading and writing tapes. In +order to work with an autochanger, Bacula requires a number of things, each of +which is explained in more detail after this list: + +\begin{itemize} +\item A script that actually controls the autochanger according to commands + sent by Bacula. We furnish such a script that works with {\bf mtx} found in + the {\bf depkgs} distribution. + +\item That each Volume (tape) to be used must be defined in the Catalog and + have a Slot number assigned to it so that Bacula knows where the Volume is + in the autochanger. This is generally done with the {\bf label} command, but + can also done after the tape is labeled using the {\bf update slots} + command. See below for more details. You must pre-label the tapes manually + before using them. + +\item Modifications to your Storage daemon's Device configuration resource to + identify that the device is a changer, as well as a few other parameters. + +\item You should also modify your Storage resource definition in the + Director's configuration file so that you are automatically prompted for the + Slot when labeling a Volume. + +\item You need to ensure that your Storage daemon (if not running as root) + has access permissions to both the tape drive and the control device. + +\item You need to have {\bf Autochanger = yes} in your Storage resource + in your bacula-dir.conf file so that you will be prompted for the + slot number when you label Volumes. +\end{itemize} + +In version 1.37 and later, there is a new \ilink{Autochanger +resource}{AutochangerRes} that permits you to group Device resources thus +creating a multi-drive autochanger. If you have an autochanger, +you {\bf must} use this new resource. + +Bacula uses its own {\bf mtx-changer} script to interface with a program +that actually does the tape changing. Thus in principle, {\bf mtx-changer} +can be adapted to function with any autochanger program, or you can +call any other script or program. The current +version of {\bf mtx-changer} works with the {\bf mtx} program. However, +FreeBSD users have provided a script in the {\bf examples/autochangers} +directory that allows Bacula to use the {\bf chio} program. + +Bacula also supports autochangers with barcode +readers. This support includes two Console commands: {\bf label barcodes} +and {\bf update slots}. For more details on these commands, see the "Barcode +Support" section below. + +Current Bacula autochanger support does not include cleaning, stackers, or +silos. Stackers and silos are not supported because Bacula expects to +be able to access the Slots randomly. +However, if you are very careful to setup Bacula to access the Volumes +in the autochanger sequentially, you may be able to make Bacula +work with stackers (gravity feed and such). + +Support for multi-drive +autochangers requires the \ilink{Autochanger resource}{AutochangerRes} +introduced in version 1.37. This resource is also recommended for single +drive autochangers. + +In principle, if {\bf mtx} will operate your changer correctly, then it is +just a question of adapting the {\bf mtx-changer} script (or selecting one +already adapted) for proper interfacing. You can find a list of autochangers +supported by {\bf mtx} at the following link: +\elink{http://mtx.opensource-sw.net/compatibility.php} +{http://mtx.opensource-sw.net/compatibility.php}. +The home page for the {\bf mtx} project can be found at: +\elink{http://mtx.opensource-sw.net/}{http://mtx.opensource-sw.net/}. + +Note, we have feedback from some users that there are certain +incompatibilities between the Linux kernel and mtx. For example between +kernel 2.6.18-8.1.8.el5 of CentOS and RedHat and version 1.3.10 and 1.3.11 +of mtx. This was fixed by upgrading to a version 2.6.22 kernel. + +In addition, apparently certain versions of mtx, for example, version +1.3.11 limit the number of slots to a maximum of 64. The solution was to +use version 1.3.10. + +If you are having troubles, please use the {\bf auto} command in the {\bf +btape} program to test the functioning of your autochanger with Bacula. When +Bacula is running, please remember that for many distributions (e.g. FreeBSD, +Debian, ...) the Storage daemon runs as {\bf bacula.tape} rather than {\bf +root.root}, so you will need to ensure that the Storage daemon has sufficient +permissions to access the autochanger. + +Some users have reported that the the Storage daemon blocks under certain +circumstances in trying to mount a volume on a drive that has a different +volume loaded. As best we can determine, this is simply a matter of +waiting a bit. The drive was previously in use writing a Volume, and +sometimes the drive will remain BLOCKED for a good deal of time (up to 7 +minutes on a slow drive) waiting for the cassette to rewind and to unload +before the drive can be used with a different Volume. + +\label{SCSI devices} +\section{Knowing What SCSI Devices You Have} +\index[general]{Have!Knowing What SCSI Devices You } +\index[general]{Knowing What SCSI Devices You Have } +\index[general]{SCSI devices} +\index[general]{devices!SCSI} + +Under Linux, you can + +\footnotesize +\begin{verbatim} +cat /proc/scsi/scsi +\end{verbatim} +\normalsize + +to see what SCSI devices you have available. You can also: + +\footnotesize +\begin{verbatim} +cat /proc/scsi/sg/device_hdr /proc/scsi/sg/devices +\end{verbatim} +\normalsize + +to find out how to specify their control address ({\bf /dev/sg0} for the +first, {\bf /dev/sg1} for the second, ...) on the {\bf Changer Device = } +Bacula directive. + +You can also use the excellent {\bf lsscsi} tool. +\footnotesize +\begin{verbatim} +$ lsscsi -g + [1:0:2:0] tape SEAGATE ULTRIUM06242-XXX 1619 /dev/st0 /dev/sg9 + [1:0:14:0] mediumx STK L180 0315 /dev/sch0 /dev/sg10 + [2:0:3:0] tape HP Ultrium 3-SCSI G24S /dev/st1 /dev/sg11 + [3:0:0:0] enclosu HP A6255A HP04 - /dev/sg3 + [3:0:1:0] disk HP 36.4G ST336753FC HP00 /dev/sdd /dev/sg4 +\end{verbatim} +\normalsize + +For more detailed information on what SCSI devices you have please see +the \ilink{Linux SCSI Tricks}{SCSITricks} section of the Tape Testing +chapter of this manual. + +Under FreeBSD, you can use: + +\footnotesize +\begin{verbatim} +camcontrol devlist +\end{verbatim} +\normalsize + +To list the SCSI devices as well as the {\bf /dev/passn} that you will use on +the Bacula {\bf Changer Device = } directive. + +Please check that your Storage daemon has permission to access this +device. + +The following tip for FreeBSD users comes from Danny Butroyd: +on reboot Bacula will NOT have permission to +control the device /dev/pass0 (assuming this is your changer device). +To get around this just edit the /etc/devfs.conf file and add the +following to the bottom: +\footnotesize +\begin{verbatim} +own pass0 root:bacula +perm pass0 0666 +own nsa0.0 root:bacula +perm nsa0.0 0666 +\end{verbatim} +\normalsize + +This gives the bacula group permission to write to the nsa0.0 device +too just to be on the safe side. To bring these changes into effect +just run:- + +/etc/rc.d/devfs restart + +Basically this will stop you having to manually change permissions on these +devices to make Bacula work when operating the AutoChanger after a reboot. + +\label{scripts} +\section{Example Scripts} +\index[general]{Scripts!Example } +\index[general]{Example Scripts } + +Please read the sections below so that you understand how autochangers work +with Bacula. Although we supply a default {\bf mtx-changer} script, your +autochanger may require some additional changes. If you want to see examples +of configuration files and scripts, please look in the {\bf +\lt{}bacula-src\gt{}/examples/devices} directory where you will find an +example {\bf HP-autoloader.conf} Bacula Device resource, and several {\bf +mtx-changer} scripts that have been modified to work with different +autochangers. + +\label{Slots} + +\section{Slots} +\index[general]{Slots } + +To properly address autochangers, Bacula must know which Volume is in each +{\bf slot} of the autochanger. Slots are where the changer cartridges reside +when not loaded into the drive. Bacula numbers these slots from one to the +number of cartridges contained in the autochanger. + +Bacula will not automatically use a Volume in your autochanger unless it is +labeled and the slot number is stored in the catalog and the Volume is marked +as InChanger. This is because it must know where each volume is (slot) to +be able to load the volume. +For each Volume in your +changer, you will, using the Console program, assign a slot. This information +is kept in {\bf Bacula's} catalog database along with the other data for the +volume. If no slot is given, or the slot is set to zero, Bacula will not +attempt to use the autochanger even if all the necessary configuration records +are present. When doing a {\bf mount} command on an autochanger, you must +specify which slot you want mounted. If the drive is loaded with a tape +from another slot, it will unload it and load the correct tape, but +normally, no tape will be loaded because an {\bf unmount} command causes +Bacula to unload the tape in the drive. + + +You can check if the Slot number and InChanger flag are set by doing a: +\begin{verbatim} +list Volumes +\end{verbatim} + +in the Console program. + +\label{mult} +\section{Multiple Devices} +\index[general]{Devices!Multiple} +\index[general]{Multiple Devices} + +Some autochangers have more than one read/write device (drive). The +new \ilink{Autochanger resource}{AutochangerRes} introduced in version +1.37 permits you to group Device resources, where each device +represents a drive. The Director may still reference the Devices (drives) +directly, but doing so, bypasses the proper functioning of the +drives together. Instead, the Director (in the Storage resource) +should reference the Autochanger resource name. Doing so permits +the Storage daemon to ensure that only one drive uses the mtx-changer +script at a time, and also that two drives don't reference the +same Volume. + +Multi-drive requires the use of the {\bf +Drive Index} directive in the Device resource of the Storage daemon's +configuration file. Drive numbers or the Device Index are numbered beginning +at zero, which is the default. To use the second Drive in an autochanger, you +need to define a second Device resource and set the Drive Index to 1 for +that device. In general, the second device will have the same {\bf Changer +Device} (control channel) as the first drive, but a different {\bf Archive +Device}. + +As a default, Bacula jobs will prefer to write to a Volume that is +already mounted. If you have a multiple drive autochanger and you want +Bacula to write to more than one Volume in the same Pool at the same +time, you will need to set \ilink{Prefer Mounted Volumes} {PreferMountedVolumes} +in the Directors Job resource to {\bf no}. This will cause +the Storage daemon to maximize the use of drives. + + +\label{ConfigRecords} +\section{Device Configuration Records} +\index[general]{Records!Device Configuration } +\index[general]{Device Configuration Records } + +Configuration of autochangers within Bacula is done in the Device resource of +the Storage daemon. Four records: {\bf Autochanger}, {\bf Changer Device}, +{\bf Changer Command}, and {\bf Maximum Changer Wait} control how Bacula uses +the autochanger. + +These four records, permitted in {\bf Device} resources, are described in +detail below. Note, however, that the {\bf Changer Device} and the +{\bf Changer Command} directives are not needed in the Device resource +if they are present in the {\bf Autochanger} resource. + +\begin{description} + +\item [Autochanger = {\it Yes|No} ] + \index[sd]{Autochanger } + The {\bf Autochanger} record specifies that the current device is or is not +an autochanger. The default is {\bf no}. + +\item [Changer Device = \lt{}device-name\gt{}] + \index[sd]{Changer Device } + In addition to the Archive Device name, you must specify a {\bf Changer +Device} name. This is because most autochangers are controlled through a +different device than is used for reading and writing the cartridges. For +example, on Linux, one normally uses the generic SCSI interface for +controlling the autochanger, but the standard SCSI interface for reading and +writing the tapes. On Linux, for the {\bf Archive Device = /dev/nst0}, you +would typically have {\bf Changer Device = /dev/sg0}. Note, some of the more +advanced autochangers will locate the changer device on {\bf /dev/sg1}. Such +devices typically have several drives and a large number of tapes. + +On FreeBSD systems, the changer device will typically be on {\bf /dev/pass0} +through {\bf /dev/passn}. + +On Solaris, the changer device will typically be some file under {\bf +/dev/rdsk}. + +Please ensure that your Storage daemon has permission to access this +device. + +\item [Changer Command = \lt{}command\gt{}] + \index[sd]{Changer Command } + This record is used to specify the external program to call and what +arguments to pass to it. The command is assumed to be a standard program or +shell script that can be executed by the operating system. This command is +invoked each time that Bacula wishes to manipulate the autochanger. The +following substitutions are made in the {\bf command} before it is sent to +the operating system for execution: + +\footnotesize +\begin{verbatim} + %% = % + %a = archive device name + %c = changer device name + %d = changer drive index base 0 + %f = Client's name + %j = Job name + %o = command (loaded, load, or unload) + %s = Slot base 0 + %S = Slot base 1 + %v = Volume name +\end{verbatim} +\normalsize + +An actual example for using {\bf mtx} with the {\bf mtx-changer} script (part +of the Bacula distribution) is: + +\footnotesize +\begin{verbatim} +Changer Command = "/etc/bacula/mtx-changer %c %o %S %a %d" +\end{verbatim} +\normalsize + +Where you will need to adapt the {\bf /etc/bacula} to be the actual path on +your system where the mtx-changer script resides. Details of the three +commands currently used by Bacula (loaded, load, unload) as well as the +output expected by Bacula are give in the {\bf Bacula Autochanger Interface} +section below. + +\item [Maximum Changer Wait = \lt{}time\gt{}] + \index[sd]{Maximum Changer Wait } + This record is used to define the maximum amount of time that Bacula + will wait for an autoloader to respond to a command (e.g. load). The + default is set to 120 seconds. If you have a slow autoloader you may + want to set it longer. + +If the autoloader program fails to respond in this time, it will be killed +and Bacula will request operator intervention. + +\item [Drive Index = \lt{}number\gt{}] + \index[sd]{Drive Index } + This record allows you to tell Bacula to use the second or subsequent + drive in an autochanger with multiple drives. Since the drives are + numbered from zero, the second drive is defined by + +\footnotesize +\begin{verbatim} +Device Index = 1 + +\end{verbatim} +\normalsize + +To use the second drive, you need a second Device resource definition in the +Bacula configuration file. See the Multiple Drive section above in this +chapter for more information. +\end{description} + +In addition, for proper functioning of the Autochanger, you must +define an Autochanger resource. +\input{autochangerres} + +\label{example} +\section{An Example Configuration File} +\index[general]{Example Configuration File } +\index[general]{File!Example Configuration } + +The following two resources implement an autochanger: + +\footnotesize +\begin{verbatim} +Autochanger { + Name = "Autochanger" + Device = DDS-4 + Changer Device = /dev/sg0 + Changer Command = "/etc/bacula/mtx-changer %c %o %S %a %d" +} + +Device { + Name = DDS-4 + Media Type = DDS-4 + Archive Device = /dev/nst0 # Normal archive device + Autochanger = yes + LabelMedia = no; + AutomaticMount = yes; + AlwaysOpen = yes; +} +\end{verbatim} +\normalsize + +where you will adapt the {\bf Archive Device}, the {\bf Changer Device}, and +the path to the {\bf Changer Command} to correspond to the values used on your +system. + +\section{A Multi-drive Example Configuration File} +\index[general]{Multi-drive Example Configuration File } + +The following resources implement a multi-drive autochanger: + +\footnotesize +\begin{verbatim} +Autochanger { + Name = "Autochanger" + Device = Drive-1, Drive-2 + Changer Device = /dev/sg0 + Changer Command = "/etc/bacula/mtx-changer %c %o %S %a %d" +} + +Device { + Name = Drive-1 + Drive Index = 0 + Media Type = DDS-4 + Archive Device = /dev/nst0 # Normal archive device + Autochanger = yes + LabelMedia = no; + AutomaticMount = yes; + AlwaysOpen = yes; +} + +Device { + Name = Drive-2 + Drive Index = 1 + Media Type = DDS-4 + Archive Device = /dev/nst1 # Normal archive device + Autochanger = yes + LabelMedia = no; + AutomaticMount = yes; + AlwaysOpen = yes; +} + +\end{verbatim} +\normalsize + +where you will adapt the {\bf Archive Device}, the {\bf Changer Device}, and +the path to the {\bf Changer Command} to correspond to the values used on your +system. + +\label{SpecifyingSlots} +\section{Specifying Slots When Labeling} +\index[general]{Specifying Slots When Labeling } +\index[general]{Labeling!Specifying Slots When } + +If you add an {\bf Autochanger = yes} record to the Storage resource in your +Director's configuration file, the Bacula Console will automatically prompt +you for the slot number when the Volume is in the changer when +you {\bf add} or {\bf label} tapes for that Storage device. If your +{\bf mtx-changer} script is properly installed, Bacula will automatically +load the correct tape during the label command. + +You must also set +{\bf Autochanger = yes} in the Storage daemon's Device resource +as we have described above in +order for the autochanger to be used. Please see the +\ilink{Storage Resource}{Autochanger1} in the Director's chapter +and the +\ilink{Device Resource}{Autochanger} in the Storage daemon +chapter for more details on these records. + +Thus all stages of dealing with tapes can be totally automated. It is also +possible to set or change the Slot using the {\bf update} command in the +Console and selecting {\bf Volume Parameters} to update. + +Even though all the above configuration statements are specified and correct, +Bacula will attempt to access the autochanger only if a {\bf slot} is non-zero +in the catalog Volume record (with the Volume name). + +If your autochanger has barcode labels, you can label all the Volumes in +your autochanger one after another by using the {\bf label barcodes} command. +For each tape in the changer containing a barcode, Bacula will mount the tape +and then label it with the same name as the barcode. An appropriate Media +record will also be created in the catalog. Any barcode that begins with the +same characters as specified on the "CleaningPrefix=xxx" command, will be +treated as a cleaning tape, and will not be labeled. For example with: + +Please note that Volumes must be pre-labeled to be automatically used in +the autochanger during a backup. If you do not have a barcode reader, this +is done manually (or via a script). + +\footnotesize +\begin{verbatim} +Pool { + Name ... + Cleaning Prefix = "CLN" +} +\end{verbatim} +\normalsize + +Any slot containing a barcode of CLNxxxx will be treated as a cleaning tape +and will not be mounted. + +\section{Changing Cartridges} +\index[general]{Changing Cartridges } +If you wish to insert or remove cartridges in your autochanger or +you manually run the {\bf mtx} program, you must first tell Bacula +to release the autochanger by doing: + +\footnotesize +\begin{verbatim} +unmount +(change cartridges and/or run mtx) +mount +\end{verbatim} +\normalsize + +If you do not do the unmount before making such a change, Bacula +will become completely confused about what is in the autochanger +and may stop function because it expects to have exclusive use +of the autochanger while it has the drive mounted. + + +\label{Magazines} +\section{Dealing with Multiple Magazines} +\index[general]{Dealing with Multiple Magazines } +\index[general]{Magazines!Dealing with Multiple } + +If you have several magazines or if you insert or remove cartridges from a +magazine, you should notify Bacula of this. By doing so, Bacula will as +a preference, use Volumes that it knows to be in the autochanger before +accessing Volumes that are not in the autochanger. This prevents unneeded +operator intervention. + +If your autochanger has barcodes (machine readable tape labels), the task of +informing Bacula is simple. Every time, you change a magazine, or add or +remove a cartridge from the magazine, simply do + +\footnotesize +\begin{verbatim} +unmount +(remove magazine) +(insert new magazine) +update slots +mount +\end{verbatim} +\normalsize + +in the Console program. This will cause Bacula to request the autochanger to +return the current Volume names in the magazine. This will be done without +actually accessing or reading the Volumes because the barcode reader does this +during inventory when the autochanger is first turned on. Bacula will ensure +that any Volumes that are currently marked as being in the magazine are marked +as no longer in the magazine, and the new list of Volumes will be marked as +being in the magazine. In addition, the Slot numbers of the Volumes will be +corrected in Bacula's catalog if they are incorrect (added or moved). + +If you do not have a barcode reader on your autochanger, you have several +alternatives. + +\begin{enumerate} +\item You can manually set the Slot and InChanger flag using the {\bf update + volume} command in the Console (quite painful). + +\item You can issue a + +\footnotesize +\begin{verbatim} +update slots scan +\end{verbatim} +\normalsize + + command that will cause Bacula to read the label on each of the cartridges in + the magazine in turn and update the information (Slot, InChanger flag) in the + catalog. This is quite effective but does take time to load each cartridge + into the drive in turn and read the Volume label. + +\item You can modify the mtx-changer script so that it simulates an + autochanger with barcodes. See below for more details. +\end{enumerate} + +\label{simulating} +\section{Simulating Barcodes in your Autochanger} +\index[general]{Autochanger!Simulating Barcodes in your } +\index[general]{Simulating Barcodes in your Autochanger } + +You can simulate barcodes in your autochanger by making the {\bf mtx-changer} +script return the same information that an autochanger with barcodes would do. +This is done by commenting out the one and only line in the {\bf list)} case, +which is: + +\footnotesize +\begin{verbatim} + ${MTX} -f $ctl status | grep " *Storage Element [0-9]*:.*Full" | awk "{print \$3 \$4}" | sed "s/Full *\(:VolumeTag=\)*//" +\end{verbatim} +\normalsize + +at approximately line 99 by putting a \# in column one of that line, or by +simply deleting it. Then in its place add a new line that prints the contents +of a file. For example: + +\footnotesize +\begin{verbatim} +cat /etc/bacula/changer.volumes +\end{verbatim} +\normalsize + +Be sure to include a full path to the file, which can have any name. The +contents of the file must be of the following format: + +\footnotesize +\begin{verbatim} +1:Volume1 +2:Volume2 +3:Volume3 +... +\end{verbatim} +\normalsize + +Where the 1, 2, 3 are the slot numbers and Volume1, Volume2, ... are the +Volume names in those slots. You can have multiple files that represent the +Volumes in different magazines, and when you change magazines, simply copy the +contents of the correct file into your {\bf /etc/bacula/changer.volumes} file. +There is no need to stop and start Bacula when you change magazines, simply +put the correct data in the file, then run the {\bf update slots} command, and +your autochanger will appear to Bacula to be an autochanger with barcodes. +\label{updateslots} + +\section{The Full Form of the Update Slots Command} +\index[general]{Full Form of the Update Slots Command } +\index[general]{Command!Full Form of the Update Slots } + +If you change only one cartridge in the magazine, you may not want to scan all +Volumes, so the {\bf update slots} command (as well as the {\bf update slots +scan} command) has the additional form: + +\footnotesize +\begin{verbatim} +update slots=n1,n2,n3-n4, ... +\end{verbatim} +\normalsize + +where the keyword {\bf scan} can be appended or not. The n1,n2, ... represent +Slot numbers to be updated and the form n3-n4 represents a range of Slot +numbers to be updated (e.g. 4-7 will update Slots 4,5,6, and 7). + +This form is particularly useful if you want to do a scan (time expensive) and +restrict the update to one or two slots. + +For example, the command: + +\footnotesize +\begin{verbatim} +update slots=1,6 scan +\end{verbatim} +\normalsize + +will cause Bacula to load the Volume in Slot 1, read its Volume label and +update the Catalog. It will do the same for the Volume in Slot 6. The command: + + +\footnotesize +\begin{verbatim} +update slots=1-3,6 +\end{verbatim} +\normalsize + +will read the barcoded Volume names for slots 1,2,3 and 6 and make the +appropriate updates in the Catalog. If you don't have a barcode reader or have +not modified the mtx-changer script as described above, the above command will +not find any Volume names so will do nothing. +\label{FreeBSD} + +\section{FreeBSD Issues} +\index[general]{Issues!FreeBSD } +\index[general]{FreeBSD Issues } + +If you are having problems on FreeBSD when Bacula tries to select a tape, and +the message is {\bf Device not configured}, this is because FreeBSD has made +the tape device {\bf /dev/nsa1} disappear when there is no tape mounted in the +autochanger slot. As a consequence, Bacula is unable to open the device. The +solution to the problem is to make sure that some tape is loaded into the tape +drive before starting Bacula. This problem is corrected in Bacula versions +1.32f-5 and later. + +Please see the +\ilink{ Tape Testing}{FreeBSDTapes} chapter of this manual for +{\bf important} information concerning your tape drive before doing the +autochanger testing. +\label{AutochangerTesting} + +\section{Testing Autochanger and Adapting mtx-changer script} +\index[general]{Testing the Autochanger } +\index[general]{Adapting Your mtx-changer script} + + +Before attempting to use the autochanger with Bacula, it is preferable to +"hand-test" that the changer works. To do so, we suggest you do the +following commands (assuming that the {\bf mtx-changer} script is installed in +{\bf /etc/bacula/mtx-changer}): + +\begin{description} + +\item [Make sure Bacula is not running.] + +\item [/etc/bacula/mtx-changer \ /dev/sg0 \ list \ 0 \ /dev/nst0 \ 0] +\index[sd]{mtx-changer list} + +This command should print: + +\footnotesize +\begin{verbatim} + 1: + 2: + 3: + ... + +\end{verbatim} +\normalsize + +or one number per line for each slot that is occupied in your changer, and +the number should be terminated by a colon ({\bf :}). If your changer has +barcodes, the barcode will follow the colon. If an error message is printed, +you must resolve the problem (e.g. try a different SCSI control device name +if {\bf /dev/sg0} is incorrect). For example, on FreeBSD systems, the +autochanger SCSI control device is generally {\bf /dev/pass2}. + +\item [/etc/bacula/mtx-changer \ /dev/sg0 \ slots ] +\index[sd]{mtx-changer slots} + +This command should return the number of slots in your autochanger. + +\item [/etc/bacula/mtx-changer \ /dev/sg0 \ unload \ 1 \ /dev/nst0 \ 0 ] +\index[sd]{mtx-changer unload} + + If a tape is loaded from slot 1, this should cause it to be unloaded. + +\item [/etc/bacula/mtx-changer \ /dev/sg0 \ load \ 3 \ /dev/nst0 \ 0 ] +\index[sd]{mtx-changer load} + +Assuming you have a tape in slot 3, it will be loaded into drive (0). + + +\item [/etc/bacula/mtx-changer \ /dev/sg0 \ loaded \ 0 \ /dev/nst0 \ 0] +\index[sd]{mtx-changer loaded} + +It should print "3" +Note, we have used an "illegal" slot number 0. In this case, it is simply +ignored because the slot number is not used. However, it must be specified +because the drive parameter at the end of the command is needed to select +the correct drive. + +\item [/etc/bacula/mtx-changer \ /dev/sg0 \ unload \ 3 /dev/nst0 \ 0] + +will unload the tape into slot 3. + +\end{description} + +Once all the above commands work correctly, assuming that you have the right +{\bf Changer Command} in your configuration, Bacula should be able to operate +the changer. The only remaining area of problems will be if your autoloader +needs some time to get the tape loaded after issuing the command. After the +{\bf mtx-changer} script returns, Bacula will immediately rewind and read the +tape. If Bacula gets rewind I/O errors after a tape change, you will probably +need to insert a {\bf sleep 20} after the {\bf mtx} command, but be careful to +exit the script with a zero status by adding {\bf exit 0} after any additional +commands you add to the script. This is because Bacula checks the return +status of the script, which should be zero if all went well. + +You can test whether or not you need a {\bf sleep} by putting the following +commands into a file and running it as a script: + +\footnotesize +\begin{verbatim} +#!/bin/sh +/etc/bacula/mtx-changer /dev/sg0 unload 1 /dev/nst0 0 +/etc/bacula/mtx-changer /dev/sg0 load 3 /dev/nst0 0 +mt -f /dev/st0 rewind +mt -f /dev/st0 weof +\end{verbatim} +\normalsize + +If the above script runs, you probably have no timing problems. If it does not +run, start by putting a {\bf sleep 30} or possibly a {\bf sleep 60} in the +script just after the mtx-changer load command. If that works, then you should +move the sleep into the actual {\bf mtx-changer} script so that it will be +effective when Bacula runs. + +A second problem that comes up with a small number of autochangers is that +they need to have the cartridge ejected before it can be removed. If this is +the case, the {\bf load 3} will never succeed regardless of how long you wait. +If this seems to be your problem, you can insert an eject just after the +unload so that the script looks like: + +\footnotesize +\begin{verbatim} +#!/bin/sh +/etc/bacula/mtx-changer /dev/sg0 unload 1 /dev/nst0 0 +mt -f /dev/st0 offline +/etc/bacula/mtx-changer /dev/sg0 load 3 /dev/nst0 0 +mt -f /dev/st0 rewind +mt -f /dev/st0 weof +\end{verbatim} +\normalsize + +Obviously, if you need the {\bf offline} command, you should move it into the +mtx-changer script ensuring that you save the status of the {\bf mtx} command +or always force an {\bf exit 0} from the script, because Bacula checks the +return status of the script. + +As noted earlier, there are several scripts in {\bf +\lt{}bacula-source\gt{}/examples/devices} that implement the above features, +so they may be a help to you in getting your script to work. + +If Bacula complains "Rewind error on /dev/nst0. ERR=Input/output error." you +most likely need more sleep time in your {\bf mtx-changer} before returning to +Bacula after a load command has been completed. + +\label{using} + +\section{Using the Autochanger} +\index[general]{Using the Autochanger } +\index[general]{Autochanger!Using the } + +Let's assume that you have properly defined the necessary Storage daemon +Device records, and you have added the {\bf Autochanger = yes} record to the +Storage resource in your Director's configuration file. + +Now you fill your autochanger with say six blank tapes. + +What do you do to make Bacula access those tapes? + +One strategy is to prelabel each of the tapes. Do so by starting Bacula, then +with the Console program, enter the {\bf label} command: + +\footnotesize +\begin{verbatim} +./bconsole +Connecting to Director rufus:8101 +1000 OK: rufus-dir Version: 1.26 (4 October 2002) +*label +\end{verbatim} +\normalsize + +it will then print something like: + +\footnotesize +\begin{verbatim} +Using default Catalog name=BackupDB DB=bacula +The defined Storage resources are: + 1: Autochanger + 2: File +Select Storage resource (1-2): 1 +\end{verbatim} +\normalsize + +I select the autochanger (1), and it prints: + +\footnotesize +\begin{verbatim} +Enter new Volume name: TestVolume1 +Enter slot (0 for none): 1 +\end{verbatim} +\normalsize + +where I entered {\bf TestVolume1} for the tape name, and slot {\bf 1} for the +slot. It then asks: + +\footnotesize +\begin{verbatim} +Defined Pools: + 1: Default + 2: File +Select the Pool (1-2): 1 +\end{verbatim} +\normalsize + +I select the Default pool. This will be automatically done if you only have a +single pool, then Bacula will proceed to unload any loaded volume, load the +volume in slot 1 and label it. In this example, nothing was in the drive, so +it printed: + +\footnotesize +\begin{verbatim} +Connecting to Storage daemon Autochanger at localhost:9103 ... +Sending label command ... +3903 Issuing autochanger "load slot 1" command. +3000 OK label. Volume=TestVolume1 Device=/dev/nst0 +Media record for Volume=TestVolume1 successfully created. +Requesting mount Autochanger ... +3001 Device /dev/nst0 is mounted with Volume TestVolume1 +You have messages. +* +\end{verbatim} +\normalsize + +You may then proceed to label the other volumes. The messages will change +slightly because Bacula will unload the volume (just labeled TestVolume1) +before loading the next volume to be labeled. + +Once all your Volumes are labeled, Bacula will automatically load them as they +are needed. + +To "see" how you have labeled your Volumes, simply enter the {\bf list +volumes} command from the Console program, which should print something like +the following: + +\footnotesize +\begin{verbatim} +*{\bf list volumes} +Using default Catalog name=BackupDB DB=bacula +Defined Pools: + 1: Default + 2: File +Select the Pool (1-2): 1 ++-------+----------+--------+---------+-------+--------+----------+-------+------+ +| MedId | VolName | MedTyp | VolStat | Bites | LstWrt | VolReten | Recyc | Slot | ++-------+----------+--------+---------+-------+--------+----------+-------+------+ +| 1 | TestVol1 | DDS-4 | Append | 0 | 0 | 30672000 | 0 | 1 | +| 2 | TestVol2 | DDS-4 | Append | 0 | 0 | 30672000 | 0 | 2 | +| 3 | TestVol3 | DDS-4 | Append | 0 | 0 | 30672000 | 0 | 3 | +| ... | ++-------+----------+--------+---------+-------+--------+----------+-------+------+ +\end{verbatim} +\normalsize + +\label{Barcodes} + +\section{Barcode Support} +\index[general]{Support!Barcode } +\index[general]{Barcode Support } + +Bacula provides barcode support with two Console commands, {\bf label +barcodes} and {\bf update slots}. + +The {\bf label barcodes} will cause Bacula to read the barcodes of all the +cassettes that are currently installed in the magazine (cassette holder) using +the {\bf mtx-changer} {\bf list} command. Each cassette is mounted in turn and +labeled with the same Volume name as the barcode. + +The {\bf update slots} command will first obtain the list of cassettes and +their barcodes from {\bf mtx-changer}. Then it will find each volume in turn +in the catalog database corresponding to the barcodes and set its Slot to +correspond to the value just read. If the Volume is not in the catalog, then +nothing will be done. This command is useful for synchronizing Bacula with the +current magazine in case you have changed magazines or in case you have moved +cassettes from one slot to another. If the autochanger is empty, nothing will +be done. + +The {\bf Cleaning Prefix} statement can be used in the Pool resource to define +a Volume name prefix, which if it matches that of the Volume (barcode) will +cause that Volume to be marked with a VolStatus of {\bf Cleaning}. This will +prevent Bacula from attempting to write on the Volume. + +\section{Use bconsole to display Autochanger content} + +The {\bf status slots storage=xxx} command displays autochanger content. + +\footnotesize +\begin{verbatim} + Slot | Volume Name | Status | Type | Pool | Loaded | +------+-----------------+----------+-------------------+----------------+---------| + 1 | 00001 | Append | DiskChangerMedia | Default | 0 | + 2 | 00002 | Append | DiskChangerMedia | Default | 0 | + 3*| 00003 | Append | DiskChangerMedia | Scratch | 0 | + 4 | | | | | 0 | +\end{verbatim} +\normalsize + +If you see a {\bf *} near the slot number, you have to run {\bf update slots} +command to synchronize autochanger content with your catalog. + +\label{interface} + +\section{Bacula Autochanger Interface} +\index[general]{Interface!Bacula Autochanger } +\index[general]{Bacula Autochanger Interface } + +Bacula calls the autochanger script that you specify on the {\bf Changer +Command} statement. Normally this script will be the {\bf mtx-changer} script +that we provide, but it can in fact be any program. The only requirement +for the script is that it must understand the commands that +Bacula uses, which are {\bf loaded}, {\bf load}, {\bf +unload}, {\bf list}, and {\bf slots}. In addition, +each of those commands must return the information in the precise format as +specified below: + +\footnotesize +\begin{verbatim} +- Currently the changer commands used are: + loaded -- returns number of the slot that is loaded, base 1, + in the drive or 0 if the drive is empty. + load -- loads a specified slot (note, some autochangers + require a 30 second pause after this command) into + the drive. + unload -- unloads the device (returns cassette to its slot). + list -- returns one line for each cassette in the autochanger + in the format :. Where + the {\bf slot} is the non-zero integer representing + the slot number, and {\bf barcode} is the barcode + associated with the cassette if it exists and if you + autoloader supports barcodes. Otherwise the barcode + field is blank. + slots -- returns total number of slots in the autochanger. +\end{verbatim} +\normalsize + +Bacula checks the exit status of the program called, and if it is zero, the +data is accepted. If the exit status is non-zero, Bacula will print an +error message and request the tape be manually mounted on the drive. diff --git a/docs/manuals/fr/main/bootstrap.tex b/docs/manuals/fr/main/bootstrap.tex new file mode 100644 index 00000000..882aaf03 --- /dev/null +++ b/docs/manuals/fr/main/bootstrap.tex @@ -0,0 +1,427 @@ +%% +%% + +\chapter{The Bootstrap File} +\label{BootstrapChapter} +\index[general]{File!Bootstrap } +\index[general]{Bootstrap File } + +The information in this chapter is provided so that you may either create your +own bootstrap files, or so that you can edit a bootstrap file produced by {\bf +Bacula}. However, normally the bootstrap file will be automatically created +for you during the +\ilink{restore\_command}{_ConsoleChapter} command in the Console program, or +by using a +\ilink{ Write Bootstrap}{writebootstrap} record in your Backup +Jobs, and thus you will never need to know the details of this file. + +The {\bf bootstrap} file contains ASCII information that permits precise +specification of what files should be restored, what volume they are on, +and where they are on the volume. It is a relatively compact +form of specifying the information, is human readable, and can be edited with +any text editor. + +\section{Bootstrap File Format} +\index[general]{Format!Bootstrap} +\index[general]{Bootstrap File Format } + +The general format of a {\bf bootstrap} file is: + +{\bf \lt{}keyword\gt{}= \lt{}value\gt{}} + +Where each {\bf keyword} and the {\bf value} specify which files to restore. +More precisely the {\bf keyword} and their {\bf values} serve to limit which +files will be restored and thus act as a filter. The absence of a keyword +means that all records will be accepted. + +Blank lines and lines beginning with a pound sign (\#) in the bootstrap file +are ignored. + +There are keywords which permit filtering by Volume, Client, Job, FileIndex, +Session Id, Session Time, ... + +The more keywords that are specified, the more selective the specification of +which files to restore will be. In fact, each keyword is {\bf AND}ed with +other keywords that may be present. + +For example, + +\footnotesize +\begin{verbatim} +Volume = Test-001 +VolSessionId = 1 +VolSessionTime = 108927638 +\end{verbatim} +\normalsize + +directs the Storage daemon (or the {\bf bextract} program) to restore only +those files on Volume Test-001 {\bf AND} having VolumeSessionId equal to one +{\bf AND} having VolumeSession time equal to 108927638. + +The full set of permitted keywords presented in the order in which they are +matched against the Volume records are: + +\begin{description} + +\item [Volume] + \index[general]{Volume } + The value field specifies what Volume the following commands apply to. + Each Volume specification becomes the current Volume, to which all the + following commands apply until a new current Volume (if any) is + specified. If the Volume name contains spaces, it should be enclosed in + quotes. At lease one Volume specification is required. + +\item [Count] + \index[general]{Count} + The value is the total number of files that will be restored for this Volume. + This allows the Storage daemon to know when to stop reading the Volume. + This value is optional. + +\item [VolFile] + \index[general]{VolFile} + The value is a file number, a list of file numbers, or a range of file + numbers to match on the current Volume. The file number represents the + physical file on the Volume where the data is stored. For a tape + volume, this record is used to position to the correct starting file, + and once the tape is past the last specified file, reading will stop. + +\item [VolBlock] + \index[general]{VolBlock} + The value is a block number, a list of block numbers, or a range of + block numbers to match on the current Volume. The block number + represents the physical block within the file on the Volume where the + data is stored. + + +\item [VolSessionTime] + \index[general]{VolSessionTime } + The value specifies a Volume Session Time to be matched from the current + volume. + +\item [VolSessionId] + \index[general]{VolSessionId } + The value specifies a VolSessionId, a list of volume session ids, or a + range of volume session ids to be matched from the current Volume. Each + VolSessionId and VolSessionTime pair corresponds to a unique Job that is + backed up on the Volume. + +\item [JobId] + \index[general]{JobId } + The value specifies a JobId, list of JobIds, or range of JobIds to be + selected from the current Volume. Note, the JobId may not be unique if you + have multiple Directors, or if you have reinitialized your database. The + JobId filter works only if you do not run multiple simultaneous jobs. + This value is optional and not used by Bacula to restore files. + +\item [Job] + \index[general]{Job } + The value specifies a Job name or list of Job names to be matched on the + current Volume. The Job corresponds to a unique VolSessionId and + VolSessionTime pair. However, the Job is perhaps a bit more readable by + humans. Standard regular expressions (wildcards) may be used to match Job + names. The Job filter works only if you do not run multiple simultaneous + jobs. + This value is optional and not used by Bacula to restore files. + +\item [Client] + \index[general]{Client } + The value specifies a Client name or list of Clients to will be matched on + the current Volume. Standard regular expressions (wildcards) may be used to + match Client names. The Client filter works only if you do not run multiple + simultaneous jobs. + This value is optional and not used by Bacula to restore files. + +\item [FileIndex] + \index[general]{FileIndex} + The value specifies a FileIndex, list of FileIndexes, or range of FileIndexes + to be selected from the current Volume. Each file (data) stored on a Volume + within a Session has a unique FileIndex. For each Session, the first file + written is assigned FileIndex equal to one and incremented for each file + backed up. + + This for a given Volume, the triple VolSessionId, VolSessionTime, and + FileIndex uniquely identifies a file stored on the Volume. Multiple copies of + the same file may be stored on the same Volume, but for each file, the triple + VolSessionId, VolSessionTime, and FileIndex will be unique. This triple is + stored in the Catalog database for each file. + + To restore a particular file, this value (or a range of FileIndexes) is + required. + +\item [FileRegex] + \index[general]{FileRegex} + The value is a regular expression. When specified, only matching + filenames will be restored. + +\begin{verbatim} + FileRegex=^/etc/passwd(.old)? +\end{verbatim} + +\item [Slot] + \index[general]{Slot } + The value specifies the autochanger slot. There may be only a single {\bf + Slot} specification for each Volume. + +\item [Stream] + \index[general]{Stream } + The value specifies a Stream, a list of Streams, or a range of Streams to be + selected from the current Volume. Unless you really know what you are doing + (the internals of {\bf Bacula}), you should avoid this specification. + This value is optional and not used by Bacula to restore files. + +\item [*JobType] + \index[general]{*JobType } + Not yet implemented. + +\item [*JobLevel] + \index[general]{*JobLevel } + Not yet implemented. +\end{description} + +The {\bf Volume} record is a bit special in that it must be the first record. +The other keyword records may appear in any order and any number following a +Volume record. + +Multiple Volume records may be specified in the same bootstrap file, but each +one starts a new set of filter criteria for the Volume. + +In processing the bootstrap file within the current Volume, each filter +specified by a keyword is {\bf AND}ed with the next. Thus, + +\footnotesize +\begin{verbatim} +Volume = Test-01 +Client = "My machine" +FileIndex = 1 +\end{verbatim} +\normalsize + +will match records on Volume {\bf Test-01} {\bf AND} Client records for {\bf +My machine} {\bf AND} FileIndex equal to {\bf one}. + +Multiple occurrences of the same record are {\bf OR}ed together. Thus, + +\footnotesize +\begin{verbatim} +Volume = Test-01 +Client = "My machine" +Client = "Backup machine" +FileIndex = 1 +\end{verbatim} +\normalsize + +will match records on Volume {\bf Test-01} {\bf AND} (Client records for {\bf +My machine} {\bf OR} {\bf Backup machine}) {\bf AND} FileIndex equal to {\bf +one}. + +For integer values, you may supply a range or a list, and for all other values +except Volumes, you may specify a list. A list is equivalent to multiple +records of the same keyword. For example, + +\footnotesize +\begin{verbatim} +Volume = Test-01 +Client = "My machine", "Backup machine" +FileIndex = 1-20, 35 +\end{verbatim} +\normalsize + +will match records on Volume {\bf Test-01} {\bf AND} {\bf (}Client records for +{\bf My machine} {\bf OR} {\bf Backup machine}{\bf )} {\bf AND} {\bf +(}FileIndex 1 {\bf OR} 2 {\bf OR} 3 ... {\bf OR} 20 {\bf OR} 35{\bf )}. + +As previously mentioned above, there may be multiple Volume records in the +same bootstrap file. Each new Volume definition begins a new set of filter +conditions that apply to that Volume and will be {\bf OR}ed with any other +Volume definitions. + +As an example, suppose we query for the current set of tapes to restore all +files on Client {\bf Rufus} using the {\bf query} command in the console +program: + +\footnotesize +\begin{verbatim} +Using default Catalog name=MySQL DB=bacula +*query +Available queries: + 1: List Job totals: + 2: List where a file is saved: + 3: List where the most recent copies of a file are saved: + 4: List total files/bytes by Job: + 5: List total files/bytes by Volume: + 6: List last 10 Full Backups for a Client: + 7: List Volumes used by selected JobId: + 8: List Volumes to Restore All Files: +Choose a query (1-8): 8 +Enter Client Name: Rufus ++-------+------------------+------------+-----------+----------+------------+ +| JobId | StartTime | VolumeName | StartFile | VolSesId | VolSesTime | ++-------+------------------+------------+-----------+----------+------------+ +| 154 | 2002-05-30 12:08 | test-02 | 0 | 1 | 1022753312 | +| 202 | 2002-06-15 10:16 | test-02 | 0 | 2 | 1024128917 | +| 203 | 2002-06-15 11:12 | test-02 | 3 | 1 | 1024132350 | +| 204 | 2002-06-18 08:11 | test-02 | 4 | 1 | 1024380678 | ++-------+------------------+------------+-----------+----------+------------+ +\end{verbatim} +\normalsize + +The output shows us that there are four Jobs that must be restored. The first +one is a Full backup, and the following three are all Incremental backups. + +The following bootstrap file will restore those files: + +\footnotesize +\begin{verbatim} +Volume=test-02 +VolSessionId=1 +VolSessionTime=1022753312 +Volume=test-02 +VolSessionId=2 +VolSessionTime=1024128917 +Volume=test-02 +VolSessionId=1 +VolSessionTime=1024132350 +Volume=test-02 +VolSessionId=1 +VolSessionTime=1024380678 +\end{verbatim} +\normalsize + +As a final example, assume that the initial Full save spanned two Volumes. The +output from {\bf query} might look like: + +\footnotesize +\begin{verbatim} ++-------+------------------+------------+-----------+----------+------------+ +| JobId | StartTime | VolumeName | StartFile | VolSesId | VolSesTime | ++-------+------------------+------------+-----------+----------+------------+ +| 242 | 2002-06-25 16:50 | File0003 | 0 | 1 | 1025016612 | +| 242 | 2002-06-25 16:50 | File0004 | 0 | 1 | 1025016612 | +| 243 | 2002-06-25 16:52 | File0005 | 0 | 2 | 1025016612 | +| 246 | 2002-06-25 19:19 | File0006 | 0 | 2 | 1025025494 | ++-------+------------------+------------+-----------+----------+------------+ +\end{verbatim} +\normalsize + +and the following bootstrap file would restore those files: + +\footnotesize +\begin{verbatim} +Volume=File0003 +VolSessionId=1 +VolSessionTime=1025016612 +Volume=File0004 +VolSessionId=1 +VolSessionTime=1025016612 +Volume=File0005 +VolSessionId=2 +VolSessionTime=1025016612 +Volume=File0006 +VolSessionId=2 +VolSessionTime=1025025494 +\end{verbatim} +\normalsize + +\section{Automatic Generation of Bootstrap Files} +\index[general]{Files!Automatic Generation of Bootstrap } +\index[general]{Automatic Generation of Bootstrap Files } + +One thing that is probably worth knowing: the bootstrap files that are +generated automatically at the end of the job are not as optimized as those +generated by the restore command. This is because during Incremental and +Differential jobs, the records pertaining to the files written for the +Job are appended to the end of the bootstrap file. +As consequence, all the files saved to an Incremental or Differential job will be +restored first by the Full save, then by any Incremental or Differential +saves. + +When the bootstrap file is generated for the restore command, only one copy +(the most recent) of each file is restored. + +So if you have spare cycles on your machine, you could optimize the bootstrap +files by doing the following: + +\footnotesize +\begin{verbatim} + ./bconsole + restore client=xxx select all + done + no + quit + Backup bootstrap file. +\end{verbatim} +\normalsize + +The above will not work if you have multiple FileSets because that will be an +extra prompt. However, the {\bf restore client=xxx select all} builds the +in-memory tree, selecting everything and creates the bootstrap file. + +The {\bf no} answers the {\bf Do you want to run this (yes/mod/no)} question. + +\label{bscanBootstrap} +\section{Bootstrap for bscan} +\index[general]{bscan} +\index[general]{bscan!bootstrap} +\index[general]{bscan bootstrap} +If you have a very large number of Volumes to scan with {\bf bscan}, +you may exceed the command line limit (511 characters). I that case, +you can create a simple bootstrap file that consists of only the +volume names. An example might be: + +\footnotesize +\begin{verbatim} +Volume="Vol001" +Volume="Vol002" +Volume="Vol003" +Volume="Vol004" +Volume="Vol005" +\end{verbatim} +\normalsize + + +\section{A Final Bootstrap Example} +\index[general]{Bootstrap Example} +\index[general]{Example!Bootstrap} + +If you want to extract or copy a single Job, you can do it by selecting by +JobId (code not tested) or better yet, if you know the VolSessionTime and the +VolSessionId (printed on Job report and in Catalog), specifying this is by far +the best. Using the VolSessionTime and VolSessionId is the way Bacula does +restores. A bsr file might look like the following: + +\footnotesize +\begin{verbatim} +Volume="Vol001" +VolSessionId=10 +VolSessionTime=1080847820 +\end{verbatim} +\normalsize + +If you know how many files are backed up (on the job report), you can +enormously speed up the selection by adding (let's assume there are 157 +files): + +\footnotesize +\begin{verbatim} +FileIndex=1-157 +Count=157 +\end{verbatim} +\normalsize + +Finally, if you know the File number where the Job starts, you can also cause +bcopy to forward space to the right file without reading every record: + +\footnotesize +\begin{verbatim} +VolFile=20 +\end{verbatim} +\normalsize + +There is nothing magic or complicated about a BSR file. Parsing it and +properly applying it within Bacula *is* magic, but you don't need to worry +about that. + +If you want to see a *real* bsr file, simply fire up the {\bf restore} command +in the console program, select something, then answer no when it prompts to +run the job. Then look at the file {\bf restore.bsr} in your working +directory. diff --git a/docs/manuals/fr/main/bugs.tex b/docs/manuals/fr/main/bugs.tex new file mode 100644 index 00000000..42df829d --- /dev/null +++ b/docs/manuals/fr/main/bugs.tex @@ -0,0 +1,21 @@ +%% +%% + +\section{Bacula Bugs} +\label{BugsChapter} +\index[general]{Bacula Bugs } +\index[general]{Bugs!Bacula } + +Well fortunately there are not too many bugs, but thanks to Dan Langille, we +have a +\elink{bugs database}{http://bugs.bacula.org} where bugs are reported. +Generally, when a bug is fixed, a patch for the currently released version will +be attached to the bug report. + +The directory {\bf patches} in the current SVN always contains a list of +the patches that have been created for the previously released version +of Bacula. In addition, the file {\bf patches-version-number} in the +{\bf patches} directory contains a summary of each of the patches. + +A "raw" list of the current task list and known issues can be found in {\bf +kernstodo} in the main Bacula source directory. diff --git a/docs/manuals/fr/main/catmaintenance.tex b/docs/manuals/fr/main/catmaintenance.tex new file mode 100644 index 00000000..b22208e8 --- /dev/null +++ b/docs/manuals/fr/main/catmaintenance.tex @@ -0,0 +1,790 @@ +%% +%% + +\chapter{Catalog Maintenance} +\label{CatMaintenanceChapter} +\index[general]{Maintenance!Catalog } +\index[general]{Catalog Maintenance } + +Without proper setup and maintenance, your Catalog may continue to grow +indefinitely as you run Jobs and backup Files, and/or it may become +very inefficient and slow. How fast the size of your +Catalog grows depends on the number of Jobs you run and how many files they +backup. By deleting records within the database, you can make space available +for the new records that will be added during the next Job. By constantly +deleting old expired records (dates older than the Retention period), your +database size will remain constant. + +If you started with the default configuration files, they already contain +reasonable defaults for a small number of machines (less than 5), so if you +fall into that case, catalog maintenance will not be urgent if you have a few +hundred megabytes of disk space free. Whatever the case may be, some knowledge +of retention periods will be useful. +\label{Retention} + +\section{Setting Retention Periods} +\index[general]{Setting Retention Periods } +\index[general]{Periods!Setting Retention } + +{\bf Bacula} uses three Retention periods: the {\bf File Retention} period, +the {\bf Job Retention} period, and the {\bf Volume Retention} period. Of +these three, the File Retention period is by far the most important in +determining how large your database will become. + +The {\bf File Retention} and the {\bf Job Retention} are specified in each +Client resource as is shown below. The {\bf Volume Retention} period is +specified in the Pool resource, and the details are given in the next chapter +of this manual. + +\begin{description} + +\item [File Retention = \lt{}time-period-specification\gt{}] + \index[general]{File Retention } + The File Retention record defines the length of time that Bacula will keep +File records in the Catalog database. When this time period expires, and if +{\bf AutoPrune} is set to {\bf yes}, Bacula will prune (remove) File records +that are older than the specified File Retention period. The pruning will +occur at the end of a backup Job for the given Client. Note that the Client +database record contains a copy of the File and Job retention periods, but +Bacula uses the current values found in the Director's Client resource to do +the pruning. + +Since File records in the database account for probably 80 percent of the +size of the database, you should carefully determine exactly what File +Retention period you need. Once the File records have been removed from +the database, you will no longer be able to restore individual files +in a Job. However, with Bacula version 1.37 and later, as long as the +Job record still exists, you will be able to restore all files in the +job. + +Retention periods are specified in seconds, but as a convenience, there are +a number of modifiers that permit easy specification in terms of minutes, +hours, days, weeks, months, quarters, or years on the record. See the +\ilink{ Configuration chapter}{Time} of this manual for additional details +of modifier specification. + +The default File retention period is 60 days. + +\item [Job Retention = \lt{}time-period-specification\gt{}] + \index[general]{Job Retention } + The Job Retention record defines the length of time that {\bf Bacula} +will keep Job records in the Catalog database. When this time period +expires, and if {\bf AutoPrune} is set to {\bf yes} Bacula will prune +(remove) Job records that are older than the specified Job Retention +period. Note, if a Job record is selected for pruning, all associated File +and JobMedia records will also be pruned regardless of the File Retention +period set. As a consequence, you normally will set the File retention +period to be less than the Job retention period. + +As mentioned above, once the File records are removed from the database, +you will no longer be able to restore individual files from the Job. +However, as long as the Job record remains in the database, you will be +able to restore all the files backuped for the Job (on version 1.37 and +later). As a consequence, it is generally a good idea to retain the Job +records much longer than the File records. + +The retention period is specified in seconds, but as a convenience, there +are a number of modifiers that permit easy specification in terms of +minutes, hours, days, weeks, months, quarters, or years. See the \ilink{ +Configuration chapter}{Time} of this manual for additional details of +modifier specification. + +The default Job Retention period is 180 days. + +\item [AutoPrune = \lt{}yes/no\gt{}] + \index[general]{AutoPrune } + If AutoPrune is set to {\bf yes} (default), Bacula will automatically apply +the File retention period and the Job retention period for the Client at the +end of the Job. + +If you turn this off by setting it to {\bf no}, your Catalog will grow each +time you run a Job. +\end{description} + +\label{CompactingMySQL} +\section{Compacting Your MySQL Database} +\index[general]{Database!Compacting Your MySQL } +\index[general]{Compacting Your MySQL Database } + +Over time, as noted above, your database will tend to grow. I've noticed that +even though Bacula regularly prunes files, {\bf MySQL} does not effectively +use the space, and instead continues growing. To avoid this, from time to +time, you must compact your database. Normally, large commercial database such +as Oracle have commands that will compact a database to reclaim wasted file +space. MySQL has the {\bf OPTIMIZE TABLE} command that you can use, and SQLite +version 2.8.4 and greater has the {\bf VACUUM} command. We leave it to you to +explore the utility of the {\bf OPTIMIZE TABLE} command in MySQL. + +All database programs have some means of writing the database out in ASCII +format and then reloading it. Doing so will re-create the database from +scratch producing a compacted result, so below, we show you how you can do +this for MySQL, PostgreSQL and SQLite. + +For a {\bf MySQL} database, you could write the Bacula database as an ASCII +file (bacula.sql) then reload it by doing the following: + +\footnotesize +\begin{verbatim} +mysqldump -f --opt bacula > bacula.sql +mysql bacula < bacula.sql +rm -f bacula.sql +\end{verbatim} +\normalsize + +Depending on the size of your database, this will take more or less time and a +fair amount of disk space. For example, if I cd to the location of the MySQL +Bacula database (typically /opt/mysql/var or something similar) and enter: + +\footnotesize +\begin{verbatim} +du bacula +\end{verbatim} +\normalsize + +I get {\bf 620,644} which means there are that many blocks containing 1024 +bytes each or approximately 635 MB of data. After doing the {\bf mysqldump}, I +had a bacula.sql file that had {\bf 174,356} blocks, and after doing the {\bf +mysql} command to recreate the database, I ended up with a total of {\bf +210,464} blocks rather than the original {\bf 629,644}. In other words, the +compressed version of the database took approximately one third of the space +of the database that had been in use for about a year. + +As a consequence, I suggest you monitor the size of your database and from +time to time (once every six months or year), compress it. + +\label{DatabaseRepair} +\label{RepairingMySQL} +\section{Repairing Your MySQL Database} +\index[general]{Database!Repairing Your MySQL } +\index[general]{Repairing Your MySQL Database } + +If you find that you are getting errors writing to your MySQL database, or +Bacula hangs each time it tries to access the database, you should consider +running MySQL's database check and repair routines. The program you need to +run depends on the type of database indexing you are using. If you are using +the default, you will probably want to use {\bf myisamchk}. For more details +on how to do this, please consult the MySQL document at: +\elink{ +http://www.mysql.com/doc/en/Repair.html} +{http://www.mysql.com/doc/en/Repair.html}. + +If the errors you are getting are simply SQL warnings, then you might try +running dbcheck before (or possibly after) using the MySQL database repair +program. It can clean up many of the orphaned record problems, and certain +other inconsistencies in the Bacula database. + +A typical cause of MySQL database problems is if your partition fills. In +such a case, you will need to create additional space on the partition or +free up some space then repair the database probably using {\bf myisamchk}. +Recently my root partition filled and the MySQL database was corrupted. +Simply running {\bf myisamchk -r} did not fix the problem. However, +the following script did the trick for me: + +\footnotesize +\begin{verbatim} +#!/bin/sh +for i in *.MYD ; do + mv $i x${i} + t=`echo $i | cut -f 1 -d '.' -` + mysql bacula </bacula.db +select * from sqlite_master where type='index' and tbl_name='File'; +\end{verbatim} +\normalsize + +If the indexes are not present, especially the JobId index, you can +create them with the following commands: + +\footnotesize +\begin{verbatim} +sqlite /bacula.db +CREATE INDEX file_jobid_idx on File (JobId); +CREATE INDEX file_jfp_idx on File (JobId, PathId, FilenameId); +\end{verbatim} +\normalsize + + + +\label{CompactingPostgres} +\section{Compacting Your PostgreSQL Database} +\index[general]{Database!Compacting Your PostgreSQL } +\index[general]{Compacting Your PostgreSQL Database } + +Over time, as noted above, your database will tend to grow. I've noticed that +even though Bacula regularly prunes files, PostgreSQL has a {\bf VACUUM} +command that will compact your database for you. Alternatively you may want to +use the {\bf vacuumdb} command, which can be run from a cron job. + +All database programs have some means of writing the database out in ASCII +format and then reloading it. Doing so will re-create the database from +scratch producing a compacted result, so below, we show you how you can do +this for PostgreSQL. + +For a {\bf PostgreSQL} database, you could write the Bacula database as an +ASCII file (bacula.sql) then reload it by doing the following: + +\footnotesize +\begin{verbatim} +pg_dump -c bacula > bacula.sql +cat bacula.sql | psql bacula +rm -f bacula.sql +\end{verbatim} +\normalsize + +Depending on the size of your database, this will take more or less time and a +fair amount of disk space. For example, you can {\bf cd} to the location of +the Bacula database (typically /usr/local/pgsql/data or possible +/var/lib/pgsql/data) and check the size. + +There are certain PostgreSQL users who do not recommend the above +procedure. They have the following to say: +PostgreSQL does not +need to be dumped/restored to keep the database efficient. A normal +process of vacuuming will prevent the database from every getting too +large. If you want to fine-tweak the database storage, commands such +as VACUUM FULL, REINDEX, and CLUSTER exist specifically to keep you +from having to do a dump/restore. + +Finally, you might want to look at the PostgreSQL documentation on +this subject at +\elink{http://www.postgresql.org/docs/8.1/interactive/maintenance.html} +{http://www.postgresql.org/docs/8.1/interactive/maintenance.html}. + +\section{Compacting Your SQLite Database} +\index[general]{Compacting Your SQLite Database } +\index[general]{Database!Compacting Your SQLite } + +First please read the previous section that explains why it is necessary to +compress a database. SQLite version 2.8.4 and greater have the {\bf Vacuum} +command for compacting the database. + +\footnotesize +\begin{verbatim} +cd {\bf working-directory} +echo 'vacuum;' | sqlite bacula.db +\end{verbatim} +\normalsize + +As an alternative, you can use the following commands, adapted to your system: + + +\footnotesize +\begin{verbatim} +cd {\bf working-directory} +echo '.dump' | sqlite bacula.db > bacula.sql +rm -f bacula.db +sqlite bacula.db < bacula.sql +rm -f bacula.sql +\end{verbatim} +\normalsize + +Where {\bf working-directory} is the directory that you specified in the +Director's configuration file. Note, in the case of SQLite, it is necessary to +completely delete (rm) the old database before creating a new compressed +version. + +\section{Migrating from SQLite to MySQL or PostgreSQL} +\index[general]{MySQL!Migrating from SQLite to } +\index[general]{Migrating from SQLite to MySQL or PostgreSQL} + +You may begin using Bacula with SQLite then later find that you want to switch +to MySQL or Postgres for any of a number of reasons: SQLite tends to use more +disk than MySQL; when the database is corrupted it is often more catastrophic +than with MySQL or PostgreSQL. Several users have succeeded in converting by +exporting the SQLite data and then processing it with Perl scripts prior to +putting it into MySQL or PostgreSQL. This is, however, not a simple process. +Scripts are available on bacula source distribution under +\texttt{examples/database}. + +\label{BackingUpBacula} +\section{Backing Up Your Bacula Database} +\index[general]{Backing Up Your Bacula Database } +\index[general]{Database!Backing Up Your Bacula } + +If ever the machine on which your Bacula database crashes, and you need to +restore from backup tapes, one of your first priorities will probably be to +recover the database. Although Bacula will happily backup your catalog +database if it is specified in the FileSet, this is not a very good way to do +it, because the database will be saved while Bacula is modifying it. Thus the +database may be in an instable state. Worse yet, you will backup the database +before all the Bacula updates have been applied. + +To resolve these problems, you need to backup the database after all the backup +jobs have been run. In addition, you will want to make a copy while Bacula is +not modifying it. To do so, you can use two scripts provided in the release +{\bf make\_catalog\_backup} and {\bf delete\_catalog\_backup}. These files +will be automatically generated along with all the other Bacula scripts. The +first script will make an ASCII copy of your Bacula database into {\bf +bacula.sql} in the working directory you specified in your configuration, and +the second will delete the {\bf bacula.sql} file. + +The basic sequence of events to make this work correctly is as follows: + +\begin{itemize} +\item Run all your nightly backups +\item After running your nightly backups, run a Catalog backup Job +\item The Catalog backup job must be scheduled after your last nightly backup + +\item You use {\bf RunBeforeJob} to create the ASCII backup file and {\bf + RunAfterJob} to clean up +\end{itemize} + +Assuming that you start all your nightly backup jobs at 1:05 am (and that they +run one after another), you can do the catalog backup with the following +additional Director configuration statements: + +\footnotesize +\begin{verbatim} +# Backup the catalog database (after the nightly save) +Job { + Name = "BackupCatalog" + Type = Backup + Client=rufus-fd + FileSet="Catalog" + Schedule = "WeeklyCycleAfterBackup" + Storage = DLTDrive + Messages = Standard + Pool = Default + # WARNING!!! Passing the password via the command line is insecure. + # see comments in make_catalog_backup for details. + RunBeforeJob = "/home/kern/bacula/bin/make_catalog_backup" + RunAfterJob = "/home/kern/bacula/bin/delete_catalog_backup" + Write Bootstrap = "/home/kern/bacula/working/BackupCatalog.bsr" +} +# This schedule does the catalog. It starts after the WeeklyCycle +Schedule { + Name = "WeeklyCycleAfterBackup + Run = Level=Full sun-sat at 1:10 +} +# This is the backup of the catalog +FileSet { + Name = "Catalog" + Include { + Options { + signature=MD5 + } + File = \lt{}working_directory\gt{}/bacula.sql + } +} +\end{verbatim} +\normalsize + +Be sure to write a bootstrap file as in the above example. However, it is preferable +to write or copy the bootstrap file to another computer. It will allow +you to quickly recover the database backup should that be necessary. If +you do not have a bootstrap file, it is still possible to recover your +database backup, but it will be more work and take longer. + + +\label{BackingUpBaculaSecurityConsiderations} +\section{Security considerations} +\index[general]{Backing Up Your Bacula Database - Security Considerations } +\index[general]{Database!Backing Up Your Bacula Database - Security Considerations } + +We provide make\_catalog\_backup as an example of what can be used to backup +your Bacula database. We expect you to take security precautions relevant +to your situation. make\_catalog\_backup is designed to take a password on +the command line. This is fine on machines with only trusted users. It is +not acceptable on machines without trusted users. Most database systems +provide a alternative method, which does not place the password on the +command line. + +The make\_catalog\_backup script contains some warnings about how to use it. Please +read those tips. + +To help you get started, we know PostgreSQL has a password file, +\elink{ +.pgpass}{http://www.postgresql.org/docs/8.2/static/libpq-pgpass.html}, and +we know MySQL has +\elink{ .my.cnf}{http://dev.mysql.com/doc/refman/4.1/en/password-security.html}. + +Only you can decide what is appropriate for your situation. We have provided +you with a starting point. We hope it helps. + + +\label{BackingUPOtherDBs} +\section{Backing Up Third Party Databases} +\index[general]{Backing Up Third Party Databases } +\index[general]{Databases!Backing Up Third Party } + +If you are running a database in production mode on your machine, Bacula will +happily backup the files, but if the database is in use while Bacula is +reading it, you may back it up in an unstable state. + +The best solution is to shutdown your database before backing it up, or use +some tool specific to your database to make a valid live copy perhaps by +dumping the database in ASCII format. I am not a database expert, so I cannot +provide you advice on how to do this, but if you are unsure about how to +backup your database, you might try visiting the Backup Central site, which +has been renamed Storage Mountain (www.backupcentral.com). In particular, +their +\elink{ Free Backup and Recovery +Software}{http://www.backupcentral.com/toc-free-backup-software.html} page has +links to scripts that show you how to shutdown and backup most major +databases. +\label{Size} + +\section{Database Size} +\index[general]{Size!Database } +\index[general]{Database Size } + +As mentioned above, if you do not do automatic pruning, your Catalog will grow +each time you run a Job. Normally, you should decide how long you want File +records to be maintained in the Catalog and set the {\bf File Retention} +period to that time. Then you can either wait and see how big your Catalog +gets or make a calculation assuming approximately 154 bytes for each File +saved and knowing the number of Files that are saved during each backup and +the number of Clients you backup. + +For example, suppose you do a backup of two systems, each with 100,000 files. +Suppose further that you do a Full backup weekly and an Incremental every day, +and that the Incremental backup typically saves 4,000 files. The size of your +database after a month can roughly be calculated as: + +\footnotesize +\begin{verbatim} + Size = 154 * No. Systems * (100,000 * 4 + 10,000 * 26) +\end{verbatim} +\normalsize + +where we have assumed four weeks in a month and 26 incremental backups per month. +This would give the following: + +\footnotesize +\begin{verbatim} + Size = 154 * 2 * (100,000 * 4 + 10,000 * 26) +or + Size = 308 * (400,000 + 260,000) +or + Size = 203,280,000 bytes +\end{verbatim} +\normalsize + +So for the above two systems, we should expect to have a database size of +approximately 200 Megabytes. Of course, this will vary according to how many +files are actually backed up. + +Below are some statistics for a MySQL database containing Job records for five +Clients beginning September 2001 through May 2002 (8.5 months) and File +records for the last 80 days. (Older File records have been pruned). For these +systems, only the user files and system files that change are backed up. The +core part of the system is assumed to be easily reloaded from the Red Hat rpms. + + +In the list below, the files (corresponding to Bacula Tables) with the +extension .MYD contain the data records whereas files with the extension .MYI +contain indexes. + +You will note that the File records (containing the file attributes) make up +the large bulk of the number of records as well as the space used (459 Mega +Bytes including the indexes). As a consequence, the most important Retention +period will be the {\bf File Retention} period. A quick calculation shows that +for each File that is saved, the database grows by approximately 150 bytes. + +\footnotesize +\begin{verbatim} + Size in + Bytes Records File + ============ ========= =========== + 168 5 Client.MYD + 3,072 Client.MYI + 344,394,684 3,080,191 File.MYD + 115,280,896 File.MYI + 2,590,316 106,902 Filename.MYD + 3,026,944 Filename.MYI + 184 4 FileSet.MYD + 2,048 FileSet.MYI + 49,062 1,326 JobMedia.MYD + 30,720 JobMedia.MYI + 141,752 1,378 Job.MYD + 13,312 Job.MYI + 1,004 11 Media.MYD + 3,072 Media.MYI + 1,299,512 22,233 Path.MYD + 581,632 Path.MYI + 36 1 Pool.MYD + 3,072 Pool.MYI + 5 1 Version.MYD + 1,024 Version.MYI +\end{verbatim} +\normalsize + +This database has a total size of approximately 450 Megabytes. + +If we were using SQLite, the determination of the total database size would be +much easier since it is a single file, but we would have less insight to the +size of the individual tables as we have in this case. + +Note, SQLite databases may be as much as 50\% larger than MySQL databases due +to the fact that all data is stored as ASCII strings. That is even binary +integers are stored as ASCII strings, and this seems to increase the space +needed. diff --git a/docs/manuals/fr/main/check_tex.pl b/docs/manuals/fr/main/check_tex.pl new file mode 100755 index 00000000..e12d51be --- /dev/null +++ b/docs/manuals/fr/main/check_tex.pl @@ -0,0 +1,152 @@ +#!/usr/bin/perl -w +# Finds potential problems in tex files, and issues warnings to the console +# about what it finds. Takes a list of files as its only arguments, +# and does checks on all the files listed. The assumption is that these are +# valid (or close to valid) LaTeX files. It follows \include statements +# recursively to pick up any included tex files. +# +# +# +# Currently the following checks are made: +# +# -- Multiple hyphens not inside a verbatim environment (or \verb). These +# should be placed inside a \verb{} contruct so they will not be converted +# to single hyphen by latex and latex2html. + + +# Original creation 3-8-05 by Karl Cunningham karlc -at- keckec -dot- com +# +# + +use strict; + +# The following builds the test string to identify and change multiple +# hyphens in the tex files. Several constructs are identified but only +# multiple hyphens are changed; the others are fed to the output +# unchanged. +my $b = '\\\\begin\\*?\\s*\\{\\s*'; # \begin{ +my $e = '\\\\end\\*?\\s*\\{\\s*'; # \end{ +my $c = '\\s*\\}'; # closing curly brace + +# This captures entire verbatim environments. These are passed to the output +# file unchanged. +my $verbatimenv = $b . "verbatim" . $c . ".*?" . $e . "verbatim" . $c; + +# This captures \verb{..{ constructs. They are passed to the output unchanged. +my $verb = '\\\\verb\\*?(.).*?\\1'; + +# This captures multiple hyphens with a leading and trailing space. These are not changed. +my $hyphsp = '\\s\\-{2,}\\s'; + +# This identifies other multiple hyphens. +my $hyphens = '\\-{2,}'; + +# This identifies \hyperpage{..} commands, which should be ignored. +my $hyperpage = '\\\\hyperpage\\*?\\{.*?\\}'; + +# This builds the actual test string from the above strings. +#my $teststr = "$verbatimenv|$verb|$tocentry|$hyphens"; +my $teststr = "$verbatimenv|$verb|$hyphsp|$hyperpage|$hyphens"; + + +sub get_includes { + # Get a list of include files from the top-level tex file. The first + # argument is a pointer to the list of files found. The rest of the + # arguments is a list of filenames to check for includes. + my $files = shift; + my ($fileline,$includefile,$includes); + + while (my $filename = shift) { + # Get a list of all the html files in the directory. + open my $if,"<$filename" or die "Cannot open input file $filename\n"; + $fileline = 0; + $includes = 0; + while (<$if>) { + chomp; + $fileline++; + # If a file is found in an include, process it. + if (($includefile) = /\\include\s*\{(.*?)\}/) { + $includes++; + # Append .tex to the filename + $includefile .= '.tex'; + + # If the include file has already been processed, issue a warning + # and don't do it again. + my $found = 0; + foreach (@$files) { + if ($_ eq $includefile) { + $found = 1; + last; + } + } + if ($found) { + print "$includefile found at line $fileline in $filename was previously included\n"; + } else { + # The file has not been previously found. Save it and + # recursively process it. + push (@$files,$includefile); + get_includes($files,$includefile); + } + } + } + close IF; + } +} + + +sub check_hyphens { + my (@files) = @_; + my ($filedata,$this,$linecnt,$before); + + # Build the test string to check for the various environments. + # We only do the conversion if the multiple hyphens are outside of a + # verbatim environment (either \begin{verbatim}...\end{verbatim} or + # \verb{--}). Capture those environments and pass them to the output + # unchanged. + + foreach my $file (@files) { + # Open the file and load the whole thing into $filedata. A bit wasteful but + # easier to deal with, and we don't have a problem with speed here. + $filedata = ""; + open IF,"<$file" or die "Cannot open input file $file"; + while () { + $filedata .= $_; + } + close IF; + + # Set up to process the file data. + $linecnt = 1; + + # Go through the file data from beginning to end. For each match, save what + # came before it and what matched. $filedata now becomes only what came + # after the match. + # Chech the match to see if it starts with a multiple-hyphen. If so + # warn the user. Keep track of line numbers so they can be output + # with the warning message. + while ($filedata =~ /$teststr/os) { + $this = $&; + $before = $`; + $filedata = $'; + $linecnt += $before =~ tr/\n/\n/; + + # Check if the multiple hyphen is present outside of one of the + # acceptable constructs. + if ($this =~ /^\-+/) { + print "Possible unwanted multiple hyphen found in line ", + "$linecnt of file $file\n"; + } + $linecnt += $this =~ tr/\n/\n/; + } + } +} +################################################################## +# MAIN #### +################################################################## + +my (@includes,$cnt); + +# Examine the file pointed to by the first argument to get a list of +# includes to test. +get_includes(\@includes,@ARGV); + +check_hyphens(@includes); diff --git a/docs/manuals/fr/main/configure.tex b/docs/manuals/fr/main/configure.tex new file mode 100644 index 00000000..4a2dece6 --- /dev/null +++ b/docs/manuals/fr/main/configure.tex @@ -0,0 +1,415 @@ +%% +%% + +\chapter{Customizing the Configuration Files} +\label{ConfigureChapter} +\index[general]{Files!Customizing the Configuration } +\index[general]{Customizing the Configuration Files } + +When each of the Bacula programs starts, it reads a configuration file +specified on the command line or the default {\bf bacula-dir.conf}, {\bf +bacula-fd.conf}, {\bf bacula-sd.conf}, or {\bf console.conf} for the Director +daemon, the File daemon, the Storage daemon, and the Console program +respectively. + +Each service (Director, Client, Storage, Console) has its own configuration +file containing a set of Resource definitions. These resources are very +similar from one service to another, but may contain different directives +(records) depending on the service. For example, in the Director's resource +file, the {\bf Director} resource defines the name of the Director, a number +of global Director parameters and his password. In the File daemon +configuration file, the {\bf Director} resource specifies which Directors are +permitted to use the File daemon. + +Before running Bacula for the first time, you must customize the configuration +files for each daemon. Default configuration files will have been created by +the installation process, but you will need to modify them to correspond to +your system. An overall view of the resources can be seen in the following: + +\addcontentsline{lof}{figure}{Bacula Objects} +\includegraphics{\idir bacula-objects.eps} +\label{ResFormat} + +\section{Character Sets} +\index[general]{Character Sets} +Bacula is designed to handle most character sets of the world, +US ASCII, German, French, Chinese, ... However, it does this by +encoding everything in UTF-8, and it expects all configuration files +(including those read on Win32 machines) to be in UTF-8 format. +UTF-8 is typically the default on Linux machines, but not on all +Unix machines, nor on Windows, so you must take some care to ensure +that your locale is set properly before starting Bacula. + +To ensure that Bacula configuration files can be correctly read including +foreign characters the {bf LANG} environment variable +must end in {\bf .UTF-8}. An full example is {\bf en\_US.UTF-8}. The +exact syntax may vary a bit from OS to OS, and exactly how you define +it will also vary. On most newer Win32 machines, you can use {\bf notepad} +to edit the conf files, then choose output encoding UTF-8. + +Bacula assumes that all filenames are in UTF-8 format on Linux and +Unix machines. On Win32 they are in Unicode (UTF-16), and will +be automatically converted to UTF-8 format. + +\section{Resource Directive Format} +\index[general]{Resource Directive Format } +\index[general]{Format!Resource Directive } + +Although, you won't need to know the details of all the directives a basic +knowledge of Bacula resource directives is essential. Each directive contained +within the resource (within the braces) is composed of a keyword followed by +an equal sign (=) followed by one or more values. The keywords must be one of +the known Bacula resource record keywords, and it may be composed of upper or +lower case characters and spaces. + +Each resource definition MUST contain a Name directive, and may optionally +contain a Description directive. The Name directive is used to +uniquely identify the resource. The Description directive is (will be) used +during display of the Resource to provide easier human recognition. For +example: + +\footnotesize +\begin{verbatim} +Director { + Name = "MyDir" + Description = "Main Bacula Director" + WorkingDirectory = "$HOME/bacula/bin/working" +} +\end{verbatim} +\normalsize + +Defines the Director resource with the name "MyDir" and a working directory +\$HOME/bacula/bin/working. In general, if you want spaces in a name to the +right of the first equal sign (=), you must enclose that name within double +quotes. Otherwise quotes are not generally necessary because once defined, +quoted strings and unquoted strings are all equal. + +\label{Comments} +\subsection{Comments} +\index[general]{Comments} + +When reading the configuration file, blank lines are ignored and everything +after a hash sign (\#) until the end of the line is taken to be a comment. A +semicolon (;) is a logical end of line, and anything after the semicolon is +considered as the next statement. If a statement appears on a line by itself, +a semicolon is not necessary to terminate it, so generally in the examples in +this manual, you will not see many semicolons. +\label{Case1} + +\subsection{Upper and Lower Case and Spaces} +\index[general]{Spaces!Upper/Lower Case} +\index[general]{Upper and Lower Case and Spaces} + +Case (upper/lower) and spaces are totally ignored in the resource directive +keywords (the part before the equal sign). + +Within the keyword (i.e. before the equal sign), spaces are not significant. +Thus the keywords: {\bf name}, {\bf Name}, and {\bf N a m e} are all +identical. + +Spaces after the equal sign and before the first character of the value are +ignored. + +In general, spaces within a value are significant (not ignored), and if the +value is a name, you must enclose the name in double quotes for the spaces to +be accepted. Names may contain up to 127 characters. Currently, a name may +contain any ASCII character. Within a quoted string, any character following a +backslash (\textbackslash{}) is taken as itself (handy for inserting +backslashes and double quotes (")). + +Please note, however, that Bacula resource names as well as certain other +names (e.g. Volume names) must contain only letters (including ISO accented +letters), numbers, and a few special characters (space, underscore, ...). +All other characters and punctuation are invalid. + +\label{Includes} +\subsection{Including other Configuration Files} +\index[general]{Including other Configuration Files } +\index[general]{Files!Including other Configuration } +\index[general]{Using @ to include other files} +\index[general]{@{\bf filename}} + +If you wish to break your configuration file into smaller pieces, you can do +so by including other files using the syntax @{\bf filename} where {\bf +filename} is the full path and filename of another file. The @filename +specification can be given anywhere a primitive token would appear. + +If you wish include all files in a specific directory, you can use the following: +\begin{verbatim} +# Include subfiles associated with configuration of clients. +# They define the bulk of the Clients, Jobs, and FileSets. +# Remember to "reload" the Director after adding a client file. +# +@|"sh -c 'for f in /etc/bacula/clientdefs/*.conf ; do echo @${f} ; done'" +\end{verbatim} + +\label{DataTypes} +\subsection{Recognized Primitive Data Types} +\index[general]{Types!Recognized Primitive Data } +\index[general]{Recognized Primitive Data Types } + +When parsing the resource directives, Bacula classifies the data according to +the types listed below. The first time you read this, it may appear a bit +overwhelming, but in reality, it is all pretty logical and straightforward. + +\begin{description} + +\item [name] + \index[fd]{name} + A keyword or name consisting of alphanumeric characters, including the +hyphen, underscore, and dollar characters. The first character of a {\bf +name} must be a letter. A name has a maximum length currently set to 127 +bytes. Typically keywords appear on the left side of an equal (i.e. they are +Bacula keywords -- i.e. Resource names or directive names). Keywords may not +be quoted. + +\item [name-string] + \index[fd]{name-string} + A name-string is similar to a name, except that the name may be quoted and +can thus contain additional characters including spaces. Name strings are +limited to 127 characters in length. Name strings are typically used on the +right side of an equal (i.e. they are values to be associated with a keyword). + + +\item [string] + \index[fd]{string} + A quoted string containing virtually any character including spaces, or a +non-quoted string. A string may be of any length. Strings are typically +values that correspond to filenames, directories, or system command names. A +backslash (\textbackslash{}) turns the next character into itself, so to +include a double quote in a string, you precede the double quote with a +backslash. Likewise to include a backslash. + +\item [directory] + \index[dir]{directory} + A directory is either a quoted or non-quoted string. A directory will be +passed to your standard shell for expansion when it is scanned. Thus +constructs such as {\bf \$HOME} are interpreted to be their correct values. + +\item [password] + \index[dir]{password} + This is a Bacula password and it is stored internally in MD5 hashed format. + +\item [integer] + \index[dir]{integer} + A 32 bit integer value. It may be positive or negative. + +\item [positive integer] + \index[dir]{positive integer } + A 32 bit positive integer value. + +\item [long integer] + \index[dir]{long integer} + A 64 bit integer value. Typically these are values such as bytes that can +exceed 4 billion and thus require a 64 bit value. + +\item [yes\vb{}no] + \index[dir]{yes or no } + Either a {\bf yes} or a {\bf no}. + +\label{Size1} +\item [size] +\index[dir]{size} +A size specified as bytes. Typically, this is a floating point scientific +input format followed by an optional modifier. The floating point input is +stored as a 64 bit integer value. If a modifier is present, it must +immediately follow the value with no intervening spaces. The following +modifiers are permitted: + +\begin{description} +\item [k] + 1,024 (kilobytes) + +\item [kb] + 1,000 (kilobytes) + +\item [m] + 1,048,576 (megabytes) + +\item [mb] + 1,000,000 (megabytes) + +\item [g] + 1,073,741,824 (gigabytes) + +\item [gb] + 1,000,000,000 (gigabytes) +\end{description} + +\label{Time} +\item [time] +\index[dir]{time} +A time or duration specified in seconds. The time is stored internally as +a 64 bit integer value, but it is specified in two parts: a number part and +a modifier part. The number can be an integer or a floating point number. +If it is entered in floating point notation, it will be rounded to the +nearest integer. The modifier is mandatory and follows the number part, +either with or without intervening spaces. The following modifiers are +permitted: + +\begin{description} + +\item [seconds] + \index[dir]{seconds} + seconds + +\item [minutes] + \index[dir]{minutes} + minutes (60 seconds) + +\item [hours] + \index[dir]{hours } + hours (3600 seconds) + +\item [days] + \index[dir]{days} + days (3600*24 seconds) + +\item [weeks] + \index[dir]{weeks} + weeks (3600*24*7 seconds) + +\item [months] + \index[dir]{months } + months (3600*24*30 seconds) + +\item [quarters] + \index[dir]{quarters } + quarters (3600*24*91 seconds) + +\item [years] + \index[dir]{years } + years (3600*24*365 seconds) +\end{description} + +Any abbreviation of these modifiers is also permitted (i.e. {\bf seconds} +may be specified as {\bf sec} or {\bf s}). A specification of {\bf m} will +be taken as months. + +The specification of a time may have as many number/modifier parts as you +wish. For example: + +\footnotesize +\begin{verbatim} +1 week 2 days 3 hours 10 mins +1 month 2 days 30 sec + +\end{verbatim} +\normalsize + +are valid date specifications. + +\end{description} + +\label{ResTypes} +\section{Resource Types} +\index[general]{Types!Resource } +\index[general]{Resource Types } + +The following table lists all current Bacula resource types. It shows what +resources must be defined for each service (daemon). The default configuration +files will already contain at least one example of each permitted resource, so +you need not worry about creating all these kinds of resources from scratch. + +\addcontentsline{lot}{table}{Resource Types} +\begin{longtable}{|l|l|l|l|l|} + \hline +\multicolumn{1}{|c| }{\bf Resource } & \multicolumn{1}{c| }{\bf Director } & +\multicolumn{1}{c| }{\bf Client } & \multicolumn{1}{c| }{\bf Storage } & +\multicolumn{1}{c| }{\bf Console } \\ + \hline +{Autochanger } & {No } & {No } & {Yes } & {No } \\ +\hline +{Catalog } & {Yes } & {No } & {No } & {No } \\ + \hline +{Client } & {Yes } & {Yes } & {No } & {No } \\ + \hline +{Console } & {Yes } & {No } & {No } & {Yes } \\ + \hline +{Device } & {No } & {No } & {Yes } & {No } \\ + \hline +{Director } & {Yes } & {Yes } & {Yes } & {Yes } \\ + \hline +{FileSet } & {Yes } & {No } & {No } & {No } \\ + \hline +{Job } & {Yes } & {No } & {No } & {No } \\ + \hline +{JobDefs } & {Yes } & {No } & {No } & {No } \\ + \hline +{Message } & {Yes } & {Yes } & {Yes } & {No } \\ + \hline +{Pool } & {Yes } & {No } & {No } & {No } \\ + \hline +{Schedule } & {Yes } & {No } & {No } & {No } \\ + \hline +{Storage } & {Yes } & {No } & {Yes } & {No } +\\ \hline + +\end{longtable} + +\section{Names, Passwords and Authorization} +\label{Names} +\index[general]{Authorization!Names Passwords and } +\index[general]{Names, Passwords and Authorization } +\index[general]{Passwords} + +In order for one daemon to contact another daemon, it must authorize itself +with a password. In most cases, the password corresponds to a particular name, +so both the name and the password must match to be authorized. Passwords are +plain text, any text. They are not generated by any special process; just +use random text. + +The default configuration files are automatically defined for correct +authorization with random passwords. If you add to or modify these files, you +will need to take care to keep them consistent. + +Here is sort of a picture of what names/passwords in which files/Resources +must match up: + +\includegraphics{\idir Conf-Diagram.eps} + +In the left column, you will find the Director, Storage, and Client resources, +with their names and passwords -- these are all in {\bf bacula-dir.conf}. In +the right column are where the corresponding values should be found in the +Console, Storage daemon (SD), and File daemon (FD) configuration files. + +Please note that the Address, {\bf fd-sd}, that appears in the Storage +resource of the Director, preceded with and asterisk in the above example, is +passed to the File daemon in symbolic form. The File daemon then resolves it +to an IP address. For this reason, you must use either an IP address or a +fully qualified name. A name such as {\bf localhost}, not being a fully +qualified name, will resolve in the File daemon to the localhost of the File +daemon, which is most likely not what is desired. The password used for the +File daemon to authorize with the Storage daemon is a temporary password +unique to each Job created by the daemons and is not specified in any .conf +file. + +\section{Detailed Information for each Daemon} +\index[general]{Detailed Information for each Daemon } +\index[general]{Daemon!Detailed Information for each } + +The details of each Resource and the directives permitted therein are +described in the following chapters. + +The following configuration files must be defined: + +\begin{itemize} +\item + \ilink{Console}{ConsoleConfChapter} -- to define the resources for + the Console program (user interface to the Director). It defines which +Directors are available so that you may interact with them. +\item + \ilink{Director}{DirectorChapter} -- to define the resources + necessary for the Director. You define all the Clients and Storage daemons +that you use in this configuration file. +\item + \ilink{Client}{FiledConfChapter} -- to define the resources for + each client to be backed up. That is, you will have a separate Client +resource file on each machine that runs a File daemon. +\item + \ilink{Storage}{StoredConfChapter} -- to define the resources to + be used by each Storage daemon. Normally, you will have a single Storage +daemon that controls your tape drive or tape drives. However, if you have +tape drives on several machines, you will have at least one Storage daemon +per machine. +\end{itemize} diff --git a/docs/manuals/fr/main/consoleconf.tex b/docs/manuals/fr/main/consoleconf.tex new file mode 100644 index 00000000..563c81ad --- /dev/null +++ b/docs/manuals/fr/main/consoleconf.tex @@ -0,0 +1,356 @@ +%% +%% + +\chapter{Console Configuration} +\label{ConsoleConfChapter} +\index[general]{Configuration!Console} +\index[general]{Console Configuration} + +\section{General} +\index[general]{General} + +The Console configuration file is the simplest of all the configuration files, +and in general, you should not need to change it except for the password. It +simply contains the information necessary to contact the Director or +Directors. + +For a general discussion of the syntax of configuration files and their +resources including the data types recognized by {\bf Bacula}, please see +the \ilink{Configuration}{ConfigureChapter} chapter of this manual. + +The following Console Resource definition must be defined: + +\section{The Director Resource} +\label{DirectorResource3} +\index[general]{Director Resource} +\index[general]{Resource!Director} + +The Director resource defines the attributes of the Director running on the +network. You may have multiple Director resource specifications in a single +Console configuration file. If you have more than one, you will be prompted to +choose one when you start the {\bf Console} program. + +\begin{description} +\item [Director] + \index[console]{Director} + Start of the Director directives. + +\item [Name = \lt{}name\gt{}] + \index[console]{Name} + The director name used to select among different Directors, otherwise, this + name is not used. + +\item [DIRPort = \lt{}port-number\gt{}] + \index[dir]{DIRPort} + Specify the port to use to connect to the Director. This value will most + likely already be set to the value you specified on the {\bf + \verb:--:with-base-port} option of the {\bf ./configure} command. This port must be + identical to the {\bf DIRport} specified in the {\bf Director} resource of + the \ilink{Director's configuration}{DirectorChapter} file. The + default is 9101 so this directive is not normally specified. + +\item [Address = \lt{}address\gt{}] + \index[dir]{Address} + Where the address is a host name, a fully qualified domain name, or a network + address used to connect to the Director. + +\item [Password = \lt{}password\gt{}] + \index[dir]{Password} + Where the password is the password needed for the Director to accept the + Console connection. This password must be identical to the {\bf Password} + specified in the {\bf Director} resource of the + \ilink{Director's configuration}{DirectorChapter} file. This + directive is required. +\end{description} + +An actual example might be: + +\footnotesize +\begin{verbatim} +Director { + Name = HeadMan + address = rufus.cats.com + password = xyz1erploit +} +\end{verbatim} +\normalsize + +\section{The ConsoleFont Resource} +\index[general]{Resource!ConsoleFont} +\index[general]{ConsoleFont Resource} + +The ConsoleFont resource is available only in the GNOME version of the +console. It permits you to define the font that you want used to display in +the main listing window. + +\begin{description} + +\item [ConsoleFont] + \index[console]{ConsoleFont} + Start of the ConsoleFont directives. + +\item [Name = \lt{}name\gt{}] + \index[console]{Name} + The name of the font. + +\item [Font = \lt{}Pango Font Name\gt{}] + \index[console]{Font} + The string value given here defines the desired font. It is specified in the + Pango format. For example, the default specification is: + +\footnotesize +\begin{verbatim} +Font = "LucidaTypewriter 9" +\end{verbatim} +\normalsize + +\end{description} + +Thanks to Phil Stracchino for providing the code for this feature. + +An different example might be: + +\footnotesize +\begin{verbatim} +ConsoleFont { + Name = Default + Font = "Monospace 10" +} +\end{verbatim} +\normalsize + +\section{The Console Resource} +\label{ConsoleResource} +\index[general]{Console Resource} +\index[general]{Resource!Console} + +As of Bacula version 1.33 and higher, there are three different kinds of +consoles, which the administrator or user can use to interact with the +Director. These three kinds of consoles comprise three different security +levels. + +\begin{itemize} +\item The first console type is an {\bf anonymous} or {\bf default} console, + which has full privileges. There is no console resource necessary for this + type since the password is specified in the Director resource. This is the + kind of console that was initially implemented in versions prior to 1.33 and + remains valid. Typically you would use it only for administrators. + +\item The second type of console, and new to version 1.33 and higher is a + "named" or "restricted" console defined within a Console resource in + both the Director's configuration file and in the Console's + configuration file. Both the names and the passwords in these two + entries must match much as is the case for Client programs. + + This second type of console begins with absolutely no privileges except + those explicitly specified in the Director's Console resource. Note, + the definition of what these restricted consoles can do is determined + by the Director's conf file. + + Thus you may define within the Director's conf file multiple Consoles + with different names and passwords, sort of like multiple users, each + with different privileges. As a default, these consoles can do + absolutely nothing -- no commands what so ever. You give them + privileges or rather access to commands and resources by specifying + access control lists in the Director's Console resource. This gives the + administrator fine grained control over what particular consoles (or + users) can do. + +\item The third type of console is similar to the above mentioned + restricted console in that it requires a Console resource definition in + both the Director and the Console. In addition, if the console name, + provided on the {\bf Name =} directive, is the same as a Client name, + the user of that console is permitted to use the {\bf SetIP} command to + change the Address directive in the Director's client resource to the IP + address of the Console. This permits portables or other machines using + DHCP (non-fixed IP addresses) to "notify" the Director of their current + IP address. + +\end{itemize} + +The Console resource is optional and need not be specified. However, if it is +specified, you can use ACLs (Access Control Lists) in the Director's +configuration file to restrict the particular console (or user) to see only +information pertaining to his jobs or client machine. + +You may specify as many Console resources in the console's conf file. If +you do so, generally the first Console resource will be used. However, if +you have multiple Director resources (i.e. you want to connect to different +directors), you can bind one of your Console resources to a particular +Director resource, and thus when you choose a particular Director, the +appropriate Console configuration resource will be used. See the "Director" +directive in the Console resource described below for more information. + +Note, the Console resource is optional, but can be useful for +restricted consoles as noted above. + +\begin{description} +\item [Console] + \index[console]{Console} + Start of the Console resource. + +\item [Name = \lt{}name\gt{}] + \index[console]{Name} + The Console name used to allow a restricted console to change + its IP address using the SetIP command. The SetIP command must + also be defined in the Director's conf CommandACL list. + + +\item [Password = \lt{}password\gt{}] + \index[console]{Password} + If this password is supplied, then the password specified in the + Director resource of you Console conf will be ignored. See below + for more details. + +\item [Director = \lt{}director-resource-name\gt{}] + If this directive is specified, this Console resource will be + used by bconsole when that particular director is selected + when first starting bconsole. I.e. it binds a particular console + resource with its name and password to a particular director. + +\item [Heartbeat Interval = \lt{}time-interval\gt{}] + \index[console]{Heartbeat Interval} + \index[console]{Directive!Heartbeat} + This directive is optional and if specified will cause the Console to + set a keepalive interval (heartbeat) in seconds on each of the sockets + to communicate with the Director. It is implemented only on systems + (Linux, ...) that provide the {\bf setsockopt} TCP\_KEEPIDLE function. + The default value is zero, which means no change is made to the socket. + +\end{description} + + +The following configuration files were supplied by Phil Stracchino. For +example, if we define the following in the user's bconsole.conf file (or +perhaps the bwx-console.conf file): + +\footnotesize +\begin{verbatim} +Director { + Name = MyDirector + DIRport = 9101 + Address = myserver + Password = "XXXXXXXXXXX" # no, really. this is not obfuscation. +} + + +Console { + Name = restricted-user + Password = "UntrustedUser" +} +\end{verbatim} +\normalsize + +Where the Password in the Director section is deliberately incorrect, and the +Console resource is given a name, in this case {\bf restricted-user}. Then +in the Director's bacula-dir.conf file (not directly accessible by the user), +we define: + +\footnotesize +\begin{verbatim} +Console { + Name = restricted-user + Password = "UntrustedUser" + JobACL = "Restricted Client Save" + ClientACL = restricted-client + StorageACL = main-storage + ScheduleACL = *all* + PoolACL = *all* + FileSetACL = "Restricted Client's FileSet" + CatalogACL = DefaultCatalog + CommandACL = run +} +\end{verbatim} +\normalsize + +the user logging into the Director from his Console will get logged in as {\bf +restricted-user}, and he will only be able to see or access a Job with the +name {\bf Restricted Client Save} a Client with the name {\bf +restricted-client}, a Storage device {\bf main-storage}, any Schedule or Pool, +a FileSet named {\bf Restricted Client's FileSet}, a Catalog named {\bf +DefaultCatalog}, and the only command he can use in the Console is the {\bf +run} command. In other words, this user is rather limited in what he can see +and do with Bacula. + +The following is an example of a bconsole conf file that can access +several Directors and has different Consoles depending on the director: + +\footnotesize +\begin{verbatim} +Director { + Name = MyDirector + DIRport = 9101 + Address = myserver + Password = "XXXXXXXXXXX" # no, really. this is not obfuscation. +} + +Director { + Name = SecondDirector + DIRport = 9101 + Address = secondserver + Password = "XXXXXXXXXXX" # no, really. this is not obfuscation. +} + +Console { + Name = restricted-user + Password = "UntrustedUser" + Director = MyDirector +} + +Console { + Name = restricted-user + Password = "A different UntrustedUser" + Director = SecondDirector +} +\end{verbatim} +\normalsize + +The second Director referenced at "secondserver" might look +like the following: + +\footnotesize +\begin{verbatim} +Console { + Name = restricted-user + Password = "A different UntrustedUser" + JobACL = "Restricted Client Save" + ClientACL = restricted-client + StorageACL = second-storage + ScheduleACL = *all* + PoolACL = *all* + FileSetACL = "Restricted Client's FileSet" + CatalogACL = RestrictedCatalog + CommandACL = run, restore + WhereACL = "/" +} +\end{verbatim} +\normalsize + + + +\section{Console Commands} +\index[general]{Console Commands} +\index[general]{Commands!Console} + +For more details on running the console and its commands, please see the +\ilink{Bacula Console}{_ConsoleChapter} chapter of this manual. + +\section{Sample Console Configuration File} +\label{SampleConfiguration2} +\index[general]{File!Sample Console Configuration} +\index[general]{Sample Console Configuration File} + +An example Console configuration file might be the following: + +\footnotesize +\begin{verbatim} +# +# Bacula Console Configuration File +# +Director { + Name = HeadMan + address = "my_machine.my_domain.com" + Password = Console_password +} +\end{verbatim} +\normalsize diff --git a/docs/manuals/fr/main/coverpage.tex b/docs/manuals/fr/main/coverpage.tex new file mode 100644 index 00000000..d6aa6a5c --- /dev/null +++ b/docs/manuals/fr/main/coverpage.tex @@ -0,0 +1,28 @@ +\newfont{\bighead}{cmr17 at 36pt} +\parskip 10pt +\parindent 0pt + +\title{\includegraphics{\idir bacula-logo.eps} \\ \bigskip + \Huge{Bacula}$^{\normalsize \textregistered}$ \Huge{Bacula Main Reference} + \begin{center} + \large{It comes in the night and sucks + the essence from your computers. } + \end{center} +} + + +\author{Kern Sibbald} +\date{\vspace{1.0in}\today \\ + This manual documents Bacula version \fullversion \\ + \vspace{0.2in} + Copyright {\copyright} 1999-2009, Free Software Foundation Europe + e.V. \\ + Bacula {\textregistered} is a registered trademark of Kern Sibbald.\\ + \vspace{0.2in} + Permission is granted to copy, distribute and/or modify this document under the terms of the + GNU Free Documentation License, Version 1.2 published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. + A copy of the license is included in the section entitled "GNU Free Documentation License". +} + +\maketitle diff --git a/docs/manuals/fr/main/critical.tex b/docs/manuals/fr/main/critical.tex new file mode 100644 index 00000000..ee0d225c --- /dev/null +++ b/docs/manuals/fr/main/critical.tex @@ -0,0 +1,130 @@ +%% +%% + +\chapter{Critical Items to Implement Before Production} +\label{CriticalChapter} +\index[general]{Production!Critical Items to Implement Before } +\index[general]{Critical Items to Implement Before Production } + +We recommend you take your time before implementing a production a Bacula +backup system since Bacula is a rather complex program, and if you make a +mistake, you may suddenly find that you cannot restore your files in case +of a disaster. This is especially true if you have not previously used a +major backup product. + +If you follow the instructions in this chapter, you will have covered most of +the major problems that can occur. It goes without saying that if you ever +find that we have left out an important point, please inform us, so +that we can document it to the benefit of everyone. + +\label{Critical} +\section{Critical Items} +\index[general]{Critical Items } +\index[general]{Items!Critical } + +The following assumes that you have installed Bacula, you more or less +understand it, you have at least worked through the tutorial or have +equivalent experience, and that you have set up a basic production +configuration. If you haven't done the above, please do so and then come back +here. The following is a sort of checklist that points with perhaps a brief +explanation of why you should do it. In most cases, you will find the +details elsewhere in the manual. The order is more or less the order you +would use in setting up a production system (if you already are in +production, use the checklist anyway). + +\begin{itemize} +\item Test your tape drive for compatibility with Bacula by using the test + command in the \ilink{btape}{btape} program. +\item Better than doing the above is to walk through the nine steps in the + \ilink{Tape Testing}{TapeTestingChapter} chapter of the manual. It + may take you a bit of time, but it will eliminate surprises. +\item Test the end of tape handling of your tape drive by using the + fill command in the \ilink{btape}{btape} program. +\item If you are using a Linux 2.4 kernel, make sure that /lib/tls is disabled. Bacula + does not work with this library. See the second point under + \ilink{ Supported Operating Systems.}{SupportedOSes} +\item Do at least one restore of files. If you backup multiple OS types + (Linux, Solaris, HP, MacOS, FreeBSD, Win32, ...), + restore files from each system type. The + \ilink{Restoring Files}{RestoreChapter} chapter shows you how. +\item Write a bootstrap file to a separate system for each backup job. The + Write Bootstrap directive is described in the + \ilink{Director Configuration}{writebootstrap} chapter of the + manual, and more details are available in the + \ilink{Bootstrap File}{BootstrapChapter} chapter. Also, the default + bacula-dir.conf comes with a Write Bootstrap directive defined. This allows + you to recover the state of your system as of the last backup. +\item Backup your catalog. An example of this is found in the default + bacula-dir.conf file. The backup script is installed by default and + should handle any database, though you may want to make your own local + modifications. See also \ilink{Backing Up Your Bacula Database - + Security Considerations }{BackingUpBaculaSecurityConsiderations} for more + information. +\item Write a bootstrap file for the catalog. An example of this is found in + the default bacula-dir.conf file. This will allow you to quickly restore your + catalog in the event it is wiped out -- otherwise it is many excruciating + hours of work. +\item Make a copy of the bacula-dir.conf, bacula-sd.conf, and + bacula-fd.conf files that you are using on your server. Put it in a safe + place (on another machine) as these files can be difficult to + reconstruct if your server dies. +\item Make a Bacula Rescue CDROM! See the + \ilink{Disaster Recovery Using a Bacula Rescue + CDROM}{RescueChapter} chapter. It is trivial to make such a CDROM, + and it can make system recovery in the event of a lost hard disk infinitely + easier. +\item Bacula assumes all filenames are in UTF-8 format. This is important + when saving the filenames to the catalog. For Win32 machine, Bacula will + automatically convert from Unicode to UTF-8, but on Unix, Linux, *BSD, + and MacOS X machines, you must explicitly ensure that your locale is set + properly. Typically this means that the {bf LANG} environment variable + must end in {\bf .UTF-8}. An full example is {\bf en\_US.UTF-8}. The + exact syntax may vary a bit from OS to OS, and exactly how you define it + will also vary. + + On most modern Win32 machines, you can edit the conf files with {\bf + notepad} and choose output encoding UTF-8. +\end{itemize} + +\section{Recommended Items} +\index[general]{Items!Recommended } +\index[general]{Recommended Items } + +Although these items may not be critical, they are recommended and will help +you avoid problems. + +\begin{itemize} +\item Read the \ilink{Quick Start Guide to Bacula}{QuickStartChapter} +\item After installing and experimenting with Bacula, read and work carefully + through the examples in the + \ilink{Tutorial}{TutorialChapter} chapter of this manual. +\item Learn what each of the \ilink{Bacula Utility Programs}{_UtilityChapter} + does. +\item Set up reasonable retention periods so that your catalog does not grow + to be too big. See the following three chapters:\\ + \ilink{Recycling your Volumes}{RecyclingChapter},\\ + \ilink{Basic Volume Management}{DiskChapter},\\ + \ilink{Using Pools to Manage Volumes}{PoolsChapter}. +\item Perform a bare metal recovery using the Bacula Rescue CDROM. See the + \ilink{Disaster Recovery Using a Bacula Rescue CDROM}{RescueChapter} + chapter. +\end{itemize} + +If you absolutely must implement a system where you write a different +tape each night and take it offsite in the morning. We recommend that you do +several things: +\begin{itemize} +\item Write a bootstrap file of your backed up data and a bootstrap file + of your catalog backup to a floppy disk or a CDROM, and take that with + the tape. If this is not possible, try to write those files to another + computer or offsite computer, or send them as email to a friend. If none + of that is possible, at least print the bootstrap files and take that + offsite with the tape. Having the bootstrap files will make recovery + much easier. +\item It is better not to force Bacula to load a particular tape each day. + Instead, let Bacula choose the tape. If you need to know what tape to + mount, you can print a list of recycled and appendable tapes daily, and + select any tape from that list. Bacula may propose a particular tape + for use that it considers optimal, but it will accept any valid tape + from the correct pool. +\end{itemize} diff --git a/docs/manuals/fr/main/dataencryption.tex b/docs/manuals/fr/main/dataencryption.tex new file mode 100644 index 00000000..9b259cef --- /dev/null +++ b/docs/manuals/fr/main/dataencryption.tex @@ -0,0 +1,195 @@ + +\chapter{Data Encryption} +\label{DataEncryption} +\index[general]{Data Encryption} +\index[general]{Encryption!Data} +\index[general]{Data Encryption} + +Bacula permits file data encryption and signing within the File Daemon (or +Client) prior to sending data to the Storage Daemon. Upon restoration, +file signatures are validated and any mismatches are reported. At no time +does the Director or the Storage Daemon have access to unencrypted file +contents. + + +It is very important to specify what this implementation does NOT +do: +\begin{itemize} +\item There is one important restore problem to be aware of, namely, it's + possible for the director to restore new keys or a Bacula configuration + file to the client, and thus force later backups to be made with a + compromised key and/or with no encryption at all. You can avoid this by + not changing the location of the keys in your Bacula File daemon + configuration file, and not changing your File daemon keys. If you do + change either one, you must ensure that no restore is done that restores + the old configuration or the old keys. In general, the worst effect of + this will be that you can no longer connect the File daemon. + +\item The implementation does not encrypt file metadata such as file path + names, permissions, and ownership. Extended attributes are also currently + not encrypted. However, Mac OS X resource forks are encrypted. +\end{itemize} + +Encryption and signing are implemented using RSA private keys coupled with +self-signed x509 public certificates. This is also sometimes known as PKI +or Public Key Infrastructure. + +Each File Daemon should be given its own unique private/public key pair. +In addition to this key pair, any number of "Master Keys" may be specified +-- these are key pairs that may be used to decrypt any backups should the +File Daemon key be lost. Only the Master Key's public certificate should +be made available to the File Daemon. Under no circumstances should the +Master Private Key be shared or stored on the Client machine. + +The Master Keys should be backed up to a secure location, such as a CD +placed in a in a fire-proof safe or bank safety deposit box. The Master +Keys should never be kept on the same machine as the Storage Daemon or +Director if you are worried about an unauthorized party compromising either +machine and accessing your encrypted backups. + +While less critical than the Master Keys, File Daemon Keys are also a prime +candidate for off-site backups; burn the key pair to a CD and send the CD +home with the owner of the machine. + +NOTE!!! If you lose your encryption keys, backups will be unrecoverable. +{\bf ALWAYS} store a copy of your master keys in a secure, off-site location. + +The basic algorithm used for each backup session (Job) is: +\begin{enumerate} +\item The File daemon generates a session key. +\item The FD encrypts that session key via PKE for all recipients (the file +daemon, any master keys). +\item The FD uses that session key to perform symmetric encryption on the data. +\end{enumerate} + + +\section{Building Bacula with Encryption Support} +\index[general]{Building Bacula with Encryption Support} + +The configuration option for enabling OpenSSL encryption support has not changed +since Bacula 1.38. To build Bacula with encryption support, you will need +the OpenSSL libraries and headers installed. When configuring Bacula, use: + +\begin{verbatim} + ./configure --with-openssl ... +\end{verbatim} + +\section{Encryption Technical Details} +\index[general]{Encryption Technical Details} + +The implementation uses 128bit AES-CBC, with RSA encrypted symmetric +session keys. The RSA key is user supplied. +If you are running OpenSSL 0.9.8 or later, the signed file hash uses +SHA-256 -- otherwise, SHA-1 is used. + +End-user configuration settings for the algorithms are not currently +exposed -- only the algorithms listed above are used. However, the +data written to Volume supports arbitrary symmetric, asymmetric, and +digest algorithms for future extensibility, and the back-end +implementation currently supports: + +\begin{verbatim} +Symmetric Encryption: + - 128, 192, and 256-bit AES-CBC + - Blowfish-CBC + +Asymmetric Encryption (used to encrypt symmetric session keys): + - RSA + +Digest Algorithms: + - MD5 + - SHA1 + - SHA256 + - SHA512 +\end{verbatim} + +The various algorithms are exposed via an entirely re-usable, +OpenSSL-agnostic API (ie, it is possible to drop in a new encryption +backend). The Volume format is DER-encoded ASN.1, modeled after the +Cryptographic Message Syntax from RFC 3852. Unfortunately, using CMS +directly was not possible, as at the time of coding a free software +streaming DER decoder/encoder was not available. + + +\section{Decrypting with a Master Key} +\index[general]{Decrypting with a Master Key} + +It is preferable to retain a secure, non-encrypted copy of the +client's own encryption keypair. However, should you lose the +client's keypair, recovery with the master keypair is possible. + +You must: +\begin{itemize} +\item Concatenate the master private and public key into a single + keypair file, ie: + cat master.key master.cert \gt master.keypair + +\item Set the PKI Keypair statement in your bacula configuration file: + +\begin{verbatim} + PKI Keypair = master.keypair +\end{verbatim} + +\item Start the restore. The master keypair will be used to decrypt + the file data. + +\end{itemize} + + +\section{Generating Private/Public Encryption Keys} +\index[general]{Generating Private/Public Encryption Keypairs} + +Generate a Master Key Pair with: + +\footnotesize +\begin{verbatim} + openssl genrsa -out master.key 2048 + openssl req -new -key master.key -x509 -out master.cert +\end{verbatim} +\normalsize + +Generate a File Daemon Key Pair for each FD: + +\footnotesize +\begin{verbatim} + openssl genrsa -out fd-example.key 2048 + openssl req -new -key fd-example.key -x509 -out fd-example.cert + cat fd-example.key fd-example.cert >fd-example.pem +\end{verbatim} +\normalsize + +Note, there seems to be a lot of confusion around the file extensions given +to these keys. For example, a .pem file can contain all the following: +private keys (RSA and DSA), public keys (RSA and DSA) and (x509) certificates. +It is the default format for OpenSSL. It stores data Base64 encoded DER format, +surrounded by ASCII headers, so is suitable for text mode transfers between +systems. A .pem file may contain any number of keys either public or +private. We use it in cases where there is both a public and a private +key. + +Typically, above we have used the .cert extension to refer to X509 +certificate encoding that contains only a single public key. + + +\section{Example Data Encryption Configuration} +\index[general]{Example!File Daemon Configuration File} +\index[general]{Example!Data Encryption Configuration File} +\index[general]{Example Data Encryption Configuration} + +{\bf bacula-fd.conf} +\footnotesize +\begin{verbatim} +FileDaemon { + Name = example-fd + FDport = 9102 # where we listen for the director + WorkingDirectory = /var/bacula/working + Pid Directory = /var/run + Maximum Concurrent Jobs = 20 + + PKI Signatures = Yes # Enable Data Signing + PKI Encryption = Yes # Enable Data Encryption + PKI Keypair = "/etc/bacula/fd-example.pem" # Public and Private Keys + PKI Master Key = "/etc/bacula/master.cert" # ONLY the Public Key +} +\end{verbatim} +\normalsize diff --git a/docs/manuals/fr/main/dirdconf.tex b/docs/manuals/fr/main/dirdconf.tex new file mode 100644 index 00000000..e262af1a --- /dev/null +++ b/docs/manuals/fr/main/dirdconf.tex @@ -0,0 +1,3570 @@ +%% +%% + +\chapter{Configuring the Director} +\label{DirectorChapter} +\index[general]{Director!Configuring the} +\index[general]{Configuring the Director} + +Of all the configuration files needed to run {\bf Bacula}, the Director's is +the most complicated, and the one that you will need to modify the most often +as you add clients or modify the FileSets. + +For a general discussion of configuration files and resources including the +data types recognized by {\bf Bacula}. Please see the +\ilink{Configuration}{ConfigureChapter} chapter of this manual. + +\section{Director Resource Types} +\index[general]{Types!Director Resource} +\index[general]{Director Resource Types} + +Director resource type may be one of the following: + +Job, JobDefs, Client, Storage, Catalog, Schedule, FileSet, Pool, Director, or +Messages. We present them here in the most logical order for defining them: + +Note, everything revolves around a job and is tied to a job in one +way or another. + +\begin{itemize} +\item + \ilink{Director}{DirectorResource4} -- to define the Director's + name and its access password used for authenticating the Console program. + Only a single Director resource definition may appear in the Director's + configuration file. If you have either {\bf /dev/random} or {\bf bc} on your + machine, Bacula will generate a random password during the configuration + process, otherwise it will be left blank. +\item + \ilink{Job}{JobResource} -- to define the backup/restore Jobs + and to tie together the Client, FileSet and Schedule resources to be used + for each Job. Normally, you will Jobs of different names corresponding + to each client (i.e. one Job per client, but a different one with a different name + for each client). +\item + \ilink{JobDefs}{JobDefsResource} -- optional resource for + providing defaults for Job resources. +\item + \ilink{Schedule}{ScheduleResource} -- to define when a Job is to + be automatically run by {\bf Bacula's} internal scheduler. You + may have any number of Schedules, but each job will reference only + one. +\item + \ilink{FileSet}{FileSetResource} -- to define the set of files + to be backed up for each Client. You may have any number of + FileSets but each Job will reference only one. +\item + \ilink{Client}{ClientResource2} -- to define what Client is to be + backed up. You will generally have multiple Client definitions. Each + Job will reference only a single client. +\item + \ilink{Storage}{StorageResource2} -- to define on what physical + device the Volumes should be mounted. You may have one or + more Storage definitions. +\item + \ilink{Pool}{PoolResource} -- to define the pool of Volumes + that can be used for a particular Job. Most people use a + single default Pool. However, if you have a large number + of clients or volumes, you may want to have multiple Pools. + Pools allow you to restrict a Job (or a Client) to use + only a particular set of Volumes. +\item + \ilink{Catalog}{CatalogResource} -- to define in what database to + keep the list of files and the Volume names where they are backed up. + Most people only use a single catalog. However, if you want to + scale the Director to many clients, multiple catalogs can be helpful. + Multiple catalogs require a bit more management because in general + you must know what catalog contains what data. Currently, all + Pools are defined in each catalog. This restriction will be removed + in a later release. +\item + \ilink{Messages}{MessagesChapter} -- to define where error and + information messages are to be sent or logged. You may define + multiple different message resources and hence direct particular + classes of messages to different users or locations (files, ...). +\end{itemize} + +\section{The Director Resource} +\label{DirectorResource4} +\index[general]{Director Resource} +\index[general]{Resource!Director} + +The Director resource defines the attributes of the Directors running on the +network. In the current implementation, there is only a single Director +resource, but the final design will contain multiple Directors to maintain +index and media database redundancy. + +\begin{description} + +\item [Director] + \index[dir]{Director} + Start of the Director resource. One and only one director resource must be +supplied. + +\item [Name = \lt{}name\gt{}] + \index[dir]{Name} + \index[dir]{Directive!Name} + The director name used by the system administrator. This directive is +required. + +\item [Description = \lt{}text\gt{}] + \index[dir]{Description} + \index[dir]{Directive!Description} + The text field contains a description of the Director that will be displayed +in the graphical user interface. This directive is optional. + +\item [Password = \lt{}UA-password\gt{}] + \index[dir]{Password} + \index[dir]{Directive!Password} + Specifies the password that must be supplied for the default Bacula + Console to be authorized. The same password must appear in the {\bf + Director} resource of the Console configuration file. For added + security, the password is never passed across the network but instead a + challenge response hash code created with the password. This directive + is required. If you have either {\bf /dev/random} or {\bf bc} on your + machine, Bacula will generate a random password during the configuration + process, otherwise it will be left blank and you must manually supply + it. + + The password is plain text. It is not generated through any special + process but as noted above, it is better to use random text for + security reasons. + +\item [Messages = \lt{}Messages-resource-name\gt{}] + \index[dir]{Messages} + \index[dir]{Directive!Messages} + The messages resource specifies where to deliver Director messages that are + not associated with a specific Job. Most messages are specific to a job and + will be directed to the Messages resource specified by the job. However, + there are a few messages that can occur when no job is running. This + directive is required. + +\item [Working Directory = \lt{}Directory\gt{}] + \index[dir]{Working Directory} + \index[dir]{Directive!Working Directory} + This directive is mandatory and specifies a directory in which the Director + may put its status files. This directory should be used only by Bacula but + may be shared by other Bacula daemons. However, please note, if this + directory is shared with other Bacula daemons (the File daemon and Storage + daemon), you must ensure that the {\bf Name} given to each daemon is + unique so that the temporary filenames used do not collide. By default + the Bacula configure process creates unique daemon names by postfixing them + with -dir, -fd, and -sd. Standard shell expansion of the {\bf + Directory} is done when the configuration file is read so that values such + as {\bf \$HOME} will be properly expanded. This directive is required. + The working directory specified must already exist and be + readable and writable by the Bacula daemon referencing it. + + If you have specified a Director user and/or a Director group on your + ./configure line with {\bf {-}{-}with-dir-user} and/or + {\bf {-}{-}with-dir-group} the Working Directory owner and group will + be set to those values. + +\item [Pid Directory = \lt{}Directory\gt{}] + \index[dir]{Pid Directory} + \index[dir]{Directive!Pid Directory} + This directive is mandatory and specifies a directory in which the Director + may put its process Id file. The process Id file is used to shutdown + Bacula and to prevent multiple copies of Bacula from running simultaneously. + Standard shell expansion of the {\bf Directory} is done when the + configuration file is read so that values such as {\bf \$HOME} will be + properly expanded. + + The PID directory specified must already exist and be + readable and writable by the Bacula daemon referencing it + + Typically on Linux systems, you will set this to: {\bf /var/run}. If you are + not installing Bacula in the system directories, you can use the {\bf Working + Directory} as defined above. This directive is required. + +\item [Scripts Directory = \lt{}Directory\gt{}] + \index[dir]{Scripts Directory} + \index[dir]{Directive!Scripts Directory} + This directive is optional and, if defined, specifies a directory in + which the Director will look for the Python startup script {\bf + DirStartup.py}. This directory may be shared by other Bacula daemons. + Standard shell expansion of the directory is done when the configuration + file is read so that values such as {\bf \$HOME} will be properly + expanded. + +\item [QueryFile = \lt{}Path\gt{}] + \index[dir]{QueryFile} + \index[dir]{Directive!QueryFile} + This directive is mandatory and specifies a directory and file in which + the Director can find the canned SQL statements for the {\bf Query} + command of the Console. Standard shell expansion of the {\bf Path} is + done when the configuration file is read so that values such as {\bf + \$HOME} will be properly expanded. This directive is required. + +\item [Heartbeat Interval = \lt{}time-interval\gt{}] + \index[dir]{Heartbeat Interval} + \index[dir]{Directive!Heartbeat} + This directive is optional and if specified will cause the Director to + set a keepalive interval (heartbeat) in seconds on each of the sockets + it opens for the Client resource. This value will override any + specified at the Director level. It is implemented only on systems + (Linux, ...) that provide the {\bf setsockopt} TCP\_KEEPIDLE function. + The default value is zero, which means no change is made to the socket. + + +\label{DirMaxConJobs} +\item [Maximum Concurrent Jobs = \lt{}number\gt{}] + \index[dir]{Maximum Concurrent Jobs} + \index[dir]{Directive!Maximum Concurrent Jobs} + \index[general]{Simultaneous Jobs} + \index[general]{Concurrent Jobs} + where \lt{}number\gt{} is the maximum number of total Director Jobs that + should run concurrently. The default is set to 1, but you may set it to a + larger number. + + The Volume format becomes more complicated with + multiple simultaneous jobs, consequently, restores may take longer if + Bacula must sort through interleaved volume blocks from multiple simultaneous + jobs. This can be avoided by having each simultaneous job write to + a different volume or by using data spooling, which will first spool the data + to disk simultaneously, then write one spool file at a time to the volume + thus avoiding excessive interleaving of the different job blocks. + +\item [FD Connect Timeout = \lt{}time\gt{}] + \index[dir]{FD Connect Timeout} + \index[dir]{Directive!FD Connect Timeout} + where {\bf time} is the time that the Director should continue + attempting to contact the File daemon to start a job, and after which + the Director will cancel the job. The default is 30 minutes. + +\item [SD Connect Timeout = \lt{}time\gt{}] + \index[dir]{SD Connect Timeout} + \index[dir]{Directive!SD Connect Timeout} + where {\bf time} is the time that the Director should continue + attempting to contact the Storage daemon to start a job, and after which + the Director will cancel the job. The default is 30 minutes. + +\item [DirAddresses = \lt{}IP-address-specification\gt{}] + \index[dir]{DirAddresses} + \index[dir]{Address} + \index[general]{Address} + \index[dir]{Directive!DirAddresses} + Specify the ports and addresses on which the Director daemon will listen + for Bacula Console connections. Probably the simplest way to explain + this is to show an example: + +\footnotesize +\begin{verbatim} + DirAddresses = { + ip = { addr = 1.2.3.4; port = 1205;} + ipv4 = { + addr = 1.2.3.4; port = http;} + ipv6 = { + addr = 1.2.3.4; + port = 1205; + } + ip = { + addr = 1.2.3.4 + port = 1205 + } + ip = { addr = 1.2.3.4 } + ip = { addr = 201:220:222::2 } + ip = { + addr = bluedot.thun.net + } +} +\end{verbatim} +\normalsize + +where ip, ip4, ip6, addr, and port are all keywords. Note, that the address +can be specified as either a dotted quadruple, or IPv6 colon notation, or as +a symbolic name (only in the ip specification). Also, port can be specified +as a number or as the mnemonic value from the /etc/services file. If a port +is not specified, the default will be used. If an ip section is specified, +the resolution can be made either by IPv4 or IPv6. If ip4 is specified, then +only IPv4 resolutions will be permitted, and likewise with ip6. + +Please note that if you use the DirAddresses directive, you must +not use either a DirPort or a DirAddress directive in the same +resource. + +\item [DirPort = \lt{}port-number\gt{}] + \index[dir]{DirPort} + \index[dir]{Directive!DirPort} + Specify the port (a positive integer) on which the Director daemon will + listen for Bacula Console connections. This same port number must be + specified in the Director resource of the Console configuration file. The + default is 9101, so normally this directive need not be specified. This + directive should not be used if you specify DirAddresses (N.B plural) + directive. + +\item [DirAddress = \lt{}IP-Address\gt{}] + \index[dir]{DirAddress} + \index[dir]{Directive!DirAddress} + This directive is optional, but if it is specified, it will cause the + Director server (for the Console program) to bind to the specified {\bf + IP-Address}, which is either a domain name or an IP address specified as a + dotted quadruple in string or quoted string format. If this directive is + not specified, the Director will bind to any available address (the + default). Note, unlike the DirAddresses specification noted above, this + directive only permits a single address to be specified. This directive + should not be used if you specify a DirAddresses (N.B. plural) directive. + +\item [DirSourceAddress = \lt{}IP-Address\gt{}] + \index[fd]{DirSourceAddress} + \index[fd]{Directive!DirSourceAddress} + This record is optional, and if it is specified, it will cause the Director + server (when initiating connections to a storage or file daemon) to source + its connections from the specified address. Only a single IP address may be + specified. If this record is not specified, the Director server will source + its outgoing connections according to the system routing table (the default). + +\item[Statistics Retention = \lt{}time\gt{}] + \index[dir]{StatisticsRetention} + \index[dir]{Directive!StatisticsRetention} + \label{PruneStatistics} + + The \texttt{Statistics Retention} directive defines the length of time that + Bacula will keep statistics job records in the Catalog database after the + Job End time. (In \texttt{JobHistory} table) When this time period expires, + and if user runs \texttt{prune stats} command, Bacula will prune (remove) + Job records that are older than the specified period. + + Theses statistics records aren't use for restore purpose, but mainly for + capacity planning, billings, etc. See \ilink{Statistics chapter} for + additional information. + + See the \ilink{ Configuration chapter}{Time} of this manual for additional + details of time specification. + + The default is 5 years. + +\item[VerId = \lt{}string\gt{}] + \index[dir]{Directive!VerId} + where \lt{}string\gt{} is an identifier which can be used for support purpose. + This string is displayed using the \texttt{version} command. + +\item[MaxConsoleConnections = \lt{}number\gt{}] + \index[dir]{MaximumConsoleConnections} + \index[dir]{MaxConsoleConnections} + \index[dir]{Directive!MaxConsoleConnections} + \index[dir]{Console} + where \lt{}number\gt{} is the maximum number of Console Connections that + could run concurrently. The default is set to 20, but you may set it to a + larger number. + +\end{description} + +The following is an example of a valid Director resource definition: + +\footnotesize +\begin{verbatim} +Director { + Name = HeadMan + WorkingDirectory = "$HOME/bacula/bin/working" + Password = UA_password + PidDirectory = "$HOME/bacula/bin/working" + QueryFile = "$HOME/bacula/bin/query.sql" + Messages = Standard +} +\end{verbatim} +\normalsize + +\section{The Job Resource} +\label{JobResource} +\index[general]{Resource!Job} +\index[general]{Job Resource} + +The Job resource defines a Job (Backup, Restore, ...) that Bacula must +perform. Each Job resource definition contains the name of a Client and +a FileSet to backup, the Schedule for the Job, where the data +are to be stored, and what media Pool can be used. In effect, each Job +resource must specify What, Where, How, and When or FileSet, Storage, +Backup/Restore/Level, and Schedule respectively. Note, the FileSet must +be specified for a restore job for historical reasons, but it is no longer used. + +Only a single type ({\bf Backup}, {\bf Restore}, ...) can be specified for any +job. If you want to backup multiple FileSets on the same Client or multiple +Clients, you must define a Job for each one. + +Note, you define only a single Job to do the Full, Differential, and +Incremental backups since the different backup levels are tied together by +a unique Job name. Normally, you will have only one Job per Client, but +if a client has a really huge number of files (more than several million), +you might want to split it into to Jobs each with a different FileSet +covering only part of the total files. + +Multiple Storage daemons are not currently supported for Jobs, so if +you do want to use multiple storage daemons, you will need to create +a different Job and ensure that for each Job that the combination of +Client and FileSet are unique. The Client and FileSet are what Bacula +uses to restore a client, so if there are multiple Jobs with the same +Client and FileSet or multiple Storage daemons that are used, the +restore will not work. This problem can be resolved by defining multiple +FileSet definitions (the names must be different, but the contents of +the FileSets may be the same). + + +\begin{description} + +\item [Job] + \index[dir]{Job} + \index[dir]{Directive!Job} + Start of the Job resource. At least one Job resource is required. + +\item [Name = \lt{}name\gt{}] + \index[dir]{Name} + \index[dir]{Directive!Name} + The Job name. This name can be specified on the {\bf Run} command in the + console program to start a job. If the name contains spaces, it must be + specified between quotes. It is generally a good idea to give your job the + same name as the Client that it will backup. This permits easy + identification of jobs. + + When the job actually runs, the unique Job Name will consist of the name you + specify here followed by the date and time the job was scheduled for + execution. This directive is required. + +\item [Enabled = \lt{}yes\vb{}no\gt{}] + \index[dir]{Enable} + \index[dir]{Directive!Enable} + This directive allows you to enable or disable automatic execution + via the scheduler of a Job. + +\item [Type = \lt{}job-type\gt{}] + \index[dir]{Type} + \index[dir]{Directive!Type} + The {\bf Type} directive specifies the Job type, which may be one of the + following: {\bf Backup}, {\bf Restore}, {\bf Verify}, or {\bf Admin}. This + directive is required. Within a particular Job Type, there are also Levels + as discussed in the next item. + +\begin{description} + +\item [Backup] + \index[dir]{Backup} + Run a backup Job. Normally you will have at least one Backup job for each + client you want to save. Normally, unless you turn off cataloging, most all + the important statistics and data concerning files backed up will be placed + in the catalog. + +\item [Restore] + \index[dir]{Restore} + Run a restore Job. Normally, you will specify only one Restore job + which acts as a sort of prototype that you will modify using the console + program in order to perform restores. Although certain basic + information from a Restore job is saved in the catalog, it is very + minimal compared to the information stored for a Backup job -- for + example, no File database entries are generated since no Files are + saved. + + {\bf Restore} jobs cannot be + automatically started by the scheduler as is the case for Backup, Verify + and Admin jobs. To restore files, you must use the {\bf restore} command + in the console. + + +\item [Verify] + \index[dir]{Verify} + Run a verify Job. In general, {\bf verify} jobs permit you to compare the + contents of the catalog to the file system, or to what was backed up. In + addition, to verifying that a tape that was written can be read, you can + also use {\bf verify} as a sort of tripwire intrusion detection. + +\item [Admin] + \index[dir]{Admin} + Run an admin Job. An {\bf Admin} job can be used to periodically run catalog + pruning, if you do not want to do it at the end of each {\bf Backup} Job. + Although an Admin job is recorded in the catalog, very little data is saved. +\end{description} + +\label{Level} + +\item [Level = \lt{}job-level\gt{}] +\index[dir]{Level} +\index[dir]{Directive!Level} + The Level directive specifies the default Job level to be run. Each + different Job Type (Backup, Restore, ...) has a different set of Levels + that can be specified. The Level is normally overridden by a different + value that is specified in the {\bf Schedule} resource. This directive + is not required, but must be specified either by a {\bf Level} directive + or as an override specified in the {\bf Schedule} resource. + +For a {\bf Backup} Job, the Level may be one of the following: + +\begin{description} + +\item [Full] +\index[dir]{Full} + When the Level is set to Full all files in the FileSet whether or not + they have changed will be backed up. + +\item [Incremental] + \index[dir]{Incremental} + When the Level is set to Incremental all files specified in the FileSet + that have changed since the last successful backup of the the same Job + using the same FileSet and Client, will be backed up. If the Director + cannot find a previous valid Full backup then the job will be upgraded + into a Full backup. When the Director looks for a valid backup record + in the catalog database, it looks for a previous Job with: + +\begin{itemize} +\item The same Job name. +\item The same Client name. +\item The same FileSet (any change to the definition of the FileSet such as + adding or deleting a file in the Include or Exclude sections constitutes a + different FileSet. +\item The Job was a Full, Differential, or Incremental backup. +\item The Job terminated normally (i.e. did not fail or was not canceled). +\item The Job started no longer ago than {\bf Max Full Interval}. +\end{itemize} + + If all the above conditions do not hold, the Director will upgrade the + Incremental to a Full save. Otherwise, the Incremental backup will be + performed as requested. + + The File daemon (Client) decides which files to backup for an + Incremental backup by comparing start time of the prior Job (Full, + Differential, or Incremental) against the time each file was last + "modified" (st\_mtime) and the time its attributes were last + "changed"(st\_ctime). If the file was modified or its attributes + changed on or after this start time, it will then be backed up. + + Some virus scanning software may change st\_ctime while + doing the scan. For example, if the virus scanning program attempts to + reset the access time (st\_atime), which Bacula does not use, it will + cause st\_ctime to change and hence Bacula will backup the file during + an Incremental or Differential backup. In the case of Sophos virus + scanning, you can prevent it from resetting the access time (st\_atime) + and hence changing st\_ctime by using the {\bf \verb:--:no-reset-atime} + option. For other software, please see their manual. + + When Bacula does an Incremental backup, all modified files that are + still on the system are backed up. However, any file that has been + deleted since the last Full backup remains in the Bacula catalog, + which means that if between a Full save and the time you do a + restore, some files are deleted, those deleted files will also be + restored. The deleted files will no longer appear in the catalog + after doing another Full save. + + In addition, if you move a directory rather than copy it, the files in + it do not have their modification time (st\_mtime) or their attribute + change time (st\_ctime) changed. As a consequence, those files will + probably not be backed up by an Incremental or Differential backup which + depend solely on these time stamps. If you move a directory, and wish + it to be properly backed up, it is generally preferable to copy it, then + delete the original. + + However, to manage deleted files or directories changes in the + catalog during an Incremental backup you can use \texttt{accurate} + mode. This is quite memory consuming process. See \ilink{Accurate + mode}{accuratemode} for more details. + +\item [Differential] + \index[dir]{Differential} + When the Level is set to Differential + all files specified in the FileSet that have changed since the last + successful Full backup of the same Job will be backed up. + If the Director cannot find a + valid previous Full backup for the same Job, FileSet, and Client, + backup, then the Differential job will be upgraded into a Full backup. + When the Director looks for a valid Full backup record in the catalog + database, it looks for a previous Job with: + +\begin{itemize} +\item The same Job name. +\item The same Client name. +\item The same FileSet (any change to the definition of the FileSet such as + adding or deleting a file in the Include or Exclude sections constitutes a + different FileSet. +\item The Job was a FULL backup. +\item The Job terminated normally (i.e. did not fail or was not canceled). +\item The Job started no longer ago than {\bf Max Full Interval}. +\end{itemize} + + If all the above conditions do not hold, the Director will upgrade the + Differential to a Full save. Otherwise, the Differential backup will be + performed as requested. + + The File daemon (Client) decides which files to backup for a + differential backup by comparing the start time of the prior Full backup + Job against the time each file was last "modified" (st\_mtime) and the + time its attributes were last "changed" (st\_ctime). If the file was + modified or its attributes were changed on or after this start time, it + will then be backed up. The start time used is displayed after the {\bf + Since} on the Job report. In rare cases, using the start time of the + prior backup may cause some files to be backed up twice, but it ensures + that no change is missed. As with the Incremental option, you should + ensure that the clocks on your server and client are synchronized or as + close as possible to avoid the possibility of a file being skipped. + Note, on versions 1.33 or greater Bacula automatically makes the + necessary adjustments to the time between the server and the client so + that the times Bacula uses are synchronized. + + When Bacula does a Differential backup, all modified files that are + still on the system are backed up. However, any file that has been + deleted since the last Full backup remains in the Bacula catalog, which + means that if between a Full save and the time you do a restore, some + files are deleted, those deleted files will also be restored. The + deleted files will no longer appear in the catalog after doing another + Full save. However, to remove deleted files from the catalog during a + Differential backup is quite a time consuming process and not currently + implemented in Bacula. It is, however, a planned future feature. + + As noted above, if you move a directory rather than copy it, the + files in it do not have their modification time (st\_mtime) or + their attribute change time (st\_ctime) changed. As a + consequence, those files will probably not be backed up by an + Incremental or Differential backup which depend solely on these + time stamps. If you move a directory, and wish it to be + properly backed up, it is generally preferable to copy it, then + delete the original. Alternatively, you can move the directory, then + use the {\bf touch} program to update the timestamps. + +%% TODO: merge this with incremental + However, to manage deleted files or directories changes in the + catalog during an Differential backup you can use \texttt{accurate} + mode. This is quite memory consuming process. See \ilink{Accurate + mode}{accuratemode} for more details. + + Every once and a while, someone asks why we need Differential + backups as long as Incremental backups pickup all changed files. + There are possibly many answers to this question, but the one + that is the most important for me is that a Differential backup + effectively merges + all the Incremental and Differential backups since the last Full backup + into a single Differential backup. This has two effects: 1. It gives + some redundancy since the old backups could be used if the merged backup + cannot be read. 2. More importantly, it reduces the number of Volumes + that are needed to do a restore effectively eliminating the need to read + all the volumes on which the preceding Incremental and Differential + backups since the last Full are done. + +\end{description} + +For a {\bf Restore} Job, no level needs to be specified. + +For a {\bf Verify} Job, the Level may be one of the following: + +\begin{description} + +\item [InitCatalog] +\index[dir]{InitCatalog} + does a scan of the specified {\bf FileSet} and stores the file + attributes in the Catalog database. Since no file data is saved, you + might ask why you would want to do this. It turns out to be a very + simple and easy way to have a {\bf Tripwire} like feature using {\bf + Bacula}. In other words, it allows you to save the state of a set of + files defined by the {\bf FileSet} and later check to see if those files + have been modified or deleted and if any new files have been added. + This can be used to detect system intrusion. Typically you would + specify a {\bf FileSet} that contains the set of system files that + should not change (e.g. /sbin, /boot, /lib, /bin, ...). Normally, you + run the {\bf InitCatalog} level verify one time when your system is + first setup, and then once again after each modification (upgrade) to + your system. Thereafter, when your want to check the state of your + system files, you use a {\bf Verify} {\bf level = Catalog}. This + compares the results of your {\bf InitCatalog} with the current state of + the files. + +\item [Catalog] +\index[dir]{Catalog} + Compares the current state of the files against the state previously + saved during an {\bf InitCatalog}. Any discrepancies are reported. The + items reported are determined by the {\bf verify} options specified on + the {\bf Include} directive in the specified {\bf FileSet} (see the {\bf + FileSet} resource below for more details). Typically this command will + be run once a day (or night) to check for any changes to your system + files. + + Please note! If you run two Verify Catalog jobs on the same client at + the same time, the results will certainly be incorrect. This is because + Verify Catalog modifies the Catalog database while running in order to + track new files. + +\item [VolumeToCatalog] +\index[dir]{VolumeToCatalog} + This level causes Bacula to read the file attribute data written to the + Volume from the last Job. The file attribute data are compared to the + values saved in the Catalog database and any differences are reported. + This is similar to the {\bf Catalog} level except that instead of + comparing the disk file attributes to the catalog database, the + attribute data written to the Volume is read and compared to the catalog + database. Although the attribute data including the signatures (MD5 or + SHA1) are compared, the actual file data is not compared (it is not in + the catalog). + + Please note! If you run two Verify VolumeToCatalog jobs on the same + client at the same time, the results will certainly be incorrect. This + is because the Verify VolumeToCatalog modifies the Catalog database + while running. + +\item [DiskToCatalog] +\index[dir]{DiskToCatalog} + This level causes Bacula to read the files as they currently are on + disk, and to compare the current file attributes with the attributes + saved in the catalog from the last backup for the job specified on the + {\bf VerifyJob} directive. This level differs from the {\bf Catalog} + level described above by the fact that it doesn't compare against a + previous Verify job but against a previous backup. When you run this + level, you must supply the verify options on your Include statements. + Those options determine what attribute fields are compared. + + This command can be very useful if you have disk problems because it + will compare the current state of your disk against the last successful + backup, which may be several jobs. + + Note, the current implementation (1.32c) does not identify files that + have been deleted. +\end{description} + +\item [Accurate = \lt{}yes\vb{}no\gt{}] +\index[dir]{Accurate} + In accurate mode, the File daemon knowns exactly which files were present + after the last backup. So it is able to handle deleted or renamed files. + + When restoring a FileSet for a specified date (including "most + recent"), Bacula is able to restore exactly the files and + directories that existed at the time of the last backup prior to + that date including ensuring that deleted files are actually deleted, + and renamed directories are restored properly. + + In this mode, the File daemon must keep data concerning all files in + memory. So you do not have sufficient memory, the restore may + either be terribly slow or fail. + +%% $$ memory = \sum_{i=1}^{n}(strlen(path_i + file_i) + sizeof(CurFile))$$ + + For 500.000 files (a typical desktop linux system), it will require + approximately 64 Megabytes of RAM on your File daemon to hold the + required information. + +\item [Verify Job = \lt{}Job-Resource-Name\gt{}] + \index[dir]{Verify Job} + \index[dir]{Directive!Verify Job} + If you run a verify job without this directive, the last job run will be + compared with the catalog, which means that you must immediately follow + a backup by a verify command. If you specify a {\bf Verify Job} Bacula + will find the last job with that name that ran. This permits you to run + all your backups, then run Verify jobs on those that you wish to be + verified (most often a {\bf VolumeToCatalog}) so that the tape just + written is re-read. + +\item [JobDefs = \lt{}JobDefs-Resource-Name\gt{}] +\index[dir]{JobDefs} +\index[dir]{Directive!JobDefs} + If a JobDefs-Resource-Name is specified, all the values contained in the + named JobDefs resource will be used as the defaults for the current Job. + Any value that you explicitly define in the current Job resource, will + override any defaults specified in the JobDefs resource. The use of + this directive permits writing much more compact Job resources where the + bulk of the directives are defined in one or more JobDefs. This is + particularly useful if you have many similar Jobs but with minor + variations such as different Clients. A simple example of the use of + JobDefs is provided in the default bacula-dir.conf file. + +\item [Bootstrap = \lt{}bootstrap-file\gt{}] +\index[dir]{Bootstrap} +\index[dir]{Directive!Bootstrap} + The Bootstrap directive specifies a bootstrap file that, if provided, + will be used during {\bf Restore} Jobs and is ignored in other Job + types. The {\bf bootstrap} file contains the list of tapes to be used + in a restore Job as well as which files are to be restored. + Specification of this directive is optional, and if specified, it is + used only for a restore job. In addition, when running a Restore job + from the console, this value can be changed. + + If you use the {\bf Restore} command in the Console program, to start a + restore job, the {\bf bootstrap} file will be created automatically from + the files you select to be restored. + + For additional details of the {\bf bootstrap} file, please see + \ilink{Restoring Files with the Bootstrap File}{BootstrapChapter} chapter + of this manual. + +\label{writebootstrap} +\item [Write Bootstrap = \lt{}bootstrap-file-specification\gt{}] +\index[dir]{Write Bootstrap} +\index[dir]{Directive!Write Bootstrap} + The {\bf writebootstrap} directive specifies a file name where Bacula + will write a {\bf bootstrap} file for each Backup job run. This + directive applies only to Backup Jobs. If the Backup job is a Full + save, Bacula will erase any current contents of the specified file + before writing the bootstrap records. If the Job is an Incremental + or Differential + save, Bacula will append the current bootstrap record to the end of the + file. + + Using this feature, permits you to constantly have a bootstrap file that + can recover the current state of your system. Normally, the file + specified should be a mounted drive on another machine, so that if your + hard disk is lost, you will immediately have a bootstrap record + available. Alternatively, you should copy the bootstrap file to another + machine after it is updated. Note, it is a good idea to write a separate + bootstrap file for each Job backed up including the job that backs up + your catalog database. + + If the {\bf bootstrap-file-specification} begins with a vertical bar + (|), Bacula will use the specification as the name of a program to which + it will pipe the bootstrap record. It could for example be a shell + script that emails you the bootstrap record. + + On versions 1.39.22 or greater, before opening the file or executing the + specified command, Bacula performs + \ilink{character substitution}{character substitution} like in RunScript + directive. To automatically manage your bootstrap files, you can use + this in your {\bf JobDefs} resources: +\begin{verbatim} +JobDefs { + Write Bootstrap = "%c_%n.bsr" + ... +} +\end{verbatim} + + For more details on using this file, please see the chapter entitled + \ilink{The Bootstrap File}{BootstrapChapter} of this manual. + +\item [Client = \lt{}client-resource-name\gt{}] +\index[dir]{Client} +\index[dir]{Directive!Client} + The Client directive specifies the Client (File daemon) that will be used in + the current Job. Only a single Client may be specified in any one Job. The + Client runs on the machine to be backed up, and sends the requested files to + the Storage daemon for backup, or receives them when restoring. For + additional details, see the + \ilink{Client Resource section}{ClientResource2} of this chapter. + This directive is required. + +\item [FileSet = \lt{}FileSet-resource-name\gt{}] +\index[dir]{FileSet} +\index[dir]{FileSet} + The FileSet directive specifies the FileSet that will be used in the + current Job. The FileSet specifies which directories (or files) are to + be backed up, and what options to use (e.g. compression, ...). Only a + single FileSet resource may be specified in any one Job. For additional + details, see the \ilink{FileSet Resource section}{FileSetResource} of + this chapter. This directive is required. + +\item [Messages = \lt{}messages-resource-name\gt{}] +\index[dir]{Messages} +\index[dir]{Directive!Messages} + The Messages directive defines what Messages resource should be used for + this job, and thus how and where the various messages are to be + delivered. For example, you can direct some messages to a log file, and + others can be sent by email. For additional details, see the + \ilink{Messages Resource}{MessagesChapter} Chapter of this manual. This + directive is required. + +\item [Pool = \lt{}pool-resource-name\gt{}] +\index[dir]{Pool} +\index[dir]{Directive!Pool} + The Pool directive defines the pool of Volumes where your data can be + backed up. Many Bacula installations will use only the {\bf Default} + pool. However, if you want to specify a different set of Volumes for + different Clients or different Jobs, you will probably want to use + Pools. For additional details, see the \ilink{Pool Resource + section}{PoolResource} of this chapter. This directive is required. + +\item [Full Backup Pool = \lt{}pool-resource-name\gt{}] +\index[dir]{Full Backup Pool} +\index[dir]{Directive!Full Backup Pool} + The {\it Full Backup Pool} specifies a Pool to be used for Full backups. + It will override any Pool specification during a Full backup. This + directive is optional. + +\item [Differential Backup Pool = \lt{}pool-resource-name\gt{}] +\index[dir]{Differential Backup Pool} +\index[dir]{Directive!Differential Backup Pool} + The {\it Differential Backup Pool} specifies a Pool to be used for + Differential backups. It will override any Pool specification during a + Differential backup. This directive is optional. + +\item [Incremental Backup Pool = \lt{}pool-resource-name\gt{}] +\index[dir]{Incremental Backup Pool} +\index[dir]{Directive!Incremental Backup Pool} + The {\it Incremental Backup Pool} specifies a Pool to be used for + Incremental backups. It will override any Pool specification during an + Incremental backup. This directive is optional. + +\item [Schedule = \lt{}schedule-name\gt{}] +\index[dir]{Schedule} +\index[dir]{Directive!Schedule} + The Schedule directive defines what schedule is to be used for the Job. + The schedule in turn determines when the Job will be automatically + started and what Job level (i.e. Full, Incremental, ...) is to be run. + This directive is optional, and if left out, the Job can only be started + manually using the Console program. Although you may specify only a + single Schedule resource for any one job, the Schedule resource may + contain multiple {\bf Run} directives, which allow you to run the Job at + many different times, and each {\bf run} directive permits overriding + the default Job Level Pool, Storage, and Messages resources. This gives + considerable flexibility in what can be done with a single Job. For + additional details, see the \ilink{Schedule Resource + Chapter}{ScheduleResource} of this manual. + + +\item [Storage = \lt{}storage-resource-name\gt{}] +\index[dir]{Storage} +\index[dir]{Directive!Storage} + The Storage directive defines the name of the storage services where you + want to backup the FileSet data. For additional details, see the + \ilink{Storage Resource Chapter}{StorageResource2} of this manual. + The Storage resource may also be specified in the Job's Pool resource, + in which case the value in the Pool resource overrides any value + in the Job. This Storage resource definition is not required by either + the Job resource or in the Pool, but it must be specified in + one or the other, if not an error will result. + +\item [Max Start Delay = \lt{}time\gt{}] +\index[dir]{Max Start Delay} +\index[dir]{Directive!Max Start Delay} + The time specifies the maximum delay between the scheduled time and the + actual start time for the Job. For example, a job can be scheduled to + run at 1:00am, but because other jobs are running, it may wait to run. + If the delay is set to 3600 (one hour) and the job has not begun to run + by 2:00am, the job will be canceled. This can be useful, for example, + to prevent jobs from running during day time hours. The default is 0 + which indicates no limit. + +\item [Max Run Time = \lt{}time\gt{}] +\index[dir]{Max Run Time} +\index[dir]{Directive!Max Run Time} + The time specifies the maximum allowed time that a job may run, counted + from when the job starts, ({\bf not} necessarily the same as when the + job was scheduled). + +\item [Incremental|Differential Max Wait Time = \lt{}time\gt{}] +\index[dir]{Incremental Wait Run Time} +\index[dir]{Differential Wait Run Time} +\index[dir]{Directive!Differential Max Wait Time} + Theses directives have been deprecated in favor of + \texttt{Incremental|Differential Max Run Time} since bacula 2.3.18. + +\item [Incremental Max Run Time = \lt{}time\gt{}] +\index[dir]{Incremental Max Run Time} +\index[dir]{Directive!Incremental Max Run Time} +The time specifies the maximum allowed time that an Incremental backup job may +run, counted from when the job starts, ({\bf not} necessarily the same as when +the job was scheduled). + +\item [Differential Max Wait Time = \lt{}time\gt{}] +\index[dir]{Differential Max Run Time} +\index[dir]{Directive!Differential Max Run Time} +The time specifies the maximum allowed time that a Differential backup job may +run, counted from when the job starts, ({\bf not} necessarily the same as when +the job was scheduled). + +\item [Max Run Sched Time = \lt{}time\gt{}] +\index[dir]{Max Run Sched Time} +\index[dir]{Directive!Max Run Sched Time} + +The time specifies the maximum allowed time that a job may run, counted from +when the job was scheduled. This can be useful to prevent jobs from running +during working hours. We can see it like \texttt{Max Start Delay + Max Run + Time}. + +\item [Max Wait Time = \lt{}time\gt{}] +\index[dir]{Max Wait Time} +\index[dir]{Directive!Max Wait Time} + The time specifies the maximum allowed time that a job may block waiting + for a resource (such as waiting for a tape to be mounted, or waiting for + the storage or file daemons to perform their duties), counted from the + when the job starts, ({\bf not} necessarily the same as when the job was + scheduled). This directive works as expected since bacula 2.3.18. + +\addcontentsline{lof}{figure}{Job time control directives} +\includegraphics{\idir different_time.eps} + +\item [Max Full Interval = \lt{}time\gt{}] +\index[dir]{Max Full Interval} +\index[dir]{Directive!Max Full Interval} + The time specifies the maximum allowed age (counting from start time) of + the most recent successful Full backup that is required in order to run + Incremental or Differential backup jobs. If the most recent Full backup + is older than this interval, Incremental and Differential backups will be + upgraded to Full backups automatically. If this directive is not present, + or specified as 0, then the age of the previous Full backup is not + considered. + +\label{PreferMountedVolumes} +\item [Prefer Mounted Volumes = \lt{}yes\vb{}no\gt{}] +\index[dir]{Prefer Mounted Volumes} +\index[dir]{Directive!Prefer Mounted Volumes} + If the Prefer Mounted Volumes directive is set to {\bf yes} (default + yes), the Storage daemon is requested to select either an Autochanger or + a drive with a valid Volume already mounted in preference to a drive + that is not ready. This means that all jobs will attempt to append + to the same Volume (providing the Volume is appropriate -- right Pool, + ... for that job), unless you are using multiple pools. + If no drive with a suitable Volume is available, it + will select the first available drive. Note, any Volume that has + been requested to be mounted, will be considered valid as a mounted + volume by another job. This if multiple jobs start at the same time + and they all prefer mounted volumes, the first job will request the + mount, and the other jobs will use the same volume. + + If the directive is set to {\bf no}, the Storage daemon will prefer + finding an unused drive, otherwise, each job started will append to the + same Volume (assuming the Pool is the same for all jobs). Setting + Prefer Mounted Volumes to no can be useful for those sites + with multiple drive autochangers that prefer to maximize backup + throughput at the expense of using additional drives and Volumes. + This means that the job will prefer to use an unused drive rather + than use a drive that is already in use. + + Despite the above, we recommend against setting this directive to + {\bf no} since + it tends to add a lot of swapping of Volumes between the different + drives and can easily lead to deadlock situations in the Storage + daemon. We will accept bug reports against it, but we cannot guarantee + that we will be able to fix the problem in a reasonable time. + + A better alternative for using multiple drives is to use multiple + pools so that Bacula will be forced to mount Volumes from those Pools + on different drives. + +\item [Prune Jobs = \lt{}yes\vb{}no\gt{}] +\index[dir]{Prune Jobs} +\index[dir]{Directive!Prune Jobs} + Normally, pruning of Jobs from the Catalog is specified on a Client by + Client basis in the Client resource with the {\bf AutoPrune} directive. + If this directive is specified (not normally) and the value is {\bf + yes}, it will override the value specified in the Client resource. The + default is {\bf no}. + + +\item [Prune Files = \lt{}yes\vb{}no\gt{}] +\index[dir]{Prune Files} +\index[dir]{Directive!Prune Files} + Normally, pruning of Files from the Catalog is specified on a Client by + Client basis in the Client resource with the {\bf AutoPrune} directive. + If this directive is specified (not normally) and the value is {\bf + yes}, it will override the value specified in the Client resource. The + default is {\bf no}. + +\item [Prune Volumes = \lt{}yes\vb{}no\gt{}] +\index[dir]{Prune Volumes} +\index[dir]{Directive!Prune Volumes} + Normally, pruning of Volumes from the Catalog is specified on a Client + by Client basis in the Client resource with the {\bf AutoPrune} + directive. If this directive is specified (not normally) and the value + is {\bf yes}, it will override the value specified in the Client + resource. The default is {\bf no}. + +\item [RunScript \{\lt{}body-of-runscript\gt{}\}] + \index[dir]{RunScript} + \index[dir]{Directive!Run Script} + + The RunScript directive behaves like a resource in that it + requires opening and closing braces around a number of directives + that make up the body of the runscript. + + The specified {\bf Command} (see below for details) is run as an external + program prior or after the current Job. This is optional. By default, the + program is executed on the Client side like in \texttt{ClientRunXXXJob}. + + \textbf{Console} options are special commands that are sent to the director instead + of the OS. At this time, console command ouputs are redirected to log with + the jobid 0. + + You can use following console command : \texttt{delete}, \texttt{disable}, + \texttt{enable}, \texttt{estimate}, \texttt{list}, \texttt{llist}, + \texttt{memory}, \texttt{prune}, \texttt{purge}, \texttt{reload}, + \texttt{status}, \texttt{setdebug}, \texttt{show}, \texttt{time}, + \texttt{trace}, \texttt{update}, \texttt{version}, \texttt{.client}, + \texttt{.jobs}, \texttt{.pool}, \texttt{.storage}. See console chapter for + more information. You need to specify needed information on command line, nothing + will be prompted. Example : + +\begin{verbatim} + Console = "prune files client=%c" + Console = "update stats age=3" +\end{verbatim} + + You can specify more than one Command/Console option per RunScript. + + You can use following options may be specified in the body + of the runscript:\\ + +\begin{tabular}{|c|c|c|l} +Options & Value & Default & Information \\ +\hline +\hline +Runs On Success & Yes/No & {\it Yes} & Run command if JobStatus is successful\\ +\hline +Runs On Failure & Yes/No & {\it No} & Run command if JobStatus isn't successful\\ +\hline +Runs On Client & Yes/No & {\it Yes} & Run command on client\\ +\hline +Runs When & Before|After|Always|\textsl{AfterVSS} & {\it Never} & When run commands\\ +\hline +Fail Job On Error & Yes/No & {\it Yes} & Fail job if script returns + something different from 0 \\ +\hline +Command & & & Path to your script\\ +\hline +Console & & & Console command\\ +\hline +\end{tabular} + \\ + + Any output sent by the command to standard output will be included in the + Bacula job report. The command string must be a valid program name or name + of a shell script. + + In addition, the command string is parsed then fed to the OS, + which means that the path will be searched to execute your specified + command, but there is no shell interpretation, as a consequence, if you + invoke complicated commands or want any shell features such as redirection + or piping, you must call a shell script and do it inside that script. + + Before submitting the specified command to the operating system, Bacula + performs character substitution of the following characters: + +\label{character substitution} +\footnotesize +\begin{verbatim} + %% = % + %c = Client's name + %d = Director's name + %e = Job Exit Status + %i = JobId + %j = Unique Job id + %l = Job Level + %n = Job name + %s = Since time + %t = Job type (Backup, ...) + %v = Volume name (Only on director side) + +\end{verbatim} +\normalsize + +The Job Exit Status code \%e edits the following values: + +\index[dir]{Exit Status} +\begin{itemize} +\item OK +\item Error +\item Fatal Error +\item Canceled +\item Differences +\item Unknown term code +\end{itemize} + + Thus if you edit it on a command line, you will need to enclose + it within some sort of quotes. + + +You can use these following shortcuts:\\ + +\begin{tabular}{|c|c|c|c|c|c} +Keyword & RunsOnSuccess & RunsOnFailure & FailJobOnError & Runs On Client & RunsWhen \\ +\hline +Run Before Job & & & Yes & No & Before \\ +\hline +Run After Job & Yes & No & & No & After \\ +\hline +Run After Failed Job & No & Yes & & No & After \\ +\hline +Client Run Before Job & & & Yes & Yes & Before \\ +\hline +Client Run After Job & Yes & No & & Yes & After \\ +\end{tabular} + +Examples: +\begin{verbatim} +RunScript { + RunsWhen = Before + FailJobOnError = No + Command = "/etc/init.d/apache stop" +} + +RunScript { + RunsWhen = After + RunsOnFailure = yes + Command = "/etc/init.d/apache start" +} +\end{verbatim} + + {\bf Notes about ClientRunBeforeJob} + + For compatibility reasons, with this shortcut, the command is executed + directly when the client recieve it. And if the command is in error, other + remote runscripts will be discarded. To be sure that all commands will be + sent and executed, you have to use RunScript syntax. + + {\bf Special Windows Considerations} + + You can run scripts just after snapshots initializations with + \textsl{AfterVSS} keyword. + + In addition, for a Windows client on version 1.33 and above, please take + note that you must ensure a correct path to your script. The script or + program can be a .com, .exe or a .bat file. If you just put the program + name in then Bacula will search using the same rules that cmd.exe uses + (current directory, Bacula bin directory, and PATH). It will even try the + different extensions in the same order as cmd.exe. + The command can be anything that cmd.exe or command.com will recognize + as an executable file. + + However, if you have slashes in the program name then Bacula figures you + are fully specifying the name, so you must also explicitly add the three + character extension. + + The command is run in a Win32 environment, so Unix like commands will not + work unless you have installed and properly configured Cygwin in addition + to and separately from Bacula. + + The System \%Path\% will be searched for the command. (under the + environment variable dialog you have have both System Environment and + User Environment, we believe that only the System environment will be + available to bacula-fd, if it is running as a service.) + + System environment variables can be referenced with \%var\% and + used as either part of the command name or arguments. + + So if you have a script in the Bacula\\bin directory then the following lines + should work fine: + +\footnotesize +\begin{verbatim} + Client Run Before Job = systemstate +or + Client Run Before Job = systemstate.bat +or + Client Run Before Job = "systemstate" +or + Client Run Before Job = "systemstate.bat" +or + ClientRunBeforeJob = "\"C:/Program Files/Bacula/systemstate.bat\"" +\end{verbatim} +\normalsize + +The outer set of quotes is removed when the configuration file is parsed. +You need to escape the inner quotes so that they are there when the code +that parses the command line for execution runs so it can tell what the +program name is. + + +\footnotesize +\begin{verbatim} +ClientRunBeforeJob = "\"C:/Program Files/Software + Vendor/Executable\" /arg1 /arg2 \"foo bar\"" +\end{verbatim} +\normalsize + + The special characters +\begin{verbatim} +&<>()@^| +\end{verbatim} + will need to be quoted, + if they are part of a filename or argument. + + If someone is logged in, a blank "command" window running the commands + will be present during the execution of the command. + + Some Suggestions from Phil Stracchino for running on Win32 machines with + the native Win32 File daemon: + + \begin{enumerate} + \item You might want the ClientRunBeforeJob directive to specify a .bat + file which runs the actual client-side commands, rather than trying + to run (for example) regedit /e directly. + \item The batch file should explicitly 'exit 0' on successful completion. + \item The path to the batch file should be specified in Unix form: + + ClientRunBeforeJob = "c:/bacula/bin/systemstate.bat" + + rather than DOS/Windows form: + + ClientRunBeforeJob = + +"c:\textbackslash{}bacula\textbackslash{}bin\textbackslash{}systemstate.bat" + INCORRECT + \end{enumerate} + +For Win32, please note that there are certain limitations: + +ClientRunBeforeJob = "C:/Program Files/Bacula/bin/pre-exec.bat" + +Lines like the above do not work because there are limitations of +cmd.exe that is used to execute the command. +Bacula prefixes the string you supply with {\bf cmd.exe /c }. To test that +your command works you should type {\bf cmd /c "C:/Program Files/test.exe"} at a +cmd prompt and see what happens. Once the command is correct insert a +backslash (\textbackslash{}) before each double quote ("), and +then put quotes around the whole thing when putting it in +the director's .conf file. You either need to have only one set of quotes +or else use the short name and don't put quotes around the command path. + +Below is the output from cmd's help as it relates to the command line +passed to the /c option. + + + If /C or /K is specified, then the remainder of the command line after + the switch is processed as a command line, where the following logic is + used to process quote (") characters: + +\begin{enumerate} +\item + If all of the following conditions are met, then quote characters + on the command line are preserved: + \begin{itemize} + \item no /S switch. + \item exactly two quote characters. + \item no special characters between the two quote characters, + where special is one of: +\begin{verbatim} +&<>()@^| +\end{verbatim} + \item there are one or more whitespace characters between the + the two quote characters. + \item the string between the two quote characters is the name + of an executable file. + \end{itemize} + +\item Otherwise, old behavior is to see if the first character is + a quote character and if so, strip the leading character and + remove the last quote character on the command line, preserving + any text after the last quote character. + +\end{enumerate} + + +The following example of the use of the Client Run Before Job directive was +submitted by a user:\\ +You could write a shell script to back up a DB2 database to a FIFO. The shell +script is: + +\footnotesize +\begin{verbatim} + #!/bin/sh + # ===== backupdb.sh + DIR=/u01/mercuryd + + mkfifo $DIR/dbpipe + db2 BACKUP DATABASE mercuryd TO $DIR/dbpipe WITHOUT PROMPTING & + sleep 1 +\end{verbatim} +\normalsize + +The following line in the Job resource in the bacula-dir.conf file: +\footnotesize +\begin{verbatim} + Client Run Before Job = "su - mercuryd -c \"/u01/mercuryd/backupdb.sh '%t' +'%l'\"" +\end{verbatim} +\normalsize + +When the job is run, you will get messages from the output of the script +stating that the backup has started. Even though the command being run is +backgrounded with \&, the job will block until the "db2 BACKUP DATABASE" +command, thus the backup stalls. + +To remedy this situation, the "db2 BACKUP DATABASE" line should be changed to +the following: + +\footnotesize +\begin{verbatim} + db2 BACKUP DATABASE mercuryd TO $DIR/dbpipe WITHOUT PROMPTING > $DIR/backup.log +2>&1 < /dev/null & +\end{verbatim} +\normalsize + +It is important to redirect the input and outputs of a backgrounded command to +/dev/null to prevent the script from blocking. + +\item [Run Before Job = \lt{}command\gt{}] +\index[dir]{Run Before Job} +\index[dir]{Directive!Run Before Job} +\index[dir]{Directive!Run Before Job} +The specified {\bf command} is run as an external program prior to running the +current Job. This directive is not required, but if it is defined, and if the +exit code of the program run is non-zero, the current Bacula job will be +canceled. + +\begin{verbatim} +Run Before Job = "echo test" +\end{verbatim} + it's equivalent to : +\begin{verbatim} +RunScript { + Command = "echo test" + RunsOnClient = No + RunsWhen = Before +} +\end{verbatim} + + Lutz Kittler has pointed out that using the RunBeforeJob directive can be a + simple way to modify your schedules during a holiday. For example, suppose + that you normally do Full backups on Fridays, but Thursday and Friday are + holidays. To avoid having to change tapes between Thursday and Friday when + no one is in the office, you can create a RunBeforeJob that returns a + non-zero status on Thursday and zero on all other days. That way, the + Thursday job will not run, and on Friday the tape you inserted on Wednesday + before leaving will be used. + +\item [Run After Job = \lt{}command\gt{}] +\index[dir]{Run After Job} +\index[dir]{Directive!Run After Job} + The specified {\bf command} is run as an external program if the current + job terminates normally (without error or without being canceled). This + directive is not required. If the exit code of the program run is + non-zero, Bacula will print a warning message. Before submitting the + specified command to the operating system, Bacula performs character + substitution as described above for the {\bf RunScript} directive. + + An example of the use of this directive is given in the + \ilink{Tips Chapter}{JobNotification} of this manual. + + See the {\bf Run After Failed Job} if you + want to run a script after the job has terminated with any + non-normal status. + +\item [Run After Failed Job = \lt{}command\gt{}] +\index[dir]{Run After Job} +\index[dir]{Directive!Run After Job} + The specified {\bf command} is run as an external program after the current + job terminates with any error status. This directive is not required. The + command string must be a valid program name or name of a shell script. If + the exit code of the program run is non-zero, Bacula will print a + warning message. Before submitting the specified command to the + operating system, Bacula performs character substitution as described above + for the {\bf RunScript} directive. Note, if you wish that your script + will run regardless of the exit status of the Job, you can use this : +\begin{verbatim} +RunScript { + Command = "echo test" + RunsWhen = After + RunsOnFailure = yes + RunsOnClient = no + RunsOnSuccess = yes # default, you can drop this line +} +\end{verbatim} + + An example of the use of this directive is given in the + \ilink{Tips Chapter}{JobNotification} of this manual. + + +\item [Client Run Before Job = \lt{}command\gt{}] +\index[dir]{Client Run Before Job} +\index[dir]{Directive!Client Run Before Job} + This directive is the same as {\bf Run Before Job} except that the + program is run on the client machine. The same restrictions apply to + Unix systems as noted above for the {\bf RunScript}. + +\item [Client Run After Job = \lt{}command\gt{}] + \index[dir]{Client Run After Job} + \index[dir]{Directive!Client Run After Job} + The specified {\bf command} is run on the client machine as soon + as data spooling is complete in order to allow restarting applications + on the client as soon as possible. . + + Note, please see the notes above in {\bf RunScript} + concerning Windows clients. + +\item [Rerun Failed Levels = \lt{}yes\vb{}no\gt{}] + \index[dir]{Rerun Failed Levels} + \index[dir]{Directive!Rerun Failed Levels} + If this directive is set to {\bf yes} (default no), and Bacula detects that + a previous job at a higher level (i.e. Full or Differential) has failed, + the current job level will be upgraded to the higher level. This is + particularly useful for Laptops where they may often be unreachable, and if + a prior Full save has failed, you wish the very next backup to be a Full + save rather than whatever level it is started as. + + There are several points that must be taken into account when using this + directive: first, a failed job is defined as one that has not terminated + normally, which includes any running job of the same name (you need to + ensure that two jobs of the same name do not run simultaneously); + secondly, the {\bf Ignore FileSet Changes} directive is not considered + when checking for failed levels, which means that any FileSet change will + trigger a rerun. + +\item [Spool Data = \lt{}yes\vb{}no\gt{}] + \index[dir]{Spool Data} + \index[dir]{Directive!Spool Data} + + If this directive is set to {\bf yes} (default no), the Storage daemon will + be requested to spool the data for this Job to disk rather than write it + directly to tape. Once all the data arrives or the spool files' maximum sizes + are reached, the data will be despooled and written to tape. Spooling data + prevents tape shoe-shine (start and stop) during + Incremental saves. If you are writing to a disk file using this option + will probably just slow down the backup jobs. + + NOTE: When this directive is set to yes, Spool Attributes is also + automatically set to yes. + +\item [Spool Attributes = \lt{}yes\vb{}no\gt{}] + \index[dir]{Spool Attributes} + \index[dir]{Directive!Spool Attributes} + \index[dir]{slow} + \index[general]{slow} + \index[dir]{Backups!slow} + \index[general]{Backups!slow} + The default is set to {\bf no}, which means that the File attributes are + sent by the Storage daemon to the Director as they are stored on tape. + However, if you want to avoid the possibility that database updates will + slow down writing to the tape, you may want to set the value to {\bf + yes}, in which case the Storage daemon will buffer the File attributes + and Storage coordinates to a temporary file in the Working Directory, + then when writing the Job data to the tape is completed, the attributes + and storage coordinates will be sent to the Director. + + NOTE: When Spool Data is set to yes, Spool Attributes is also + automatically set to yes. + +\item [Where = \lt{}directory\gt{}] + \index[dir]{Where} + \index[dir]{Directive!Where} + This directive applies only to a Restore job and specifies a prefix to + the directory name of all files being restored. This permits files to + be restored in a different location from which they were saved. If {\bf + Where} is not specified or is set to backslash ({\bf /}), the files will + be restored to their original location. By default, we have set {\bf + Where} in the example configuration files to be {\bf + /tmp/bacula-restores}. This is to prevent accidental overwriting of + your files. + +\item [Add Prefix = \lt{}directory\gt{}] + \label{confaddprefix} + \index[dir]{AddPrefix} + \index[dir]{Directive!AddPrefix} + This directive applies only to a Restore job and specifies a prefix to the + directory name of all files being restored. This will use \ilink{File + Relocation}{filerelocation} feature implemented in Bacula 2.1.8 or later. + +\item [Add Suffix = \lt{}extention\gt{}] + \index[dir]{AddSuffix} + \index[dir]{Directive!AddSuffix} + This directive applies only to a Restore job and specifies a suffix to all + files being restored. This will use \ilink{File Relocation}{filerelocation} + feature implemented in Bacula 2.1.8 or later. + + Using \texttt{Add Suffix=.old}, \texttt{/etc/passwd} will be restored to + \texttt{/etc/passwsd.old} + +\item [Strip Prefix = \lt{}directory\gt{}] + \index[dir]{StripPrefix} + \index[dir]{Directive!StripPrefix} + This directive applies only to a Restore job and specifies a prefix to remove + from the directory name of all files being restored. This will use the + \ilink{File Relocation}{filerelocation} feature implemented in Bacula 2.1.8 + or later. + + Using \texttt{Strip Prefix=/etc}, \texttt{/etc/passwd} will be restored to + \texttt{/passwd} + + Under Windows, if you want to restore \texttt{c:/files} to \texttt{d:/files}, + you can use : + +\begin{verbatim} + Strip Prefix = c: + Add Prefix = d: +\end{verbatim} + +\item [RegexWhere = \lt{}expressions\gt{}] + \index[dir]{RegexWhere} + \index[dir]{Directive!RegexWhere} + This directive applies only to a Restore job and specifies a regex filename + manipulation of all files being restored. This will use \ilink{File + Relocation}{filerelocation} feature implemented in Bacula 2.1.8 or later. + + For more informations about how use this option, see + \ilink{this}{useregexwhere}. + +\item [Replace = \lt{}replace-option\gt{}] + \index[dir]{Replace} + \index[dir]{Directive!Replace} + This directive applies only to a Restore job and specifies what happens + when Bacula wants to restore a file or directory that already exists. + You have the following options for {\bf replace-option}: + +\begin{description} + +\item [always] + \index[dir]{always} + when the file to be restored already exists, it is deleted and then + replaced by the copy that was backed up. This is the default value. + +\item [ifnewer] +\index[dir]{ifnewer} + if the backed up file (on tape) is newer than the existing file, the + existing file is deleted and replaced by the back up. + +\item [ifolder] + \index[dir]{ifolder} + if the backed up file (on tape) is older than the existing file, the + existing file is deleted and replaced by the back up. + +\item [never] + \index[dir]{never} + if the backed up file already exists, Bacula skips restoring this file. +\end{description} + +\item [Prefix Links=\lt{}yes\vb{}no\gt{}] + \index[dir]{Prefix Links} + \index[dir]{Directive!Prefix Links} + If a {\bf Where} path prefix is specified for a recovery job, apply it + to absolute links as well. The default is {\bf No}. When set to {\bf + Yes} then while restoring files to an alternate directory, any absolute + soft links will also be modified to point to the new alternate + directory. Normally this is what is desired -- i.e. everything is self + consistent. However, if you wish to later move the files to their + original locations, all files linked with absolute names will be broken. + +\item [Maximum Concurrent Jobs = \lt{}number\gt{}] + \index[dir]{Maximum Concurrent Jobs} + \index[dir]{Directive!Maximum Concurrent Jobs} + where \lt{}number\gt{} is the maximum number of Jobs from the current + Job resource that can run concurrently. Note, this directive limits + only Jobs with the same name as the resource in which it appears. Any + other restrictions on the maximum concurrent jobs such as in the + Director, Client, or Storage resources will also apply in addition to + the limit specified here. The default is set to 1, but you may set it + to a larger number. We strongly recommend that you read the WARNING + documented under \ilink{ Maximum Concurrent Jobs}{DirMaxConJobs} in the + Director's resource. + +\item [Reschedule On Error = \lt{}yes\vb{}no\gt{}] + \index[dir]{Reschedule On Error} + \index[dir]{Directive!Reschedule On Error} + If this directive is enabled, and the job terminates in error, the job + will be rescheduled as determined by the {\bf Reschedule Interval} and + {\bf Reschedule Times} directives. If you cancel the job, it will not + be rescheduled. The default is {\bf no} (i.e. the job will not be + rescheduled). + + This specification can be useful for portables, laptops, or other + machines that are not always connected to the network or switched on. + +\item [Reschedule Interval = \lt{}time-specification\gt{}] + \index[dir]{Reschedule Interval} + \index[dir]{Directive!Reschedule Interval} + If you have specified {\bf Reschedule On Error = yes} and the job + terminates in error, it will be rescheduled after the interval of time + specified by {\bf time-specification}. See \ilink{the time + specification formats}{Time} in the Configure chapter for details of + time specifications. If no interval is specified, the job will not be + rescheduled on error. + +\item [Reschedule Times = \lt{}count\gt{}] + \index[dir]{Reschedule Times} + \index[dir]{Directive!Reschedule Times} + This directive specifies the maximum number of times to reschedule the + job. If it is set to zero (the default) the job will be rescheduled an + indefinite number of times. + +\item [Run = \lt{}job-name\gt{}] + \index[dir]{Run} + \index[dir]{Directive!Run} + \index[dir]{Clone a Job} + The Run directive (not to be confused with the Run option in a + Schedule) allows you to start other jobs or to clone jobs. By using the + cloning keywords (see below), you can backup + the same data (or almost the same data) to two or more drives + at the same time. The {\bf job-name} is normally the same name + as the current Job resource (thus creating a clone). However, it + may be any Job name, so one job may start other related jobs. + + The part after the equal sign must be enclosed in double quotes, + and can contain any string or set of options (overrides) that you + can specify when entering the Run command from the console. For + example {\bf storage=DDS-4 ...}. In addition, there are two special + keywords that permit you to clone the current job. They are {\bf level=\%l} + and {\bf since=\%s}. The \%l in the level keyword permits + entering the actual level of the current job and the \%s in the since + keyword permits putting the same time for comparison as used on the + current job. Note, in the case of the since keyword, the \%s must be + enclosed in double quotes, and thus they must be preceded by a backslash + since they are already inside quotes. For example: + +\begin{verbatim} + run = "Nightly-backup level=%l since=\"%s\" storage=DDS-4" +\end{verbatim} + + A cloned job will not start additional clones, so it is not + possible to recurse. + + Please note that all cloned jobs, as specified in the Run directives are + submitted for running before the original job is run (while it is being + initialized). This means that any clone job will actually start before + the original job, and may even block the original job from starting + until the original job finishes unless you allow multiple simultaneous + jobs. Even if you set a lower priority on the clone job, if no other + jobs are running, it will start before the original job. + + If you are trying to prioritize jobs by using the clone feature (Run + directive), you will find it much easier to do using a RunScript + resource, or a RunBeforeJob directive. + +\label{Priority} +\item [Priority = \lt{}number\gt{}] + \index[dir]{Priority} + \index[dir]{Directive!Priority} + This directive permits you to control the order in which your jobs will + be run by specifying a positive non-zero number. The higher the number, + the lower the job priority. Assuming you are not running concurrent jobs, + all queued jobs of priority 1 will run before queued jobs of priority 2 + and so on, regardless of the original scheduling order. + + The priority only affects waiting jobs that are queued to run, not jobs + that are already running. If one or more jobs of priority 2 are already + running, and a new job is scheduled with priority 1, the currently + running priority 2 jobs must complete before the priority 1 job is + run, unless Allow Mixed Priority is set. + + The default priority is 10. + + If you want to run concurrent jobs you should + keep these points in mind: + +\begin{itemize} +\item See \ilink{Running Concurrent Jobs}{ConcurrentJobs} on how to setup + concurrent jobs. + +\item Bacula concurrently runs jobs of only one priority at a time. It + will not simultaneously run a priority 1 and a priority 2 job. + +\item If Bacula is running a priority 2 job and a new priority 1 job is + scheduled, it will wait until the running priority 2 job terminates even + if the Maximum Concurrent Jobs settings would otherwise allow two jobs + to run simultaneously. + +\item Suppose that bacula is running a priority 2 job and a new priority 1 + job is scheduled and queued waiting for the running priority 2 job to + terminate. If you then start a second priority 2 job, the waiting + priority 1 job will prevent the new priority 2 job from running + concurrently with the running priority 2 job. That is: as long as there + is a higher priority job waiting to run, no new lower priority jobs will + start even if the Maximum Concurrent Jobs settings would normally allow + them to run. This ensures that higher priority jobs will be run as soon + as possible. +\end{itemize} + +If you have several jobs of different priority, it may not best to start +them at exactly the same time, because Bacula must examine them one at a +time. If by Bacula starts a lower priority job first, then it will run +before your high priority jobs. If you experience this problem, you may +avoid it by starting any higher priority jobs a few seconds before lower +priority ones. This insures that Bacula will examine the jobs in the +correct order, and that your priority scheme will be respected. + +\label{AllowMixedPriority} +\item [Allow Mixed Priority = \lt{}yes\vb{}no\gt{}] +\index[dir]{Allow Mixed Priority} + This directive is only implemented in version 2.5 and later. When + set to {\bf yes} (default {\bf no}), this job may run even if lower + priority jobs are already running. This means a high priority job + will not have to wait for other jobs to finish before starting. + The scheduler will only mix priorities when all running jobs have + this set to true. + + Note that only higher priority jobs will start early. Suppose the + director will allow two concurrent jobs, and that two jobs with + priority 10 are running, with two more in the queue. If a job with + priority 5 is added to the queue, it will be run as soon as one of + the running jobs finishes. However, new priority 10 jobs will not + be run until the priority 5 job has finished. + +\label{WritePartAfterJob} +\item [Write Part After Job = \lt{}yes\vb{}no\gt{}] +\index[dir]{Write Part After Job} +\index[dir]{Directive!Write Part After Job} + This directive is only implemented in version 1.37 and later. + If this directive is set to {\bf yes} (default {\bf no}), a new part file + will be created after the job is finished. + + It should be set to {\bf yes} when writing to devices that require mount + (for example DVD), so you are sure that the current part, containing + this job's data, is written to the device, and that no data is left in + the temporary file on the hard disk. However, on some media, like DVD+R + and DVD-R, a lot of space (about 10Mb) is lost every time a part is + written. So, if you run several jobs each after another, you could set + this directive to {\bf no} for all jobs, except the last one, to avoid + wasting too much space, but to ensure that the data is written to the + medium when all jobs are finished. + + This directive is ignored with tape and FIFO devices. + +\end{description} + +The following is an example of a valid Job resource definition: + +\footnotesize +\begin{verbatim} +Job { + Name = "Minou" + Type = Backup + Level = Incremental # default + Client = Minou + FileSet="Minou Full Set" + Storage = DLTDrive + Pool = Default + Schedule = "MinouWeeklyCycle" + Messages = Standard +} +\end{verbatim} +\normalsize + +\section{The JobDefs Resource} +\label{JobDefsResource} +\index[general]{JobDefs Resource} +\index[general]{Resource!JobDefs} + +The JobDefs resource permits all the same directives that can appear in a Job +resource. However, a JobDefs resource does not create a Job, rather it can be +referenced within a Job to provide defaults for that Job. This permits you to +concisely define several nearly identical Jobs, each one referencing a JobDefs +resource which contains the defaults. Only the changes from the defaults need to +be mentioned in each Job. + +\section{The Schedule Resource} +\label{ScheduleResource} +\index[general]{Resource!Schedule} +\index[general]{Schedule Resource} + +The Schedule resource provides a means of automatically scheduling a Job as +well as the ability to override the default Level, Pool, Storage and Messages +resources. If a Schedule resource is not referenced in a Job, the Job can only +be run manually. In general, you specify an action to be taken and when. + +\begin{description} + +\item [Schedule] +\index[dir]{Schedule} +\index[dir]{Directive!Schedule} + Start of the Schedule directives. No {\bf Schedule} resource is + required, but you will need at least one if you want Jobs to be + automatically started. + +\item [Name = \lt{}name\gt{}] + \index[dir]{Name} + \index[dir]{Directive!Name} + The name of the schedule being defined. The Name directive is required. + +\item [Run = \lt{}Job-overrides\gt{} \lt{}Date-time-specification\gt{}] + \index[dir]{Run} + \index[dir]{Directive!Run} + The Run directive defines when a Job is to be run, and what overrides if + any to apply. You may specify multiple {\bf run} directives within a + {\bf Schedule} resource. If you do, they will all be applied (i.e. + multiple schedules). If you have two {\bf Run} directives that start at + the same time, two Jobs will start at the same time (well, within one + second of each other). + + The {\bf Job-overrides} permit overriding the Level, the Storage, the + Messages, and the Pool specifications provided in the Job resource. In + addition, the FullPool, the IncrementalPool, and the DifferentialPool + specifications permit overriding the Pool specification according to + what backup Job Level is in effect. + + By the use of overrides, you may customize a particular Job. For + example, you may specify a Messages override for your Incremental + backups that outputs messages to a log file, but for your weekly or + monthly Full backups, you may send the output by email by using a + different Messages override. + + {\bf Job-overrides} are specified as: {\bf keyword=value} where the + keyword is Level, Storage, Messages, Pool, FullPool, DifferentialPool, + or IncrementalPool, and the {\bf value} is as defined on the respective + directive formats for the Job resource. You may specify multiple {\bf + Job-overrides} on one {\bf Run} directive by separating them with one or + more spaces or by separating them with a trailing comma. For example: + +\begin{description} + +\item [Level=Full] + \index[dir]{Level} + \index[dir]{Directive!Level} + is all files in the FileSet whether or not they have changed. + +\item [Level=Incremental] + \index[dir]{Level} + \index[dir]{Directive!Level} + is all files that have changed since the last backup. + +\item [Pool=Weekly] + \index[dir]{Pool} + \index[dir]{Directive!Pool} + specifies to use the Pool named {\bf Weekly}. + +\item [Storage=DLT\_Drive] + \index[dir]{Storage} + \index[dir]{Directive!Storage} + specifies to use {\bf DLT\_Drive} for the storage device. + +\item [Messages=Verbose] + \index[dir]{Messages} + \index[dir]{Directive!Messages} + specifies to use the {\bf Verbose} message resource for the Job. + +\item [FullPool=Full] + \index[dir]{FullPool} + \index[dir]{Directive!FullPool} + specifies to use the Pool named {\bf Full} if the job is a full backup, or +is +upgraded from another type to a full backup. + +\item [DifferentialPool=Differential] + \index[dir]{DifferentialPool} + \index[dir]{Directive!DifferentialPool} + specifies to use the Pool named {\bf Differential} if the job is a + differential backup. + +\item [IncrementalPool=Incremental] + \index[dir]{IncrementalPool} + \index[dir]{Directive!IncrementalPool} + specifies to use the Pool named {\bf Incremental} if the job is an +incremental backup. + +\item [SpoolData=yes\vb{}no] + \index[dir]{SpoolData} + \index[dir]{Directive!SpoolData} + tells Bacula to request the Storage daemon to spool data to a disk file + before writing it to the Volume (normally a tape). Thus the data is + written in large blocks to the Volume rather than small blocks. This + directive is particularly useful when running multiple simultaneous + backups to tape. It prevents interleaving of the job data and reduces + or eliminates tape drive stop and start commonly known as "shoe-shine". + +\item [SpoolSize={\it bytes}] + \index[dir]{SpoolSize} + \index[dir]{Directive!SpoolSize} + where the bytes specify the maximum spool size for this job. + The default is take from Device Maximum Spool Size limit. + This directive is available only in Bacula version 2.3.5 or + later. + +\item [WritePartAfterJob=yes\vb{}no] + \index[dir]{WritePartAfterJob} + \index[dir]{Directive!WritePartAfterJob} + tells Bacula to request the Storage daemon to write the current part + file to the device when the job is finished (see \ilink{Write Part After + Job directive in the Job resource}{WritePartAfterJob}). Please note, + this directive is implemented only in version 1.37 and later. The + default is yes. We strongly recommend that you keep this set to yes + otherwise, when the last job has finished one part will remain in the + spool file and restore may or may not work. + +\end{description} + +{\bf Date-time-specification} determines when the Job is to be run. The +specification is a repetition, and as a default Bacula is set to run a job at +the beginning of the hour of every hour of every day of every week of every +month of every year. This is not normally what you want, so you must specify +or limit when you want the job to run. Any specification given is assumed to +be repetitive in nature and will serve to override or limit the default +repetition. This is done by specifying masks or times for the hour, day of the +month, day of the week, week of the month, week of the year, and month when +you want the job to run. By specifying one or more of the above, you can +define a schedule to repeat at almost any frequency you want. + +Basically, you must supply a {\bf month}, {\bf day}, {\bf hour}, and {\bf +minute} the Job is to be run. Of these four items to be specified, {\bf day} +is special in that you may either specify a day of the month such as 1, 2, +... 31, or you may specify a day of the week such as Monday, Tuesday, ... +Sunday. Finally, you may also specify a week qualifier to restrict the +schedule to the first, second, third, fourth, or fifth week of the month. + +For example, if you specify only a day of the week, such as {\bf Tuesday} the +Job will be run every hour of every Tuesday of every Month. That is the {\bf +month} and {\bf hour} remain set to the defaults of every month and all +hours. + +Note, by default with no other specification, your job will run at the +beginning of every hour. If you wish your job to run more than once in any +given hour, you will need to specify multiple {\bf run} specifications each +with a different minute. + +The date/time to run the Job can be specified in the following way in +pseudo-BNF: + +\footnotesize +\begin{verbatim} + = on + = at + = 1st | 2nd | 3rd | 4th | 5th | first | + second | third | fourth | fifth + = sun | mon | tue | wed | thu | fri | sat | + sunday | monday | tuesday | wednesday | + thursday | friday | saturday + = w00 | w01 | ... w52 | w53 + = jan | feb | mar | apr | may | jun | jul | + aug | sep | oct | nov | dec | january | + february | ... | december + = daily + = weekly + = monthly + = hourly + = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 + = | +<12hour> = 0 | 1 | 2 | ... 12 + = 0 | 1 | 2 | ... 23 + = 0 | 1 | 2 | ... 59 + = 1 | 2 | ... 31 +