inkscape:cx="195.73943"
inkscape:cy="392.82587"
inkscape:document-units="px"
- inkscape:current-layer="g3104"
+ inkscape:current-layer="g4863"
showgrid="false"
- inkscape:window-width="1920"
- inkscape:window-height="1024"
- inkscape:window-x="1366"
- inkscape:window-y="27"
+ inkscape:window-width="1366"
+ inkscape:window-height="739"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
inkscape:window-maximized="1"
showguides="true"
inkscape:guide-bbox="true"
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
+ <dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
x="644.8819"
sodipodi:role="line"
style="font-size:40px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:expanded;text-align:end;line-height:125%;writing-mode:lr-tb;text-anchor:end;fill:#c10000;fill-opacity:1;font-family:Microgramma D;-inkscape-font-specification:Microgramma D Bold Expanded"
- id="tspan4869">Developers Guide</tspan></text>
+ id="tspan4869">Developer's Guide</tspan></text>
</g>
</svg>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ id="svg6421"
+ version="1.1"
+ inkscape:version="0.48.3.1 r9886"
+ width="385.04352"
+ height="387.53574"
+ sodipodi:docname="git-edit-commit.svg">
+ <metadata
+ id="metadata6427">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs6425">
+ <marker
+ inkscape:stockid="Arrow1Mend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Mend"
+ style="overflow:visible">
+ <path
+ id="path7248"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
+ transform="matrix(-0.4,0,0,-0.4,-4,0)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ </defs>
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1920"
+ inkscape:window-height="1024"
+ id="namedview6423"
+ showgrid="false"
+ inkscape:zoom="1.3779048"
+ inkscape:cx="108.83224"
+ inkscape:cy="242.12969"
+ inkscape:window-x="1366"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="layer2"
+ fit-margin-top="5"
+ fit-margin-left="5"
+ fit-margin-right="5"
+ fit-margin-bottom="5" />
+ <g
+ inkscape:groupmode="layer"
+ id="layer2"
+ inkscape:label="svg"
+ style="display:inline"
+ transform="translate(-16.30899,32.637543)">
+ <path
+ sodipodi:type="arc"
+ style="color:#000000;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path6431"
+ sodipodi:cx="26.291788"
+ sodipodi:cy="34.972706"
+ sodipodi:rx="21.559267"
+ sodipodi:ry="21.559267"
+ d="m 47.851055,34.972706 a 21.559267,21.559267 0 1 1 -43.1185339,0 21.559267,21.559267 0 1 1 43.1185339,0 z"
+ transform="translate(32.855884,-24.607104)" />
+ <text
+ xml:space="preserve"
+ style="font-size:12.48532295px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ x="20.515533"
+ y="47.937492"
+ id="text7207"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan7209"
+ x="20.515533"
+ y="47.937492"
+ style="font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Courier New;-inkscape-font-specification:Courier New">git pull</tspan></text>
+ <path
+ transform="translate(132.85589,-24.607104)"
+ d="m 47.851055,34.972706 a 21.559267,21.559267 0 1 1 -43.1185339,0 21.559267,21.559267 0 1 1 43.1185339,0 z"
+ sodipodi:ry="21.559267"
+ sodipodi:rx="21.559267"
+ sodipodi:cy="34.972706"
+ sodipodi:cx="26.291788"
+ id="path7703"
+ style="color:#000000;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ sodipodi:type="arc" />
+ <path
+ sodipodi:type="arc"
+ style="color:#000000;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path7705"
+ sodipodi:cx="26.291788"
+ sodipodi:cy="34.972706"
+ sodipodi:rx="21.559267"
+ sodipodi:ry="21.559267"
+ d="m 47.851055,34.972706 a 21.559267,21.559267 0 1 1 -43.1185339,0 21.559267,21.559267 0 1 1 43.1185339,0 z"
+ transform="translate(232.85589,-24.607104)" />
+ <path
+ sodipodi:type="arc"
+ style="color:#000000;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path7735"
+ sodipodi:cx="26.291788"
+ sodipodi:cy="34.972706"
+ sodipodi:rx="21.559267"
+ sodipodi:ry="21.559267"
+ d="m 47.851055,34.972706 a 21.559267,21.559267 0 1 1 -43.1185339,0 21.559267,21.559267 0 1 1 43.1185339,0 z"
+ transform="matrix(0.84667465,0.53211091,-0.53211091,0.84667465,155.49645,35.967551)" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#Arrow1Mend);display:inline"
+ d="M 76.829528,22.505434 137.60825,66.406298"
+ id="path7773"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cc" />
+ <text
+ xml:space="preserve"
+ style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ x="135.99142"
+ y="-17.76059"
+ id="text7788"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan7790"
+ x="135.99142"
+ y="-17.76059"
+ style="font-size:13px">Push <tspan
+ style="font-size:13px;font-weight:bold;-inkscape-font-specification:Sans Bold"
+ id="tspan7792">A</tspan></tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text7794"
+ y="-17.76059"
+ x="236.49289"
+ style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ xml:space="preserve"><tspan
+ style="font-size:13px"
+ y="-17.76059"
+ x="236.49289"
+ id="tspan7796"
+ sodipodi:role="line">Push <tspan
+ id="tspan7798"
+ style="font-size:13px;font-weight:bold;-inkscape-font-specification:Sans Bold">B</tspan></tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ x="240.44431"
+ y="49.78466"
+ id="text7800"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan7802"
+ x="240.44431"
+ y="49.78466"
+ style="font-size:13px">HEAD</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text7822"
+ y="114.23943"
+ x="124.94333"
+ style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ xml:space="preserve"><tspan
+ style="font-size:13px;font-style:italic;-inkscape-font-specification:Sans Italic"
+ y="114.23943"
+ x="124.94333"
+ id="tspan7824"
+ sodipodi:role="line">Your mods</tspan></text>
+ <path
+ style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#Arrow1Mend);display:inline"
+ d="m 81.232777,10.365602 52.566223,0"
+ id="path7233"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cc" />
+ <path
+ sodipodi:nodetypes="cc"
+ inkscape:connector-curvature="0"
+ id="path7679"
+ d="m 181.23278,10.365602 52.56622,0"
+ style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#Arrow1Mend);display:inline" />
+ <path
+ transform="translate(32.855885,150.24019)"
+ d="m 47.851055,34.972706 a 21.559267,21.559267 0 1 1 -43.1185339,0 21.559267,21.559267 0 1 1 43.1185339,0 z"
+ sodipodi:ry="21.559267"
+ sodipodi:rx="21.559267"
+ sodipodi:cy="34.972706"
+ sodipodi:cx="26.291788"
+ id="path7828"
+ style="color:#000000;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ sodipodi:type="arc" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text7830"
+ y="222.78479"
+ x="20.515533"
+ style="font-size:12.48532295px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ xml:space="preserve"><tspan
+ style="font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Courier New;-inkscape-font-specification:Courier New"
+ y="222.78479"
+ x="20.515533"
+ id="tspan7832"
+ sodipodi:role="line">git pull</tspan></text>
+ <path
+ sodipodi:type="arc"
+ style="color:#000000;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path7834"
+ sodipodi:cx="26.291788"
+ sodipodi:cy="34.972706"
+ sodipodi:rx="21.559267"
+ sodipodi:ry="21.559267"
+ d="m 47.851055,34.972706 a 21.559267,21.559267 0 1 1 -43.1185339,0 21.559267,21.559267 0 1 1 43.1185339,0 z"
+ transform="translate(232.85589,150.24019)" />
+ <path
+ transform="translate(332.85589,150.24019)"
+ d="m 47.851055,34.972706 a 21.559267,21.559267 0 1 1 -43.1185339,0 21.559267,21.559267 0 1 1 43.1185339,0 z"
+ sodipodi:ry="21.559267"
+ sodipodi:rx="21.559267"
+ sodipodi:cy="34.972706"
+ sodipodi:cx="26.291788"
+ id="path7836"
+ style="color:#000000;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ sodipodi:type="arc" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text7846"
+ y="159.08672"
+ x="235.99142"
+ style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ xml:space="preserve"><tspan
+ style="font-size:13px"
+ y="159.08672"
+ x="235.99142"
+ id="tspan7848"
+ sodipodi:role="line">Push <tspan
+ id="tspan7850"
+ style="font-size:13px;font-weight:bold;-inkscape-font-specification:Sans Bold">A</tspan></tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ x="336.49289"
+ y="159.08672"
+ id="text7852"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan7854"
+ x="336.49289"
+ y="159.08672"
+ style="font-size:13px">Push <tspan
+ style="font-size:13px;font-weight:bold;-inkscape-font-specification:Sans Bold"
+ id="tspan7856">B</tspan></tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text7858"
+ y="224.63196"
+ x="340.44431"
+ style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ xml:space="preserve"><tspan
+ style="font-size:13px"
+ y="224.63196"
+ x="340.44431"
+ id="tspan7860"
+ sodipodi:role="line">HEAD</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ x="125.6987"
+ y="224.73987"
+ id="text7862"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan7864"
+ x="125.6987"
+ y="224.73987"
+ style="font-size:13px;font-style:italic;-inkscape-font-specification:Sans Italic">Your mods</tspan></text>
+ <path
+ sodipodi:type="arc"
+ style="color:#000000;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path7866"
+ sodipodi:cx="26.291788"
+ sodipodi:cy="34.972706"
+ sodipodi:rx="21.559267"
+ sodipodi:ry="21.559267"
+ d="m 47.851055,34.972706 a 21.559267,21.559267 0 1 1 -43.1185339,0 21.559267,21.559267 0 1 1 43.1185339,0 z"
+ transform="translate(132.85589,150.24019)" />
+ <path
+ sodipodi:nodetypes="cc"
+ inkscape:connector-curvature="0"
+ id="path7870"
+ d="m 81.232778,185.2129 52.566222,0"
+ style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#Arrow1Mend);display:inline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#Arrow1Mend);display:inline"
+ d="m 181.23278,185.2129 52.56622,0"
+ id="path7872"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cc" />
+ <path
+ sodipodi:nodetypes="cc"
+ inkscape:connector-curvature="0"
+ id="path7874"
+ d="m 281.23278,185.2129 52.56622,0"
+ style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#Arrow1Mend);display:inline" />
+ <path
+ transform="matrix(0.03488943,0,0,0.03488943,161.29433,262.0068)"
+ d="m 47.851055,34.972706 a 21.559267,21.559267 0 1 1 -43.1185339,0 21.559267,21.559267 0 1 1 43.1185339,0 z"
+ sodipodi:ry="21.559267"
+ sodipodi:rx="21.559267"
+ sodipodi:cy="34.972706"
+ sodipodi:cx="26.291788"
+ id="path7842"
+ style="color:#000000;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ sodipodi:type="arc" />
+ <path
+ sodipodi:type="arc"
+ style="color:#000000;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path7900"
+ sodipodi:cx="26.291788"
+ sodipodi:cy="34.972706"
+ sodipodi:rx="21.559267"
+ sodipodi:ry="21.559267"
+ d="m 47.851055,34.972706 a 21.559267,21.559267 0 1 1 -43.1185339,0 21.559267,21.559267 0 1 1 43.1185339,0 z"
+ transform="translate(32.855885,261.05167)" />
+ <text
+ xml:space="preserve"
+ style="font-size:12.48532295px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ x="20.515533"
+ y="335.59625"
+ id="text7902"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan7904"
+ x="20.515533"
+ y="335.59625"
+ style="font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Courier New;-inkscape-font-specification:Courier New">git pull</tspan></text>
+ <path
+ transform="translate(232.85589,261.05167)"
+ d="m 47.851055,34.972706 a 21.559267,21.559267 0 1 1 -43.1185339,0 21.559267,21.559267 0 1 1 43.1185339,0 z"
+ sodipodi:ry="21.559267"
+ sodipodi:rx="21.559267"
+ sodipodi:cy="34.972706"
+ sodipodi:cx="26.291788"
+ id="path7906"
+ style="color:#000000;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ sodipodi:type="arc" />
+ <path
+ sodipodi:type="arc"
+ style="color:#000000;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="path7908"
+ sodipodi:cx="26.291788"
+ sodipodi:cy="34.972706"
+ sodipodi:rx="21.559267"
+ sodipodi:ry="21.559267"
+ d="m 47.851055,34.972706 a 21.559267,21.559267 0 1 1 -43.1185339,0 21.559267,21.559267 0 1 1 43.1185339,0 z"
+ transform="translate(332.85589,261.05167)" />
+ <text
+ xml:space="preserve"
+ style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ x="135.99142"
+ y="269.89819"
+ id="text7912"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan7914"
+ x="135.99142"
+ y="269.89819"
+ style="font-size:13px">Push <tspan
+ style="font-size:13px;font-weight:bold;-inkscape-font-specification:Sans Bold"
+ id="tspan7916">A</tspan></tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text7918"
+ y="269.89819"
+ x="236.49289"
+ style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ xml:space="preserve"><tspan
+ style="font-size:13px"
+ y="269.89819"
+ x="236.49289"
+ id="tspan7920"
+ sodipodi:role="line">Push <tspan
+ id="tspan7922"
+ style="font-size:13px;font-weight:bold;-inkscape-font-specification:Sans Bold">B</tspan></tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ x="359.55515"
+ y="349.89819"
+ id="text7924"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan7926"
+ x="359.55515"
+ y="349.89819"
+ style="font-size:13px">HEAD</tspan></text>
+ <text
+ sodipodi:linespacing="125%"
+ id="text7928"
+ y="335.89819"
+ x="328.76266"
+ style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ xml:space="preserve"><tspan
+ style="font-size:13px;font-style:italic;-inkscape-font-specification:Sans Italic"
+ y="335.89819"
+ x="328.76266"
+ id="tspan7930"
+ sodipodi:role="line">Your mods</tspan></text>
+ <path
+ transform="translate(132.85589,261.05167)"
+ d="m 47.851055,34.972706 a 21.559267,21.559267 0 1 1 -43.1185339,0 21.559267,21.559267 0 1 1 43.1185339,0 z"
+ sodipodi:ry="21.559267"
+ sodipodi:rx="21.559267"
+ sodipodi:cy="34.972706"
+ sodipodi:cx="26.291788"
+ id="path7932"
+ style="color:#000000;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ sodipodi:type="arc" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#Arrow1Mend);display:inline"
+ d="m 81.232778,296.02438 52.566222,0"
+ id="path7934"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cc" />
+ <path
+ sodipodi:nodetypes="cc"
+ inkscape:connector-curvature="0"
+ id="path7936"
+ d="m 181.23278,296.02438 52.56622,0"
+ style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#Arrow1Mend);display:inline" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#Arrow1Mend);display:inline"
+ d="m 281.23278,296.02438 52.56622,0"
+ id="path7938"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cc" />
+ </g>
+</svg>
first_rule: all
-all: pdflatex tex web mini-clean
+all: tex pdflatex mini-clean
.SUFFIXES: .tex .html
.PHONY:
@echo "Done."
commonfiles:
+ @../../update_version
+ @echo "Making version `cat version.tex`"
@echo -n "Linking shared files..."
@(for L in $(LICENCES); do ln -sf $$L .; done)
@echo "Done"
tex: epscovers epsimages commonfiles
- @../../update_version
- @echo "Making version `cat version.tex`"
- @rm -rf $(IMAGES)/pdf
- @rm -rf $(IMAGES)/png
-# @cp -fp ${IMAGES}/hires/*.eps .
@ln -sf $(TEXCOMPILERFILE) $(BSYSCOMPILERFILE)
@touch ${DOC}i-dir.tex ${DOC}i-fd.tex ${DOC}i-sd.tex \
${DOC}i-console.tex ${DOC}i-general.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
-
pdflatex: pdfcovers pdfimages commonfiles
@ln -sf $(PDFCOMPILERFILE) $(BSYSCOMPILERFILE)
pdflatex -interaction=batchmode ${DOC}.tex
pdflatex -interaction=batchmode ${DOC}.tex
pdflatex -interaction=batchmode ${DOC}.tex
-dvipdf:
- @echo "Making dvi to pdf"
- @cp -fp ${IMAGES}/hires/*.eps .
- dvipdf ${DOC}.dvi ${DOC}.pdf
-
html:
@echo " "
@echo "Making html"
fi)
@cp -f ${DOC}/${MAINDOC} ${DOC}/index.html
@echo "Done making web"
+
show:
xdvi ${DOC}
clean:
+ @find . -type l -name "*.tex" -exec rm {} \;
@rm -f 1 2 3 *.tex~
@rm -f *.png *.gif *.jpg *.eps
@rm -f *.pdf *.aux *.cp *.fn *.ky *.log *.pg
first_rule: all
-all: tex web pdf mini-clean
+all: tex pdflatex mini-clean
.SUFFIXES: .tex .html
.PHONY:
@echo "Done."
commonfiles:
+ @../../update_version
+ @echo -n "Making version `cat version.tex`"
@echo -n "Linking shared files..."
@(for L in $(LICENCES); do ln -sf $$L .; done)
@echo "Done"
tex: epscovers epsimages commonfiles
- @../../update_version
@ln -sf $(TEXCOMPILERFILE) $(BSYSCOMPILERFILE)
-# @cp -fp ${IMAGES}/hires/*.eps .
touch ${DOC}.idx ${DOC}i-general.tex
-latex -interaction=batchmode ${DOC}.tex
makeindex ${DOC}.idx >/dev/null 2>/dev/null
@rm -f ${DOC}/WARNINGS
clean:
+ @find . -type l -name "*.tex" -exec rm {} \;
@rm -f 1 2 3
@rm -f *.png *.gif *.jpg *.eps
@rm -f *.pdf *.aux *.cp *.fn *.ky *.log *.pg
WEBCOMPILERFILE=$(MANUALSDIR)/bsys-web-mode.tex
first_rule: all
-all: tex web dvipdf mini-clean
+all: tex pdflatex mini-clean
.SUFFIXES: .tex .html
.PHONY:
@echo "Done."
commonfiles:
+ @../../update_version
+ @echo "Making version `cat version.tex`"
@echo -n "Linking shared files..."
@(for L in $(LICENCES); do ln -sf $$L .; done)
@echo "Done"
tex: epscovers epsimages
- @../../update_version
- @echo "Making version `cat version.tex`"
-# @cp -fp ${IMAGES}/hires/*.eps .
@ln -sf $(TEXCOMPILERFILE) $(BSYSCOMPILERFILE)
@touch ${DOC}i-dir.tex ${DOC}i-fd.tex ${DOC}i-sd.tex \
${DOC}i-console.tex ${DOC}i-general.tex
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
-
pdflatex: pdfcovers pdfimages commonfiles
@ln -sf $(PDFCOMPILERFILE) $(BSYSCOMPILERFILE)
pdflatex -interaction=batchmode ${DOC}.tex
pdflatex -interaction=batchmode ${DOC}.tex
pdflatex -interaction=batchmode ${DOC}.tex
-dvipdf:
- @echo "Making dvi to pdf"
- @cp -fp ${IMAGES}/hires/*.eps .
- dvipdf ${DOC}.dvi ${DOC}.pdf
-
html:
@echo " "
@echo "Making html"
clean:
+ @find . -type l -name "*.tex" -exec rm {} \;
@rm -f 1 2 3 *.tex~
@rm -f *.png *.gif *.jpg *.eps
@rm -f *.pdf *.aux *.cp *.fn *.ky *.log *.pg
IMAGES=../../../images
+MANUALSDIR=../..
DOC=misc
MAINDOC=Bacula_Miscellaneous_Guide.html
+BSYSMANUALDIR=../../../bsysmanual
+COVERSDIR=../../../covers
+PDFCOVERSDIR=$(COVERSDIR)/pdf
+SVGCOVERSDIR=$(COVERSDIR)/svg
+EPSCOVERSDIR=$(COVERSDIR)/eps
+LICENSESDIR=$(MANUALSDIR)/licences
+COVERNAME=coverpage-misc
+BSYSMANNAME=bsysmanual-coverpagebackground
+LICENCES=$(wildcard $(LICENSESDIR)/*.tex)
+BSYSCOMPILERFILE=bsys-compiler-mode.tex
+PDFCOMPILERFILE=$(MANUALSDIR)/bsys-pdflatex-mode.tex
+TEXCOMPILERFILE=$(MANUALSDIR)/bsys-latex-mode.tex
+WEBCOMPILERFILE=$(MANUALSDIR)/bsys-web-mode.tex
+
first_rule: all
-all: tex web dvipdf mini-clean
+all: tex pdflatex mini-clean
.SUFFIXES: .tex .html
.PHONY:
.DONTCARE:
-tex:
+pdfcovers:
+ @echo -n "Linking coverpage and background PDF format..."
+ @(cd $(SVGCOVERSDIR) ; make pdf)
+ @ln -sf `pwd`/${PDFCOVERSDIR}/${COVERNAME}.pdf `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.pdf
+ @echo "Done."
+
+pdfimages:
+ @echo "Generating PDF images..."
+ @(cd ${IMAGES}/svg ; make pdf)
+ @echo "Done."
+
+pngimages:
+ @echo "Generating PNG images..."
+ @(cd ${IMAGES}/svg ; make png)
+ @echo "Done."
+
+epsimages:
+ @echo "Generating EPS images..."
+ @(cd ${IMAGES}/svg ; make eps)
+ @rm -rf ${IMAGES}/png
+ @rm -rf ${IMAGES}/pdf
+ @echo "Done."
+
+epscovers:
+ @echo -n "Linking coverpage and background EPS format..."
+ @(cd $(SVGCOVERSDIR) ; make eps)
+ @ln -sf `pwd`/${EPSCOVERSDIR}/${COVERNAME}.eps `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.eps
+ @rm -f `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.pdf
+ @echo "Done."
+
+commonfiles:
@../../update_version
- @echo "Making version `cat version.tex`"
- @cp -fp ${IMAGES}/hires/*.eps .
+ @echo -n "Making version `cat version.tex`"
+ @echo -n "Linking shared files..."
+ @(for L in $(LICENCES); do ln -sf $$L .; done)
+ @echo "Done"
+
+tex: epscovers epsimages commonfiles
+ @ln -sf $(TEXCOMPILERFILE) $(BSYSCOMPILERFILE)
@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
+pdflatex: pdfcovers pdfimages commonfiles
+ @ln -sf $(PDFCOMPILERFILE) $(BSYSCOMPILERFILE)
+ pdflatex -interaction=batchmode ${DOC}.tex
+ makeindex ${DOC}.idx -o ${DOC}.ind 2>/dev/null
+ pdflatex -interaction=batchmode ${DOC}.tex
+ pdflatex -interaction=batchmode ${DOC}.tex
html:
@echo " "
clean:
+ @find . -type l -name "*.tex" -exec rm {} \;
@rm -f 1 2 3 *.tex~
@rm -f *.png *.gif *.jpg *.eps
@rm -f *.pdf *.aux *.cp *.fn *.ky *.log *.pg
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
+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
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
+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.
use to control the DVD writing.
\label{DVDdirectives}
-\section{DVD Specific SD Directives}
+\section{DVD Specific SD Directives}
\index[general]{Directives!DVD}
\index[general]{DVD Specific SD Directives }
\item [Mount Point = {\it directory}]
\index[general]{Mount Point}
- Directory where the device can be mounted.
+ Directory where the device can be mounted.
\item [Mount Command = {\it name-string}]
\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
- executed, \%a is replaced with the Archive Device, and \%m with the Mount
+ 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:
+ Most frequently, you will define it as follows:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
Mount Command = "/bin/mount -t iso9660 -o ro %a %m"
-\end{verbatim}
+\end{lstlisting}
\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}
+\begin{lstlisting}
Mount Command = "/bin/mount /media/dvd"
-\end{verbatim}
+\end{lstlisting}
\normalsize
executed, \%a is replaced with the Archive Device, and \%m with the Mount
Point.
- Most frequently, you will define it as follows:
+ Most frequently, you will define it as follows:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
Unmount Command = "/bin/umount %m"
-\end{verbatim}
+\end{lstlisting}
\normalsize
\item [Write Part Command = {\it name-string}]
\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
+ 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:
+ dvd-handler} script as follows:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
Write Part Command = "/path/dvd-handler %a write %e %v"
-\end{verbatim}
+\end{lstlisting}
\normalsize
Where {\bf /path} is the path to your scripts install directory, and
- dvd-handler is the Bacula supplied script file.
+ 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[general]{Free Space Command }
- Command that must be executed to check how much free space is left on the
+ 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:
+ dvd-handler} script as follows:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
Free Space Command = "/path/dvd-handler %a free"
-\end{verbatim}
+\end{lstlisting}
\normalsize
Where {\bf /path} is the path to your scripts install directory, and
the comment (\#) symbol.
If you do not set it, Bacula will expect there is always free space on the
- device.
+ 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
+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}.
this function, you may have failures. Under {\bf bash}, you can
set this with the following command:
-\footnotesize
-\begin{verbatim}
+\footnotesize
+\begin{lstlisting}
ulimit -l unlimited
-\end{verbatim}
+\end{lstlisting}
\normalsize
-\section{Edit Codes for DVD Directives}
+\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
+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}
+\begin{lstlisting}
%% = %
%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}
+\end{lstlisting}
\normalsize
-\section{DVD Specific Director Directives}
+\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{}]
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.
+ 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
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
+\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.
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).
+ DVD-writer and Lstlisting DVD-RW).
To retrieve the current mode of a DVD-RW, run:
-\begin{verbatim}
+\begin{lstlisting}
dvd+rw-mediainfo /dev/xxx
-\end{verbatim}
+\end{lstlisting}
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}
+\begin{lstlisting}
dvd+rw-format /dev/xxx
-\end{verbatim}
+\end{lstlisting}
If you want to set it back to the default {\bf Incremental Sequential} mode, run:
-\begin{verbatim}
+\begin{lstlisting}
dvd+rw-format -blank /dev/xxx
-\end{verbatim}
+\end{lstlisting}
\item Bacula only accepts to write to blank DVDs. To quickly blank a DVD+/-RW, run
this command:
-\begin{verbatim}
+\begin{lstlisting}
dd if=/dev/zero bs=1024 count=512 | growisofs -Z /dev/xxx=/dev/fd/0
-\end{verbatim}
+\end{lstlisting}
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}
+\begin{lstlisting}
growisofs -Z /dev/xxx=/dev/zero
-\end{verbatim}
+\end{lstlisting}
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}
+\begin{lstlisting}
growisofs -Z /dev/xxx filename
-\end{verbatim}
+\end{lstlisting}
To add additional files (more parts use):
-\begin{verbatim}
+\begin{lstlisting}
growisofs -M /dev/xxx filename
-\end{verbatim}
+\end{lstlisting}
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.
-%%
-%%
-
\chapter{The internal database is not supported, please do not
use it.}
\label{InternalDbChapter}
\index[general]{The internal database is not supported, please do not
use it. }
-\section{Internal Bacula Database}
+\section{Internal Bacula Database}\label{chap:InternalBaculaDatabase}
\index[general]{Internal Bacula Database }
\index[general]{Database!Internal Bacula }
Previously it was intended to be used primarily by Bacula developers for
testing; although SQLite is also a good choice for this. We do not recommend
-its use in general.
+its use in general.
This database is simplistic in that it consists entirely of Bacula's internal
structures appended sequentially to a file. Consequently, it is in most cases
inappropriate for sites with many clients or systems with large numbers of
-files, or long-term production environments.
+files, or long-term production environments.
Below, you will find a table comparing the features available with SQLite and
MySQL and with the internal Bacula database. At the current time, you cannot
dynamically switch from one to the other, but must rebuild the Bacula source
code. If you wish to experiment with both, it is possible to build both
-versions of Bacula and install them into separate directories.
-
-\addcontentsline{lot}{table}{SQLite vs MySQL Database Comparison}
-\begin{longtable}{|l|l|l|}
- \hline
-\multicolumn{1}{|c| }{\bf Feature } & \multicolumn{1}{c| }{\bf SQLite or MySQL
- } & \multicolumn{1}{c| }{\bf Bacula } \\
- \hline
-{Job Record } & {Yes } & {Yes } \\
- \hline
-{Media Record } & {Yes } & {Yes } \\
- \hline
-{FileName Record } & {Yes } & {No } \\
- \hline
-{File Record } & {Yes } & {No } \\
- \hline
-{FileSet Record } & {Yes } & {Yes } \\
- \hline
-{Pool Record } & {Yes } & {Yes } \\
- \hline
-{Client Record } & {Yes } & {Yes } \\
- \hline
-{JobMedia Record } & {Yes } & {Yes } \\
- \hline
-{List Job Records } & {Yes } & {Yes } \\
- \hline
-{List Media Records } & {Yes } & {Yes } \\
- \hline
-{List Pool Records } & {Yes } & {Yes } \\
- \hline
-{List JobMedia Records } & {Yes } & {Yes } \\
- \hline
-{Delete Pool Record } & {Yes } & {Yes } \\
- \hline
-{Delete Media Record } & {Yes } & {Yes } \\
- \hline
-{Update Pool Record } & {Yes } & {Yes } \\
- \hline
-{Implement Verify } & {Yes } & {No } \\
- \hline
-{MD5 Signatures } & {Yes } & {No }
-\\ \hline
+versions of Bacula and install them into separate directories.
-\end{longtable}
+%\addcontentsline{lot}{table}{SQLite vs MySQL Database Comparison}
+\LTXtable{0.95\linewidth}{table_sqlitevsmysql}
In addition, since there is no SQL available, the Console commands: {\bf
sqlquery}, {\bf query}, {\bf retention}, and any other command that directly
-uses SQL are not available with the Internal database.
+uses SQL are not available with the Internal database.
--- /dev/null
+delim_0
+", \\dotfill{}"
+delim_1
+", \\dotfill{}"
+delim_2
+", \\dotfill{}"
%%
%% # $ % & ~ _ ^ \ { }
%%
+\documentclass[10pt,bsyspaper,english,logo,titlepage]{bsysmanual}
-\documentclass[10pt,a4paper]{book}
+\renewcommand{\familydefault}{\sfdefault}
+\usepackage[utf8]{inputenc}
+\usepackage[toc,title,header,page]{appendix}
+\usepackage[T1]{fontenc}
+\usepackage{longtable,graphicx,fancyhdr,lastpage,eurosym,dcolumn,ltxtable}
+\usepackage{textcomp,varioref,lscape,pdfpages,ifthen,setspace,colortbl,diagbox}
+\usepackage{lmodern,minitoc}
+\usepackage{MnSymbol}
+\usepackage{bbding,multirow}
+\usepackage[hyphens]{url}
+\usepackage[plainpages=true,bookmarks=false,bookmarksopen=false,filecolor=black,linkcolor=black,urlcolor=bsysredtwo,filebordercolor={0. 0. 0.},menubordercolor={0. 0. 0.},urlbordercolor={0. 0. 0.},linkbordercolor={0. 0. 0.},hyperindex=false,colorlinks=true]{hyperref}
+\usepackage{babel,xr,xr-hyper}
+\usepackage[font={sf,bf},textfont=md]{caption}
+\usepackage[printonlyused]{acronym}
+\setlength\arrayrulewidth{0.4pt}
+\include{bsyscommondefs}
+\usepackage[left=4cm,right=3cm,bottom=2cm,top=2.5cm]{geometry}
+\usepackage{moreverb,fancyvrb}
+\usepackage{listings}
+\input{external-references}
+\pdfminorversion=4
-\topmargin -0.5in
-\oddsidemargin 0.0in
-\evensidemargin 0.0in
-\textheight 10in
-\textwidth 6.5in
-
-
-\usepackage{html}
\usepackage{float}
\usepackage{graphicx}
\usepackage{bacula}
\usepackage{makeidx}
\usepackage{index}
\usepackage{setspace}
-\usepackage{hyperref}
-% \usepackage[linkcolor=black,colorlinks=true]{hyperref}
\usepackage{url}
+
\makeindex
\newindex{general}{idx}{ind}{General Index}
\sloppy
+\def\bsystitle{Bacula Miscellaneous Guide}
\begin{document}
\sloppy
-
+\lstset{escapechar=,breaklines=true,basicstyle=\ttfamily\scriptsize,backgroundcolor=\color{lightbsysgrey}}
\include{coverpage}
-
-\clearpage
-\pagenumbering{roman}
+\frontmatter
\tableofcontents
-\clearpage
+\listoftables
+%\listoffigures
-\pagestyle{myheadings}
-\markboth{Bacula Version \version}{Bacula Version \version}
-\pagenumbering{arabic}
+\mainmatter
\include{python}
\include{vars}
\include{stunnel}
\include{dvd}
\include{projects}
\include{internaldb}
+\begin{appendices}
+\begin{small}
\include{license}
\include{fdl}
\include{gpl}
\include{lesser}
-
+\end{small}
+\end{appendices}
% pull in the index
-\clearpage
\printindex[general]
\end{document}
-%%
-%%
-
\chapter{Python Scripting}
\label{PythonChapter}
\index[general]{Python Scripting}
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
+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
+a scripting language such as Python, you can generate any name
you want, based on the current state of Bacula.
\section{Python Configuration}
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
+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
installation with Python enabled, Bacula will print the following error
message:
-\begin{verbatim}
+\begin{lstlisting}
09-Jun 15:14 bacula-dir: ERROR in pythonlib.c:131 Could not import
Python script /etc/bacula/scripts/DirStartUp. Python disabled.
-\end{verbatim}
+\end{lstlisting}
The source code directory {\bf examples/python} contains sample scripts
for DirStartUp.py, SDStartUp.py, and FDStartUp.py that you might want
\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
+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
+or set new values in the Job attributes, such as the
Priority. You will see below how the events are used.
\section{Python Objects}
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.
+ 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
+ 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
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
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
+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.
\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.
+ and the Bacula Job object as the second argument.
\item [Exit]
This Python method, if defined, will be called when the Director terminates.
A simple definition of the Bacula Events Class might be the following:
-\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
import sys, bacula
class BaculaEvents:
def JobStart(self, job):
...
-\end{verbatim}
-\normalsize
+\end{lstlisting}
Then to instantiate the class and pass it to Bacula, you
would do:
-\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
bacula.set_events(BaculaEvents()) # register Bacula Events wanted
-\end{verbatim}
-\normalsize
+\end{lstlisting}
And at that point, each time a Job is started, your BaculaEvents JobStart
method will be called.
A simple Job Events class might look like the following:
-\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
class JobEvents:
def NewVolume(self, job):
...
-\end{verbatim}
-\normalsize
+\end{lstlisting}
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
+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
+be done in the Bacula JobStart event (your method). So, you would modify
Bacula Events (not the Job events) as follows:
-\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
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
+\end{lstlisting}
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.
+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
\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
+ 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
+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
+\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}
\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
+ 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.
There is a new Console command named {\bf python}. It takes
a single argument {\bf restart}. Example:
-\begin{verbatim}
+\begin{lstlisting}
python restart
-\end{verbatim}
+\end{lstlisting}
This command restarts the Python interpreter in the Director.
This can be useful when you are modifying the DirStartUp script,
\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
+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
+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
+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
+If you are getting error messages such as the following when
loading DirStartUp.py:
-\begin{verbatim}
+\begin{lstlisting}
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}
-
+\end{lstlisting}
+
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
+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}
An example script for the Director startup file is provided in
{\bf examples/python/DirStartup.py} as follows:
-\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
#
# Bacula Python interface script for the Director
#
class BaculaEvents(object):
def __init__(self):
# Called here when a new Bacula Events class is
- # is created. Normally not used
+ # is created. Normally not used
noop = 1
def JobStart(self, job):
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)
+ 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):
+ def JobEnd(self, job):
jobid = job.JobId
- client = job.Client
- job.JobReport="Python Dir JobEnd output: JobId=%d Client=%s.\n" % (jobid, client)
+ 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
"""
# 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.
-\end{verbatim}
-\normalsize
+\end{lstlisting}
-%%
-%%
-
\chapter{Using Stunnel to Encrypt Communications}
\label{StunnelChapter}
\index[general]{Using Stunnel to Encrypt Communications to Clients }
Prior to version 1.37, Bacula did not have built-in communications encryption.
-Please see the \ilink {TLS chapter}{CommEncryption} if you are using Bacula
+Please see the \ilink{TLS chapter}{CommEncryption} if you are using Bacula
1.37 or greater.
Without too much effort, it is possible to encrypt the communications
called {\bf client}. Although the details may be slightly different, the same
principles apply whether you are encrypting between Unix, Linux, or Win32
machines. This example was developed between two Linux machines running
-stunnel version 4.04-4 on a Red Hat Enterprise 3.0 system.
+stunnel version 4.04-4 on a Red Hat Enterprise 3.0 system.
\section{Communications Ports Used}
\index[general]{Used!Communications Ports }
The encryption is accomplished between the Director and the File daemon by
using an stunnel on the Director's machine (server) to encrypt the data and to
contact an stunnel on the File daemon's machine (client), which decrypts the
-data and passes it to the client.
+data and passes it to the client.
Between the File daemon and the Storage daemon, we use an stunnel on the File
daemon's machine to encrypt the data and another stunnel on the Storage
-daemon's machine to decrypt the data.
+daemon's machine to decrypt the data.
As a consequence, there are actually four copies of stunnel running, two on the
server and two on the client. This may sound a bit complicated, but it really
isn't. To accomplish this, we will need to construct four separate conf files
for stunnel, and we will need to make some minor modifications to the
-Director's conf file. None of the other conf files need to be changed.
+Director's conf file. None of the other conf files need to be changed.
\section{A Picture}
\index[general]{Picture }
Since pictures usually help a lot, here is an overview of what we will be
doing. Don't worry about all the details of the port numbers and such for the
-moment.
+moment.
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
File daemon (client):
stunnel-fd1.conf
|===========|
|===========|
Port 29103 >----| Stunnel 4 |-----> 9103
|===========|
-\end{verbatim}
+\end{lstlisting}
\normalsize
\section{Certificates}
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.
+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).
+(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.
+middle attack and hence loss of your data.
-See below for how to create a self-signed certificate.
+See below for how to create a self-signed certificate.
\section{Securing the Data Channel}
\index[general]{Channel!Securing the Data }
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.
+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
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.
+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:
+following:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
Storage {
Name = File
Address = server
Device = File
Media Type = File
}
-\end{verbatim}
+\end{lstlisting}
\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:
+modify this to be:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
Storage {
Name = File
Address = localhost
Device = File
Media Type = File
}
-\end{verbatim}
+\end{lstlisting}
\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.
+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:
+client. A pretty much minimal config file would look like the following:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
client = yes
[29103]
accept = localhost:9103
connect = server:29103
-\end{verbatim}
+\end{lstlisting}
\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:
+actually used, stunnel-fd2.conf, looked like this:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
#
# Stunnel conf for Bacula client -> SD
#
[29103]
accept = localhost:9103
connect = server:29103
-\end{verbatim}
+\end{lstlisting}
\normalsize
You will notice that I specified a pid file location because I ran stunnel
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.
+command window.
If you do not have a signed certificate (stunnel.pem), you need to delete the
-cert, CAfile, and verify lines.
+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.
+them in one file is more convenient.
The config file, stunnel-sd.conf, needed for Stunnel 4 on the server machine
-is:
+is:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
#
# Bacula stunnel conf for Storage daemon
#
[29103]
accept = 29103
connect = 9103
-\end{verbatim}
+\end{lstlisting}
\normalsize
\section{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:
+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:
+ 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}
+\begin{lstlisting}
stunnel stunnel-sd.conf
-
-\end{verbatim}
+
+\end{lstlisting}
\normalsize
-\item Start stunnel on the client with:
+\item Start stunnel on the client with:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
stunnel stunnel-fd2.conf
-
-\end{verbatim}
+
+\end{lstlisting}
\normalsize
-\item Run a job.
+\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.
+ the stunnels, rerun the job, repeat until it works.
\end{itemize}
\section{Encrypting the Control Channel}
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.
+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:
+something like:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
Client {
Name = client-fd
Address = client
Catalog = BackupDB
Password = "xxx"
}
-\end{verbatim}
+\end{lstlisting}
\normalsize
-to be:
+to be:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
Client {
Name = client-fd
Address = localhost
Catalog = BackupDB
Password = "xxx"
}
-\end{verbatim}
+\end{lstlisting}
\normalsize
This will cause the Director to send the control information to
-localhost:29102 instead of directly to the client.
+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:
+look like the following:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
#
# Bacula stunnel conf for the Directory to contact a client
#
[29102]
accept = localhost:29102
connect = client:29102
-\end{verbatim}
+\end{lstlisting}
\normalsize
and the config file, stunnel-fd1.conf, needed to run stunnel on the Client
-would be:
+would be:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
#
# Bacula stunnel conf for the Directory to contact a client
#
[29102]
accept = localhost:29102
connect = client:29102
-\end{verbatim}
+\end{lstlisting}
\normalsize
\section{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:
+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:
+\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}
+\begin{lstlisting}
stunnel stunnel-dir.conf
-
-\end{verbatim}
+
+\end{lstlisting}
\normalsize
-\item Start stunnel on the client with:
+\item Start stunnel on the client with:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
stunnel stunnel-fd1.conf
-
-\end{verbatim}
+
+\end{lstlisting}
\normalsize
-\item Run a job.
+\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.
+ the stunnels, rerun the job, repeat until it works.
\end{itemize}
\section{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.
+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:
+unique. We previously used:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
Client {
Name = client-fd
Address = localhost
Catalog = BackupDB
Password = "xxx"
}
-\end{verbatim}
+\end{lstlisting}
\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:
+Client resource would look like:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
Client {
Name = client2-fd
Address = localhost
Catalog = BackupDB
Password = "yyy"
}
-\end{verbatim}
+\end{lstlisting}
\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:
+we can just add the new port to the config file, stunnel-dir.conf, to make:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
#
# Bacula stunnel conf for the Directory to contact a client
#
[29104]
accept = localhost:29102
connect = client2:29102
-\end{verbatim}
+\end{lstlisting}
\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.
+that this new client can talk to our Storage daemon.
\section{Creating a Self-signed Certificate}
\index[general]{Creating a Self-signed Certificate }
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}:
+following, which I put in a file named {\bf makepem}:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
#!/bin/sh
#
# Simple shell script to make a .pem file that can be used
echo "" >>stunnel.pem
cat $PEM2 >>stunnel.pem
rm $PEM1 $PEM2
-\end{verbatim}
+\end{lstlisting}
\normalsize
The above script will ask you a number of questions. You may simply answer
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.
+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:
+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.
+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.
+was contributed by Stephan Holl.
--- /dev/null
+\begin{longtable}{|X|c|c|}
+ \hline
+ \multicolumn{1}{|c|}{\bf Feature}
+ & \multicolumn{1}{c|}{\bf SQLite or MySQL}
+ & \multicolumn{1}{c| }{\bf Bacula} \\
+ \endfirsthead
+ \hline
+ \multicolumn{1}{|c|}{\bf Feature}
+ & \multicolumn{1}{c|}{\bf SQLite or MySQL}
+ & \multicolumn{1}{c| }{\bf Bacula} \\
+ \endhead
+ \multicolumn{3}{c}{Cont. on next page} \\
+ \endfoot
+ \caption{SQLite versus MySQL database comparison} \\
+ \endlastfoot
+ \hline
+ Job Record & Yes & Yes \\
+ \hline
+ Media Record & Yes & Yes \\
+ \hline
+ FileName Record & Yes & No \\
+ \hline
+ File Record & Yes & No \\
+ \hline
+ FileSet Record & Yes & Yes \\
+ \hline
+ Pool Record & Yes & Yes \\
+ \hline
+ Client Record & Yes & Yes \\
+ \hline
+ JobMedia Record & Yes & Yes \\
+ \hline
+ List Job Records & Yes & Yes \\
+ \hline
+ List Media Records & Yes & Yes \\
+ \hline
+ List Pool Records & Yes & Yes \\
+ \hline
+ List JobMedia Records & Yes & Yes \\
+ \hline
+ Delete Pool Record & Yes & Yes \\
+ \hline
+ Delete Media Record & Yes & Yes \\
+ \hline
+ Update Pool Record & Yes & Yes \\
+ \hline
+ Implement Verify & Yes & No \\
+ \hline
+ MD5 Signatures & Yes & No \\
+ \hline
+\end{longtable}
-%%
-%%
-
\chapter{Variable Expansion}
\label{VarsChapter}
\index[general]{Variable Expansion }
% TODO: does the following mean that this should not be in book?
-Please note that as of version 1.37, the Variable Expansion
+Please note that as of version 1.37, the Variable Expansion
is deprecated and replaced by Python scripting (not yet
documented).
Variable expansion is somewhat similar to Unix shell variable expansion.
Currently (version 1.31), it is used only in format labels, but in the future,
-it will most likely be used in more places.
+it will most likely be used in more places.
\section{General Functionality}
\index[general]{Functionality!General }
conversion, substring selection, regular expression matching and replacement,
character class replacement, padding strings, repeated expansion in a user
controlled loop, support of arithmetic expressions in the loop start, step and
-end conditions, and recursive expansion.
+end conditions, and recursive expansion.
When using variable expansion characters in a Volume Label Format record, the
-format should always be enclosed in double quotes ({\bf "}).
+format should always be enclosed in double quotes ({\bf "}).
For example, {\bf \$\{HOME\}} will be replaced by your home directory as
defined in the environment. If you have defined the variable {\bf xxx} to be
{\bf Test}, then the reference {\bf \$\{xxx:p/7/Y/r\}} will right pad the
contents of {\bf xxx} to a length of seven characters filling with the
-character {\bf Y} giving {\bf YYYTest}.
+character {\bf Y} giving {\bf YYYTest}.
\section{Bacula Variables}
\index[general]{Bacula Variables }
\index[general]{Variables!Bacula }
Within Bacula, there are three main classes of variables with some minor
-variations within the classes. The classes are:
+variations within the classes. The classes are:
\begin{description}
\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
+duration of Bacula's execution, or it can be a variable that is stored in
the catalog, and thus retains its value from one Bacula execution to another.
Counter variables may be incremented by postfixing a plus sign ({\bf +} after
-the variable name).
+the variable name).
\item [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:
+following variables are available:
\begin{itemize}
-\item [Year] -- the full year
-\item [Month] -- the current month 1-12
-\item [Day] -- the day of the month 1-31
-\item [Hour] -- the hour 0-24
-\item [Minute] -- the current minute 0-59
-\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 [general] -- the Director's name
-\item [Level] -- the Job Level
-\item [Type] -- the Job type
-\item [JobId] -- the JobId
-\item [JobName] -- the unique job name composed of Job and date
-\item [Storage] -- the Storage daemon's name
-\item [Client] -- the Client's name
-\item [NumVols] -- the current number of Volumes in the Pool
-\item [Pool] -- the Pool name
-\item [Catalog] -- the Catalog name
-\item [MediaType] -- the Media Type
+\item [Year] -- the full year
+\item [Month] -- the current month 1-12
+\item [Day] -- the day of the month 1-31
+\item [Hour] -- the hour 0-24
+\item [Minute] -- the current minute 0-59
+\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 [general] -- the Director's name
+\item [Level] -- the Job Level
+\item [Type] -- the Job type
+\item [JobId] -- the JobId
+\item [JobName] -- the unique job name composed of Job and date
+\item [Storage] -- the Storage daemon's name
+\item [Client] -- the Client's name
+\item [NumVols] -- the current number of Volumes in the Pool
+\item [Pool] -- the Pool name
+\item [Catalog] -- the Catalog name
+\item [MediaType] -- the Media Type
\end{itemize}
\item [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
-variable name (e.g. {\bf \$\{Months[3]\}}). Environment variable arrays are
+variable name (e.g. {\bf \$\{Months[3]\}}). Environment variable arrays are
defined by separating the elements with a vertical bar ({\bf |}), thus {\bf
set Months="Jan|Feb|Mar|Apr|..."} defines an environment variable named
{\bf Month} that will be treated as an array, and the reference {\bf
-\$\{Months[3]\}} will yield {\bf Mar}. The elements of the array can have
-differing lengths.
+\$\{Months[3]\}} will yield {\bf Mar}. The elements of the array can have
+differing lengths.
\end{description}
\section{Full Syntax}
\index[general]{Full Syntax }
Since the syntax is quite extensive, below, you will find the pseudo BNF. The
-special characters have the following meaning:
+special characters have the following meaning:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
::= definition
( ) grouping if the parens are not quoted
| separates alternatives
* preceding item can be repeated zero or more times
? preceding item can appear zero or one time
+ preceding item must appear one or more times
-\end{verbatim}
+\end{lstlisting}
\normalsize
-And the pseudo BNF describing the syntax is:
+And the pseudo BNF describing the syntax is:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
input ::= ( TEXT
| variable
| INDEX_OPEN input INDEX_CLOSE (loop_limits)?
INDEX_CLOSE ::= ']'
INDEX_MARK ::= '#'
NAME_CHARS ::= 'a'|...|'z'|'A'|...|'Z'|'0'|...|'9'
-\end{verbatim}
+\end{lstlisting}
\normalsize
\section{Semantics}
\index[general]{Semantics }
The items listed in {\bf command} above, which always follow a colon ({\bf :})
-have the following meanings:
+have the following meanings:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
- perform substitution if variable is empty
+ perform substitution if variable is not empty
o cut out substring of the variable value
% special function call (none implemented)
l lower case the variable value
u upper case the variable value
-\end{verbatim}
+\end{lstlisting}
\normalsize
-The {\bf loop\_limits} are start, step, and end values.
+The {\bf loop\_limits} are start, step, and end values.
A counter variable name followed immediately by a plus ({\bf +}) will cause
-the counter to be incremented by one.
+the counter to be incremented by one.
\section{Examples}
\index[general]{Examples }
-To create an ISO date:
+To create an ISO date:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
DLT-${Year}-${Month:p/2/0/r}-${Day:p/2/0/r}
-\end{verbatim}
+\end{lstlisting}
\normalsize
-on 20 June 2003 would give {\bf DLT-2003-06-20}
+on 20 June 2003 would give {\bf DLT-2003-06-20}
-If you set the environment variable {\bf mon} to
+If you set the environment variable {\bf mon} to
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
January|February|March|April|May|...
File-${mon[${Month}]}/${Day}/${Year}
-\end{verbatim}
+\end{lstlisting}
\normalsize
-on the first of March would give {\bf File-March/1/2003 }
+on the first of March would give {\bf File-March/1/2003 }
IMAGES=../../../images
+MANUALSDIR=../..
DOC=problems
MAINDOC=Bacula_Problem_Resolution_G.html
+BSYSMANUALDIR=../../../bsysmanual
+COVERSDIR=../../../covers
+PDFCOVERSDIR=$(COVERSDIR)/pdf
+SVGCOVERSDIR=$(COVERSDIR)/svg
+EPSCOVERSDIR=$(COVERSDIR)/eps
+LICENSESDIR=$(MANUALSDIR)/licences
+COVERNAME=coverpage-problems
+BSYSMANNAME=bsysmanual-coverpagebackground
+LICENCES=$(wildcard $(LICENSESDIR)/*.tex)
+BSYSCOMPILERFILE=bsys-compiler-mode.tex
+PDFCOMPILERFILE=$(MANUALSDIR)/bsys-pdflatex-mode.tex
+TEXCOMPILERFILE=$(MANUALSDIR)/bsys-latex-mode.tex
+WEBCOMPILERFILE=$(MANUALSDIR)/bsys-web-mode.tex
first_rule: all
-all: tex web dvipdf mini-clean
+all: tex pdflatex mini-clean
.SUFFIXES: .tex .html
.PHONY:
.DONTCARE:
-
-tex:
+pdfcovers:
+ @echo -n "Linking coverpage and background PDF format..."
+ @(cd $(SVGCOVERSDIR) ; make pdf)
+ @ln -sf `pwd`/${PDFCOVERSDIR}/${COVERNAME}.pdf `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.pdf
+ @echo "Done."
+
+pdfimages:
+ @echo "Generating PDF images..."
+ @(cd ${IMAGES}/svg ; make pdf)
+ @echo "Done."
+
+pngimages:
+ @echo "Generating PNG images..."
+ @(cd ${IMAGES}/svg ; make png)
+ @echo "Done."
+
+epsimages:
+ @echo "Generating EPS images..."
+ @(cd ${IMAGES}/svg ; make eps)
+ @rm -rf ${IMAGES}/png
+ @rm -rf ${IMAGES}/pdf
+ @echo "Done."
+
+epscovers:
+ @echo -n "Linking coverpage and background EPS format..."
+ @(cd $(SVGCOVERSDIR) ; make eps)
+ @ln -sf `pwd`/${EPSCOVERSDIR}/${COVERNAME}.eps `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.eps
+ @rm -f `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.pdf
+ @echo "Done."
+
+commonfiles:
@../../update_version
@echo "Making version `cat version.tex`"
- @cp -fp ${IMAGES}/hires/*.eps .
+ @echo -n "Linking shared files..."
+ @(for L in $(LICENCES); do ln -sf $$L .; done)
+ @echo "Done"
+
+tex: epscovers epsimages commonfiles
+ @ln -sf $(TEXCOMPILERFILE) $(BSYSCOMPILERFILE)
@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
+pdflatex: pdfcovers pdfimages commonfiles
+ @ln -sf $(PDFCOMPILERFILE) $(BSYSCOMPILERFILE)
+ pdflatex -interaction=batchmode ${DOC}.tex
+ makeindex ${DOC}.idx -o ${DOC}.ind 2>/dev/null
+ pdflatex -interaction=batchmode ${DOC}.tex
+ pdflatex -interaction=batchmode ${DOC}.tex
html:
@echo " "
pic2graph -density 100 <main_configs.pic >main_configs.png
mini-clean:
+ @find . -type l -name "*.tex" -exec rm {} \;
@rm -f 1 2 3 *.tex~
@rm -f *.gif *.jpg *.eps
@rm -f *.aux *.cp *.fn *.ky *.log *.pg
clean:
+ @find . -type l -name "*.tex" -exec rm {} \;
@rm -f 1 2 3 *.tex~
@rm -f *.png *.gif *.jpg *.eps
@rm -f *.pdf *.aux *.cp *.fn *.ky *.log *.pg
-%%
-%%
% TODO: maybe merge all this FAQ in with the appropriate section?
% TODO: and use detailed indexing to help reader
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
+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}{http://wiki.bacula.org}
-or go directly to the FAQ at:
+or go directly to the FAQ at:
\elink{http://wiki.bacula.org/doku.php?id=faq}
{http://wiki.bacula.org/doku.php?id=faq}.
\section{What is Bacula?}
\item [What is {\bf Bacula}? ]
\index[general]{What is Bacula? }
- {\bf Bacula} is a network backup and restore program.
+ {\bf Bacula} is a network backup and restore program.
\section{Does Bacula support Windows?}
\item [Does Bacula support Windows?]
(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?}
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++.
+ adding a larger subset of C++.
\label{run}
\section{On what machines does Bacula run?}
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?}
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.
+ 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
+ \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.\\
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.
+ configuration files.
During the authorization process, the Storage daemon and File daemon
also require that the Director authenticates itself, so both ends
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
+ instructions in the \bsysxrlink{Running Bacula}{TutorialChapter}{main}{chapter} of
+ the \mainman{}. 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
Here is a picture that indicates what names/passwords in which
files/Resources must match up:
- \includegraphics{\idir Conf-Diagram.eps}
+ \bsysimageH{Conf-Diagram}{Configuration Diagram}{}
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.
+ 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
Why? ]
\index[general]{Cannot Access a Client}
There are several reasons why Bacula could not contact a client on a
- different machine. They are:
+ 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.
+ 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.
+ 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).
+ 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.
+ 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,
+ 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
If you are using MySQL do the following:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
cd <bacula-source>/src/cats
./drop_mysql_tables
./make_mysql_tables
-
-\end{verbatim}
+
+\end{lstlisting}
\normalsize
If you are using SQLite, do the following:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
Delete bacula.db from your working directory.
cd <bacula-source>/src/cats
./drop_sqlite_tables
./make_sqlite_tables
-
-\end{verbatim}
+
+\end{lstlisting}
\normalsize
-Then write an EOF on each tape you used with {\bf Bacula} using:
+Then write an EOF on each tape you used with {\bf Bacula} using:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
mt -f /dev/st0 rewind
mt -f /dev/st0 weof
-\end{verbatim}
+\end{lstlisting}
\normalsize
-where you need to adjust the device name for your system.
+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?}
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.
+ problem, please review the \bsysxrlink{Windows Installation Instructions}{Win32Chapter}{main}{chapter} in the\mainman{}.
\label{windowsdie}
\section{My Windows Client Immediately Dies When I Start It}
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:
+following:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
Start a DOS shell Window.
cd c:\bacula\bin
bacula-fd -d100 -c c:\bacula\bin\bacula-fd.conf
-
-\end{verbatim}
+
+\end{lstlisting}
\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.
+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
Message resource definition:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
append = "/home/kern/bacula/bin/log" = all, !skipped
-
-\end{verbatim}
+
+\end{lstlisting}
\normalsize
Obviously you will want to change the filename to be appropriate for your
-system.
+system.
\label{nobackup}
-\section{My backups are not working on my Windows
+\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
+\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:
+like:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
Mail = yourname@yourdomain = all, !skipped
-
-\end{verbatim}
+
+\end{lstlisting}
\normalsize
in your Director's message resource. You should then receive one email for
me 9 months), you might change that to:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
MailOnError = yourname@yourdomain = all, !skipped
-
-\end{verbatim}
+
+\end{lstlisting}
\normalsize
then you only get email messages when a Job errors as is the case for your
-Windows machine.
+Windows machine.
You should also be logging the Director's messages, please see the previous
-FAQ for how to do so.
+FAQ for how to do so.
\label{sched}
\section{All my Jobs are scheduled for the same time. Will this cause
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
+ \bsysxrlink{Pruning Example}{PruningExample}{main}{chapter} of the \mainman{}.
+ Also, there is a whole chapter devoted to \bsysxrlink{Basic Volume
+ Management}{DiskChapter}{main}{chapter} in the \mainman{}. 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.
+ Yes, to have a \emph{Virtual} device which just consumes data, you can use a
+ FIFO device (see \bsysxrlink{Stored configuration}{SetupFifo}{main}{chapter}
+ in the \mainman{}). It's useful to test a backup.
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
Device {
Name = NULL
Media Type = NULL
MaximumOpenWait = 60
AlwaysOpen = no
}
-\end{verbatim}
+\end{lstlisting}
\normalsize
\label{bigfiles}
%% 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}
+\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
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
+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.
\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.
+ \ilink{Disaster Recovery Using Bacula}{RescueChapter}{main}{chapter}
+ of the \mainman{}.
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
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.
+ \bsysxrlink{FileSet Resource definition}{FileSetResource}{main}{chapter} in the \mainman{}.
\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}
+\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,
\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}
+\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
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.
+specify. Please see:
+\bsysxrlink{the Priority record}{Priority}{main}{chapter} of the \mainman{} in
+the Job resource.
\label{nomail}
\section{I Am Not Getting Email Notification, What Can I Do? }
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
+ 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.
+ mail program, please see \bsysxrlink{bsmtp}{bsmtp}{utility}{command} in the
+ \utilityman{}.
\label{periods}
\section{My retention periods don't work}
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.
-
+ 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.
+ program.
\label{CompressionNotWorking}
\section{Why aren't my files compressed?}
\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
+ 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.
be mentioned in the {\bf config.out} line by:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
ZLIB support: yes
-
-\end{verbatim}
+
+\end{lstlisting}
\normalsize
\item You must add the {\bf compression=gzip} option on your Include
- statement in the Director's configuration file.
+ 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.
+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.
+ 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.
+ daemon's Device resource.
\end{itemize}
\label{LevelChanging}
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.
-
+ \bsysxrlink{Level record}{Level}{main}{chapter} in the \mainman{}.
+
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:
+ following information for analysis:
\begin{itemize}
-\item Your Director's configuration file.
+\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).
+ 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).
+ 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.
+ 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.
+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}
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.
+
+ 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:
+ example, set:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
SD Connect Timeout = 5 min
-
-\end{verbatim}
+
+\end{lstlisting}
\normalsize
-in the FileDaemon resource.
-\item Run these kinds of jobs after all other jobs.
+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,
+\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
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}
+\begin{lstlisting}
bacula-dir -c bacula-dir.conf ... >/dev/null 0>\&1 2>\&1
-
-\end{verbatim}
+
+\end{lstlisting}
\normalsize
-and likewise for the other daemons.
+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,
+\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
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.
the Media record by doing:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
llist Volume=xxx
-\end{verbatim}
+\end{lstlisting}
\normalsize
-If it doesn't have the right value, you can use:
+If it doesn't have the right value, you can use:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
update Volume=xxx
-\end{verbatim}
+\end{lstlisting}
\normalsize
-to change it.
+to change it.
\label{ConnectionRefused}
\section{I get a Connection refused when connecting to my Client}
\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.
+ 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).
+ 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}.
+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:
+Another solution might be to run the daemon with the debug option by:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
Start a DOS shell Window.
cd c:\bacula\bin
bacula-fd -d100 -c c:\bacula\bin\bacula-fd.conf
-
-\end{verbatim}
+
+\end{lstlisting}
\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.
+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
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.
+ 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).
+ 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.
+ 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}
+\begin{lstlisting}
iptables -t filter -A INPUT -m limit --limit 3/second --limit-burst 3 -j DROP
-\end{verbatim}
+\end{lstlisting}
\normalsize
you will want to add the following rules {\bf before} the above rule:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
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}
+\end{lstlisting}
\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}
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.
+ 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
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.
+ 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
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 ...
+ out what tape it wants, and you can mount it before you go home ...
\label{Password generation}
\section{Password generation}
configuration files.
\end{description}
-
+
-%%
-%%
-
\chapter{Dealing with Firewalls}
\label{FirewallsChapter}
\index[general]{Dealing with Firewalls }
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.
+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:
+do a backup are the following:
-\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
Console -> DIR:9101
DIR -> SD:9103
DIR -> FD:9102
FD -> SD:9103
-\end{verbatim}
-\normalsize
+\end{lstlisting}
+
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 \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.
+"client" that initiates the conversation.
Note, port 9103 serves both the Director and the File daemon, each having its
-own independent connection.
+own independent connection.
-If you are running {\bf iptables}, you might add something like:
+If you are running {\bf iptables}, you might add something like:
-\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
-A FW-1-INPUT -m state --state NEW -m tcp -p tcp --dport 9101:9103 -j ACCEPT
-\end{verbatim}
-\normalsize
+\end{lstlisting}
-on your server, and
+on your server, and
-\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
-A FW-1-INPUT -m state --state NEW -m tcp -p tcp --dport 9102 -j ACCEPT
-\end{verbatim}
-\normalsize
+\end{lstlisting}
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.
+Thanks to Raymond Norton for this tip.
\section{A Concrete Example}
\index[general]{Example!Concrete }
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:
+server:
-\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
server.int.mydomain.tld
-\end{verbatim}
-\normalsize
+\end{lstlisting}
-when a fully qualified domain name is required, or simply:
+when a fully qualified domain name is required, or simply:
-\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
server
-\end{verbatim}
-\normalsize
+\end{lstlisting}
if a hostname is adequate. We will call the various bacula daemons running on
-the server.int.mydomain.tld machine:
+the server.int.mydomain.tld machine:
-\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
server-fd
server-sd
server-dir
-\end{verbatim}
-\normalsize
+\end{lstlisting}
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:
+client is on the internal network. Its fully qualified domain name is:
-\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
private1.int.mydomain.tld
-\end{verbatim}
-\normalsize
+\end{lstlisting}
-And its hostname is:
+And its hostname is:
-\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
private1
-\end{verbatim}
-\normalsize
+\end{lstlisting}
-This machine is a client and therefore runs just one bacula daemon:
+This machine is a client and therefore runs just one bacula daemon:
-\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
private1-fd
-\end{verbatim}
-\normalsize
+\end{lstlisting}
The second client is on the external network. Its fully qualified domain name
-is:
+is:
-\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
public1.mydomain.tld
-\end{verbatim}
-\normalsize
+\end{lstlisting}
-And its hostname is:
+And its hostname is:
-\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
public1
-\end{verbatim}
-\normalsize
+\end{lstlisting}
-This machine also runs just one bacula daemon:
+This machine also runs just one bacula daemon:
-\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
public1-fd
-\end{verbatim}
-\normalsize
+\end{lstlisting}
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:
+assigned the name:
-\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
firewall.mydomain.tld
-\end{verbatim}
-\normalsize
+\end{lstlisting}
-Remember:
+Remember:
-\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
*.int.mydomain.tld = internal network
*.mydomain.tld = external network
-\end{verbatim}
-\normalsize
+\end{lstlisting}
\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:
+server-sd. I have just *one* Device resource in my server-sd.conf file:
-\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
Autochanger {
Name = "autochanger1";\
Device = Drive0
Fast Forward Space File = No
BSF at EOM = yes
}
-\end{verbatim}
-\normalsize
+\end{lstlisting}
-(note, please see
+(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:
+is only one Storage definition in my server-dir.conf file:
-\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
Storage {
Name = "autochanger1" # Storage device for backing up
Address = Storage-server
Media Type = AIT-1
Autochanger = yes
}
-\end{verbatim}
-\normalsize
+\end{lstlisting}
Note that the Storage resource uses neither of the two addresses to
the Storage daemon -- neither server.int.mydomain.tld nor
In addition to the above, I have two Client resources defined in
-server-dir.conf:
+server-dir.conf:
-\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
Client {
Name = private1-fd
Address = private1.int.mydomain.tld
Catalog = MyCatalog
Password = "mysecretpassword" # password for FileDaemon
}
-\end{verbatim}
-\normalsize
+\end{lstlisting}
And finally, to tie it all together, I have two Job resources defined in
-server-dir.conf:
+server-dir.conf:
-\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
Job {
Name = "Private1-Backup"
Type = Backup
Write Bootstrap = "/var/db/bacula/Public1-Backup.bsr"
Priority = 13
}
-\end{verbatim}
-\normalsize
+\end{lstlisting}
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
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.
+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:
+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 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
+ '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.
+\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:
+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 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
+ '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.
+ 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}
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'.
+this 'Server Publication'. Others may call it 'Port Forwarding'.
\subsection{Firewall Problems}
\index[general]{Firewall Problems}
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
+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
+disallow connections to the Bacula Windows File daemon. See the
Windows chapter of this manual for additional details.
-%%
-%%
-
\chapter{What To Do When Bacula Crashes (Kaboom)}
\label{KaboomChapter}
\index[general]{Kaboom!What To Do When Bacula Crashes }
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.
+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
+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
+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
+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.
+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.
+traceback will be emailed to you.
For this to work, you need to ensure that a few things are setup correctly on
-your system:
+your system:
\begin{enumerate}
\item You must have a version of Bacula built with debug information turned
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.
+ 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.
+ specified in the {\bf btraceback} file.
-\item You must have a {\bf mail} program which is on {\bf Bacula's} path.
+\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
+ 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}
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.
+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:
+{\bf btraceback} file is:
-\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
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
+\end{lstlisting}
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.
+sufficient if you are running more than one daemon on a machine.
\section{Testing The Traceback}
\index[general]{Traceback!Testing The }
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:
+Unfortunately, the output had to be split to fit on this page:
-\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
[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
/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
+\end{lstlisting}
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:
+it is:
-\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
./btraceback /home/kern/bacula/k/src/dird 2103
-\end{verbatim}
-\normalsize
+\end{lstlisting}
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.
+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
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:
+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:
+ bacula-sd) and kill it with a command like the following:
-\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
kill -15 PID
-\end{verbatim}
-\normalsize
+\end{lstlisting}
-where you replace {\bf PID} by the actual value.
+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.
+ the Storage daemon should not.
-\item cd to the directory containing the Storage daemon
+\item cd to the directory containing the Storage daemon
-\item Start the Storage daemon under the debugger:
+\item Start the Storage daemon under the debugger:
- \footnotesize
-\begin{verbatim}
+\begin{lstlisting}
gdb ./bacula-sd
-\end{verbatim}
-\normalsize
+\end{lstlisting}
-\item Run the Storage daemon:
+\item Run the Storage daemon:
- \footnotesize
-\begin{verbatim}
+\begin{lstlisting}
run -s -f -c ./bacula-sd.conf
-\end{verbatim}
-\normalsize
+\end{lstlisting}
You may replace the {\bf ./bacula-sd.conf} with the full path to the Storage
-daemon's configuration file.
+daemon's configuration file.
-\item At this point, Bacula will be fully operational.
+\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.
+ 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.
+ {\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}
+
+\begin{lstlisting}
thread apply all bt
-\end{verbatim}
-\normalsize
+\end{lstlisting}
-After that you can issue any debugging command.
+After that you can issue any debugging command.
\end{enumerate}
\section{Getting Debug Output from Bacula}
{\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.
+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:
+Console using the {\bf setdebug} command. The full syntax of the command is:
-\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
setdebug level=nnn client=client-name storage=storage-name dir
-\end{verbatim}
-\normalsize
+\end{lstlisting}
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).
+necessary to specify all the components of the above command).
%%
%% # $ % & ~ _ ^ \ { }
%%
+\documentclass[10pt,bsyspaper,english,logo,titlepage]{bsysmanual}
+
+\renewcommand{\familydefault}{\sfdefault}
+\usepackage[utf8]{inputenc}
+\usepackage[toc,title,header,page]{appendix}
+\usepackage[T1]{fontenc}
+\usepackage{longtable,graphicx,fancyhdr,lastpage,eurosym,dcolumn,ltxtable}
+\usepackage{textcomp,varioref,lscape,pdfpages,ifthen,setspace,colortbl,diagbox}
+\usepackage{lmodern,minitoc}
+\usepackage{MnSymbol}
+\usepackage{bbding,multirow}
+\usepackage[hyphens]{url}
+\usepackage[plainpages=true,bookmarks=false,bookmarksopen=false,filecolor=black,linkcolor=black,urlcolor=bsysredtwo,filebordercolor={0. 0. 0.},menubordercolor={0. 0. 0.},urlbordercolor={0. 0. 0.},linkbordercolor={0. 0. 0.},hyperindex=false,colorlinks=true]{hyperref}
+\usepackage{babel,xr,xr-hyper}
+\usepackage[font={sf,bf},textfont=md]{caption}
+\usepackage[printonlyused]{acronym}
+\setlength\arrayrulewidth{0.4pt}
+\include{bsyscommondefs}
+\usepackage[left=4cm,right=3cm,bottom=2cm,top=2.5cm]{geometry}
+\usepackage{moreverb,fancyvrb}
+\usepackage{listings}
+\input{external-references}
+\pdfminorversion=4
-\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{makeidx}
\usepackage{index}
\usepackage{setspace}
-\usepackage{hyperref}
\usepackage{url}
-
\makeindex
\newindex{general}{idx}{ind}{General Index}
\sloppy
+\def\bsystitle{Problem Resolution Guide}
\begin{document}
+\lstset{escapechar=,breaklines=true,basicstyle=\ttfamily\scriptsize,backgroundcolor=\color{lightbsysgrey}}
\sloppy
+\include{coverpage}
-\newfont{\bighead}{cmr17 at 36pt}
-\parskip 10pt
-\parindent 0pt
-
-\title{\includegraphics{\idir bacula-logo.eps} \\ \bigskip
- \Huge{Bacula Problem Resolution Guide}
- \begin{center}
- \large{The Leading Open Source Backup Solution. }
- \end{center}
-}
-
-
-\author{Kern Sibbald}
-\date{\vspace{1.0in}\today \\
- This manual documents Bacula version \input{version} \\
- \vspace{0.2in}
- Copyright \copyright 1999-2010, 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
-
-\clearpage
+\frontmatter
\tableofcontents
-\clearpage
+\listoftables
+\listoffigures
+\mainmatter
\include{faq}
\include{tips}
\include{tapetesting}
\include{firewalls}
\include{kaboom}
+\begin{appendices}
+\begin{small}
\include{fdl}
-
+\end{small}
+\end{appendices}
% The following line tells link_resolver.pl to not include these files:
% nolinks developersi baculai-dir baculai-fd baculai-sd baculai-console baculai-main
% pull in the index
-\clearpage
\printindex[general]
\end{document}
-%%
-%%
-
\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.
+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.
+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.
+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
+ 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:
+\item Use tar to write to, then read from your drive:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
mt -f /dev/nst0 rewind
tar cvf /dev/nst0 .
mt -f /dev/nst0 rewind
tar tvf /dev/nst0
-
-\end{verbatim}
+
+\end{lstlisting}
\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
+ 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). When doing this, you should consult the \bsysxrlink{Storage Daemon
+ Configuration}{StoredConfChapter}{main}{chapter} of the \mainman{}.
\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:
+\item Run the btape {\bf test} command:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
./btape -c bacula-sd.conf /dev/nst0
test
-
-\end{verbatim}
+
+\end{lstlisting}
\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.
+ have an autochanger, please be sure to read the \bsysxrlink{Autochanger
+ chapter}{AutochangersChapter}{main}{chapter} of the \mainman{}.
\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.
+ 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
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:
+ restore command, being careful to restore it to an alternate location:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
restore select all done
yes
-
-\end{verbatim}
+
+\end{lstlisting}
\normalsize
Do a {\bf diff} on the restored directory to ensure it is identical to the
on each system type.
\item If you have an autochanger, you should now go back to the btape program
- and run the autochanger test:
+ and run the autochanger test:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
./btape -c bacula-sd.conf /dev/nst0
auto
-
-\end{verbatim}
+
+\end{lstlisting}
\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.
+ your autochanger.
\item We strongly recommend that you use a dedicated SCSI
controller for your tape drives. Scanners are known to induce
the following was most likely caused by a scanner:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
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}
+\end{lstlisting}
\normalsize
\end{enumerate}
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.
+completed. In particular, you may want to look at the
+\ilink{Tips for Resolving Problems}{problems1} section below.
\label{NoTapeInDrive}
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.
+using the {\bf -c} option.
\subsection{Specifying a Device Name For a Tape}
\index[general]{Tape!Specifying a Device Name For a}
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).
+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
what is needed in this case. Bacula does not support SysV tape drive
behavior.
-See below for specifying Volume names.
+See below for specifying Volume names.
\subsection{Specifying a Device Name For a File}
\index[general]{File!Specifying a Device Name For a}
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.
+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.
+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.
+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}
+daemon's configuration file read by {\bf btape}
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
Usage: btape [options] device_name
-b <file> specify bootstrap file
-c <file> set configuration file to file
-s turn off signals
-v be verbose
-? print this message.
-\end{verbatim}
+\end{lstlisting}
\normalsize
\subsection{Using btape to Verify your Tape Drive}
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.
+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:
+reasonably self explanatory. For example:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
(ensure that Bacula is not running)
./btape -c /usr/bin/bacula/bacula-sd.conf /dev/nst0
-\end{verbatim}
+\end{lstlisting}
\normalsize
-The output will be:
+The output will be:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
Tape block granularity is 1024 bytes.
btape: btape.c:376 Using device: /dev/nst0
*
-\end{verbatim}
+\end{lstlisting}
\normalsize
-Enter the test command:
+Enter the test command:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
test
-\end{verbatim}
+\end{lstlisting}
\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.
+listing short because it is frequently updated to have new tests.
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
=== Append files test ===
This test is essential to Bacula.
I'm going to write one record in file 0,
Now the important part, I am going to attempt to append to the tape.
...
=== End Append files test ===
-\end{verbatim}
+\end{lstlisting}
\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.
+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:
+starts to print a long series of:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
Got EOF on tape.
Got EOF on tape.
...
-\end{verbatim}
+\end{lstlisting}
\normalsize
then almost certainly, you are running your drive in fixed block mode rather
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.
+your tape drive.
\subsection{Testing tape drive speed}
\label{sec:btapespeed}
access.
\end{itemize}
-\begin{verbatim}
+\begin{lstlisting}
*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:383 Total Volume bytes=9.664 GB. Total Write rate = 7.365 MB/s
-\end{verbatim}
+\end{lstlisting}
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
\index[general]{Tricks!Linux SCSI}
\index[general]{Linux SCSI Tricks}
-You can find out what SCSI devices you have by doing:
+You can find out what SCSI devices you have by doing:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
lsscsi
-\end{verbatim}
+\end{lstlisting}
\normalsize
Typical output is:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
[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}
+\end{lstlisting}
\normalsize
There are two drives in one autochanger: /dev/st0 and /dev/st1
information as follows:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
cat /proc/scsi/scsi
-\end{verbatim}
+\end{lstlisting}
\normalsize
For the above example with the three drives and two autochangers,
I get:
-\footnotesize
-\begin{verbatim}
+\footnotesize
+\begin{lstlisting}
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: ATA Model: ST3160812AS Rev: 3.AD
Host: scsi2 Channel: 00 Id: 10 Lun: 00
Vendor: OVERLAND Model: LXB Rev: 0107
Type: Medium Changer ANSI SCSI revision: 02
-\end{verbatim}
+\end{lstlisting}
\normalsize
above example):
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
Attached devices:
Host: scsi2 Channel: 00 Id: 01 Lun: 00
Vendor: HP Model: C5713A Rev: H107
Host: scsi2 Channel: 00 Id: 04 Lun: 00
Vendor: SONY Model: SDT-10000 Rev: 0110
Type: Sequential-Access ANSI SCSI revision: 02
-\end{verbatim}
+\end{lstlisting}
\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:
+for data and for control, so in Bacula, you would use:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
Archive Device = /dev/nst0
Changer Device = /dev/sg0
-\end{verbatim}
+\end{lstlisting}
\normalsize
-If you want to remove the SDT-10000 device, you can do so as root with:
+If you want to remove the SDT-10000 device, you can do so as root with:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
echo "scsi remove-single-device 2 0 4 0">/proc/scsi/scsi
-\end{verbatim}
+\end{lstlisting}
\normalsize
-and you can put add it back with:
+and you can put add it back with:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
echo "scsi add-single-device 2 0 4 0">/proc/scsi/scsi
-\end{verbatim}
+\end{lstlisting}
\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.
+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}
+\begin{lstlisting}
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: ATA Model: WDC WD1600JD-75H Rev: 08.0
Host: scsi2 Channel: 00 Id: 06 Lun: 00
Vendor: OVERLAND Model: LXB Rev: 0106
Type: Medium Changer ANSI SCSI revision: 02
-\end{verbatim}
+\end{lstlisting}
\normalsize
The above tape drives are accessed on /dev/nst0 and /dev/nst1, while
\index[general]{Files!Bacula Saves But Cannot Restore}
\index[general]{Bacula Saves But Cannot Restore Files}
-If you are getting error messages such as:
+If you are getting error messages such as:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
Volume data error at 0:1! Wanted block-id: "BB02", got "". Buffer discarded
-\end{verbatim}
+\end{lstlisting}
\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.
+them.
-There are two possible solutions.
+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:
+ Bacula startup files to explicitly set:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
mt -f /dev/nst0 defblksize 0
-\end{verbatim}
+\end{lstlisting}
\normalsize
or whatever is appropriate on your system. Note, if you are running a Linux
\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:
+ by adding:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
Block Positioning = no
-\end{verbatim}
+\end{lstlisting}
\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
+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).
+tested).
\end{enumerate}
If you are getting error messages such as:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
Volume data error at 0:0!
Block checksum mismatch in block=0 len=32625 calc=345678 blk=123456
-\end{verbatim}
+\end{lstlisting}
\normalsize
-You are getting tape read errors, and this is most likely due to
+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.
\index[general]{Device!Bacula Cannot Open the}
\index[general]{Bacula Cannot Open the Device}
-If you get an error message such as:
+If you get an error message such as:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
dev open failed: dev.c:265 stored: unable to open
device /dev/nst0:> ERR=No such device or address
-\end{verbatim}
+\end{lstlisting}
\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}.
+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
{\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.
+for this tip.
\label{IncorrectFiles}
\subsection{Incorrect File Number}
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.
+order for Bacula to work.
There are two possible solutions to the above problem of incorrect file
-number:
+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.
+ 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:
+ include:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
Hardware End of File = no
-\end{verbatim}
+\end{lstlisting}
\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.
+medium, and Bacula will keep track of the file number itself.
\end{itemize}
\label{IncorrectBlocks}
{\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).
+(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).
+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).
+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}.
+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
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:
+definition:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
Minimum Block Size = nnn
Maximum Block Size = nnn
-\end{verbatim}
+\end{lstlisting}
\normalsize
where {\bf nnn} must be the same for both records and must be identical to the
-driver's fixed block size.
+driver's fixed block size.
We recommend that you avoid this configuration if at all possible by using
-variable block sizes.
+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.
+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.
+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
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:
+Linux} system:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
become super user
mt -f /dev/nst0 rewind
mt -f /dev/nst0 stoptions buffer-writes async-writes read-ahead
-\end{verbatim}
+\end{lstlisting}
\normalsize
The above commands will clear all options and then set those specified. None
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.
+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:
+size, as happened to one user, by explicitly turning it off with:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
mt -f /dev/nst0 defblksize 0
-\end{verbatim}
+\end{lstlisting}
\normalsize
If you are running a Linux
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:
+provided by Willem Riede. Do the following:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
become super user
mt -f /dev/nst0 stsetoptions 0
grep st0 /var/log/messages
-\end{verbatim}
+\end{lstlisting}
\normalsize
-and you will get output that looks something like the following:
+and you will get output that looks something like the following:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
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}
+\end{lstlisting}
\normalsize
Note, I have chopped off the beginning of the line with the date and machine
-name for presentation purposes.
+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.
+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.
+the other modes that Bacula needs to function properly.
\label{compression}
\subsection{Tape Hardware Compression and Blocking Size}
\index[general]{Size!Tape Hardware Compression and Blocking Size}
You should be able to verify the tape compression status with sysfs on Linux.
-\begin{verbatim}
+\begin{lstlisting}
cat /sys/class/scsi_tape/nst0/default_compression
-\end{verbatim}
+\end{lstlisting}
-You can, turn it on by using (on Linux):
+You can, turn it on by using (on Linux):
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
become super user
mt -f /dev/nst0 defcompression 1
-\end{verbatim}
+\end{lstlisting}
\normalsize
and of course, if you use a zero instead of the one at the end, you will turn
-it off.
+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:
+my DDS-4 drive (/dev/nst0), I get the following:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
tapeinfo -f /dev/sg0
Product Type: Tape Drive
Vendor ID: 'HP '
BufferedMode: yes
Medium Type: Not Loaded
Density Code: 0x26
-BlockSize: 0
-\end{verbatim}
+BlockSize: 0
+\end{lstlisting}
\normalsize
where the {\bf DataCompEnabled: yes} means that tape hardware compression is
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 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
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
+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
+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:
+following records:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
Minimum Block Size = nnn
Maximum Block Size = nnn
-\end{verbatim}
+\end{lstlisting}
\normalsize
in your Storage daemon's Device resource to force Bacula to write fixed size
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.
+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.
+ignore that field as well as the {\bf Attached Changer} field.
-To recover files from tapes written in fixed block mode, see below.
+To recover files from tapes written in fixed block mode, see below.
\label{FreeBSDTapes}
\subsection{Tape Modes on FreeBSD}
\index[general]{Tape Modes on FreeBSD}
On most FreeBSD systems such as 4.9 and most tape drives, Bacula should run
-with:
+with:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
mt -f /dev/nsa0 seteotmodel 2
mt -f /dev/nsa0 blocksize 0
mt -f /dev/nsa0 comp enable
-\end{verbatim}
+\end{lstlisting}
\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
+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):
+need to set the following (see below for an alternative):
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
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}
+\end{lstlisting}
\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.
+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.
+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
the correct values to use are:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
mt -f /dev/nsa0 seteotmodel 1
mt -f /dev/nsa0 blocksize 0
mt -f /dev/nsa0 comp enable
-\end{verbatim}
+\end{lstlisting}
\normalsize
-and
+and
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
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}
+\end{lstlisting}
\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.
+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}
+\begin{lstlisting}
# Overland Powerloader LT02 - 17 slots single drive
Device {
Name = Powerloader
Media Type = LT0-2
Archive Device = /dev/nsa0
- AutomaticMount = yes;
+ AutomaticMount = yes;
AlwaysOpen = yes;
RemovableMedia = yes;
RandomAccess = no;
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}
+\begin{lstlisting}
Device {
...
# FreeBSD/NetBSD Specific Settings
Fast Forward Space File = yes
TWO EOF = yes
}
-\end{verbatim}
+\end{lstlisting}
\normalsize
On FreeBSD version 6.0, it is reported that you can even set
\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,
+drives and autochangers you have. For example,
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
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}
+\end{lstlisting}
\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.
+use when invoking the tapeinfo program. E.g.
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
tapeinfo -f /dev/pass2
-\end{verbatim}
+\end{lstlisting}
\normalsize
\label{onstream}
\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:
+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/}.
+{http://sourceforge.net/projects/osst/}.
-To make Bacula work you must first load the new driver then, as root, do:
+To make Bacula work you must first load the new driver then, as root, do:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
mt -f /dev/nosst0 defblksize 32768
-\end{verbatim}
+\end{lstlisting}
\normalsize
Also you must add the following to your Device resource in your Storage
-daemon's conf file:
+daemon's conf file:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
Minimum Block Size = 32768
Maximum Block Size = 32768
-\end{verbatim}
+\end{lstlisting}
\normalsize
Here is a Device specification provided by Michel Meyers that is known to
-work:
+work:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
Device {
Name = "Onstream DI-30"
Media Type = "ADR-30"
AlwaysOpen = yes
Removable Media = yes
}
-\end{verbatim}
+\end{lstlisting}
\normalsize
\section{Hardware Compression on EXB-8900}
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.
+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
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.
+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.
+Bacula.
\label{RecoveringFiles}
\section{Recovering Files Written With Fixed Block Sizes}
(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.
+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,
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.
+your files.
\label{BlockModes}
\section{Tape Blocking Modes}
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.
+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
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.
+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.
+number of sequential reads as it had written.
\section{Details of Tape Modes}
\index[general]{Modes!Details}
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.
+ 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
\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
+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 getting errors such as:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
3992 Bad autochanger "load slot 1, drive 1": ERR=Child exited with code 1.
-\end{verbatim}
+\end{lstlisting}
\normalsize
and you are running your Storage daemon as non-root, then most likely
If you are getting errors such as:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
: kernel: st0: MTSETDRVBUFFER only allowed for root
-\end{verbatim}
+\end{lstlisting}
\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
+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
+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.
-%%
-%%
-
\chapter{Tips and Suggestions}
\label{TipsChapter}
-\index[general]{Tips and Suggestions }
-\index[general]{Suggestions!Tips and }
+\index[general]{Tips and Suggestions}
+\index[general]{Suggestions!Tips and}
\label{examples}
-\index[general]{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.
+distribution.
For additional tips, please see the \elink{Bacula
wiki}{http://wiki.bacula.org}.
\section{Upgrading Bacula Versions}
\label{upgrading}
-\index[general]{Upgrading Bacula Versions }
-\index[general]{Versions!Upgrading Bacula }
+\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
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.
+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
+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
{\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.
+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
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
+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 }
+\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.
+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.
+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:
+presentation:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
Messages {
Name = Standard
mailcommand = "/home/bacula/bin/bsmtp -h localhost
operator = your-email-address = mount
console = all, !skipped, !saved
}
-\end{verbatim}
+\end{lstlisting}
\normalsize
You will need to ensure that the {\bf /home/bacula/bin} path on the {\bf
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.
+/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.
+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.
+see the
+\bsysxrlink{Mail}{mailcommand}{utility}{command} in the \utilityman{} 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.
+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 }
+\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:
+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.
+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}:
+ director}:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
director = director-name = all
-
-\end{verbatim}
+
+\end{lstlisting}
\normalsize
-\item If all else fails, try replacing the {\bf mailcommand} with
+\item If all else fails, try replacing the {\bf mailcommand} with
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
mailcommand = "mail -s test your@domain.com"
-\end{verbatim}
+\end{lstlisting}
\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:
+bsmtp programs. For example, you might start simply by using:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
mailcommand = "/home/bacula/bin/bsmtp -f \"root@localhost\" %r"
-\end{verbatim}
+\end{lstlisting}
\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 }
+\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.
+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:
+my Director's configuration file:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
Schedule {
Name = "Watchdog"
Run = Level=Full sun-sat at 6:05
Job Retention = 1 month
AutoPrune = yes
}
-\end{verbatim}
+\end{lstlisting}
\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:
+command:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
RunAfterJob = "/home/kern/bacula/bin/watchdog %c %d"
-\end{verbatim}
+\end{lstlisting}
\normalsize
which runs my "watchdog" script. As an example, I have added the Job codes
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.
+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:
+following is my watchdog script:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
#!/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}
+\end{lstlisting}
\normalsize
-If you just wish to send yourself a message, you can do it with:
+If you just wish to send yourself a message, you can do it with:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
#!/bin/sh
cd /home/kern/mysql/var/bacula
/home/kern/bacula/bin/bsmtp \
-s "Bacula running" abuse@whitehouse.com <<END-OF-DATA
Bacula is still running!!!
END-OF-DATA
-\end{verbatim}
+\end{lstlisting}
\normalsize
\section{Maintaining a Valid Bootstrap File}
\label{bootstrap}
-\index[general]{Maintaining a Valid Bootstrap File }
-\index[general]{File!Maintaining a Valid Bootstrap }
+\index[general]{Maintaining a Valid Bootstrap File}
+\index[general]{File!Maintaining a Valid Bootstrap}
-By using a
-\ilink{ WriteBootstrap}{writebootstrap} record in each of your
-Director's Job resources, you can constantly maintain a
-\ilink{bootstrap}{BootstrapChapter} file that will enable you to
+By using a \bsysxrlinkdocument{WriteBootstrap}{writebootstrap}{main}{chapter} record in each of your
+Director's Job resources (\mainman{}), you can constantly maintain a
+\bsysxrlinkdocument{bootstrap}{BootstrapChapter}{main}{chapter} file that will enable you to
recover the state of your system as of the last backup without having the
Bacula catalog. This permits you to more easily recover from a disaster that
-destroys your Bacula catalog.
+destroys your Bacula catalog.
When a Job resource has a {\bf WriteBootstrap} record, Bacula will maintain
the designated file (normally on another system but mounted by NFS) with up to
date information necessary to restore your system. For example, in my
-Director's configuration file, I have the following record:
+Director's configuration file, I have the following record:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
Write Bootstrap = "/mnt/deuter/files/backup/client-name.bsr"
-\end{verbatim}
+\end{lstlisting}
\normalsize
where I replace {\bf client-name} by the actual name of the client that is
being backed up. Thus, Bacula automatically maintains one file for each of my
clients. The necessary bootstrap information is appended to this file during
each {\bf Incremental} backup, and the file is totally rewritten during each
-{\bf Full} backup.
+{\bf Full} backup.
Note, one disadvantage of writing to an NFS mounted volume as I do is
that if the other machine goes down, the OS will wait forever on the fopen()
problem was provided by Andrew Hilborne, and consists of using the {\bf soft}
option instead of the {\bf hard} option when mounting the NFS volume, which is
typically done in {\bf /etc/fstab}/. The NFS documentation explains these
-options in detail. However, I found that with the {\bf soft} option
+options in detail. However, I found that with the {\bf soft} option
NFS disconnected frequently causing even more problems.
If you are starting off in the middle of a cycle (i.e. with Incremental
{\bf Write Bootstrap} record. The restore bootstrap file can be found in {\bf
restore.bsr} in the working directory that you defined. In the example given
below for the client {\bf rufus}, my input is shown in bold. Note, the JobId
-output has been partially truncated to fit on the page here:
+output has been partially truncated to fit on the page here:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
(in the Console program)
*restore
First you select one or more JobIds that contain files
quit
(in a shell window)
cp ../working/restore.bsr /mnt/deuter/files/backup/rufus.bsr
-\end{verbatim}
+\end{lstlisting}
\normalsize
\section{Rejected Volumes After a Crash}
\label{RejectedVolumes}
-\index[general]{Crash!Rejected Volumes After a }
-\index[general]{Rejected Volumes After a Crash }
+\index[general]{Crash!Rejected Volumes After a}
+\index[general]{Rejected Volumes After a Crash}
Bacula keeps a count of the number of files on each Volume in its Catalog
database so that before appending to a tape, it can verify that the number of
the Storage daemon crashes before the job has completed, the tape will contain
one more file than is noted in the Catalog, and the next time you attempt to
use the same Volume, Bacula will reject it due to a mismatch between the
-physical tape (Volume) and the catalog.
+physical tape (Volume) and the catalog.
The easiest solution to this problem is to label a new tape and start fresh.
If you wish to continue appending to the current tape, you can do so by using
the {\bf update} command in the console program to change the {\bf Volume
Files} entry in the catalog. A typical sequence of events would go like the
-following:
+following:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
- Bacula crashes
- You restart Bacula
-\end{verbatim}
+\end{lstlisting}
\normalsize
-Bacula then prints:
+Bacula then prints:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
17-Jan-2003 16:45 rufus-dir: Start Backup JobId 13,
Job=kernsave.2003-01-17_16.45.46
17-Jan-2003 16:45 rufus-sd: Volume test01 previously written,
Storage: SDT-10000
Media type: DDS-4
Pool: Default
-\end{verbatim}
+\end{lstlisting}
\normalsize
(note, lines wrapped for presentation)
-The key here is the line that reads:
+The key here is the line that reads:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
The number of files mismatch! Volume=11 Catalog=10
-\end{verbatim}
+\end{lstlisting}
\normalsize
It says that Bacula found eleven files on the volume, but that the catalog
and even if the catalog contains references to files saved in file 11,
everything will be OK and nothing will be lost. Note that if the SD had
written several file marks to the volume, the difference between the Volume
-count and the Catalog count could be larger than one, but this is unusual.
+count and the Catalog count could be larger than one, but this is unusual.
If on the other hand the catalog is marked as having more files than Bacula
found on the tape, you need to consider the possible negative consequences of
modifying the catalog. Please see below for a more complete discussion of
-this.
+this.
Continuing with the example of {\bf Volume = 11 Catalog = 10}, to enable to
-Bacula to append to the tape, you do the following:
+Bacula to append to the tape, you do the following:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
update
Update choice:
1: Volume parameters
| 1 | test01 | DDS-4 | Error | 352427156 | ... | 31536000 | 1 | 0 |
+-------+---------+--------+---------+-----------+------+----------+------+-----+
Enter MediaId or Volume name: 1
-\end{verbatim}
+\end{lstlisting}
\normalsize
(note table output truncated for presentation) First, you chose to update the
Volume parameters by entering a {\bf 1}. In the volume listing that follows,
notice how the VolStatus is {\bf Error}. We will correct that after changing
-the Volume Files. Continuing, you respond 1,
+the Volume Files. Continuing, you respond 1,
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
Updating Volume "test01"
Parameters to modify:
1: Volume Status
10: Pool
11: Done
Select parameter to modify (1-10): 1
-\end{verbatim}
+\end{lstlisting}
\normalsize
Here, you have selected {\bf 9} in order to update the Volume Files, then you
changed it from {\bf 10} to {\bf 11}, and you now answer {\bf 1} to change the
-Volume Status.
+Volume Status.
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
Current Volume status is: Error
Possible Values are:
1: Append
11: Done
Select parameter to modify (1-11): 11
Selection done.
-\end{verbatim}
+\end{lstlisting}
\normalsize
At this point, you have changed the Volume Files from {\bf 10} to {\bf 11} to
account for the last file that was written but not updated in the database,
-and you changed the Volume Status back to {\bf Append}.
+and you changed the Volume Status back to {\bf Append}.
-This was a lot of words to describe something quite simple.
+This was a lot of words to describe something quite simple.
The {\bf Volume Files} option exists only in version 1.29 and later, and you
should be careful using it. Generally, if you set the value to that which
Bacula said is on the tape, you will be OK, especially if the value is one
-more than what is in the catalog.
+more than what is in the catalog.
-Now lets consider the case:
+Now lets consider the case:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
The number of files mismatch! Volume=10 Catalog=12
-\end{verbatim}
+\end{lstlisting}
\normalsize
Here the Bacula found fewer files on the volume than what is marked in the
saved on Files 11 and 12, all chaos will break out. In this case, you will
probably be better off using a new tape. In fact, you might want to see what
files the catalog claims are actually stored on that Volume, and back them up
-to another tape and recycle this tape.
+to another tape and recycle this tape.
\section{Security Considerations}
\label{security}
-\index[general]{Considerations!Security }
-\index[general]{Security Considerations }
+\index[general]{Considerations!Security}
+\index[general]{Security Considerations}
Only the File daemon needs to run with root permission (so that it can access
all files). As a consequence, you may run your Director, Storage daemon, and
MySQL or PostgreSQL database server as non-root processes. Version 1.30 has
the {\bf -u} and the {\bf -g} options that allow you to specify a userid and
-groupid on the command line to be used after Bacula starts.
+groupid on the command line to be used after Bacula starts.
As of version 1.33, thanks to Dan Langille, it is easier to configure the
-Bacula Director and Storage daemon to run as non-root.
+Bacula Director and Storage daemon to run as non-root.
You should protect the Bacula port addresses (normally 9101, 9102, and 9103)
from outside access by a firewall or other means of protection to prevent
-unauthorized use of your daemons.
+unauthorized use of your daemons.
You should ensure that the configuration files are not world readable since
they contain passwords that allow access to the daemons. Anyone who can access
the Director using a console program can restore any file from a backup
-Volume.
+Volume.
You should protect your Catalog database. If you are using SQLite, make sure
that the working directory is readable only by root (or your Bacula userid),
more strict. If you are using MySQL or PostgreSQL, please note that the Bacula
setup procedure leaves the database open to anyone. At a minimum, you should
assign the user {\bf bacula} a userid and add it to your Director's
-configuration file in the appropriate Catalog resource.
+configuration file in the appropriate Catalog resource.
If you use the make\_catalog\_backup script provided by Bacula, remember that
you should take care when supplying passwords on the command line. Read the
\ilink{Backing Up Your Bacula
-Database - Security Considerations }{BackingUpBaculaSecurityConsiderations}
+Database - Security Considerations}{BackingUpBaculaSecurityConsiderations}
section for more information.
\section{Creating Holiday Schedules}
\label{holiday}
-\index[general]{Schedules!Creating Holiday }
-\index[general]{Creating Holiday Schedules }
+\index[general]{Schedules!Creating Holiday}
+\index[general]{Creating Holiday Schedules}
If you normally change tapes every day or at least every Friday, but Thursday
is a holiday, you can use a trick proposed by Lutz Kittler to ensure that no
be used on Friday. To do so, define a {\bf RunJobBefore} script that normally
returns zero, so that the Bacula job will normally continue. You can then
modify the script to return non-zero on any day when you do not want Bacula to
-run the job.
+run the job.
\section{Automatic Labeling Using Your Autochanger}
\label{autolabel}
-\index[general]{Automatic Labeling Using Your Autochanger }
-\index[general]{Autochanger!Automatic Labeling Using Your }
+\index[general]{Automatic Labeling Using Your Autochanger}
+\index[general]{Autochanger!Automatic Labeling Using Your}
If you have an autochanger but it does not support barcodes, using a "trick"
you can make Bacula automatically label all the volumes in your autochanger's
-magazine.
+magazine.
First create a file containing one line for each slot in your autochanger that
has a tape to be labeled. The line will contain the slot number a colon (:)
then the Volume name you want to use. For example, create a file named {\bf
-volume-list}, which contains:
+volume-list}, which contains:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
1:Volume001
2:TestVolume02
5:LastVolume
-\end{verbatim}
+\end{lstlisting}
\normalsize
The records do not need to be in any order and you don't need to mention all
sequential set of numbers for each slot you want labeled. In the example
above, I've left out slots 3 and 4 just as an example. Now, modify your {\bf
mtx-changer} script and comment out all the lines in the {\bf list)} case by
-putting a \# in column 1. Then add the following two lines:
+putting a \# in column 1. Then add the following two lines:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
cat <absolute-path>/volume-list
exit 0
-\end{verbatim}
+\end{lstlisting}
\normalsize
-so that the whole case looks like:
+so that the whole case looks like:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
list)
#
# commented out lines
cat <absolute-path>/volume-list
exit 0
;;
-\end{verbatim}
+\end{lstlisting}
\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:
+volume-list file. Then using the console, you enter the following command:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
label barcodes
-\end{verbatim}
+\end{lstlisting}
\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{}.
+supplied the \lt{}barcodes\gt{}.
-If it seems to work, when it finishes, enter:
+If it seems to work, when it finishes, enter:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
list volumes
-\end{verbatim}
+\end{lstlisting}
\normalsize
-and you should see all the volumes nicely created.
+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 }
+\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.
+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 }
+\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:
+start by doing a {\bf list volumes} in the Console program:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
list volumes
-
+
Using default Catalog name=BackupDB DB=bacula
Pool: Default
+---------+---------------+-----------+-----------+----------------+-
| 34 | DLT-08Aug03 | DLT8000 | Full | 64,293,941,255 |
| 35 | DLT-24Aug03 | DLT8000 | Append | 9,999,216,782 |
+---------+---------------+-----------+-----------+----------------+
-\end{verbatim}
+\end{lstlisting}
\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).
+(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.
+myself that the backups would all complete without my intervention.
\section{Exclude Files on Windows Regardless of Case}
\label{Case}
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:
+specified:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
"/[Uu][Nn][Ii][Mm][Pp][Oo][Rr][Tt][Aa][Nn][Tt] [Ff][Ii][Ll][Ee][Ss]"
-\end{verbatim}
+\end{lstlisting}
\normalsize
-As a consequence, the above exclude works for files of any case.
+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.
+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 }
+\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
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:
+done this by:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
ssh-keygen -b 4096 -t dsa -f Bacula_key
-\end{verbatim}
+\end{lstlisting}
\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.
+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
+machine. Then you have to add (or uncomment) the line
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
AuthorizedKeysFile %h/.ssh/authorized_keys
-\end{verbatim}
+\end{lstlisting}
\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).
+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:
+enter the following on the machine where Bacula runs:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
ssh -i Bacula_key -l root <machine-name-or-ip-address> "ls -la"
-\end{verbatim}
+\end{lstlisting}
\normalsize
-This should execute the "ls -la" command on the remote machine.
+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:
+Now you could add lines like the following to your Director's conf file:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
...
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}
+\end{lstlisting}
\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.
+in a single script.
\section{Recycling All Your Volumes}
\label{recycle}
-\index[general]{Recycling All Your Volumes }
-\index[general]{Volumes!Recycling All Your }
+\index[general]{Recycling All Your Volumes}
+\index[general]{Volumes!Recycling All Your}
-This tip comes from Phil Stracchino.
+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}.
+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}
+\begin{lstlisting}
update Media set VolStatus='Recycle';
-\end{verbatim}
+\end{lstlisting}
\normalsize
Bacula will then ignore the data already stored on the tapes and just re-use
-each tape without further objection.
+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 }
+\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.
+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
+properly. Please see the
\ilink{aclsupport}{ACLSupport} FileSet option in the
-configuration chapter of this manual.
+configuration chapter of this manual.
For example, you could dump the ACLs to a file with a script similar to the
-following:
+following:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
#!/bin/sh
BACKUP_DIRS="/foo /bar"
STORE_ACL=/root/acl-backup
for i in $BACKUP_DIRS; do
cd $i /usr/bin/getfacl -R --skip-base .>$STORE_ACL/${i//\//_}
done
-\end{verbatim}
+\end{lstlisting}
\normalsize
-Then use Bacula to backup {\bf /root/acl-backup}.
+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:
+then restored to your system using:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
setfacl --restore/root/acl-backup
-\end{verbatim}
+\end{lstlisting}
\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 }
+\index[general]{Handling!Total Automation of Bacula Tape}
+\index[general]{Total Automation of Bacula Tape Handling}
-This tip was provided by Alexander Kuehn.
+This tip was provided by Alexander Kuehn.
\elink{Bacula}{http://www.bacula.org/} is a really nice backup program except
that the manual tape changing requires user interaction with the bacula
-console.
+console.
Fortunately I can fix this.
NOTE!!! This suggestion applies for people who do *NOT* have tape autochangers
-and must change tapes manually.!!!!!
+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
+scripts/programs. This highly flexible approach allowed me to create
\elink{this shell script}{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:
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):
+Type" and "Label media" may have different values):
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
Device {
Name=DDS3
Archive Device = # use yours not mine! ;)/dev/nsa0
Offline On Unmount = Yes; # keep this too
Label media = Yes; #
}
-\end{verbatim}
+\end{lstlisting}
\normalsize
As the script has to emulate the complete wisdom of a mtx-changer it has an
the following line:
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
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}
+\end{lstlisting}
\normalsize
The above should be all on one line, and it effectively tells Bacula that
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.
+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
+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
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.
+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
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.
+which is the normal case.
\footnotesize
-\begin{verbatim}
+\begin{lstlisting}
#
# Bacula Director Configuration file -- bacula-dir.conf
#
Maximum Concurrent Jobs = 4
...
}
-\end{verbatim}
+\end{lstlisting}
\normalsize
\parindent 0pt
\title{\includegraphics[width=0.3\linewidth]{baculasystems-logo}
- \\
+ \\
\Huge{Bacula\raisebox{0.1ex}{\textsuperscript\textregistered} Enterprise \bsystitle{}}}
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
+guarantee your freedom to share and change free software\lstinline:--: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
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.
+could even be mouse-clicks or menu items\lstinline:--: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
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
+guarantee your freedom to share and change free software\lstinline:--: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
+designated software packages\lstinline:--:typically libraries\lstinline:--: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,
--- /dev/null
+\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}{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}{http://www.bacula.org}.
+
+\section{GPL}
+\index[general]{GPL}
+
+The vast bulk of the source code is released under the
+\ilink{GNU Affero General Public License version 3.}{GplChapter}.
+
+Most of this code is copyrighted: Copyright \copyright 2000-\the\year{}
+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 AGPLv3 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{.3ex}{\textsuperscript{\textregistered}} is a registered
+trademark of Kern Sibbald.
+
+\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}{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.