File: Configuring_Director.html

package info (click to toggle)
bacula-doc 9.6.7-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 241,364 kB
  • sloc: makefile: 1,869; perl: 937; sh: 218
file content (2854 lines) | stat: -rw-r--r-- 266,085 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
	<head>
		<title>Configuring the Director</title>
		<meta content="text/html; charset=utf-8" http-equiv="content-type" />
		<meta content="Configuring the Director" name="description" />
		<meta content="main" name="keywords" />
		<meta content="document" name="resource-type" />
		<meta content="global" name="distribution" />
		<meta content="LaTeX2HTML v2018" name="Generator" />
		<meta content="text/css" http-equiv="Content-Style-Type" />
		<link href="../css/main.css" rel="STYLESHEET" />
		<link href="Client_File_daemon_Configur.html" rel="next" />
		<link href="Customizing_Configuration_F.html" rel="previous" />
		<link href="Main_Reference.html" rel="up" />
		<link href="Client_File_daemon_Configur.html" rel="next" />
	</head>
	<body>
		<div class="navigation"><a href="Client_File_daemon_Configur.html" name="tex2html1884"> <img align="BOTTOM" alt="next" border="0" class="navigation-next" height="24" src="../images/next.png" width="37" /></a> <a href="Main_Reference.html" name="tex2html1878"> <img align="BOTTOM" alt="up" border="0" class="navigation-up" height="24" src="../images/up.png" width="26" /></a> <a href="Customizing_Configuration_F.html" name="tex2html1872"> <img align="BOTTOM" alt="previous" border="0" class="navigation-prev" height="24" src="../images/prev.png" width="63" /></a> <a href="Contents.html" name="tex2html1880"> <img align="BOTTOM" alt="contents" border="0" class="navigation-next" height="24" src="../images/contents.png" width="65" /></a> <a href="Index.html" name="tex2html1882"> <img align="BOTTOM" alt="index" border="0" class="navigation-next" height="24" src="../images/index.png" width="43" /></a><br /><b> Next:</b> <a href="Client_File_daemon_Configur.html" name="tex2html1885">Client/File daemon Configuration</a> <b> Up:</b> <a href="Main_Reference.html" name="tex2html1879">Main Reference</a> <b> Previous:</b> <a href="Customizing_Configuration_F.html" name="tex2html1873">Customizing the Configuration Files</a>   <b> <a href="Contents.html" name="tex2html1881">Contents</a></b>   <b> <a href="Index.html" name="tex2html1883">Index</a></b><br />
			<br />
		</div><a name="CHILD_LINKS"><strong>Subsections</strong></a><ul class="ChildLinks">
			<li><a href="Configuring_Director.html#SECTION002110000000000000000" name="tex2html1886">Director Resource Types</a></li>
			<li><a href="Configuring_Director.html#SECTION002120000000000000000" name="tex2html1887">The Director Resource</a></li>
			<li><a href="Configuring_Director.html#SECTION002130000000000000000" name="tex2html1888">The Job Resource</a></li>
			<li><a href="Configuring_Director.html#SECTION002140000000000000000" name="tex2html1889">The JobDefs Resource</a></li>
			<li><a href="Configuring_Director.html#SECTION002150000000000000000" name="tex2html1890">The Schedule Resource</a></li>
			<li><a href="Configuring_Director.html#SECTION002160000000000000000" name="tex2html1891">Technical Notes on Schedules</a></li>
			<li><a href="Configuring_Director.html#SECTION002170000000000000000" name="tex2html1892">The FileSet Resource</a></li>
			<li><a href="Configuring_Director.html#SECTION002180000000000000000" name="tex2html1893">FileSet Examples</a></li>
			<li><a href="Configuring_Director.html#SECTION002190000000000000000" name="tex2html1894">Backing up Raw Partitions</a></li>
			<li><a href="Configuring_Director.html#SECTION0021100000000000000000" name="tex2html1895">Excluding Files and Directories</a></li>
			<li><a href="Configuring_Director.html#SECTION0021110000000000000000" name="tex2html1896">Windows FileSets</a><ul>
					<li><a href="Configuring_Director.html#SECTION0021110010000000000000" name="tex2html1897">A Windows Example FileSet</a></li>
					<li><a href="Configuring_Director.html#SECTION0021110020000000000000" name="tex2html1898">Windows NTFS Naming Considerations</a></li>
				</ul>
				<br />
			</li>
			<li><a href="Configuring_Director.html#SECTION0021120000000000000000" name="tex2html1899">Testing Your FileSet</a></li>
			<li><a href="Configuring_Director.html#SECTION0021130000000000000000" name="tex2html1900">The Client Resource</a></li>
			<li><a href="Configuring_Director.html#SECTION0021140000000000000000" name="tex2html1901">The Storage Resource</a></li>
			<li><a href="Configuring_Director.html#SECTION0021150000000000000000" name="tex2html1902">The Autochanger Resources</a></li>
			<li><a href="Configuring_Director.html#SECTION0021160000000000000000" name="tex2html1903">The Pool Resource</a><ul>
					<li><a href="Configuring_Director.html#SECTION0021161000000000000000" name="tex2html1904">The Scratch Pool</a></li>
				</ul>
				<br />
			</li>
			<li><a href="Configuring_Director.html#SECTION0021170000000000000000" name="tex2html1905">The Catalog Resource</a></li>
			<li><a href="Configuring_Director.html#SECTION0021180000000000000000" name="tex2html1906">The Messages Resource</a></li>
			<li><a href="Configuring_Director.html#SECTION0021190000000000000000" name="tex2html1907">The Console Resource</a></li>
			<li><a href="Configuring_Director.html#SECTION0021200000000000000000" name="tex2html1908">The Counter Resource</a></li>
			<li><a href="Configuring_Director.html#SECTION0021210000000000000000" name="tex2html1909">Example Director Configuration File</a></li>
		</ul>
		<hr />
		<h1><a name="SECTION002100000000000000000"></a> <a name="DirectorChapter"></a><br /> Configuring the Director </h1><b> <a name="9416"></a> <a name="9417"></a> </b><p><b>Of all the configuration files needed to run <b>Bacula</b>, the Director's is the most complicated, and the one that you will need to modify the most often as you add clients or modify the FileSets. </b></p>
		<p><b>For a general discussion of configuration files and resources including the data types recognized by <b>Bacula</b>. Please see the ConfigurationConfigureChapter chapter of this manual. </b></p>
		<p>
		</p>
		<h1><a name="SECTION002110000000000000000"> Director Resource Types</a></h1><b> <a name="9423"></a> <a name="9424"></a> </b><p><b>Director resource type may be one of the following: </b></p>
		<p><b>Job, JobDefs, Client, Storage/Autochange, Catalog, Schedule, FileSet, Pool, Director, or Messages. We present them here in the most logical order for defining them: </b></p>
		<p><b>Note, everything revolves around a job and is tied to a job in one way or another. </b></p>
		<p>
			<ul>
				<li>DirectorDirectorResource4 - to define the Director's name and its access password used for authenticating the Console program. Only a single Director resource definition may appear in the Director's configuration file. If you have either <b>/dev/random</b> or <b>bc</b> on your machine, Bacula will generate a random password during the configuration process, otherwise it will be left blank. </li>
				<li>JobJobResource - to define the backup/restore Jobs and to tie together the Client, FileSet and Schedule resources to be used for each Job. Normally, you will Jobs of different names corresponding to each client (i.e. one Job per client, but a different one with a different name for each client). </li>
				<li>JobDefsJobDefsResource - optional resource for providing defaults for Job resources. </li>
				<li>ScheduleScheduleResource - to define when a Job is to be automatically run by <b>Bacula's</b> internal scheduler. You may have any number of Schedules, but each job will reference only one. </li>
				<li>FileSetFileSetResource - to define the set of files to be backed up for each Client. You may have any number of FileSets but each Job will reference only one. </li>
				<li>ClientClientResource2 - to define what Client is to be backed up. You will generally have multiple Client definitions. Each Job will reference only a single client. </li>
				<li>StorageStorageResource2 (or Autochanger) - to define on what physical device the Volumes should be mounted. The keywords Storage and Autochanger are interchangable. You may have one or more Storage/Autochanger definitions. <p>
					</p>
				</li>
				<li>PoolPoolResource - to define the pool of Volumes that can be used for a particular Job. Most people use a single default Pool. However, if you have a large number of clients or volumes, you may want to have multiple Pools. Pools allow you to restrict a Job (or a Client) to use only a particular set of Volumes. <p>
					</p>
				</li>
				<li>CatalogCatalogResource - to define in what database to keep the list of files and the Volume names where they are backed up. Most people only use a single catalog. However, if you want to scale the Director to many clients, multiple catalogs can be helpful. Multiple catalogs require a bit more management because in general you must know what catalog contains what data. Currently, all Pools are defined in each catalog. This restriction will be removed in a later release. </li>
				<li>ConsoleConsoleResource1 - to define which the administrator or user can use to interact with the Director. <p>
					</p>
				</li>
				<li>CounterCounterResource - to define a counter variable that can be accessed by variable expansion used for creating Volume labels. <p>
					</p>
				</li>
				<li>MessagesMessagesChapter - to define where error and information messages are to be sent or logged. You may define multiple different message resources and hence direct particular classes of messages to different users or locations (files, ...). </li>
			</ul>
		</p>
		<p>
		</p>
		<h1><a name="SECTION002120000000000000000"></a> <a name="DirectorResource4"></a><br /> The Director Resource </h1><b> <a name="9456"></a> <a name="9457"></a> </b><p><b>The Director resource defines the attributes of the Directors running on the network. In the current implementation, there is only a single Director resource, but the final design will contain multiple Directors to maintain index and media database redundancy. </b></p>
		<p>
			<dl>
				<dt><strong>Director</strong></dt>
				<dd><a name="9459"></a> Start of the Director resource. One and only one director resource must be supplied. <p>
					</p>
				</dd>
				<dt><strong>Name = name</strong></dt>
				<dd><a name="9462"></a> <a name="9463"></a> The director name used by the system administrator. This directive is required. <p>
					</p>
				</dd>
				<dt><strong>Description = text</strong></dt>
				<dd><a name="9466"></a> <a name="9467"></a> The text field contains a description of the Director that will be displayed in the graphical user interface. This directive is optional. <p>
					</p>
				</dd>
				<dt><strong>Password = UA-password</strong></dt>
				<dd><a name="9470"></a> <a name="9471"></a> Specifies the password that must be supplied for the default Bacula Console to be authorized. The same password must appear in the <b> Director</b> resource of the Console configuration file. For added security, the password is never passed across the network but instead a challenge response hash code created with the password. This directive is required. If you have either <b>/dev/random</b> or <b>bc</b> on your machine, Bacula will generate a random password during the configuration process, otherwise it will be left blank and you must manually supply it. <p> The password is plain text. It is not generated through any special process but as noted above, it is better to use random text for security reasons. </p>
					<p>
					</p>
				</dd>
				<dt><strong>Messages = Messages-resource-name</strong></dt>
				<dd><a name="9477"></a> <a name="9478"></a> The messages resource specifies where to deliver Director messages that are not associated with a specific Job. Most messages are specific to a job and will be directed to the Messages resource specified by the job. However, there are a few messages that can occur when no job is running. This directive is required. <p>
					</p>
				</dd>
				<dt><strong>Working Directory = Directory</strong></dt>
				<dd><a name="9481"></a> <a name="9482"></a> This directive is mandatory and specifies a directory in which the Director may put its status files. This directory should be used only by Bacula but may be shared by other Bacula daemons. However, please note, if this directory is shared with other Bacula daemons (the File daemon and Storage daemon), you must ensure that the <b>Name</b> given to each daemon is unique so that the temporary filenames used do not collide. By default the Bacula configure process creates unique daemon names by postfixing them with -dir, -fd, and -sd. Standard shell expansion of the <b> Directory</b> is done when the configuration file is read so that values such as <b>$HOME</b> will be properly expanded. This directive is required. The working directory specified must already exist and be readable and writable by the Bacula daemon referencing it. <p> If you have specified a Director user and/or a Director group on your ./configure line with <b>-with-dir-user</b> and/or <b>-with-dir-group</b> the Working Directory owner and group will be set to those values. </p>
					<p>
					</p>
				</dd>
				<dt><strong>Pid Directory = Directory</strong></dt>
				<dd><a name="9492"></a> <a name="9493"></a> This directive is mandatory and specifies a directory in which the Director may put its process Id file. The process Id file is used to shutdown Bacula and to prevent multiple copies of Bacula from running simultaneously. Standard shell expansion of the <b>Directory</b> is done when the configuration file is read so that values such as <b>$HOME</b> will be properly expanded. <p> The PID directory specified must already exist and be readable and writable by the Bacula daemon referencing it </p>
					<p> Typically on Linux systems, you will set this to: <b>/var/run</b>. If you are not installing Bacula in the system directories, you can use the <b>Working Directory</b> as defined above. This directive is required. </p>
					<p>
					</p>
				</dd>
				<dt><strong>Scripts Directory = Directory</strong></dt>
				<dd><a name="9500"></a> <a name="9501"></a> This directive is optional and, if defined, specifies a directory in which the Director and the Storage daemon will look for many of the scripts that it needs to use during particular operations such as starting/stopping, the mtx-changer script, tape alerts, as well as catalog updates. This directory may be shared by other Bacula daemons. Standard shell expansion of the directory is done when the configuration file is read so that values such as <b>$HOME</b> will be properly expanded. <p>
					</p>
				</dd>
				<dt><strong>QueryFile = Path</strong></dt>
				<dd><a name="9505"></a> <a name="9506"></a> This directive is mandatory and specifies a directory and file in which the Director can find the canned SQL statements for the <b>Query</b> command of the Console. Standard shell expansion of the <b>Path</b> is done when the configuration file is read so that values such as <b> $HOME</b> will be properly expanded. This directive is required. <p>
					</p>
				</dd>
				<dt><strong>Heartbeat Interval = time-interval</strong></dt>
				<dd><a name="9512"></a> <a name="9513"></a> This directive is optional and if specified will cause the Director to set a keepalive interval (heartbeat) in seconds on each of the sockets it opens for the Client resource. This value will override any specified at the Director level. It is implemented only on systems (Linux, ...) that provide the <b>setsockopt</b> TCP_KEEPIDLE function. The default vaule is 300 seconds. <p><a name="DirMaxConJobs"></a></p>
				</dd>
				<dt><strong>Maximum Concurrent Jobs = number</strong></dt>
				<dd><a name="9518"></a> <a name="9519"></a> <a name="9520"></a> <a name="9521"></a> where number is the maximum number of total Director Jobs that should run concurrently. The default is set to 20, but you may set it to a larger number. Every valid connection to any daemon (Director, File daemon, or Storage daemon) results in a Job. This includes connections from <b>bconsole</b>. Thus the number of concurrent Jobs must, in general, be greater than the maximum number of Jobs that you wish to actually run. <p> In general, increasing the number of Concurrent Jobs increases the total through put of Bacula, because the simultaneous Jobs can all feed data to the Storage daemon and to the Catalog at the same time. However, keep in mind, that the Volume format becomes more complicated with multiple simultaneous jobs, consequently, restores may take slightly longer if Bacula must sort through interleaved volume blocks from multiple simultaneous jobs. Though normally unnecessary, interleaved job data can be avoided by having each simultaneous job write to a different volume or by using data spooling, which will first spool the data to disk simultaneously, then write one spool file at a time to the volume thus avoiding excessive interleaving of the different job blocks. </p>
					<p>
					</p>
				</dd>
				<dt><strong>FD Connect Timeout = time</strong></dt>
				<dd><a name="9527"></a> <a name="9528"></a> where <b>time</b> is the time that the Director should continue attempting to contact the File daemon to start a job, and after which the Director will cancel the job. The default is 3 minutes. <p>
					</p>
				</dd>
				<dt><strong>SD Connect Timeout = time</strong></dt>
				<dd><a name="9532"></a> <a name="9533"></a> where <b>time</b> is the time that the Director should continue attempting to contact the Storage daemon to start a job, and after which the Director will cancel the job. The default is 30 minutes. <p>
					</p>
				</dd>
				<dt><strong>DirAddresses = IP-address-specification</strong></dt>
				<dd><a name="9537"></a> <a name="9538"></a> <a name="9539"></a> <a name="9540"></a> Specify the ports and addresses on which the Director daemon will listen for Bacula Console connections. Probably the simplest way to explain this is to show an example: <p><pre>
 DirAddresses  = {
    ip = {addr = 1.2.3.4; port = 1205;}
    ipv4 = {
        addr = 1.2.3.4; port = http;}
    ipv6 = {
        addr = 1.2.3.4;
        port = 1205;
    }
    ip = {
        addr = 1.2.3.4
        port = 1205
    }
    ip = {addr = 1.2.3.4 }
    ip = {addr = 201:220:222::2 }
    ip = {
        addr = bluedot.thun.net
    }
}
</pre></p>
					<p> where ip, ip4, ip6, addr, and port are all keywords. Note, that the address can be specified as either a dotted quadruple, or IPv6 colon notation, or as a symbolic name (only in the ip specification). Also, port can be specified as a number or as the mnemonic value from the /etc/services file. If a port is not specified, the default will be used. If an ip section is specified, the resolution can be made either by IPv4 or IPv6. If ip4 is specified, then only IPv4 resolutions will be permitted, and likewise with ip6. </p>
					<p> Please note that if you use the DirAddresses directive, you must not use either a DirPort or a DirAddress directive in the same resource. </p>
					<p>
					</p>
				</dd>
				<dt><strong>DirPort = port-number</strong></dt>
				<dd><a name="9545"></a> <a name="9546"></a> Specify the port (a positive integer) on which the Director daemon will listen for Bacula Console connections. This same port number must be specified in the Director resource of the Console configuration file. The default is 9101, so normally this directive need not be specified. This directive should not be used if you specify DirAddresses (N.B plural) directive. <p>
					</p>
				</dd>
				<dt><strong>DirAddress = IP-Address</strong></dt>
				<dd><a name="9549"></a> <a name="9550"></a> This directive is optional, but if it is specified, it will cause the Director server (for the Console program) to bind to the specified <b> IP-Address</b>, which is either a domain name or an IP address specified as a dotted quadruple in string or quoted string format. If this directive is not specified, the Director will bind to any available address (the default). Note, unlike the DirAddresses specification noted above, this directive only permits a single address to be specified. This directive should not be used if you specify a DirAddresses (N.B. plural) directive. <p>
					</p>
				</dd>
				<dt><strong>DirSourceAddress = IP-Address</strong></dt>
				<dd><a name="9554"></a> <a name="9555"></a> This record is optional, and if it is specified, it will cause the Director server (when initiating connections to a storage or file daemon) to source its connections from the specified address. Only a single IP address may be specified. If this record is not specified, the Director server will source its outgoing connections according to the system routing table (the default). <p>
					</p>
				</dd>
				<dt><strong>Statistics Retention = time</strong></dt>
				<dd><a name="9558"></a> <a name="9559"></a> <a name="PruneStatistics"></a><p> The <tt>Statistics Retention</tt> directive defines the length of time that Bacula will keep statistics job records in the Catalog database after the Job End time. (In <tt>JobHistory</tt> table) When this time period expires, and if user runs <tt>prune stats</tt> command, Bacula will prune (remove) Job records that are older than the specified period. </p>
					<p> Theses statistics records aren't use for restore purpose, but mainly for capacity planning, billings, etc. See Statistics chapterTO-BE-REPLACED for additional information. </p>
					<p> See the Configuration chapterTime of this manual for additional details of time specification. </p>
					<p> The default is 5 years. </p>
					<p>
					</p>
				</dd>
				<dt><strong>VerId = string</strong></dt>
				<dd><a name="9570"></a> where string is an identifier which can be used for support purpose. This string is displayed using the <tt>version</tt> command. <p>
					</p>
				</dd>
				<dt><strong>MaximumConsoleConnections = number</strong></dt>
				<dd><a name="9576"></a> <a name="9577"></a> <a name="9578"></a> where number is the maximum number of Console Connections that could run concurrently. The default is set to 20, but you may set it to a larger number. <p><a name="Director:Director:MaximumReloadRequests"></a></p>
				</dd>
				<dt><strong>MaximumReloadRequests = number</strong></dt>
				<dd><a name="9584"></a> <a name="9585"></a> <a name="9586"></a><p> Where number is the maximum number of <tt>reload</tt> command that can be done while jobs are running. The default is set to 32 and is usually sufficient. </p>
					<p>
					</p>
				</dd>
			</dl>
		</p>
		<p><b>The following is an example of a valid Director resource definition: </b></p>
		<p><b></b><pre>
Director {
  Name = HeadMan
  WorkingDirectory = "$HOME/bacula/bin/working"
  Password = UA_password
  PidDirectory = "$HOME/bacula/bin/working"
  QueryFile = "$HOME/bacula/bin/query.sql"
  Messages = Standard
}
</pre><b></b></p>
		<p>
		</p>
		<h1><a name="SECTION002130000000000000000"></a> <a name="JobResource"></a><br /> The Job Resource </h1><b> <a name="9595"></a> <a name="9596"></a> </b><p><b>The Job resource defines a Job (Backup, Restore, ...) that Bacula must perform. Each Job resource definition contains the name of a Client and a FileSet to backup, the Schedule for the Job, where the data are to be stored, and what media Pool can be used. In effect, each Job resource must specify What, Where, How, and When or FileSet, Storage, Backup/Restore/Level, and Schedule respectively. Note, the FileSet must be specified for a restore job for historical reasons, but it is no longer used. </b></p>
		<p><b>Only a single type (<b>Backup</b>, <b>Restore</b>, ...) can be specified for any job. If you want to backup multiple FileSets on the same Client or multiple Clients, you must define a Job for each one. </b></p>
		<p><b>Note, you define only a single Job to do the Full, Differential, and Incremental backups since the different backup levels are tied together by a unique Job name. Normally, you will have only one Job per Client, but if a client has a really huge number of files (more than several million), you might want to split it into to Jobs each with a different FileSet covering only part of the total files. </b></p>
		<p><b>Multiple Storage daemons are not currently supported for Jobs, so if you do want to use multiple storage daemons, you will need to create a different Job and ensure that for each Job that the combination of Client and FileSet are unique. The Client and FileSet are what Bacula uses to restore a client, so if there are multiple Jobs with the same Client and FileSet or multiple Storage daemons that are used, the restore will not work. This problem can be resolved by defining multiple FileSet definitions (the names must be different, but the contents of the FileSets may be the same). </b></p>
		<p>
			<dl>
				<dt><strong>Job</strong></dt>
				<dd><a name="9600"></a> <a name="9601"></a> Start of the Job resource. At least one Job resource is required. <p>
					</p>
				</dd>
				<dt><strong>Name = name</strong></dt>
				<dd><a name="9604"></a> <a name="9605"></a> The Job name. This name can be specified on the <b>Run</b> command in the console program to start a job. If the name contains spaces, it must be specified between quotes. It is generally a good idea to give your job the same name as the Client that it will backup. This permits easy identification of jobs. <p> When the job actually runs, the unique Job Name will consist of the name you specify here followed by the date and time the job was scheduled for execution. This directive is required. </p>
					<p>
					</p>
				</dd>
				<dt><strong>Enabled = yes|no</strong></dt>
				<dd><a name="9609"></a> <a name="9610"></a> This directive allows you to enable or disable automatic execution via the scheduler of a Job. This directive allows you to enable or disable a Job resource. When the resource of the Job is disabled, the Job will no longer be scheduled and it will not be available in the list of Jobs to be run. To be able to use the Job you must Enable it. <p>
					</p>
				</dd>
				<dt><strong>Type = job-type</strong></dt>
				<dd><a name="9613"></a> <a name="9614"></a> The <b>Type</b> directive specifies the Job type, which may be one of the following: <b>Backup</b>, <b>Restore</b>, <b>Verify</b>, or <b>Admin</b>. This directive is required. Within a particular Job Type, there are also Levels as discussed in the next item. <p>
						<dl>
							<dt><strong>Backup</strong></dt>
							<dd><a name="9621"></a> Run a backup Job. Normally you will have at least one Backup job for each client you want to save. Normally, unless you turn off cataloging, most all the important statistics and data concerning files backed up will be placed in the catalog. <p>
								</p>
							</dd>
							<dt><strong>Restore</strong></dt>
							<dd><a name="9622"></a> Run a restore Job. Normally, you will specify only one Restore job which acts as a sort of prototype that you will modify using the console program in order to perform restores. Although certain basic information from a Restore job is saved in the catalog, it is very minimal compared to the information stored for a Backup job - for example, no File database entries are generated since no Files are saved. <p><b>Restore</b> jobs cannot be automatically started by the scheduler as is the case for Backup, Verify and Admin jobs. To restore files, you must use the <b>restore</b> command in the console. </p>
								<p>
								</p>
							</dd>
							<dt><strong>Verify</strong></dt>
							<dd><a name="9625"></a> Run a verify Job. In general, <b>verify</b> jobs permit you to compare the contents of the catalog to the file system, or to what was backed up. In addition, to verifying that a tape that was written can be read, you can also use <b>verify</b> as a sort of tripwire intrusion detection. <p>
								</p>
							</dd>
							<dt><strong>Admin</strong></dt>
							<dd><a name="9628"></a> Run an admin Job. An <b>Admin</b> job can be used to periodically run catalog pruning, if you do not want to do it at the end of each <b>Backup</b> Job. Although an Admin job is recorded in the catalog, very little data is saved. The Client is not involved in an Admin job, so features such as “Client Run Before Job” are not available. Only Director's runscripts will be executed. <p>
								</p>
							</dd>
							<dt><strong>Migration</strong></dt>
							<dd><a name="9631"></a> Run a Migration Job (similar to a backup job) that reads data that was previously backed up to a Volume and writes it to another Volume. (See MigrationChapter) <p>
								</p>
							</dd>
							<dt><strong>Copy</strong></dt>
							<dd><a name="9633"></a> Run a Copy Job that essentially creates two identical copies of the same backup. The Copy process is essentially identical to the Migration feature with the exception that the Job that is copied is left unchanged. (See MigrationChapter) <p>
								</p>
							</dd>
						</dl>
					</p>
					<p><a name="Level"></a></p>
					<p>
					</p>
				</dd>
				<dt><strong>Level = job-level</strong></dt>
				<dd><a name="9639"></a> <a name="9640"></a> The Level directive specifies the default Job level to be run. Each different Job Type (Backup, Restore, ...) has a different set of Levels that can be specified. The Level is normally overridden by a different value that is specified in the <b>Schedule</b> resource. This directive is not required, but must be specified either by a <b>Level</b> directive or as an override specified in the <b>Schedule</b> resource. <p> For a <b>Backup</b> Job, the Level may be one of the following: </p>
					<p>
						<dl>
							<dt><strong>Full</strong></dt>
							<dd><a name="9646"></a> When the Level is set to Full all files in the FileSet whether or not they have changed will be backed up. <p>
								</p>
							</dd>
							<dt><strong>Incremental</strong></dt>
							<dd><a name="9647"></a> When the Level is set to Incremental all files specified in the FileSet that have changed since the last successful backup of the the same Job using the same FileSet and Client, will be backed up. If the Director cannot find a previous valid Full backup then the job will be upgraded into a Full backup. When the Director looks for a valid backup record in the catalog database, it looks for a previous Job with: <p>
									<ul>
										<li>The same Job name. </li>
										<li>The same Client name. </li>
										<li>The same FileSet (any change to the definition of the FileSet such as adding or deleting a file in the Include or Exclude sections constitutes a different FileSet. </li>
										<li>The Job was a Full, Differential, or Incremental backup. </li>
										<li>The Job terminated normally (i.e. did not fail or was not canceled). </li>
										<li>The Job started no longer ago than <b>Max Full Interval</b>. </li>
									</ul>
								</p>
								<p> If all the above conditions do not hold, the Director will upgrade the Incremental to a Full save. Otherwise, the Incremental backup will be performed as requested. </p>
								<p> The File daemon (Client) decides which files to backup for an Incremental backup by comparing start time of the prior Job (Full, Differential, or Incremental) against the time each file was last "modified" (st_mtime) and the time its attributes were last "changed"(st_ctime). If the file was modified or its attributes changed on or after this start time, it will then be backed up. </p>
								<p> Some virus scanning software may change st_ctime while doing the scan. For example, if the virus scanning program attempts to reset the access time (st_atime), which Bacula does not use, it will cause st_ctime to change and hence Bacula will backup the file during an Incremental or Differential backup. In the case of Sophos virus scanning, you can prevent it from resetting the access time (st_atime) and hence changing st_ctime by using the <b><code>--</code>no-reset-atime</b> option. For other software, please see their manual. </p>
								<p> When Bacula does an Incremental backup, all modified files that are still on the system are backed up. However, any file that has been deleted since the last Full backup remains in the Bacula catalog, which means that if between a Full save and the time you do a restore, some files are deleted, those deleted files will also be restored. The deleted files will no longer appear in the catalog after doing another Full save. </p>
								<p> In addition, if you move a directory rather than copy it, the files in it do not have their modification time (st_mtime) or their attribute change time (st_ctime) changed. As a consequence, those files will probably not be backed up by an Incremental or Differential backup which depend solely on these time stamps. If you move a directory, and wish it to be properly backed up, it is generally preferable to copy it, then delete the original. </p>
								<p> However, to manage deleted files or directories changes in the catalog during an Incremental backup you can use <tt>accurate</tt> mode. This is quite memory consuming process. See Accurate modeaccuratemode for more details. </p>
								<p>
								</p>
							</dd>
							<dt><strong>Differential</strong></dt>
							<dd><a name="9655"></a> When the Level is set to Differential all files specified in the FileSet that have changed since the last successful Full backup of the same Job will be backed up. If the Director cannot find a valid previous Full backup for the same Job, FileSet, and Client, backup, then the Differential job will be upgraded into a Full backup. When the Director looks for a valid Full backup record in the catalog database, it looks for a previous Job with: <p>
									<ul>
										<li>The same Job name. </li>
										<li>The same Client name. </li>
										<li>The same FileSet (any change to the definition of the FileSet such as adding or deleting a file in the Include or Exclude sections constitutes a different FileSet. </li>
										<li>The Job was a FULL backup. </li>
										<li>The Job terminated normally (i.e. did not fail or was not canceled). </li>
										<li>The Job started no longer ago than <b>Max Full Interval</b>. </li>
									</ul>
								</p>
								<p> If all the above conditions do not hold, the Director will upgrade the Differential to a Full save. Otherwise, the Differential backup will be performed as requested. </p>
								<p> The File daemon (Client) decides which files to backup for a differential backup by comparing the start time of the prior Full backup Job against the time each file was last "modified" (st_mtime) and the time its attributes were last "changed" (st_ctime). If the file was modified or its attributes were changed on or after this start time, it will then be backed up. The start time used is displayed after the <b> Since</b> on the Job report. In rare cases, using the start time of the prior backup may cause some files to be backed up twice, but it ensures that no change is missed. As with the Incremental option, you should ensure that the clocks on your server and client are synchronized or as close as possible to avoid the possibility of a file being skipped. Note, on versions 1.33 or greater Bacula automatically makes the necessary adjustments to the time between the server and the client so that the times Bacula uses are synchronized. </p>
								<p> When Bacula does a Differential backup, all modified files that are still on the system are backed up. However, any file that has been deleted since the last Full backup remains in the Bacula catalog, which means that if between a Full save and the time you do a restore, some files are deleted, those deleted files will also be restored. The deleted files will no longer appear in the catalog after doing another Full save. However, to remove deleted files from the catalog during a Differential backup is quite a time consuming process and not currently implemented in Bacula. It is, however, a planned future feature. </p>
								<p> As noted above, if you move a directory rather than copy it, the files in it do not have their modification time (st_mtime) or their attribute change time (st_ctime) changed. As a consequence, those files will probably not be backed up by an Incremental or Differential backup which depend solely on these time stamps. If you move a directory, and wish it to be properly backed up, it is generally preferable to copy it, then delete the original. Alternatively, you can move the directory, then use the <b>touch</b> program to update the timestamps. </p>
								<p> However, to manage deleted files or directories changes in the catalog during an Differential backup you can use <tt>accurate</tt> mode. This is quite memory consuming process. See Accurate modeaccuratemode for more details. </p>
								<p> Every once and a while, someone asks why we need Differential backups as long as Incremental backups pickup all changed files. There are possibly many answers to this question, but the one that is the most important for me is that a Differential backup effectively merges all the Incremental and Differential backups since the last Full backup into a single Differential backup. This has two effects: 1. It gives some redundancy since the old backups could be used if the merged backup cannot be read. 2. More importantly, it reduces the number of Volumes that are needed to do a restore effectively eliminating the need to read all the volumes on which the preceding Incremental and Differential backups since the last Full are done. </p>
								<p>
								</p>
							</dd>
							<dt><strong>VirtualFull</strong></dt>
							<dd><a name="9664"></a><p> When the Backup Level is set to VirtualFull, Bacula will consolidate the previous Full backup plus the most recent Differential backup and any subsequent Incremental backups into a new Full backup. This new Full backup will then be considered as the most recent Full for any future Incremental or Differential backups. The VirtualFull backup is accomplished without contacting the client by reading the previous backup data and writing it to a volume in a different pool. </p>
								<p> Bacula's virtual backup feature is often called Synthetic Backup or Consolidation in other backup products. </p>
								<p>
								</p>
							</dd>
						</dl>
					</p>
					<p> For a <b>Restore</b> Job, no level needs to be specified. </p>
					<p> For a <b>Verify</b> Job, the Level may be one of the following: </p>
					<p>
						<dl>
							<dt><strong>InitCatalog</strong></dt>
							<dd><a name="9669"></a> does a scan of the specified <b>FileSet</b> and stores the file attributes in the Catalog database. Since no file data is saved, you might ask why you would want to do this. It turns out to be a very simple and easy way to have a <b>Tripwire</b> like feature using <b> Bacula</b>. In other words, it allows you to save the state of a set of files defined by the <b>FileSet</b> and later check to see if those files have been modified or deleted and if any new files have been added. This can be used to detect system intrusion. Typically you would specify a <b>FileSet</b> that contains the set of system files that should not change (e.g. /sbin, /boot, /lib, /bin, ...). Normally, you run the <b>InitCatalog</b> level verify one time when your system is first setup, and then once again after each modification (upgrade) to your system. Thereafter, when your want to check the state of your system files, you use a <b>Verify</b> <b>level = Catalog</b>. This compares the results of your <b>InitCatalog</b> with the current state of the files. <p>
								</p>
							</dd>
							<dt><strong>Catalog</strong></dt>
							<dd><a name="9679"></a> Compares the current state of the files against the state previously saved during an <b>InitCatalog</b>. Any discrepancies are reported. The items reported are determined by the <b>verify</b> options specified on the <b>Include</b> directive in the specified <b>FileSet</b> (see the <b> FileSet</b> resource below for more details). Typically this command will be run once a day (or night) to check for any changes to your system files. <p> Please note! If you run two Verify Catalog jobs on the same client at the same time, the results will certainly be incorrect. This is because Verify Catalog modifies the Catalog database while running in order to track new files. </p>
								<p>
								</p>
							</dd>
							<dt><strong>VolumeToCatalog</strong></dt>
							<dd><a name="9685"></a> This level causes Bacula to read the file attribute data written to the Volume from the last backup Job for the job specified on the <b>VerifyJob</b> directive. The file attribute data are compared to the values saved in the Catalog database and any differences are reported. This is similar to the <b>DiskToCatalog</b> level except that instead of comparing the disk file attributes to the catalog database, the attribute data written to the Volume is read and compared to the catalog database. Although the attribute data including the signatures (MD5 or SHA1) are compared, the actual file data is not compared (it is not in the catalog). <p> Please note! If you run two Verify VolumeToCatalog jobs on the same client at the same time, the results will certainly be incorrect. This is because the Verify VolumeToCatalog modifies the Catalog database while running. </p>
								<p>
								</p>
							</dd>
							<dt><strong>DiskToCatalog</strong></dt>
							<dd><a name="9688"></a> This level causes Bacula to read the files as they currently are on disk, and to compare the current file attributes with the attributes saved in the catalog from the last backup for the job specified on the <b>VerifyJob</b> directive. This level differs from the <b>VolumeToCatalog</b> level described above by the fact that it doesn't compare against a previous Verify job but against a previous backup. When you run this level, you must supply the verify options on your Include statements. Those options determine what attribute fields are compared. <p> This command can be very useful if you have disk problems because it will compare the current state of your disk against the last successful backup, which may be several jobs. </p>
								<p> Note, the current implementation (1.32c) does not identify files that have been deleted. </p>
							</dd>
						</dl>
					</p>
					<p>
					</p>
				</dd>
				<dt><strong>Accurate = yes|no</strong></dt>
				<dd><a name="9694"></a> In accurate mode, the File daemon knowns exactly which files were present after the last backup. So it is able to handle deleted or renamed files. <p> When restoring a FileSet for a specified date (including "most recent"), Bacula is able to restore exactly the files and directories that existed at the time of the last backup prior to that date including ensuring that deleted files are actually deleted, and renamed directories are restored properly. </p>
					<p> In this mode, the File daemon must keep data concerning all files in memory. So If you do not have sufficient memory, the backup may either be terribly slow or fail. </p>
					<p> For 500.000 files (a typical desktop linux system), it will require approximately 64 Megabytes of RAM on your File daemon to hold the required information. </p>
					<p>
					</p>
				</dd>
				<dt><strong>Verify Job = Job-Resource-Name</strong></dt>
				<dd><a name="9697"></a> <a name="9698"></a> If you run a verify job without this directive, the last job run will be compared with the catalog, which means that you must immediately follow a backup by a verify command. If you specify a <b>Verify Job</b> Bacula will find the last job with that name that ran. This permits you to run all your backups, then run Verify jobs on those that you wish to be verified (most often a <b>VolumeToCatalog</b>) so that the tape just written is re-read. <p>
					</p>
				</dd>
				<dt><strong>JobDefs = JobDefs-Resource-Name</strong></dt>
				<dd><a name="9703"></a> <a name="9704"></a> If a JobDefs-Resource-Name is specified, all the values contained in the named JobDefs resource will be used as the defaults for the current Job. Any value that you explicitly define in the current Job resource, will override any defaults specified in the JobDefs resource. The use of this directive permits writing much more compact Job resources where the bulk of the directives are defined in one or more JobDefs. This is particularly useful if you have many similar Jobs but with minor variations such as different Clients. A simple example of the use of JobDefs is provided in the default bacula-dir.conf file. <p>
					</p>
				</dd>
				<dt><strong>Bootstrap = bootstrap-file</strong></dt>
				<dd><a name="9707"></a> <a name="9708"></a> The Bootstrap directive specifies a bootstrap file that, if provided, will be used during <b>Restore</b> Jobs and is ignored in other Job types. The <b>bootstrap</b> file contains the list of tapes to be used in a restore Job as well as which files are to be restored. Specification of this directive is optional, and if specified, it is used only for a restore job. In addition, when running a Restore job from the console, this value can be changed. <p> If you use the <b>Restore</b> command in the Console program, to start a restore job, the <b>bootstrap</b> file will be created automatically from the files you select to be restored. </p>
					<p> For additional details of the <b>bootstrap</b> file, please see Restoring Files with the Bootstrap FileBootstrapChapter chapter of this manual. </p>
					<p><a name="writebootstrap"></a></p>
				</dd>
				<dt><strong>Write Bootstrap = bootstrap-file-specification</strong></dt>
				<dd><a name="9719"></a> <a name="9720"></a> The <b>writebootstrap</b> directive specifies a file name where Bacula will write a <b>bootstrap</b> file for each Backup job run. This directive applies only to Backup Jobs. If the Backup job is a Full save, Bacula will erase any current contents of the specified file before writing the bootstrap records. If the Job is an Incremental or Differential save, Bacula will append the current bootstrap record to the end of the file. <p> Using this feature, permits you to constantly have a bootstrap file that can recover the current state of your system. Normally, the file specified should be a mounted drive on another machine, so that if your hard disk is lost, you will immediately have a bootstrap record available. Alternatively, you should copy the bootstrap file to another machine after it is updated. Note, it is a good idea to write a separate bootstrap file for each Job backed up including the job that backs up your catalog database. </p>
					<p> If the <b>bootstrap-file-specification</b> begins with a vertical bar (<code>|</code>), Bacula will use the specification as the name of a program to which it will pipe the bootstrap record. It could for example be a shell script that emails you the bootstrap record. </p>
					<p> On versions 1.39.22 or greater, before opening the file or executing the specified command, Bacula performs character substitutioncharacter substitution like in RunScript directive. To automatically manage your bootstrap files, you can use this in your <b>JobDefs</b> resources: <pre>
JobDefs {
   Write Bootstrap = "%c_%n.bsr"
   ...
}
</pre></p>
					<p> For more details on using this file, please see the chapter entitled The Bootstrap FileBootstrapChapter of this manual. </p>
					<p>
					</p>
				</dd>
				<dt><strong>Client = client-resource-name</strong></dt>
				<dd><a name="9733"></a> <a name="9734"></a> The Client directive specifies the Client (File daemon) that will be used in the current Job. Only a single Client may be specified in any one Job. The Client runs on the machine to be backed up, and sends the requested files to the Storage daemon for backup, or receives them when restoring. For additional details, see the Client Resource sectionClientResource2 of this chapter. This directive is required. <p>
					</p>
				</dd>
				<dt><strong>FileSet = FileSet-resource-name</strong></dt>
				<dd><a name="9739"></a> <a name="9740"></a> The FileSet directive specifies the FileSet that will be used in the current Job. The FileSet specifies which directories (or files) are to be backed up, and what options to use (e.g. compression, ...). Only a single FileSet resource may be specified in any one Job. For additional details, see the FileSet Resource sectionFileSetResource of this chapter. This directive is required. <p>
					</p>
				</dd>
				<dt><strong>Base = job-resource-name, ...</strong></dt>
				<dd><a name="9745"></a> <a name="9746"></a> The Base directive permits to specify the list of jobs that will be used during Full backup as base. This directive is optional. See the Base Job chapterbasejobs for more information. <p>
					</p>
				</dd>
				<dt><strong>Messages = messages-resource-name</strong></dt>
				<dd><a name="9751"></a> <a name="9752"></a> The Messages directive defines what Messages resource should be used for this job, and thus how and where the various messages are to be delivered. For example, you can direct some messages to a log file, and others can be sent by email. For additional details, see the Messages ResourceMessagesChapter Chapter of this manual. This directive is required. <p><a name="Director:Job:SnapshotRetention"></a></p>
				</dd>
				<dt><strong>Snapshot Retention = time-period-specification</strong></dt>
				<dd><a name="9758"></a> <a name="9759"></a><p> The Snapshot Retention directive defines the length of time that Bacula will keep Snapshots in the Catalog database and on the Client after the Snapshot creation. When this time period expires, and if using the <tt>snapshot prune</tt> command, Bacula will prune (remove) Snapshot records that are older than the specified Snapshot Retention period and will contact the FileDaemon to delete Snapshots from the system. </p>
					<p> The Snapshot retention period is specified as seconds, minutes, hours, days, weeks, months, quarters, or years. See the Configuration chapterTime of this manual for additional details of time specification. </p>
					<p> The default is 0 seconds, Snapshots are deleted at the end of the backup. The Job <span class="textbf">SnapshotRetention</span> directive overwrites the Client <span class="textbf">SnapshotRetention</span> directive. </p>
					<p>
					</p>
				</dd>
				<dt><strong>Pool = pool-resource-name</strong></dt>
				<dd><a name="9767"></a> <a name="9768"></a> The Pool directive defines the pool of Volumes where your data can be backed up. Many Bacula installations will use only the <b>Default</b> pool. However, if you want to specify a different set of Volumes for different Clients or different Jobs, you will probably want to use Pools. For additional details, see the Pool Resource sectionPoolResource of this chapter. This directive is required. <p>
					</p>
				</dd>
				<dt><strong>Full Backup Pool = pool-resource-name</strong></dt>
				<dd><a name="9774"></a> <a name="9775"></a> The <i>Full Backup Pool</i> specifies a Pool to be used for Full backups. It will override any Pool specification during a Full backup. This directive is optional. <p>
					</p>
				</dd>
				<dt><strong>Differential Backup Pool = pool-resource-name</strong></dt>
				<dd><a name="9779"></a> <a name="9780"></a> The <i>Differential Backup Pool</i> specifies a Pool to be used for Differential backups. It will override any Pool specification during a Differential backup. This directive is optional. <p>
					</p>
				</dd>
				<dt><strong>Incremental Backup Pool = pool-resource-name</strong></dt>
				<dd><a name="9784"></a> <a name="9785"></a> The <i>Incremental Backup Pool</i> specifies a Pool to be used for Incremental backups. It will override any Pool specification during an Incremental backup. This directive is optional. <p><a name="Director:Job:BackupsToKeep"></a></p>
				</dd>
				<dt><strong>BackupsToKeep = number</strong></dt>
				<dd><a name="9790"></a> <a name="9791"></a><p> When this directive is present during a Virtual Full (it is ignored for other Job types), it will look for a Full backup that has more subsequent backups than the value specified. In the example below, the Job will simply terminate unless there is a Full back followed by at least 31 backups of either level Differential or Incremental. </p>
					<p><pre>
   Job {
     Name = "VFull"
     Type = Backup
     Level = VirtualFull
     Client = "my-fd"
     File Set = "FullSet"
     Accurate = Yes
     Backups To Keep = 30
   }
</pre></p>
					<p> Assuming that the last Full backup is followed by 32 Incremental backups, a Virtual Full will be run that consolidates the Full with the first two Incrementals that were run after the Full. The result is that you will end up with a Full followed by 30 Incremental backups. </p>
					<p><a name="Director:Job:DeleteConsolidatedJobs"></a></p>
				</dd>
				<dt><strong>DeleteConsolidatedJobs = yes/no</strong></dt>
				<dd><a name="9797"></a> <a name="9798"></a><p> If set to <b>yes</b>, it will cause any old Job that is consolidated during a Virtual Full to be deleted. In the example above we saw that a Full plus one other job (either an Incremental or Differential) were consolidated into a new Full backup. The original Full plus the other Job consolidated will be deleted. The default value is <b>no</b>. </p>
					<p>
					</p>
				</dd>
				<dt><strong>Schedule = schedule-name</strong></dt>
				<dd><a name="9803"></a> <a name="9804"></a> The Schedule directive defines what schedule is to be used for the Job. The schedule in turn determines when the Job will be automatically started and what Job level (i.e. Full, Incremental, ...) is to be run. This directive is optional, and if left out, the Job can only be started manually using the Console program. Although you may specify only a single Schedule resource for any one job, the Schedule resource may contain multiple <b>Run</b> directives, which allow you to run the Job at many different times, and each <b>run</b> directive permits overriding the default Job Level Pool, Storage, and Messages resources. This gives considerable flexibility in what can be done with a single Job. For additional details, see the Schedule Resource ChapterScheduleResource of this manual. <p>
					</p>
				</dd>
				<dt><strong>Storage = storage-resource-name</strong></dt>
				<dd><a name="9811"></a> <a name="9812"></a> The Storage directive defines the name of the storage services where you want to backup the FileSet data. For additional details, see the Storage Resource ChapterStorageResource2 of this manual. The Storage resource may also be specified in the Job's Pool resource, in which case the value in the Pool resource overrides any value in the Job. This Storage resource definition is not required by either the Job resource or in the Pool, but it must be specified in one or the other, if not an error will result. <p>
					</p>
				</dd>
				<dt><strong>Max Start Delay = time</strong></dt>
				<dd><a name="9817"></a> <a name="9818"></a> The time specifies the maximum delay between the scheduled time and the actual start time for the Job. For example, a job can be scheduled to run at 1:00am, but because other jobs are running, it may wait to run. If the delay is set to 3600 (one hour) and the job has not begun to run by 2:00am, the job will be canceled. This can be useful, for example, to prevent jobs from running during day time hours. The default is 0 which indicates no limit. <p>
					</p>
				</dd>
				<dt><strong>Max Run Time = time</strong></dt>
				<dd><a name="9821"></a> <a name="9822"></a> The time specifies the maximum allowed time that a job may run, counted from when the job starts, (<b>not</b> necessarily the same as when the job was scheduled). <p> By default, the the watchdog thread will kill any Job that has run more than 200 days. The maximum watchdog timeout is independent of MaxRunTime and cannot be changed. </p>
					<p>
					</p>
				</dd>
				<dt><strong>Incremental|Differential Max Wait Time = time</strong></dt>
				<dd><a name="9826"></a> <a name="9827"></a> <a name="9828"></a> Theses directives have been deprecated in favor of <tt>Incremental|Differential Max Run Time</tt> since bacula 2.3.18. <p>
					</p>
				</dd>
				<dt><strong>Incremental Max Run Time = time</strong></dt>
				<dd><a name="9832"></a> <a name="9833"></a> The time specifies the maximum allowed time that an Incremental backup job may run, counted from when the job starts, (<b>not</b> necessarily the same as when the job was scheduled). <p>
					</p>
				</dd>
				<dt><strong>Differential Max Wait Time = time</strong></dt>
				<dd><a name="9837"></a> <a name="9838"></a> The time specifies the maximum allowed time that a Differential backup job may run, counted from when the job starts, (<b>not</b> necessarily the same as when the job was scheduled). <p>
					</p>
				</dd>
				<dt><strong>Max Run Sched Time = time</strong></dt>
				<dd><a name="9842"></a> <a name="9843"></a><p> The time specifies the maximum allowed time that a job may run, counted from when the job was scheduled. This can be useful to prevent jobs from running during working hours. We can see it like <tt>Max Start Delay + Max Run Time</tt>. </p>
					<p>
					</p>
				</dd>
				<dt><strong>Max Wait Time = time</strong></dt>
				<dd><a name="9847"></a> <a name="9848"></a> The time specifies the maximum allowed time that a job may block waiting for a resource (such as waiting for a tape to be mounted, or waiting for the storage or file daemons to perform their duties), counted from the when the job starts, (<b>not</b> necessarily the same as when the job was scheduled). This directive works as expected since bacula 2.3.18. <p>
						<div align="CENTER"><a name="fig:differenttime"></a><a name="9852"></a><table>
								<caption align="BOTTOM"><strong>Figure:</strong> Job time control directives</caption>
								<tr>
									<td>
										<div align="CENTER">
										</div><img align="BOTTOM" alt="Image different_time" border="0" height="352" src="../images/different_time.png" width="663" /></td>
								</tr>
							</table>
						</div>
					</p>
					<p><a name="Director:Job:MaximumSpawnedJobs"></a></p>
				</dd>
				<dt><strong>Maximum Spawned Jobs = nb</strong></dt>
				<dd><a name="9858"></a> <a name="9859"></a><p> The Job resource now permits specifying a number of <b>Maximum Spawn Jobs</b>. The default is 300. This directive can be useful if you have big hardware and you do a lot of Migration/Copy jobs which start at the same time. </p>
					<p>
					</p>
				</dd>
				<dt><strong>Maximum Bandwidth = speed</strong></dt>
				<dd><a name="9863"></a> <a name="9864"></a><p> The speed parameter specifies the maximum allowed bandwidth that a job may use. The speed parameter should be specified in k/s, kb/s, m/s or mb/s. </p>
					<p>
					</p>
				</dd>
				<dt><strong>Max Full Interval = time</strong></dt>
				<dd><a name="9867"></a> <a name="9868"></a> The time specifies the maximum allowed age (counting from start time) of the most recent successful Full backup that is required in order to run Incremental or Differential backup jobs. If the most recent Full backup is older than this interval, Incremental and Differential backups will be upgraded to Full backups automatically. If this directive is not present, or specified as 0, then the age of the previous Full backup is not considered. <p><a name="PreferMountedVolumes"></a></p>
				</dd>
				<dt><strong>Prefer Mounted Volumes = yes|no</strong></dt>
				<dd><a name="9872"></a> <a name="9873"></a> If the Prefer Mounted Volumes directive is set to <b>yes</b> (default yes), the Storage daemon is requested to select either an Autochanger or a drive with a valid Volume already mounted in preference to a drive that is not ready. This means that all jobs will attempt to append to the same Volume (providing the Volume is appropriate - right Pool, ... for that job), unless you are using multiple pools. If no drive with a suitable Volume is available, it will select the first available drive. Note, any Volume that has been requested to be mounted, will be considered valid as a mounted volume by another job. This if multiple jobs start at the same time and they all prefer mounted volumes, the first job will request the mount, and the other jobs will use the same volume. <p> If the directive is set to <b>no</b>, the Storage daemon will prefer finding an unused drive, otherwise, each job started will append to the same Volume (assuming the Pool is the same for all jobs). Setting Prefer Mounted Volumes to no can be useful for those sites with multiple drive autochangers that prefer to maximize backup throughput at the expense of using additional drives and Volumes. This means that the job will prefer to use an unused drive rather than use a drive that is already in use. </p>
					<p> Despite the above, we recommend against setting this directive to <b>no</b> since it tends to add a lot of swapping of Volumes between the different drives and can easily lead to deadlock situations in the Storage daemon. We will accept bug reports against it, but we cannot guarantee that we will be able to fix the problem in a reasonable time. </p>
					<p> A better alternative for using multiple drives is to use multiple pools so that Bacula will be forced to mount Volumes from those Pools on different drives. </p>
					<p>
					</p>
				</dd>
				<dt><strong>Prune Jobs = yes|no</strong></dt>
				<dd><a name="9879"></a> <a name="9880"></a> Normally, pruning of Jobs from the Catalog is specified on a Client by Client basis in the Client resource with the <b>AutoPrune</b> directive. If this directive is specified (not normally) and the value is <b> yes</b>, it will override the value specified in the Client resource. The default is <b>no</b>. <p>
					</p>
				</dd>
				<dt><strong>Prune Files = yes|no</strong></dt>
				<dd><a name="9886"></a> <a name="9887"></a> Normally, pruning of Files from the Catalog is specified on a Client by Client basis in the Client resource with the <b>AutoPrune</b> directive. If this directive is specified (not normally) and the value is <b> yes</b>, it will override the value specified in the Client resource. The default is <b>no</b>. <p>
					</p>
				</dd>
				<dt><strong>Prune Volumes = yes|no</strong></dt>
				<dd><a name="9893"></a> <a name="9894"></a> Normally, pruning of Volumes from the Catalog is specified on a Pool by Pool basis in the Pool resource with the <b>AutoPrune</b> directive. Note, this is different from File and Job pruning which is done on a Client by Client basis. If this directive is specified (not normally) and the value is <b>yes</b>, it will override the value specified in the Pool resource. The default is <b>no</b>. <p>
					</p>
				</dd>
				<dt><strong>RunScript {body-of-runscript}</strong></dt>
				<dd><a name="9900"></a> <a name="9901"></a><p> The RunScript directive behaves like a resource in that it requires opening and closing braces around a number of directives that make up the body of the runscript. </p>
					<p> The specified <b>Command</b> (see below for details) is run as an external program prior or after the current Job. This is optional. By default, the program is executed on the Client side like in <tt>ClientRunXXXJob</tt>. </p>
					<p><span class="textbf">Console</span> options are special commands that are sent to the director instead of the OS. At this time, console command ouputs are redirected to log with the jobid 0. </p>
					<p> You can use following console command : <tt>delete</tt>, <tt>disable</tt>, <tt>enable</tt>, <tt>estimate</tt>, <tt>list</tt>, <tt>llist</tt>, <tt>memory</tt>, <tt>prune</tt>, <tt>purge</tt>, <tt>reload</tt>, <tt>status</tt>, <tt>setdebug</tt>, <tt>show</tt>, <tt>time</tt>, <tt>trace</tt>, <tt>update</tt>, <tt>version</tt>, <tt>.client</tt>, <tt>.jobs</tt>, <tt>.pool</tt>, <tt>.storage</tt>. See console chapter for more information. You need to specify needed information on command line, nothing will be prompted. Example : </p>
					<p><pre>
   Console = "prune files client=%c"
   Console = "update stats age=3"
</pre></p>
					<p> You can specify more than one Command/Console option per RunScript. </p>
					<p> You can use following options may be specified in the body of the runscript: <br />
					</p>
					<p>
						<table border="1" cellpadding="3">
							<tr>
								<td align="CENTER" colspan="1"><span><span class="textbf">Options</span></span></td>
								<td align="CENTER" colspan="1"><span><span class="textbf">Value</span></span></td>
								<td align="CENTER" colspan="1"><span><span class="textbf">Default</span></span></td>
								<td align="CENTER" colspan="1"><span><span class="textbf">Information</span></span></td>
							</tr>
							<tr>
								<td align="LEFT">Runs On Success</td>
								<td align="LEFT">Yes / No</td>
								<td align="LEFT"><i>Yes</i></td>
								<td align="LEFT">Run command if JobStatus is successful</td>
							</tr>
							<tr>
								<td align="LEFT">Runs On Failure</td>
								<td align="LEFT">Yes / No</td>
								<td align="LEFT"><i>No</i></td>
								<td align="LEFT">Run command if JobStatus isn't successful</td>
							</tr>
							<tr>
								<td align="LEFT">Runs On Client</td>
								<td align="LEFT">Yes / No</td>
								<td align="LEFT"><i>Yes</i></td>
								<td align="LEFT">Run command on client</td>
							</tr>
							<tr>
								<td align="LEFT">Runs When</td>
								<td align="LEFT">Before | After | Always | <span class="textsl">AfterVSS</span></td>
								<td align="LEFT"><i>Never</i></td>
								<td align="LEFT">When run commands</td>
							</tr>
							<tr>
								<td align="LEFT">Fail Job On Error</td>
								<td align="LEFT">Yes/No</td>
								<td align="LEFT"><i>Yes</i></td>
								<td align="LEFT">Fail job if script returns something different from 0</td>
							</tr>
							<tr>
								<td align="LEFT">Command</td>
								<td align="LEFT"> </td>
								<td align="LEFT"> </td>
								<td align="LEFT">Path to your script</td>
							</tr>
							<tr>
								<td align="LEFT">Console</td>
								<td align="LEFT"> </td>
								<td align="LEFT"> </td>
								<td align="LEFT">Console command</td>
							</tr>
						</table>
					</p>
					<p> Any output sent by the command to standard output will be included in the Bacula job report. The command string must be a valid program name or name of a shell script. </p>
					<p> In addition, the command string is parsed then fed to the OS, which means that the path will be searched to execute your specified command, but there is no shell interpretation, as a consequence, if you invoke complicated commands or want any shell features such as redirection or piping, you must call a shell script and do it inside that script. </p>
					<p> Before submitting the specified command to the operating system, Bacula performs character substitution of the following characters: </p>
					<p><a name="character_substitution"></a><pre>
    %% = %
    %b = Job Bytes
    %c = Client's name
    %C = If the job is a Cloned job (Only on director side)
    %d = Daemon's name (Such as host-dir or host-fd)
    %D = Director's name (Also valid on file daemon)
    %e = Job Exit Status
    %E = Non-fatal Job Errors
    %f = Job FileSet (Only on director side)
    %F = Job Files
    %h = Client address
    %i = JobId
    %I = Migration/Copy JobId (Only in Copy/Migrate Jobs)
    %j = Unique Job id
    %l = Job Level
    %n = Job name
    %p = Pool name (Only on director side)
    %P = Current PID process
    %o = Job Priority
    %R = Read Bytes
    %S = Previous Job name (Only on file daemon side)
    %s = Since time
    %t = Job type (Backup, ...)
    %v = Volume name (Only on director side)
    %w = Storage name (Only on director side)
    %x = Spooling enabled? ("yes" or "no")
</pre></p>
					<p> Some character substitutions are not available in all situations. The Job Exit Status code %e edits the following values: </p>
					<p><a name="10534"></a><ul>
							<li>OK </li>
							<li>Error </li>
							<li>Fatal Error </li>
							<li>Canceled </li>
							<li>Differences </li>
							<li>Unknown term code </li>
						</ul>
					</p>
					<p> Thus if you edit it on a command line, you will need to enclose it within some sort of quotes. </p>
					<p> You can use these following shortcuts: <br />
					</p>
					<p>
						<table border="1" cellpadding="3">
							<tr>
								<td align="CENTER" colspan="1"><span><span class="textbf">Keyword</span></span></td>
							</tr>
							<tr>
								<td align="LEFT"> </td>
							</tr>
							<tr>
								<td align="LEFT">Run Before Job</td>
							</tr>
							<tr>
								<td align="LEFT">Run After Job</td>
							</tr>
							<tr>
								<td align="LEFT">Run After Failed Job</td>
							</tr>
							<tr>
								<td align="LEFT">Client Run Before Job</td>
							</tr>
							<tr>
								<td align="LEFT">Client Run After Job</td>
							</tr>
						</table> Examples: <pre>
RunScript {
    RunsWhen = Before
    FailJobOnError = No
    Command = "/etc/init.d/apache stop"
}

RunScript {
    RunsWhen = After
    RunsOnFailure = yes
    Command = "/etc/init.d/apache start"
}
</pre></p>
					<p><b>Notes about ClientRunBeforeJob</b></p>
					<p> For compatibility reasons, with this shortcut, the command is executed directly when the client recieve it. And if the command is in error, other remote runscripts will be discarded. To be sure that all commands will be sent and executed, you have to use RunScript syntax. </p>
					<p><b>Special Shell Considerations</b></p>
					<p> A "Command =" can be one of: <ul>
							<li>The full path to an executable program </li>
							<li>The name of an executable program that can be found in the $PATH </li>
							<li>A <span class="textsl">complex</span> shell command in the form of: "sh -c ÿour commands go hereSPMquot;" </li>
						</ul>
					</p>
					<p><b>Special Windows Considerations</b></p>
					<p> You can run scripts just after snapshots initializations with <span class="textsl">AfterVSS</span> keyword. </p>
					<p> In addition, for a Windows client, please take note that you must ensure a correct path to your script. The script or program can be a .com, .exe or a .bat file. If you just put the program name in then Bacula will search using the same rules that cmd.exe uses (current directory, Bacula bin directory, and PATH). It will even try the different extensions in the same order as cmd.exe. The command can be anything that cmd.exe or command.com will recognize as an executable file. </p>
					<p> However, if you have slashes in the program name then Bacula figures you are fully specifying the name, so you must also explicitly add the three character extension. </p>
					<p> The command is run in a Win32 environment, so Unix like commands will not work unless you have installed and properly configured Cygwin in addition to and separately from Bacula. </p>
					<p> The System %Path% will be searched for the command. (under the environment variable dialog you have have both System Environment and User Environment, we believe that only the System environment will be available to bacula-fd, if it is running as a service.) </p>
					<p> System environment variables can be referenced with %var% and used as either part of the command name or arguments. </p>
					<p> So if you have a script in the Bacula <br /> bin directory then the following lines should work fine: </p>
					<p><pre>
        Client Run Before Job = systemstate
or
        Client Run Before Job = systemstate.bat
or
        Client Run Before Job = "systemstate"
or
        Client Run Before Job = "systemstate.bat"
or
        ClientRunBeforeJob = "\"C:/Program Files/Bacula/systemstate.bat\""
</pre></p>
					<p> The outer set of quotes is removed when the configuration file is parsed. You need to escape the inner quotes so that they are there when the code that parses the command line for execution runs so it can tell what the program name is. </p>
					<p><pre>
ClientRunBeforeJob = "\"C:/Program Files/Software
     Vendor/Executable\" /arg1 /arg2 \"foo bar\""
</pre></p>
					<p> The special characters <pre>
&&lt;&gt;()@^|
</pre> will need to be quoted, if they are part of a filename or argument. </p>
					<p> If someone is logged in, a blank "command" window running the commands will be present during the execution of the command. </p>
					<p> Some Suggestions from Phil Stracchino for running on Win32 machines with the native Win32 File daemon: </p>
					<p>
						<ol>
							<li>You might want the ClientRunBeforeJob directive to specify a .bat file which runs the actual client-side commands, rather than trying to run (for example) regedit /e directly. </li>
							<li>The batch file should explicitly 'exit 0' on successful completion. </li>
							<li>The path to the batch file should be specified in Unix form: <p> ClientRunBeforeJob = "c:/bacula/bin/systemstate.bat" </p>
								<p> rather than DOS/Windows form: </p>
								<p> ClientRunBeforeJob = </p>
								<p> "c:\bacula\bin\systemstate.bat" INCORRECT </p>
							</li>
						</ol>
					</p>
					<p> For Win32, please note that there are certain limitations: </p>
					<p> ClientRunBeforeJob = "C:/Program Files/Bacula/bin/pre-exec.bat" </p>
					<p> Lines like the above do not work because there are limitations of cmd.exe that is used to execute the command. Bacula prefixes the string you supply with <b>cmd.exe /c </b>. To test that your command works you should type <b>cmd /c "C:/Program Files/test.exe"</b> at a cmd prompt and see what happens. Once the command is correct insert a backslash (\) before each double quote ("), and then put quotes around the whole thing when putting it in the director's .conf file. You either need to have only one set of quotes or else use the short name and don't put quotes around the command path. </p>
					<p> Below is the output from cmd's help as it relates to the command line passed to the /c option. </p>
					<p> If /C or /K is specified, then the remainder of the command line after the switch is processed as a command line, where the following logic is used to process quote (") characters: </p>
					<p>
						<ol>
							<li>If all of the following conditions are met, then quote characters on the command line are preserved: <ul>
									<li>no /S switch. </li>
									<li>exactly two quote characters. </li>
									<li>no special characters between the two quote characters, where special is one of: <pre>
&&lt;&gt;()@^|
</pre></li>
									<li>there are one or more whitespace characters between the the two quote characters. </li>
									<li>the string between the two quote characters is the name of an executable file. </li>
								</ul>
								<p>
								</p>
							</li>
							<li>Otherwise, old behavior is to see if the first character is a quote character and if so, strip the leading character and remove the last quote character on the command line, preserving any text after the last quote character. <p>
								</p>
							</li>
						</ol>
					</p>
					<p> The following example of the use of the Client Run Before Job directive was submitted by a user: <br /> You could write a shell script to back up a DB2 database to a FIFO. The shell script is: </p>
					<p><pre>
 #!/bin/sh
 # ===== backupdb.sh
 DIR=/u01/mercuryd

 mkfifo $DIR/dbpipe
 db2 BACKUP DATABASE mercuryd TO $DIR/dbpipe WITHOUT PROMPTING &
 sleep 1
</pre></p>
					<p> The following line in the Job resource in the bacula-dir.conf file: <pre>
 Client Run Before Job = "su - mercuryd -c \"/u01/mercuryd/backupdb.sh '%t'
'%l'\""
</pre></p>
					<p> When the job is run, you will get messages from the output of the script stating that the backup has started. Even though the command being run is backgrounded with &, the job will block until the "db2 BACKUP DATABASE" command, thus the backup stalls. </p>
					<p> To remedy this situation, the "db2 BACKUP DATABASE" line should be changed to the following: </p>
					<p><pre>
 db2 BACKUP DATABASE mercuryd TO $DIR/dbpipe WITHOUT PROMPTING &gt; $DIR/backup.log
2&gt;&1 &lt; /dev/null &
</pre></p>
					<p> It is important to redirect the input and outputs of a backgrounded command to /dev/null to prevent the script from blocking. </p>
					<p>
					</p>
				</dd>
				<dt><strong>Run Before Job = command</strong></dt>
				<dd><a name="10653"></a> <a name="10654"></a> <a name="10655"></a> The specified <b>command</b> is run as an external program prior to running the current Job. This directive is not required, but if it is defined, and if the exit code of the program run is non-zero, the current Bacula job will be canceled. <p><pre>
Run Before Job = "echo test"
</pre> it's equivalent to : <pre>
RunScript {
 Command = "echo test"
 RunsOnClient = No
 RunsWhen = Before
}
</pre></p>
					<p> Lutz Kittler has pointed out that using the RunBeforeJob directive can be a simple way to modify your schedules during a holiday. For example, suppose that you normally do Full backups on Fridays, but Thursday and Friday are holidays. To avoid having to change tapes between Thursday and Friday when no one is in the office, you can create a RunBeforeJob that returns a non-zero status on Thursday and zero on all other days. That way, the Thursday job will not run, and on Friday the tape you inserted on Wednesday before leaving will be used. </p>
					<p>
					</p>
				</dd>
				<dt><strong>Run After Job = command</strong></dt>
				<dd><a name="10663"></a> <a name="10664"></a> The specified <b>command</b> is run as an external program if the current job terminates normally (without error or without being canceled). This directive is not required. If the exit code of the program run is non-zero, Bacula will print a warning message. Before submitting the specified command to the operating system, Bacula performs character substitution as described above for the <b>RunScript</b> directive. <p> An example of the use of this directive is given in the TipsJobNotificationproblemschapter of the Bacula Enterprise Problem Resolution Guide. </p>
					<p> See the <b>Run After Failed Job</b> if you want to run a script after the job has terminated with any non-normal status. </p>
					<p>
					</p>
				</dd>
				<dt><strong>Run After Failed Job = command</strong></dt>
				<dd><a name="10674"></a> <a name="10675"></a> The specified <b>command</b> is run as an external program after the current job terminates with any error status. This directive is not required. The command string must be a valid program name or name of a shell script. If the exit code of the program run is non-zero, Bacula will print a warning message. Before submitting the specified command to the operating system, Bacula performs character substitution as described above for the <b>RunScript</b> directive. Note, if you wish that your script will run regardless of the exit status of the Job, you can use this : <pre>
RunScript {
 Command = "echo test"
 RunsWhen = After
 RunsOnFailure = yes
 RunsOnClient  = no
 RunsOnSuccess = yes    # default, you can drop this line
}
</pre><p> An example of the use of this directive is given in the TipsJobNotificationproblemschapter of the Bacula Enterprise Problem Resolution Guide. </p>
					<p>
					</p>
				</dd>
				<dt><strong>Client Run Before Job = command</strong></dt>
				<dd><a name="10686"></a> <a name="10687"></a> This directive is the same as <b>Run Before Job</b> except that the program is run on the client machine. The same restrictions apply to Unix systems as noted above for the <b>RunScript</b>. <span class="textbf">ClientRunBeforeJob</span> can be used with Backup and Restore jobs. <p>
					</p>
				</dd>
				<dt><strong>Client Run After Job = command</strong></dt>
				<dd><a name="10693"></a> <a name="10694"></a> The specified <b>command</b> is run on the client machine as soon as data spooling is complete in order to allow restarting applications on the client as soon as possible. <span class="textbf">ClientRunBeforeJob</span> can be used with Backup and Restore jobs. <p> Note, please see the notes above in <b>RunScript</b> concerning Windows clients. </p>
					<p>
					</p>
				</dd>
				<dt><strong>Rerun Failed Levels = yes|no</strong></dt>
				<dd><a name="10700"></a> <a name="10701"></a> If this directive is set to <b>yes</b> (default no), and Bacula detects that a previous job at a higher level (i.e. Full or Differential) has failed, the current job level will be upgraded to the higher level. This is particularly useful for Laptops where they may often be unreachable, and if a prior Full save has failed, you wish the very next backup to be a Full save rather than whatever level it is started as. <p> There are several points that must be taken into account when using this directive: first, a failed job is defined as one that has not terminated normally, which includes any running job of the same name (you need to ensure that two jobs of the same name do not run simultaneously); secondly, the <b>Ignore FileSet Changes</b> directive is not considered when checking for failed levels, which means that any FileSet change will trigger a rerun. </p>
					<p>
					</p>
				</dd>
				<dt><strong>Spool Data = yes|no</strong></dt>
				<dd><a name="10706"></a> <a name="10707"></a><p> If this directive is set to <b>yes</b> (default no), the Storage daemon will be requested to spool the data for this Job to disk rather than write it directly to the Volume (normally a tape). </p>
					<p> Thus the data is written in large blocks to the Volume rather than small blocks. This directive is particularly useful when running multiple simultaneous backups to tape. Once all the data arrives or the spool files' maximum sizes are reached, the data will be despooled and written to tape. </p>
					<p> Spooling data prevents interleaving date from several job and reduces or eliminates tape drive stop and start commonly known as "shoe-shine". </p>
					<p> We don't recommend using this option if you are writing to a disk file using this option will probably just slow down the backup jobs. </p>
					<p> NOTE: When this directive is set to yes, Spool Attributes is also automatically set to yes. </p>
					<p>
					</p>
				</dd>
				<dt><strong>Spool Attributes = yes|no</strong></dt>
				<dd><a name="10711"></a> <a name="10712"></a> <a name="10713"></a> <a name="10714"></a> <a name="10715"></a> <a name="10716"></a> The default is set to <b>no</b>, which means that the File attributes are sent by the Storage daemon to the Director as they are stored on tape. However, if you want to avoid the possibility that database updates will slow down writing to the tape, you may want to set the value to <b> yes</b>, in which case the Storage daemon will buffer the File attributes and Storage coordinates to a temporary file in the Working Directory, then when writing the Job data to the tape is completed, the attributes and storage coordinates will be sent to the Director. <p> NOTE: When Spool Data is set to yes, Spool Attributes is also automatically set to yes. </p>
					<p>
					</p>
				</dd>
				<dt><strong>SpoolSize=<i>bytes</i></strong></dt>
				<dd><a name="10720"></a> <a name="10721"></a> where the bytes specify the maximum spool size for this job. The default is take from Device Maximum Spool Size limit. This directive is available only in Bacula version 2.3.5 or later. <p>
					</p>
				</dd>
				<dt><strong>Where = directory</strong></dt>
				<dd><a name="10724"></a> <a name="10725"></a> This directive applies only to a Restore job and specifies a prefix to the directory name of all files being restored. This permits files to be restored in a different location from which they were saved. If <b> Where</b> is not specified or is set to backslash (<b>/</b>), the files will be restored to their original location. By default, we have set <b> Where</b> in the example configuration files to be <b> /tmp/bacula-restores</b>. This is to prevent accidental overwriting of your files. <p>
					</p>
				</dd>
				<dt><strong>Add Prefix = directory</strong></dt>
				<dd><a name="confaddprefix"></a> <a name="10733"></a> <a name="10734"></a> This directive applies only to a Restore job and specifies a prefix to the directory name of all files being restored. This will use File Relocationfilerelocation feature implemented in Bacula 2.1.8 or later. <p>
					</p>
				</dd>
				<dt><strong>Add Suffix = extention</strong></dt>
				<dd><a name="10739"></a> <a name="10740"></a> This directive applies only to a Restore job and specifies a suffix to all files being restored. This will use File Relocationfilerelocation feature implemented in Bacula 2.1.8 or later. <p> Using <tt>Add Suffix=.old</tt>, <tt>/etc/passwd</tt> will be restored to <tt>/etc/passwsd.old</tt></p>
					<p>
					</p>
				</dd>
				<dt><strong>Strip Prefix = directory</strong></dt>
				<dd><a name="10748"></a> <a name="10749"></a> This directive applies only to a Restore job and specifies a prefix to remove from the directory name of all files being restored. This will use the File Relocationfilerelocation feature implemented in Bacula 2.1.8 or later. <p> Using <tt>Strip Prefix=/etc</tt>, <tt>/etc/passwd</tt> will be restored to <tt>/passwd</tt></p>
					<p> Under Windows, if you want to restore <tt>c:/files</tt> to <tt>d:/files</tt>, you can use : </p>
					<p><pre>
 Strip Prefix = c:
 Add Prefix = d:
</pre></p>
					<p>
					</p>
				</dd>
				<dt><strong>RegexWhere = expressions</strong></dt>
				<dd><a name="10761"></a> <a name="10762"></a> This directive applies only to a Restore job and specifies a regex filename manipulation of all files being restored. This will use File Relocationfilerelocation feature implemented in Bacula 2.1.8 or later. <p> For more informations about how use this option, see thisuseregexwhere. </p>
					<p>
					</p>
				</dd>
				<dt><strong>Replace = replace-option</strong></dt>
				<dd><a name="10769"></a> <a name="10770"></a> This directive applies only to a Restore job and specifies what happens when Bacula wants to restore a file or directory that already exists. You have the following options for <b>replace-option</b>: <p>
						<dl>
							<dt><strong>always</strong></dt>
							<dd><a name="10773"></a> when the file to be restored already exists, it is deleted and then replaced by the copy that was backed up. This is the default value. <p>
								</p>
							</dd>
							<dt><strong>ifnewer</strong></dt>
							<dd><a name="10774"></a> if the backed up file (on tape) is newer than the existing file, the existing file is deleted and replaced by the back up. <p>
								</p>
							</dd>
							<dt><strong>ifolder</strong></dt>
							<dd><a name="10775"></a> if the backed up file (on tape) is older than the existing file, the existing file is deleted and replaced by the back up. <p>
								</p>
							</dd>
							<dt><strong>never</strong></dt>
							<dd><a name="10776"></a> if the backed up file already exists, Bacula skips restoring this file. </dd>
						</dl>
					</p>
					<p>
					</p>
				</dd>
				<dt><strong>Prefix Links=yes|no</strong></dt>
				<dd><a name="10780"></a> <a name="10781"></a> If a <b>Where</b> path prefix is specified for a recovery job, apply it to absolute links as well. The default is <b>No</b>. When set to <b> Yes</b> then while restoring files to an alternate directory, any absolute soft links will also be modified to point to the new alternate directory. Normally this is what is desired - i.e. everything is self consistent. However, if you wish to later move the files to their original locations, all files linked with absolute names will be broken. <p>
					</p>
				</dd>
				<dt><strong>Maximum Concurrent Jobs = number</strong></dt>
				<dd><a name="10787"></a> <a name="10788"></a> where number is the maximum number of Jobs from the current Job resource that can run concurrently. Note, this directive limits only Jobs with the same name as the resource in which it appears. Any other restrictions on the maximum concurrent jobs such as in the Director, Client, or Storage resources will also apply in addition to the limit specified here. The default is set to 1, but you may set it to a larger number. If set to a large value, please be careful to not have this value higher than the Maximum Concurrent Jobs configured in the Client resource in the Client/File daemon configuration file. Otherwise, the File daemon may fail backup jobs because the File daemon's Maximum Concurrent Jobs is exceeded. We recommend that you read the WARNING documented under Maximum Concurrent JobsDirMaxConJobs in the Director's resource. <p>
					</p>
				</dd>
				<dt><strong>Reschedule On Error = yes|no</strong></dt>
				<dd><a name="10795"></a> <a name="10796"></a> If this directive is enabled, and the job terminates in error, the job will be rescheduled as determined by the <b>Reschedule Interval</b> and <b>Reschedule Times</b> directives. If you cancel the job, it will not be rescheduled. The default is <b>no</b> (i.e. the job will not be rescheduled). <p> This specification can be useful for portables, laptops, or other machines that are not always connected to the network or switched on. </p>
					<p>
					</p>
				</dd>
				<dt><strong>Reschedule Incomplete Jobs = yes|no</strong></dt>
				<dd><a name="10802"></a> <a name="10803"></a><p> If this directive is enabled, and the job terminates in incomplete status, the job will be rescheduled as determined by the <b>Reschedule Interval</b> and <b>Reschedule Times</b> directives. If you cancel the job, it will not be rescheduled. The default is <b>yes</b> (i.e. Incomplete jobs will be rescheduled). </p>
					<p>
					</p>
				</dd>
				<dt><strong>Reschedule Interval = time-specification</strong></dt>
				<dd><a name="10809"></a> <a name="10810"></a> If you have specified <b>Reschedule On Error = yes</b> and the job terminates in error, it will be rescheduled after the interval of time specified by <b>time-specification</b>. See the time specification formatsTime in the Configure chapter for details of time specifications. If no interval is specified, the job will not be rescheduled on error. The default Reschedule Interval is 30 minutes (1800 seconds). <p>
					</p>
				</dd>
				<dt><strong>Reschedule Times = count</strong></dt>
				<dd><a name="10817"></a> <a name="10818"></a> This directive specifies the maximum number of times to reschedule the job. If it is set to zero (the default) the job will be rescheduled an indefinite number of times. <p>
					</p>
				</dd>
				<dt><strong>Allow Duplicate Jobs = yes|no</strong></dt>
				<dd><a name="10821"></a><p>
						<div align="CENTER"><a name="fig:allowduplicatejobs"></a><a name="10824"></a><table>
								<caption align="BOTTOM"><strong>Figure:</strong> Allow Duplicate Jobs usage</caption>
								<tr>
									<td>
										<div align="CENTER">
										</div><img align="BOTTOM" alt="Image duplicate-real" border="0" height="1123" src="../images/duplicate-real.png" width="794" /></td>
								</tr>
							</table>
						</div>
					</p>
					<p> A duplicate job in the sense we use it here means a second or subsequent job with the same name starts. This happens most frequently when the first job runs longer than expected because no tapes are available. The default is <b>yes</b>. </p>
					<p> If this directive is enabled duplicate jobs will be run. If the directive is set to <b>no</b> (default) then only one job of a given name may run at one time, and the action that Bacula takes to ensure only one job runs is determined by the other directives (see below). </p>
					<p> If <b>Allow Duplicate Jobs</b> is set to <b>no</b> and two jobs are present and none of the three directives given below permit cancelling a job, then the current job (the second one started) will be cancelled. </p>
					<p>
					</p>
				</dd>
				<dt><strong>Allow Higher Duplicates = yes|no</strong></dt>
				<dd><a name="10833"></a> This directive was implemented in version 5.0.0, but does not work as expected. If used, it should always be set to no. In later versions of Bacula the directive is disabled (disregarded). <p>
					</p>
				</dd>
				<dt><strong>Cancel Lower Level Duplicates = yes|no</strong></dt>
				<dd><a name="10836"></a> If <span class="textbf">Allow Duplicate Jobs</span> is set to <span class="textbf">no</span> and this directive is set to <span class="textbf">yes</span>, Bacula will choose between duplicated jobs the one with the highest level. For example, it will cancel a previous Incremental to run a Full backup. It works only for Backup jobs. The default is <tt>no</tt>. If the levels of the duplicated jobs are the same, nothing is done and the other Cancel XXX Duplicate directives will be examined. <p>
					</p>
				</dd>
				<dt><strong>Cancel Queued Duplicates = yes|no</strong></dt>
				<dd><a name="10843"></a> If <b>Allow Duplicate Jobs</b> is set to <b>no</b> and if this directive is set to <b>yes</b> any job that is already queued to run but not yet running will be canceled. The default is <b>no</b>. <p>
					</p>
				</dd>
				<dt><strong>Cancel Running Duplicates = yes|no</strong></dt>
				<dd><a name="10850"></a> If <b>Allow Duplicate Jobs</b> is set to <b>no</b> and if this directive is set to <b>yes</b> any job that is already running will be canceled. The default is <b>no</b>. <p>
					</p>
				</dd>
				<dt><strong>Run = job-name</strong></dt>
				<dd><a name="10857"></a> <a name="10858"></a> <a name="10859"></a> The Run directive (not to be confused with the Run option in a Schedule) allows you to start other jobs or to clone jobs. By using the cloning keywords (see below), you can backup the same data (or almost the same data) to two or more drives at the same time. The <b>job-name</b> is normally the same name as the current Job resource (thus creating a clone). However, it may be any Job name, so one job may start other related jobs. <p> The part after the equal sign must be enclosed in double quotes, and can contain any string or set of options (overrides) that you can specify when entering the Run command from the console. For example <b>storage=DDS-4 ...</b>. In addition, there are two special keywords that permit you to clone the current job. They are <b>level=%l</b> and <b>since=%s</b>. The %l in the level keyword permits entering the actual level of the current job and the %s in the since keyword permits putting the same time for comparison as used on the current job. Note, in the case of the since keyword, the %s must be enclosed in double quotes, and thus they must be preceded by a backslash since they are already inside quotes. For example: </p>
					<p><pre>
   run = "Nightly-backup level=%l since=\"%s\" storage=DDS-4"
</pre></p>
					<p> A cloned job will not start additional clones, so it is not possible to recurse. </p>
					<p> Please note that all cloned jobs, as specified in the Run directives are submitted for running before the original job is run (while it is being initialized). This means that any clone job will actually start before the original job, and may even block the original job from starting until the original job finishes unless you allow multiple simultaneous jobs. Even if you set a lower priority on the clone job, if no other jobs are running, it will start before the original job. </p>
					<p> If you are trying to prioritize jobs by using the clone feature (Run directive), you will find it much easier to do using a RunScript resource, or a RunBeforeJob directive. </p>
					<p><a name="Priority"></a></p>
				</dd>
				<dt><strong>Priority = number</strong></dt>
				<dd><a name="10869"></a> <a name="10870"></a> This directive permits you to control the order in which your jobs will be run by specifying a positive non-zero number. The higher the number, the lower the job priority. Assuming you are not running concurrent jobs, all queued jobs of priority 1 will run before queued jobs of priority 2 and so on, regardless of the original scheduling order. <p> The priority only affects waiting jobs that are queued to run, not jobs that are already running. If one or more jobs of priority 2 are already running, and a new job is scheduled with priority 1, the currently running priority 2 jobs must complete before the priority 1 job is run, unless Allow Mixed Priority is set. </p>
					<p> The default priority is 10. </p>
					<p> If you want to run concurrent jobs you should keep these points in mind: </p>
					<p>
						<ul>
							<li>See Running Concurrent JobsConcurrentJobsproblemssection on how to setup concurrent jobs in the Bacula Enterprise Problem Resolution Guide. <p>
								</p>
							</li>
							<li>Bacula concurrently runs jobs of only one priority at a time. It will not simultaneously run a priority 1 and a priority 2 job. <p>
								</p>
							</li>
							<li>If Bacula is running a priority 2 job and a new priority 1 job is scheduled, it will wait until the running priority 2 job terminates even if the Maximum Concurrent Jobs settings would otherwise allow two jobs to run simultaneously. <p>
								</p>
							</li>
							<li>Suppose that bacula is running a priority 2 job and a new priority 1 job is scheduled and queued waiting for the running priority 2 job to terminate. If you then start a second priority 2 job, the waiting priority 1 job will prevent the new priority 2 job from running concurrently with the running priority 2 job. That is: as long as there is a higher priority job waiting to run, no new lower priority jobs will start even if the Maximum Concurrent Jobs settings would normally allow them to run. This ensures that higher priority jobs will be run as soon as possible. </li>
						</ul>
					</p>
					<p> If you have several jobs of different priority, it may not best to start them at exactly the same time, because Bacula must examine them one at a time. If by Bacula starts a lower priority job first, then it will run before your high priority jobs. If you experience this problem, you may avoid it by starting any higher priority jobs a few seconds before lower priority ones. This insures that Bacula will examine the jobs in the correct order, and that your priority scheme will be respected. </p>
					<p><a name="AllowMixedPriority"></a></p>
				</dd>
				<dt><strong>Allow Mixed Priority = yes|no</strong></dt>
				<dd><a name="10880"></a> This directive is only implemented in version 2.5 and later. When set to <b>yes</b> (default <b>no</b>), this job may run even if lower priority jobs are already running. This means a high priority job will not have to wait for other jobs to finish before starting. The scheduler will only mix priorities when all running jobs have this set to true. <p> Note that only higher priority jobs will start early. Suppose the director will allow two concurrent jobs, and that two jobs with priority 10 are running, with two more in the queue. If a job with priority 5 is added to the queue, it will be run as soon as one of the running jobs finishes. However, new priority 10 jobs will not be run until the priority 5 job has finished. </p>
					<p>
					</p>
				</dd>
			</dl>
		</p>
		<p><b>The following is an example of a valid Job resource definition: </b></p>
		<p><b></b><pre>
Job {
  Name = "Minou"
  Type = Backup
  Level = Incremental                 # default
  Client = Minou
  FileSet="Minou Full Set"
  Storage = DLTDrive
  Pool = Default
  Schedule = "MinouWeeklyCycle"
  Messages = Standard
}
</pre><b></b></p>
		<p>
		</p>
		<h1><a name="SECTION002140000000000000000"></a> <a name="JobDefsResource"></a><br /> The JobDefs Resource </h1><b> <a name="10888"></a> <a name="10889"></a> </b><p><b>The JobDefs resource permits all the same directives that can appear in a Job resource. However, a JobDefs resource does not create a Job, rather it can be referenced within a Job to provide defaults for that Job. This permits you to concisely define several nearly identical Jobs, each one referencing a JobDefs resource which contains the defaults. Only the changes from the defaults need to be mentioned in each Job. </b></p>
		<p>
		</p>
		<h1><a name="SECTION002150000000000000000"></a> <a name="ScheduleResource"></a><br /> The Schedule Resource </h1><b> <a name="10892"></a> <a name="10893"></a> </b><p><b>The Schedule resource provides a means of automatically scheduling a Job as well as the ability to override the default Level, Pool, Storage and Messages resources. If a Schedule resource is not referenced in a Job, the Job can only be run manually. In general, you specify an action to be taken and when. </b></p>
		<p>
			<dl>
				<dt><strong>Schedule</strong></dt>
				<dd><a name="10895"></a> <a name="10896"></a> Start of the Schedule directives. No <b>Schedule</b> resource is required, but you will need at least one if you want Jobs to be automatically started. <p>
					</p>
				</dd>
				<dt><strong>Name = name</strong></dt>
				<dd><a name="10900"></a> <a name="10901"></a> The name of the schedule being defined. The Name directive is required. <p>
					</p>
				</dd>
				<dt><strong>Enabled = yes|no</strong></dt>
				<dd><a name="10904"></a> <a name="10905"></a> This directive allows you to enable or disable the Schedule resource. <p>
					</p>
				</dd>
				<dt><strong>Run = Job-overrides Date-time-specification</strong></dt>
				<dd><a name="10910"></a> <a name="10911"></a> The Run directive defines when a Job is to be run, and what overrides if any to apply. You may specify multiple <b>run</b> directives within a <b>Schedule</b> resource. If you do, they will all be applied (i.e. multiple schedules). If you have two <b>Run</b> directives that start at the same time, two Jobs will start at the same time (well, within one second of each other). <p> The <b>Job-overrides</b> permit overriding the Level, the Storage, the Messages, and the Pool specifications provided in the Job resource. In addition, the FullPool, the IncrementalPool, and the DifferentialPool specifications permit overriding the Pool specification according to what backup Job Level is in effect. </p>
					<p> By the use of overrides, you may customize a particular Job. For example, you may specify a Messages override for your Incremental backups that outputs messages to a log file, but for your weekly or monthly Full backups, you may send the output by email by using a different Messages override. </p>
					<p><b>Job-overrides</b> are specified as: <b>keyword=value</b> where the keyword is Level, Storage, Messages, Pool, FullPool, DifferentialPool, or IncrementalPool, and the <b>value</b> is as defined on the respective directive formats for the Job resource. You may specify multiple <b> Job-overrides</b> on one <b>Run</b> directive by separating them with one or more spaces or by separating them with a trailing comma. For example: </p>
					<p>
						<dl>
							<dt><strong>Level=Full</strong></dt>
							<dd><a name="10922"></a> <a name="10923"></a> is all files in the FileSet whether or not they have changed. <p>
								</p>
							</dd>
							<dt><strong>Level=Incremental</strong></dt>
							<dd><a name="10924"></a> <a name="10925"></a> is all files that have changed since the last backup. <p>
								</p>
							</dd>
							<dt><strong>Pool=Weekly</strong></dt>
							<dd><a name="10926"></a> <a name="10927"></a> specifies to use the Pool named <b>Weekly</b>. <p>
								</p>
							</dd>
							<dt><strong>Storage=DLT_Drive</strong></dt>
							<dd><a name="10929"></a> <a name="10930"></a> specifies to use <b>DLT_Drive</b> for the storage device. <p>
								</p>
							</dd>
							<dt><strong>Messages=Verbose</strong></dt>
							<dd><a name="10932"></a> <a name="10933"></a> specifies to use the <b>Verbose</b> message resource for the Job. <p>
								</p>
							</dd>
							<dt><strong>FullPool=Full</strong></dt>
							<dd><a name="10935"></a> <a name="10936"></a> specifies to use the Pool named <b>Full</b> if the job is a full backup, or is upgraded from another type to a full backup. <p>
								</p>
							</dd>
							<dt><strong>DifferentialPool=Differential</strong></dt>
							<dd><a name="10938"></a> <a name="10939"></a> specifies to use the Pool named <b>Differential</b> if the job is a differential backup. <p>
								</p>
							</dd>
							<dt><strong>IncrementalPool=Incremental</strong></dt>
							<dd><a name="10941"></a> <a name="10942"></a> specifies to use the Pool named <b>Incremental</b> if the job is an incremental backup. <p>
								</p>
							</dd>
							<dt><strong>NextPool=pool-specification</strong></dt>
							<dd>The <b>Next Pool</b> directive specifies the pool to which Jobs will be migrated. This directive is used to define the Pool into which the data will be migrated. The Next Pool specified in the Run resource will take precidence over any specification in the Job or Pool resources. <p>
								</p>
							</dd>
							<dt><strong>Accurate=ltyes|no</strong></dt>
							<dd><a name="10949"></a> <a name="10950"></a> tells Bacula to use or not the Accurate code for the specific job. It can allow you to save memory and and CPU resources on the catalog server in some cases. <p>
								</p>
							</dd>
						</dl>
					</p>
					<p><b>Date-time-specification</b> determines when the Job is to be run. The specification is a repetition, and as a default Bacula is set to run a job at the beginning of the hour of every hour of every day of every week of every month of every year. This is not normally what you want, so you must specify or limit when you want the job to run. Any specification given is assumed to be repetitive in nature and will serve to override or limit the default repetition. This is done by specifying masks or times for the hour, day of the month, day of the week, week of the month, week of the year, and month when you want the job to run. By specifying one or more of the above, you can define a schedule to repeat at almost any frequency you want. </p>
					<p> Basically, you must supply a <b>month</b>, <b>day</b>, <b>hour</b>, and <b>minute</b> the Job is to be run. Of these four items to be specified, <b>day</b> is special in that you may either specify a day of the month such as 1, 2, ... 31, or you may specify a day of the week such as Monday, Tuesday, ... Sunday. Finally, you may also specify a week qualifier to restrict the schedule to the first, second, third, fourth, or fifth week of the month. </p>
					<p> For example, if you specify only a day of the week, such as <b>Tuesday</b> the Job will be run every hour of every Tuesday of every Month. That is the <b>month</b> and <b>hour</b> remain set to the defaults of every month and all hours. </p>
					<p> Note, by default with no other specification, your job will run at the beginning of every hour. If you wish your job to run more than once in any given hour, you will need to specify multiple <b>run</b> specifications each with a different minute. </p>
					<p> The date/time to run the Job can be specified in the following way in pseudo-BNF: </p>
					<p><pre>
&lt;void-keyword&gt;    = on
&lt;at-keyword&gt;      = at
&lt;week-keyword&gt;    = 1st | 2nd | 3rd | 4th | 5th | 6th | first |
                    second | third | fourth | fifth | sixth
&lt;wday-keyword&gt;    = sun | mon | tue | wed | thu | fri | sat |
                    sunday | monday | tuesday | wednesday |
                    thursday | friday | saturday
&lt;week-of-year-keyword&gt; = w00 | w01 | ... w52 | w53
&lt;month-keyword&gt;   = jan | feb | mar | apr | may | jun | jul |
                    aug | sep | oct | nov | dec | january |
                    february | ... | december
&lt;daily-keyword&gt;   = daily
&lt;weekly-keyword&gt;  = weekly
&lt;monthly-keyword&gt; = monthly
&lt;hourly-keyword&gt;  = hourly
&lt;digit&gt;           = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0
&lt;number&gt;          = &lt;digit&gt; | &lt;digit&gt;&lt;number&gt;
&lt;12hour&gt;          = 0 | 1 | 2 | ... 12
&lt;hour&gt;            = 0 | 1 | 2 | ... 23
&lt;minute&gt;          = 0 | 1 | 2 | ... 59
&lt;day&gt;             = 1 | 2 | ... 31 | lastday
&lt;time&gt;            = &lt;hour&gt;:&lt;minute&gt; |
                    &lt;12hour&gt;:&lt;minute&gt;am |
                    &lt;12hour&gt;:&lt;minute&gt;pm
&lt;time-spec&gt;       = &lt;at-keyword&gt; &lt;time&gt; |
                    &lt;hourly-keyword&gt;
&lt;date-keyword&gt;    = &lt;void-keyword&gt;  &lt;weekly-keyword&gt;
&lt;day-range&gt;       = &lt;day&gt;-&lt;day&gt;
&lt;month-range&gt;     = &lt;month-keyword&gt;-&lt;month-keyword&gt;
&lt;wday-range&gt;      = &lt;wday-keyword&gt;-&lt;wday-keyword&gt;
&lt;range&gt;           = &lt;day-range&gt; | &lt;month-range&gt; |
                          &lt;wday-range&gt;
&lt;date&gt;            = &lt;date-keyword&gt; | &lt;day&gt; | &lt;range&gt;
&lt;date-spec&gt;       = &lt;date&gt; | &lt;date-spec&gt;
&lt;day-spec&gt;        = &lt;day&gt; | &lt;wday-keyword&gt; |
                    &lt;day&gt; | &lt;wday-range&gt; |
                    &lt;week-keyword&gt; &lt;wday-keyword&gt; |
                    &lt;week-keyword&gt; &lt;wday-range&gt; |
                    &lt;daily-keyword&gt;
&lt;month-spec&gt;      = &lt;month-keyword&gt; | &lt;month-range&gt; |
                    &lt;monthly-keyword&gt;
&lt;date-time-spec&gt;  = &lt;month-spec&gt; &lt;day-spec&gt; &lt;time-spec&gt;
</pre></p>
					<p>
					</p>
				</dd>
			</dl>
		</p>
		<p><b>Note, the Week of Year specification wnn follows the ISO standard definition of the week of the year, where Week 1 is the week in which the first Thursday of the year occurs, or alternatively, the week which contains the 4th of January. Weeks are numbered w01 to w53. w00 for Bacula is the week that precedes the first ISO week (i.e. has the first few days of the year if any occur before Thursday). w00 is not defined by the ISO specification. A week starts with Monday and ends with Sunday. </b></p>
		<p><b>According to the NIST (US National Institute of Standards and Technology), 12am and 12pm are ambiguous and can be defined to anything. However, 12:01am is the same as 00:01 and 12:01pm is the same as 12:01, so Bacula defines 12am as 00:00 (midnight) and 12pm as 12:00 (noon). You can avoid this abiguity (confusion) by using 24 hour time specifications (i.e. no am/pm). This is the definition in Bacula version 2.0.3 and later. </b></p>
		<p><b>An example schedule resource that is named <b>WeeklyCycle</b> and runs a job with level full each Sunday at 2:05am and an incremental job Monday through Saturday at 2:05am is: </b></p>
		<p><b></b><pre>
Schedule {
  Name = "WeeklyCycle"
  Run = Level=Full sun at 2:05
  Run = Level=Incremental mon-sat at 2:05
}
</pre><b></b></p>
		<p><b>An example of a possible monthly cycle is as follows: </b></p>
		<p><b></b><pre>
Schedule {
  Name = "MonthlyCycle"
  Run = Level=Full Pool=Monthly 1st sun at 2:05
  Run = Level=Differential 2nd-5th sun at 2:05
  Run = Level=Incremental Pool=Daily mon-sat at 2:05
}
</pre><b></b></p>
		<p><b>The first of every month: </b></p>
		<p><b></b><pre>
Schedule {
  Name = "First"
  Run = Level=Full on 1 at 2:05
  Run = Level=Incremental on 2-31 at 2:05
}
</pre><b></b></p>
		<p><b>Every 10 minutes: </b></p>
		<p><b></b><pre>
Schedule {
  Name = "TenMinutes"
  Run = Level=Full hourly at 0:05
  Run = Level=Full hourly at 0:15
  Run = Level=Full hourly at 0:25
  Run = Level=Full hourly at 0:35
  Run = Level=Full hourly at 0:45
  Run = Level=Full hourly at 0:55
}
</pre><b></b></p>
		<p>
		</p>
		<h1><a name="SECTION002160000000000000000"> Technical Notes on Schedules</a></h1><b> <a name="10975"></a> <a name="10976"></a> </b><p><b>Internally Bacula keeps a schedule as a bit mask. There are six masks and a minute field to each schedule. The masks are hour, day of the month (mday), month, day of the week (wday), week of the month (wom), and week of the year (woy). The schedule is initialized to have the bits of each of these masks set, which means that at the beginning of every hour, the job will run. When you specify a month for the first time, the mask will be cleared and the bit corresponding to your selected month will be selected. If you specify a second month, the bit corresponding to it will also be added to the mask. Thus when Bacula checks the masks to see if the bits are set corresponding to the current time, your job will run only in the two months you have set. Likewise, if you set a time (hour), the hour mask will be cleared, and the hour you specify will be set in the bit mask and the minutes will be stored in the minute field. </b></p>
		<p><b>For any schedule you have defined, you can see how these bits are set by doing a <b>show schedules</b> command in the Console program. Please note that the bit mask is zero based, and Sunday is the first day of the week (bit zero). </b></p>
		<p><b>-</b></p>
		<p>
		</p>
		<h1><a name="SECTION002170000000000000000"></a> <a name="FileSetResource"></a><br /> The FileSet Resource </h1><b> <a name="11526"></a> <a name="11527"></a> </b><p><b>The FileSet resource defines what files are to be included or excluded in a backup job. A <b>FileSet</b> resource is required for each backup Job. It consists of a list of files or directories to be included, a list of files or directories to be excluded and the various backup options such as compression, encryption, and signatures that are to be applied to each file. </b></p>
		<p><b>Any change to the list of the included files will cause Bacula to automatically create a new FileSet (defined by the name and an MD5 checksum of the Include/Exclude contents). Each time a new FileSet is created, Bacula will ensure that the next backup is always a Full save. </b></p>
		<p><b>Bacula is designed to handle most character sets of the world, US ASCII, German, French, Chinese, ... However, it does this by encoding everything in UTF-8, and it expects all configuration files (including those read on Win32 machines) to be in UTF-8 format. UTF-8 is typically the default on Linux machines, but not on all Unix machines, nor on Windows, so you must take some care to ensure that your locale is set properly before starting Bacula. On most modern Win32 machines, you can edit the conf files with <b>notebook</b> and choose output encoding UTF-8. </b></p>
		<p><b>To ensure that Bacula configuration files can be correctly read including foreign characters the <b>LANG</b> environment variable must end in <b>.UTF-8</b>. A full example is <b>en_US.UTF-8</b>. The exact syntax may vary a bit from OS to OS, and exactly how you define it will also vary. </b></p>
		<p><b>Bacula assumes that all filenames are in UTF-8 format on Linux and Unix machines. On Win32 they are in Unicode (UTF-16), and will be automatically converted to UTF-8 format. </b></p>
		<p>
			<dl>
				<dt><strong>FileSet</strong></dt>
				<dd><a name="11534"></a> <a name="11535"></a> Start of the FileSet resource. One <b>FileSet</b> resource must be defined for each Backup job. <p>
					</p>
				</dd>
				<dt><strong>Name = name</strong></dt>
				<dd><a name="11539"></a> <a name="11540"></a> The name of the FileSet resource. This directive is required. <p>
					</p>
				</dd>
				<dt><strong>Ignore FileSet Changes = yes|no</strong></dt>
				<dd><a name="11543"></a> <a name="11544"></a> Normally, if you modify the FileSet Include or Exclude lists, the next backup will be forced to a Full so that Bacula can guarantee that any additions or deletions are properly saved. <p> We strongly recommend against setting this directive to yes, since doing so may cause you to have an incomplete set of backups. </p>
					<p> If this directive is set to <b>yes</b>, any changes you make to the FileSet Include or Exclude lists, will not force a Full during subsequent backups. </p>
					<p> The default is <b>no</b>, in which case, if you change the Include or Exclude, Bacula will force a Full backup to ensure that everything is properly backed up. </p>
					<p>
					</p>
				</dd>
				<dt><strong>Enable VSS = yes|no</strong></dt>
				<dd><a name="11549"></a> <a name="11550"></a> If this directive is set to <b>yes</b> the File daemon will be notified that the user wants to use a Volume Shadow Copy Service (VSS) backup for this job. The default is <b>yes</b>. This directive is effective only for VSS enabled Win32 File daemons. It permits a consistent copy of open files to be made for cooperating writer applications, and for applications that are not VSS away, Bacula can at least copy open files. The Volume Shadow Copy will only be done on Windows drives where the drive (e.g. C:, D:, ...) is explicitly mentioned in a <b>File</b> directive. For more information, please see the WindowsVSS chapter of this manual. <p>
					</p>
				</dd>
				<dt><strong>Include { Options {file-options} ...; file-list } </strong></dt>
				<dd><a name="12666"></a> <a name="11564"></a> <a name="12667"></a><p>
					</p>
				</dd>
				<dt><strong>Exclude { file-list }</strong></dt>
				<dd><a name="12668"></a> <a name="11571"></a><p>
					</p>
				</dd>
			</dl>
		</p>
		<p><b>The Include resource must contain a list of directories and/or files to be processed in the backup job. Normally, all files found in all subdirectories of any directory in the Include File list will be backed up. Note, see below for the definition of file-list. The Include resource may also contain one or more Options resources that specify options such as compression to be applied to all or any subset of the files found when processing the file-list for backup. Please see below for more details concerning Options resources. </b></p>
		<p><b>There can be any number of <b>Include</b> resources within the FileSet, each having its own list of directories or files to be backed up and the backup options defined by one or more Options resources. The <b>file-list</b> consists of one file or directory name per line. Directory names should be specified without a trailing slash with Unix path notation. </b></p>
		<p><b>Windows users, please take note to specify directories (even c:/...) in Unix path notation. If you use Windows conventions, you will most likely not be able to restore your files due to the fact that the Windows path separator was defined as an escape character long before Windows existed, and Bacula adheres to that convention (i.e. <br /> means the next character appears as itself). </b></p>
		<p><b>You should always specify a full path for every directory and file that you list in the FileSet. In addition, on Windows machines, you should <b>always</b> prefix the directory or filename with the drive specification (e.g. <b>c:/xxx</b>) using Unix directory name separators (forward slash). The drive letter itself can be upper or lower case (e.g. c:/xxx or C:/xxx). </b></p>
		<p><b>Bacula's default for processing directories is to recursively descend in the directory saving all files and subdirectories. Bacula will not by default cross filesystems (or mount points in Unix parlance). This means that if you specify the root partition (e.g. <b>/</b>), Bacula will save only the root partition and not any of the other mounted filesystems. Similarly on Windows systems, you must explicitly specify each of the drives you want saved (e.g. <b>c:/</b> and <b>d:/</b> ...). In addition, at least for Windows systems, you will most likely want to enclose each specification within double quotes particularly if the directory (or file) name contains spaces. The <b>df</b> command on Unix systems will show you which mount points you must specify to save everything. See below for an example. </b></p>
		<p><b>Take special care not to include a directory twice or Bacula will backup the same files two times wasting a lot of space on your archive device. Including a directory twice is very easy to do. For example: </b></p>
		<p><b></b><pre>
  Include {
    Options { compression=GZIP }
    File = /
    File = /usr
  }
</pre><b></b></p>
		<p><b>on a Unix system where /usr is a subdirectory (rather than a mounted filesystem) will cause /usr to be backed up twice. </b></p>
		<p><b>Please take note of the following items in the FileSet syntax: </b></p>
		<p>
			<ol>
				<li>There is no equal sign (=) after the Include and before the opening brace ({). The same is true for the Exclude. </li>
				<li>Each directory (or filename) to be included or excluded is preceded by a <b>File =</b>. Previously they were simply listed on separate lines. </li>
				<li>The options that previously appeared on the Include line now must be specified within their own Options resource. </li>
				<li>The Exclude resource does not accept Options. </li>
				<li>When using wild-cards or regular expressions, directory names are always terminated with a slash (/) and filenames have no trailing slash. </li>
			</ol>
		</p>
		<p><b>The Options resource is optional, but when specified, it will contain a list of <b>keyword=value</b> options to be applied to the file-list. See below for the definition of file-list. Multiple Options resources may be specified one after another. As the files are found in the specified directories, the Options will applied to the filenames to determine if and how the file should be backed up. The wildcard and regular expression pattern matching parts of the Options resources are checked in the order they are specified in the FileSet until the first one that matches. Once one matches, the compression and other flags within the Options specification will apply to the pattern matched. </b></p>
		<p><b>A key point is that in the absence of an Option or no other Option is matched, every file is accepted for backing up. This means that if you want to exclude something, you must explicitly specify an Option with an <b>exclude = yes</b> and some pattern matching. </b></p>
		<p><b>Once Bacula determines that the Options resource matches the file under consideration, that file will be saved without looking at any other Options resources that may be present. This means that any wild cards must appear before an Options resource without wild cards. </b></p>
		<p><b>If for some reason, Bacula checks all the Options resources to a file under consideration for backup, but there are no matches (generally because of wild cards that don't match), Bacula as a default will then backup the file. This is quite logical if you consider the case of no Options clause is specified, where you want everything to be backed up, and it is important to keep in mind when excluding as mentioned above. </b></p>
		<p><b>However, one additional point is that in the case that no match was found, Bacula will use the options found in the last Options resource. As a consequence, if you want a particular set of “default” options, you should put them in an Options resource after any other Options. </b></p>
		<p><b>It is a good idea to put all your wild-card and regex expressions inside double quotes to prevent conf file scanning problems. </b></p>
		<p><b>This is perhaps a bit overwhelming, so there are a number of examples included below to illustrate how this works. </b></p>
		<p><b>You find yourself using a lot of Regex statements, which will cost quite a lot of CPU time, we recommend you simplify them if you can, or better yet convert them to Wild statements which are much more efficient. </b></p>
		<p><b>The directives within an Options resource may be one of the following: </b></p>
		<p>
			<dl>
				<dt><strong>compression=GZIP</strong></dt>
				<dd><a name="11591"></a> <a name="11592"></a> All files saved will be software compressed using the GNU ZIP compression format. The compression is done on a file by file basis by the File daemon. If there is a problem reading the tape in a single record of a file, it will at most affect that file and none of the other files on the tape. Normally this option is <b>not</b> needed if you have a modern tape drive as the drive will do its own compression. In fact, if you specify software compression at the same time you have hardware compression turned on, your files may actually take more space on the volume. <p> Software compression is very important if you are writing your Volumes to a file, and it can also be helpful if you have a fast computer but a slow network, otherwise it is generally better to rely your tape drive's hardware compression. As noted above, it is not generally a good idea to do both software and hardware compression. </p>
					<p> Specifying <b>GZIP</b> uses the default compression level 6 (i.e. <b> GZIP</b> is identical to <b>GZIP6</b>). If you want a different compression level (1 through 9), you can specify it by appending the level number with no intervening spaces to <b>GZIP</b>. Thus <b>compression=GZIP1</b> would give minimum compression but the fastest algorithm, and <b> compression=GZIP9</b> would give the highest level of compression, but requires more computation. According to the GZIP documentation, compression levels greater than six generally give very little extra compression and are rather CPU intensive. </p>
					<p> You can overwrite this option per Storage resource with AllowCompressionAllowCompression option. </p>
					<p>
					</p>
				</dd>
				<dt><strong>compression=LZO</strong></dt>
				<dd><a name="11602"></a> <a name="11603"></a> All files saved will be software compressed using the LZO compression format. The compression is done on a file by file basis by the File daemon. Everything else about GZIP is true for LZO. <p> LZO provides much faster compression and decompression speed but lower compression ratio than GZIP. If your CPU is fast enough you should be able to compress your data without making the backup duration longer. </p>
					<p> Note that bacula only use one compression level LZO1X-1 specified by LZO. </p>
					<p> You can overwrite this option per Storage resource with AllowCompressionAllowCompression option. </p>
					<p>
					</p>
				</dd>
				<dt><strong>signature=SHA1</strong></dt>
				<dd><a name="11606"></a> <a name="11607"></a> <a name="11608"></a> An SHA1 signature will be computed for all The SHA1 algorithm is purported to be some what slower than the MD5 algorithm, but at the same time is significantly better from a cryptographic point of view (i.e. much fewer collisions, much lower probability of being hacked.) It adds four more bytes than the MD5 signature. We strongly recommend that either this option or MD5 be specified as a default for all files. Note, only one of the two options MD5 or SHA1 can be computed for any file. <p>
					</p>
				</dd>
				<dt><strong>signature=MD5</strong></dt>
				<dd><a name="11609"></a> <a name="11610"></a> <a name="11611"></a> An MD5 signature will be computed for all files saved. Adding this option generates about 5% extra overhead for each file saved. In addition to the additional CPU time, the MD5 signature adds 16 more bytes per file to your catalog. We strongly recommend that this option or the SHA1 option be specified as a default for all files. <p>
					</p>
				</dd>
				<dt><strong>basejob=options</strong></dt>
				<dd><a name="11614"></a> <a name="11615"></a><p> The options letters specified are used when running a <b>Backup Level=Full</b> with BaseJobs. The options letters are the same as in the <span class="textbf">verify=</span> options below. </p>
					<p>
					</p>
				</dd>
				<dt><strong>accurate=options</strong></dt>
				<dd><a name="11620"></a> <a name="11621"></a> The options letters specified are used when running a <b>Backup Level=Incremental/Differential</b> in Accurate mode. The options letters are the same as in the <span class="textbf">verify=</span> directive below. <p>
					</p>
				</dd>
				<dt><strong>verify=options</strong></dt>
				<dd><a name="11626"></a> <a name="11627"></a> The options letters specified are used when running a <b>Verify Level=Catalog</b> as well as the <b>DiskToCatalog</b> level job. The options letters may be any combination of the following: <p>
						<dl>
							<dt>
							</dt>
							<dd><b>i</b> compare the inodes <p>
								</p>
							</dd>
							<dt>
							</dt>
							<dd><b>p</b> compare the permission bits <p>
								</p>
							</dd>
							<dt>
							</dt>
							<dd><b>n</b> compare the number of links <p>
								</p>
							</dd>
							<dt>
							</dt>
							<dd><b>u</b> compare the user id <p>
								</p>
							</dd>
							<dt>
							</dt>
							<dd><b>g</b> compare the group id <p>
								</p>
							</dd>
							<dt>
							</dt>
							<dd><b>s</b> compare the size <p>
								</p>
							</dd>
							<dt>
							</dt>
							<dd><b>a</b> compare the access time <p>
								</p>
							</dd>
							<dt>
							</dt>
							<dd><b>m</b> compare the modification time (st_mtime) <p>
								</p>
							</dd>
							<dt>
							</dt>
							<dd><b>c</b> compare the change time (st_ctime) <p>
								</p>
							</dd>
							<dt>
							</dt>
							<dd><b>d</b> report file size decreases <p>
								</p>
							</dd>
							<dt>
							</dt>
							<dd><b>5</b> compare the MD5 signature <p>
								</p>
							</dd>
							<dt>
							</dt>
							<dd><b>1</b> compare the SHA1 signature <p>
								</p>
							</dd>
							<dt>
							</dt>
							<dd><b>A</b> Only for Accurate option, it allows to always backup the file <p>
								</p>
							</dd>
						</dl>
					</p>
					<p> A useful set of general options on the <b>Level=Catalog</b> or <b> Level=DiskToCatalog</b> verify is <b>pins5</b> i.e. compare permission bits, then inodes, number of links, size, and finally MD5 changes. </p>
					<p>
					</p>
				</dd>
				<dt><strong>onefs=yes|no</strong></dt>
				<dd><a name="11648"></a> <a name="11649"></a> If set to <b>yes</b> (the default), <b>Bacula</b> will remain on a single file system. That is it will not backup file systems that are mounted on a subdirectory. If you are using a *nix system, you may not even be aware that there are several different filesystems as they are often automatically mounted by the OS (e.g. /dev, /net, /sys, /proc, ...). Bacula will inform you when it decides not to traverse into another filesystem. This can be very useful if you forgot to backup a particular partition. An example of the informational message in the job report is: <p><pre>
rufus-fd: /misc is a different filesystem. Will not descend from / into /misc
rufus-fd: /net is a different filesystem. Will not descend from / into /net
rufus-fd: /var/lib/nfs/rpc_pipefs is a different filesystem. Will not descend from /var/lib/nfs into /var/lib/nfs/rpc_pipefs
rufus-fd: /selinux is a different filesystem. Will not descend from / into /selinux
rufus-fd: /sys is a different filesystem. Will not descend from / into /sys
rufus-fd: /dev is a different filesystem. Will not descend from / into /dev
rufus-fd: /home is a different filesystem. Will not descend from / into /home
</pre></p>
					<p> Note: in older versions of Bacula, the above message was of the form: </p>
					<p><pre>
Filesystem change prohibited. Will not descend into /misc
</pre></p>
					<p> If you wish to backup multiple filesystems, you can explicitly list each filesystem you want saved. Otherwise, if you set the onefs option to <b>no</b>, Bacula will backup all mounted file systems (i.e. traverse mount points) that are found within the <b>FileSet</b>. Thus if you have NFS or Samba file systems mounted on a directory listed in your FileSet, they will also be backed up. Normally, it is preferable to set <b>onefs=yes</b> and to explicitly name each filesystem you want backed up. Explicitly naming the filesystems you want backed up avoids the possibility of getting into a infinite loop recursing filesystems. Another possibility is to use <b>onefs=no</b> and to set <b>fstype=ext2, ...</b>. See the example below for more details. </p>
					<p> If you think that Bacula should be backing up a particular directory and it is not, and you have <b>onefs=no</b> set, before you complain, please do: </p>
					<p><pre>
  stat /
  stat &lt;filesystem&gt;
</pre></p>
					<p> where you replace <b>filesystem</b> with the one in question. If the <b>Device:</b> number is different for / and for your filesystem, then they are on different filesystems. E.g. <pre>
stat /
  File: `/'
  Size: 4096            Blocks: 16         IO Block: 4096   directory
Device: 302h/770d       Inode: 2           Links: 26
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2005-11-10 12:28:01.000000000 +0100
Modify: 2005-09-27 17:52:32.000000000 +0200
Change: 2005-09-27 17:52:32.000000000 +0200

stat /net
  File: `/home'
  Size: 4096            Blocks: 16         IO Block: 4096   directory
Device: 308h/776d       Inode: 2           Links: 7
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2005-11-10 12:28:02.000000000 +0100
Modify: 2005-11-06 12:36:48.000000000 +0100
Change: 2005-11-06 12:36:48.000000000 +0100
</pre></p>
					<p> Also be aware that even if you include <b>/home</b> in your list of files to backup, as you most likely should, you will get the informational message that “/home is a different filesystem” when Bacula is processing the <b>/</b> directory. This message does not indicate an error. This message means that while examining the <b>File =</b> referred to in the second part of the message, Bacula will not descend into the directory mentioned in the first part of the message. However, it is possible that the separate filesystem will be backed up despite the message. For example, consider the following FileSet: </p>
					<p><pre>
  File = /
  File = /var
</pre></p>
					<p> where <b>/var</b> is a separate filesystem. In this example, you will get a message saying that Bacula will not decend from <b>/</b> into <b>/var</b>. But it is important to realise that Bacula will descend into <b>/var</b> from the second File directive shown above. In effect, the warning is bogus, but it is supplied to alert you to possible omissions from your FileSet. In this example, <b>/var</b> will be backed up. If you changed the FileSet such that it did not specify <b>/var</b>, then <b>/var</b> will not be backed up. </p>
					<p>
					</p>
				</dd>
				<dt><strong>honor nodump flag=yes|no</strong></dt>
				<dd><a name="11682"></a> <a name="11683"></a> If your file system supports the <b>nodump</b> flag (e. g. most BSD-derived systems) Bacula will honor the setting of the flag when this option is set to <b>yes</b>. Files having this flag set will not be included in the backup and will not show up in the catalog. For directories with the <b>nodump</b> flag set recursion is turned off and the directory will be listed in the catalog. If the <b>honor nodump flag</b> option is not defined or set to <b>no</b> every file and directory will be eligible for backup. <p><a name="portable"></a></p>
				</dd>
				<dt><strong>portable=yes|no</strong></dt>
				<dd><a name="11690"></a> <a name="11691"></a> If set to <b>yes</b> (default is <b>no</b>), the Bacula File daemon will backup Win32 files in a portable format, but not all Win32 file attributes will be saved and restored. By default, this option is set to <b>no</b>, which means that on Win32 systems, the data will be backed up using Windows BackupRead API calls and all the security and ownership attributes will be properly backed up (and restored). However this format is not portable to other systems - e.g. Unix, and very old Win95/98/Me systems. When backing up Unix systems, this option is ignored, and unless you have a specific need to have portable backups, we recommend accept the default (<b>no</b>) so that the maximum information concerning your Windows files is saved. <p>
					</p>
				</dd>
				<dt><strong>recurse=yes|no</strong></dt>
				<dd><a name="11696"></a> <a name="11697"></a> If set to <b>yes</b> (the default), Bacula will recurse (or descend) into all subdirectories found unless the directory is explicitly excluded using an <b>exclude</b> definition. If you set <b>recurse=no</b>, Bacula will save the subdirectory entries, but not descend into the subdirectories, and thus will not save the files or directories contained in the subdirectories. Normally, you will want the default (<b>yes</b>). <p>
					</p>
				</dd>
				<dt><strong>sparse=yes|no</strong></dt>
				<dd><a name="11702"></a> <a name="11703"></a> Enable special code that checks for sparse files such as created by ndbm. The default is <b>no</b>, so no checks are made for sparse files. You may specify <b>sparse=yes</b> even on files that are not sparse file. No harm will be done, but there will be a small additional overhead to check for buffers of all zero, and if there is a 32K block of all zeros (see below), that block will become a hole in the file, which may not be desirable if the original file was not a sparse file. <p><b>Restrictions:</b> Bacula reads files in 32K buffers. If the whole buffer is zero, it will be treated as a sparse block and not written to tape. However, if any part of the buffer is non-zero, the whole buffer will be written to tape, possibly including some disk sectors (generally 4098 bytes) that are all zero. As a consequence, Bacula's detection of sparse blocks is in 32K increments rather than the system block size. If anyone considers this to be a real problem, please send in a request for change with the reason. </p>
					<p> If you are not familiar with sparse files, an example is say a file where you wrote 512 bytes at address zero, then 512 bytes at address 1 million. The operating system will allocate only two blocks, and the empty space or hole will have nothing allocated. However, when you read the sparse file and read the addresses where nothing was written, the OS will return all zeros as if the space were allocated, and if you backup such a file, a lot of space will be used to write zeros to the volume. Worse yet, when you restore the file, all the previously empty space will now be allocated using much more disk space. By turning on the <b>sparse</b> option, Bacula will specifically look for empty space in the file, and any empty space will not be written to the Volume, nor will it be restored. The price to pay for this is that Bacula must search each block it reads before writing it. On a slow system, this may be important. If you suspect you have sparse files, you should benchmark the difference or set sparse for only those files that are really sparse. </p>
					<p> You probably should not use this option on files or raw disk devices that are not really sparse files (i.e. have holes in them). </p>
					<p><a name="readfifo"></a></p>
				</dd>
				<dt><strong>readfifo=yes|no</strong></dt>
				<dd><a name="11709"></a> <a name="11710"></a> If enabled, tells the Client to read the data on a backup and write the data on a restore to any FIFO (pipe) that is explicitly mentioned in the FileSet. In this case, you must have a program already running that writes into the FIFO for a backup or reads from the FIFO on a restore. This can be accomplished with the <b>RunBeforeJob</b> directive. If this is not the case, Bacula will hang indefinitely on reading/writing the FIFO. When this is not enabled (default), the Client simply saves the directory entry for the FIFO. <p> Unfortunately, when Bacula runs a RunBeforeJob, it waits until that script terminates, and if the script accesses the FIFO to write into the it, the Bacula job will block and everything will stall. However, Vladimir Stavrinov as supplied tip that allows this feature to work correctly. He simply adds the following to the beginning of the RunBeforeJob script: </p>
					<p><pre>
   exec &gt; /dev/null
</pre></p>
					<p>
					</p>
				</dd>
				<dt><strong>noatime=yes|no</strong></dt>
				<dd><a name="11714"></a> <a name="11715"></a> If enabled, and if your Operating System supports the O_NOATIME file open flag, Bacula will open all files to be backed up with this option. It makes it possible to read a file without updating the inode atime (and also without the inode ctime update which happens if you try to set the atime back to its previous value). It also prevents a race condition when two programs are reading the same file, but only one does not want to change the atime. It's most useful for backup programs and file integrity checkers (and bacula can fit on both categories). <p> This option is particularly useful for sites where users are sensitive to their MailBox file access time. It replaces both the <b>keepatime</b> option without the inconveniences of that option (see below). </p>
					<p> If your Operating System does not support this option, it will be silently ignored by Bacula. </p>
					<p>
					</p>
				</dd>
				<dt><strong>mtimeonly=yes|no</strong></dt>
				<dd><a name="11717"></a> <a name="11718"></a> If enabled, tells the Client that the selection of files during Incremental and Differential backups should based only on the st_mtime value in the stat() packet. The default is <b>no</b> which means that the selection of files to be backed up will be based on both the st_mtime and the st_ctime values. In general, it is not recommended to use this option. <p>
					</p>
				</dd>
				<dt><strong>keepatime=yes|no</strong></dt>
				<dd><a name="11720"></a> <a name="11721"></a> The default is <b>no</b>. When enabled, Bacula will reset the st_atime (access time) field of files that it backs up to their value prior to the backup. This option is not generally recommended as there are very few programs that use st_atime, and the backup overhead is increased because of the additional system call necessary to reset the times. However, for some files, such as mailboxes, when Bacula backs up the file, the user will notice that someone (Bacula) has accessed the file. In this, case keepatime can be useful. (I'm not sure this works on Win32). <p> Note, if you use this feature, when Bacula resets the access time, the change time (st_ctime) will automatically be modified by the system, so on the next incremental job, the file will be backed up even if it has not changed. As a consequence, you will probably also want to use <b>mtimeonly = yes</b> as well as keepatime (thanks to Rudolf Cejka for this tip). </p>
					<p>
					</p>
				</dd>
				<dt><strong>checkfilechanges=yes|no</strong></dt>
				<dd><a name="11724"></a> <a name="11725"></a> On versions 2.0.4 or greater, if enabled, the Client will check size, age of each file after their backup to see if they have changed during backup. If time or size mismatch, an error will raise. <p><pre>
 zog-fd: Client1.2007-03-31_09.46.21 Error: /tmp/test mtime changed during backup.
</pre></p>
					<p> In general, it is recommended to use this option. </p>
					<p>
					</p>
				</dd>
				<dt><strong>hardlinks=yes|no</strong></dt>
				<dd><a name="11728"></a> <a name="11729"></a> When enabled (default), this directive will cause hard links to be backed up. However, the File daemon keeps track of hard linked files and will backup the data only once. The process of keeping track of the hard links can be quite expensive if you have lots of them (tens of thousands or more). This doesn't occur on normal Unix systems, but if you use a program like BackupPC, it can create hundreds of thousands, or even millions of hard links. Backups become very long and the File daemon will consume a lot of CPU power checking hard links. In such a case, set <b>hardlinks=no</b> and hard links will not be backed up. Note, using this option will most likely backup more data and on a restore the file system will not be restored identically to the original. <p>
					</p>
				</dd>
				<dt><strong>wild=string</strong></dt>
				<dd><a name="11733"></a> <a name="11734"></a> Specifies a wild-card string to be applied to the filenames and directory names. Note, if <b>Exclude</b> is not enabled, the wild-card will select which files are to be included. If <b>Exclude=yes</b> is specified, the wild-card will select which files are to be excluded. Multiple wild-card directives may be specified, and they will be applied in turn until the first one that matches. Note, if you exclude a directory, no files or directories below it will be matched. <p> You may want to test your expressions prior to running your backup by using the bwild program. Please see the Utilitiesbwildutilitychapter of the Bacula Enterprise Utility programs for more information. You can also test your full FileSet definition by using the estimateestimateconsolecommand in the Bacula Enterprise Console Manual. It is recommended to enclose the string in double quotes. </p>
					<p>
					</p>
				</dd>
				<dt><strong>wilddir=string</strong></dt>
				<dd><a name="11747"></a> <a name="11748"></a> Specifies a wild-card string to be applied to directory names only. No filenames will be matched by this directive. Note, if <b>Exclude</b> is not enabled, the wild-card will select directories to be included. If <b>Exclude=yes</b> is specified, the wild-card will select which directories are to be excluded. Multiple wild-card directives may be specified, and they will be applied in turn until the first one that matches. Note, if you exclude a directory, no files or directories below it will be matched. <p> It is recommended to enclose the string in double quotes. </p>
					<p> You may want to test your expressions prior to running your backup by using the bwild program. Please see the Utilitiesbwildutilitychapter of the Bacula Enterprise Utility programs for more information. You can also test your full FileSet definition by using the estimateestimateconsolecommand in the Bacula Enterprise Console Manual. An example of excluding with the WildDir option on Win32 machines is presented below. </p>
					<p>
					</p>
				</dd>
				<dt><strong>wildfile=string</strong></dt>
				<dd><a name="11761"></a> <a name="11762"></a> Specifies a wild-card string to be applied to non-directories. That is no directory entries will be matched by this directive. However, note that the match is done against the full path and filename, so your wild-card string must take into account that filenames are preceded by the full path. If <b>Exclude</b> is not enabled, the wild-card will select which files are to be included. If <b>Exclude=yes</b> is specified, the wild-card will select which files are to be excluded. Multiple wild-card directives may be specified, and they will be applied in turn until the first one that matches. <p> It is recommended to enclose the string in double quotes. </p>
					<p> You may want to test your expressions prior to running your backup by using the bwild program. Please see the Utilitiesbwildutilitychapter of the Bacula Enterprise Utility programs for more information. You can also test your full FileSet definition by using the estimateestimateconsolecommand in the Bacula Enterprise Console Manual. An example of excluding with the WildFile option on Win32 machines is presented below. </p>
					<p>
					</p>
				</dd>
				<dt><strong>regex=string</strong></dt>
				<dd><a name="11775"></a> <a name="11776"></a> Specifies a POSIX extended regular expression to be applied to the filenames and directory names, which include the full path. If <b> Exclude</b> is not enabled, the regex will select which files are to be included. If <b>Exclude=yes</b> is specified, the regex will select which files are to be excluded. Multiple regex directives may be specified within an Options resource, and they will be applied in turn until the first one that matches. Note, if you exclude a directory, no files or directories below it will be matched. <p> It is recommended to enclose the string in double quotes. </p>
					<p> The regex libraries differ from one operating system to another, and in addition, regular expressions are complicated, so you may want to test your expressions prior to running your backup by using the bregex program. Please see the Utilitiesbwildutilitychapter of the Bacula Enterprise Utility programs for more information. You can also test your full FileSet definition by using the estimateestimateconsolecommand in the Bacula Enterprise Console Manual. </p>
					<p> You find yourself using a lot of Regex statements, which will cost quite a lot of CPU time, we recommend you simplify them if you can, or better yet convert them to Wild statements which are much more efficient. </p>
					<p>
					</p>
				</dd>
				<dt><strong>regexfile=string</strong></dt>
				<dd><a name="11789"></a> <a name="11790"></a> Specifies a POSIX extended regular expression to be applied to non-directories. No directories will be matched by this directive. However, note that the match is done against the full path and filename, so your regex string must take into account that filenames are preceded by the full path. If <b>Exclude</b> is not enabled, the regex will select which files are to be included. If <b>Exclude=yes</b> is specified, the regex will select which files are to be excluded. Multiple regex directives may be specified, and they will be applied in turn until the first one that matches. <p> It is recommended to enclose the string in double quotes. </p>
					<p> The regex libraries differ from one operating system to another, and in addition, regular expressions are complicated, so you may want to test your expressions prior to running your backup by using the bregex program. Please see the bregexbregexutilitycommand of the Bacula Enterprise Utility programs more. </p>
					<p>
					</p>
				</dd>
				<dt><strong>regexdir=string</strong></dt>
				<dd><a name="11799"></a> <a name="11800"></a> Specifies a POSIX extended regular expression to be applied to directory names only. No filenames will be matched by this directive. Note, if <b>Exclude</b> is not enabled, the regex will select directories files are to be included. If <b>Exclude=yes</b> is specified, the regex will select which files are to be excluded. Multiple regex directives may be specified, and they will be applied in turn until the first one that matches. Note, if you exclude a directory, no files or directories below it will be matched. <p> It is recommended to enclose the string in double quotes. </p>
					<p> The regex libraries differ from one operating system to another, and in addition, regular expressions are complicated, so you may want to test your expressions prior to running your backup by using the bregex program. Please see the bregexbregexutilitycommand of the Bacula Enterprise Utility programs more. </p>
					<p>
					</p>
				</dd>
				<dt><strong>exclude=yes|no</strong></dt>
				<dd><a name="11807"></a> <a name="11808"></a> The default is <b>no</b>. When enabled, any files matched within the Options will be excluded from the backup. <p><a name="ACLSupport"></a></p>
				</dd>
				<dt><strong>aclsupport=yes|no</strong></dt>
				<dd><a name="11811"></a> <a name="11812"></a> The default is <b>no</b>. If this option is set to yes, and you have the POSIX <b>libacl</b> installed on your Linux system, Bacula will backup the file and directory Unix Access Control Lists (ACL) as defined in IEEE Std 1003.1e draft 17 and “POSIX.1e” (abandoned). This feature is available on Unix systems only and requires the Linux ACL library. Bacula is automatically compiled with ACL support if the <b>libacl</b> library is installed on your Linux system (shown in config.out). While restoring the files Bacula will try to restore the ACLs, if there is no ACL support available on the system, Bacula restores the files and directories but not the ACL information. Please note, if you backup an EXT3 or XFS filesystem with ACLs, then you restore them to a different filesystem (perhaps reiserfs) that does not have ACLs, the ACLs will be ignored. <p> For other operating systems there is support for either POSIX ACLs or the more extensible NFSv4 ACLs. </p>
					<p> The ACL stream format between Operation Systems is <span class="textbf">not</span> compatible so for example an ACL saved on Linux cannot be restored on Solaris. </p>
					<p> The following Operating Systems are currently supported: </p>
					<p>
						<ol>
							<li>AIX (pre-5.3 (POSIX) and post 5.3 (POSIX and NFSv4) ACLs) </li>
							<li>Darwin </li>
							<li>FreeBSD (POSIX and NFSv4/ZFS ACLs) </li>
							<li>HPUX </li>
							<li>IRIX </li>
							<li>Linux </li>
							<li>Solaris (POSIX and NFSv4/ZFS ACLs) </li>
							<li>Tru64 </li>
						</ol>
					</p>
					<p><a name="XattrSupport"></a></p>
				</dd>
				<dt><strong>xattrsupport=yes|no</strong></dt>
				<dd><a name="11820"></a> <a name="11821"></a> The default is <b>no</b>. If this option is set to yes, and your operating system support either so called Extended Attributes or Extensible Attributes Bacula will backup the file and directory XATTR data. This feature is available on UNIX only and depends on support of some specific library calls in libc. <p> The XATTR stream format between Operating Systems is <b>not</b> compatible so an XATTR saved on Linux cannot for example be restored on Solaris. </p>
					<p> On some operating systems ACLs are also stored as Extended Attributes (Linux, Darwin, FreeBSD) Bacula checks if you have the aclsupport option enabled and if so will not save the same info when saving extended attribute information. Thus ACLs are only saved once. </p>
					<p> The following Operating Systems are currently supported: </p>
					<p>
						<ol>
							<li>AIX (Extended Attributes) </li>
							<li>Darwin (Extended Attributes) </li>
							<li>FreeBSD (Extended Attributes) </li>
							<li>IRIX (Extended Attributes) </li>
							<li>Linux (Extended Attributes) </li>
							<li>NetBSD (Extended Attributes) </li>
							<li>Solaris (Extended Attributes and Extensible Attributes) </li>
							<li>Tru64 (Extended Attributes) </li>
						</ol>
					</p>
					<p>
					</p>
				</dd>
				<dt><strong>ignore case=yes|no</strong></dt>
				<dd><a name="11826"></a> <a name="11827"></a> The default is <b>no</b>. On Windows systems, you will almost surely want to set this to <b>yes</b>. When this directive is set to <b>yes</b> all the case of character will be ignored in wild-card and regex comparisons. That is an uppercase A will match a lowercase a. <p>
					</p>
				</dd>
				<dt><strong>fstype=filesystem-type</strong></dt>
				<dd><a name="11831"></a> <a name="11832"></a> This option allows you to select files and directories by the filesystem type. The permitted filesystem-type names are: <p> ext2, jfs, ntfs, proc, reiserfs, xfs, usbdevfs, sysfs, smbfs, iso9660. </p>
					<p> You may have multiple Fstype directives, and thus permit matching of multiple filesystem types within a single Options resource. If the type specified on the fstype directive does not match the filesystem for a particular directive, that directory will not be backed up. This directive can be used to prevent backing up non-local filesystems. Normally, when you use this directive, you would also set <b>onefs=no</b> so that Bacula will traverse filesystems. </p>
					<p>
					</p>
				</dd>
				<dt><strong>DriveType=Windows-drive-type</strong></dt>
				<dd><a name="11834"></a> <a name="11835"></a> This option is effective only on Windows machines and is somewhat similar to the Unix/Linux <b>fstype</b> described above, except that it allows you to select what Windows drive types you want to allow. By default all drive types are accepted. <p> The permitted drivetype names are: </p>
					<p> removable, fixed, remote, cdrom, ramdisk </p>
					<p> You may have multiple Driveype directives, and thus permit matching of multiple drive types within a single Options resource. If the type specified on the drivetype directive does not match the filesystem for a particular directive, that directory will not be backed up. This directive can be used to prevent backing up non-local filesystems. Normally, when you use this directive, you would also set <b>onefs=no</b> so that Bacula will traverse filesystems. </p>
					<p> This option is not implemented in Unix/Linux systems. </p>
					<p>
					</p>
				</dd>
				<dt><strong>hfsplussupport=yes|no</strong></dt>
				<dd><a name="11838"></a> <a name="11839"></a> This option allows you to turn on support for Mac OSX HFS plus finder information. <p>
					</p>
				</dd>
				<dt><strong>strippath=integer</strong></dt>
				<dd><a name="11842"></a> <a name="11843"></a> This option will cause <b>integer</b> paths to be stripped from the front of the full path/filename being backed up. This can be useful if you are migrating data from another vendor or if you have taken a snapshot into some subdirectory. This directive can cause your filenames to be overlayed with regular backup data, so should be used only by experts and with great care. </dd>
			</dl>
		</p>
		<p><b><b>file-list</b> is a list of directory and/or filename names specified with a <b>File =</b> directive. To include names containing spaces, enclose the name between double-quotes. Wild-cards are not interpreted in file-lists. They can only be specified in Options resources. </b></p>
		<p><b>There are a number of special cases when specifying directories and files in a <b>file-list</b>. They are: </b></p>
		<p>
			<ul>
				<li>Any name preceded by an at-sign (@) is assumed to be the name of a file, which contains a list of files each preceded by a “File =”. The named file is read once when the configuration file is parsed during the Director startup. Note, that the file is read on the Director's machine and not on the Client's. In fact, the @filename can appear anywhere within the conf file where a token would be read, and the contents of the named file will be logically inserted in the place of the @filename. What must be in the file depends on the location the @filename is specified in the conf file. For example: <p><pre>
Include {
  Options { compression=GZIP }
  @/home/files/my-files
}
</pre></p>
					<p>
					</p>
				</li>
				<li>Any name beginning with a vertical bar () is assumed to be the name of a program. This program will be executed on the Director's machine at the time the Job starts (not when the Director reads the configuration file), and any output from that program will be assumed to be a list of files or directories, one per line, to be included. Before submitting the specified command bacula will performe character substitutioncharacter substitution. <p> This allows you to have a job that, for example, includes all the local partitions even if you change the partitioning by adding a disk. The examples below show you how to do this. However, please note two things: <br /> 1. if you want the local filesystems, you probably should be using the new <b>fstype</b> directive, which was added in version 1.36.3 and set <b>onefs=no</b>. <br />
					</p>
					<p> 2. the exact syntax of the command needed in the examples below is very system dependent. For example, on recent Linux systems, you may need to add the -P option, on FreeBSD systems, the options will be different as well. </p>
					<p> In general, you will need to prefix your command or commands with a <b> sh -c</b> so that they are invoked by a shell. This will not be the case if you are invoking a script as in the second example below. Also, you must take care to escape (precede with a \) wild-cards, shell character, and to ensure that any spaces in your command are escaped as well. If you use a single quotes (') within a double quote ("), Bacula will treat everything between the single quotes as one field so it will not be necessary to escape the spaces. In general, getting all the quotes and escapes correct is a real pain as you can see by the next example. As a consequence, it is often easier to put everything in a file and simply use the file name within Bacula. In that case the <b>sh -c</b> will not be necessary providing the first line of the file is <b>#!/bin/sh</b>. </p>
					<p> As an example: </p>
					<p><pre>
 
Include {
   Options { signature = SHA1 }
   File = "|sh -c 'df -l | grep \"^/dev/hd[ab]\" | grep -v \".*/tmp\" \
      | awk \"{print \\$6}\"'"
}
</pre></p>
					<p> will produce a list of all the local partitions on a Red Hat Linux system. Note, the above line was split, but should normally be written on one line. Quoting is a real problem because you must quote for Bacula which consists of preceding every \ and every " with a \, and you must also quote for the shell command. In the end, it is probably easier just to execute a small file with: </p>
					<p><pre>
Include {
  Options {
    signature=MD5
  }
  File = "|my_partitions"
}
</pre></p>
					<p> where my_partitions has: </p>
					<p><pre>
#!/bin/sh
df -l | grep "^/dev/hd[ab]" | grep -v ".*/tmp" \
      | awk "{print \$6}"
</pre></p>
					<p> If the vertical bar (<code>|</code>) in front of my_partitions is preceded by a backslash as in \<code>|</code>, the program will be executed on the Client's machine instead of on the Director's machine. Please note that if the filename is given within quotes, you will need to use two slashes. An example, provided by John Donagher, that backs up all the local UFS partitions on a remote system is: </p>
					<p><pre>
FileSet {
  Name = "All local partitions"
  Include {
    Options { signature=SHA1; onefs=yes; }
    File = "\\|bash -c \"df -klF ufs | tail +2 | awk '{print \$6}'\""
  }
}
</pre></p>
					<p> The above requires two backslash characters after the double quote (one preserves the next one). If you are a Linux user, just change the <b>ufs</b> to <b>ext3</b> (or your preferred filesystem type), and you will be in business. </p>
					<p> If you know what filesystems you have mounted on your system, e.g. for Red Hat Linux normally only ext2 and ext3, you can backup all local filesystems using something like: </p>
					<p><pre>
 
Include {
   Options { signature = SHA1; onfs=no; fstype=ext2 }
   File = /
}
</pre></p>
					<p>
					</p>
				</li>
				<li>Any file-list item preceded by a less-than sign () will be taken to be a file. This file will be read on the Director's machine (see below for doing it on the Client machine) at the time the Job starts, and the data will be assumed to be a list of directories or files, one per line, to be included. The names should start in column 1 and should not be quoted even if they contain spaces. This feature allows you to modify the external file and change what will be saved without stopping and restarting Bacula as would be necessary if using the @ modifier noted above. For example: <p><pre>
Include {
  Options { signature = SHA1 }
  File = "&lt;/home/files/local-filelist"
}
</pre></p>
					<p> If you precede the less-than sign () with a backslash as in \, the file-list will be read on the Client machine instead of on the Director's machine. Please note that if the filename is given within quotes, you will need to use two slashes. </p>
					<p><pre>
Include {
  Options { signature = SHA1 }
  File = "\\&lt;/home/xxx/filelist-on-client"
}
</pre></p>
					<p>
					</p>
				</li>
				<li>If you explicitly specify a block device such as <b>/dev/hda1</b>, then Bacula (starting with version 1.28) will assume that this is a raw partition to be backed up. In this case, you are strongly urged to specify a <b> sparse=yes</b> include option, otherwise, you will save the whole partition rather than just the actual data that the partition contains. For example: <p><pre>
Include {
  Options { signature=MD5; sparse=yes }
  File = /dev/hd6
}
</pre></p>
					<p> will backup the data in device /dev/hd6. Note, the bf /dev/hd6 must be the raw partition itself. Bacula will not back it up as a raw device if you specify a symbolic link to a raw device such as my be created by the LVM Snapshot utilities. </p>
					<p> Ludovic Strappazon has pointed out that this feature can be used to backup a full Microsoft Windows disk. Simply boot into the system using a Linux Rescue disk, then load a statically linked Bacula as described in the Disaster Recovery Using BaculaRescueChapter chapter of this manual. Then save the whole disk partition. In the case of a disaster, you can then restore the desired partition by again booting with the rescue disk and doing a restore of the partition. </p>
				</li>
				<li>If you explicitly specify a FIFO device name (created with mkfifo), and you add the option <b>readfifo=yes</b> as an option, Bacula will read the FIFO and back its data up to the Volume. For example: <p><pre>
Include {
  Options {
    signature=SHA1
    readfifo=yes
  }
  File = /home/abc/fifo
}
</pre></p>
					<p> if <b>/home/abc/fifo</b> is a fifo device, Bacula will open the fifo, read it, and store all data thus obtained on the Volume. Please note, you must have a process on the system that is writing into the fifo, or Bacula will hang, and after one minute of waiting, Bacula will give up and go on to the next file. The data read can be anything since Bacula treats it as a stream. </p>
					<p> This feature can be an excellent way to do a “hot” backup of a very large database. You can use the <b>RunBeforeJob</b> to create the fifo and to start a program that dynamically reads your database and writes it to the fifo. Bacula will then write it to the Volume. Be sure to read the readfifo sectionreadfifo that gives a tip to ensure that the RunBeforeJob does not block Bacula. </p>
					<p> During the restore operation, the inverse is true, after Bacula creates the fifo if there was any data stored with it (no need to explicitly list it or add any options), that data will be written back to the fifo. As a consequence, if any such FIFOs exist in the fileset to be restored, you must ensure that there is a reader program or Bacula will block, and after one minute, Bacula will time out the write to the fifo and move on to the next file. </p>
					<p>
					</p>
				</li>
				<li>A file-list may not contain wild-cards. Use directives in the Options resource if you wish to specify wild-cards or regular expression matching. <p>
					</p>
				</li>
				<li><a name="11898"></a> The <b>ExcludeDirContaining = filename</b> is a directive that can be added to the Include section of the FileSet resource. If the specified filename (<b>filename-string</b>) is found on the Client in any directory to be backed up, the whole directory will be ignored (not backed up). For example: <p><pre>
  # List of files to be backed up
  FileSet {
    Name = "MyFileSet"
    Include {
      Options {
        signature = MD5
      }
      File = /home
      Exclude Dir Containing = .excludeme
    }
  }
</pre></p>
					<p> But in /home, there may be hundreds of directories of users and some people want to indicate that they don't want to have certain directories backed up. For example, with the above FileSet, if the user or sysadmin creates a file named <b>.excludeme</b> in specific directories, such as </p>
					<p><pre>
   /home/user/www/cache/.excludeme
   /home/user/temp/.excludeme
</pre></p>
					<p> then Bacula will not backup the two directories named: </p>
					<p><pre>
   /home/user/www/cache
   /home/user/temp
</pre></p>
					<p> NOTE: subdirectories will not be backed up. That is, the directive applies to the two directories in question and any children (be they files, directories, etc). </p>
					<p>
					</p>
				</li>
			</ul>
		</p>
		<p>
		</p>
		<h1><a name="SECTION002180000000000000000"> FileSet Examples</a></h1><b> <a name="11911"></a> <a name="11912"></a> </b><p><b>The following is an example of a valid FileSet resource definition. Note, the first Include pulls in the contents of the file <b>/etc/backup.list</b> when Bacula is started (i.e. the @), and that file must have each filename to be backed up preceded by a <b>File =</b> and on a separate line. </b></p>
		<p><b></b><pre>
FileSet {
  Name = "Full Set"
  Include {
    Options {
      Compression=GZIP
      signature=SHA1
      Sparse = yes
    }
    @/etc/backup.list
  }
  Include {
     Options {
        wildfile = "*.o"
        wildfile = "*.exe"
        Exclude = yes
     }
     File = /root/myfile
     File = /usr/lib/another_file
  }
}
</pre><b></b></p>
		<p><b>In the above example, all the files contained in /etc/backup.list will be compressed with GZIP compression, an SHA1 signature will be computed on the file's contents (its data), and sparse file handling will apply. </b></p>
		<p><b>The two directories /root/myfile and /usr/lib/another_file will also be saved without any options, but all files in those directories with the extensions <b>.o</b> and <b>.exe</b> will be excluded. </b></p>
		<p><b>Let's say that you now want to exclude the directory /tmp. The simplest way to do so is to add an exclude directive that lists /tmp. The example above would then become: </b></p>
		<p><b></b><pre>
FileSet {
  Name = "Full Set"
  Include {
    Options {
      Compression=GZIP
      signature=SHA1
      Sparse = yes
    }
    @/etc/backup.list
  }
  Include {
     Options {
        wildfile = "*.o"
        wildfile = "*.exe"
        Exclude = yes
     }
     File = /root/myfile
     File = /usr/lib/another_file
  }
  Exclude {
     File = /tmp                          # don't add trailing /
  }
}
</pre><b></b></p>
		<p><b>You can add wild-cards to the File directives listed in the Exclude directory, but you need to take care because if you exclude a directory, it and all files and directories below it will also be excluded. </b></p>
		<p><b>Now lets take a slight variation on the above and suppose you want to save all your whole filesystem except <b>/tmp</b>. The problem that comes up is that Bacula will not normally cross from one filesystem to another. Doing a <b>df</b> command, you get the following output: </b></p>
		<p><b></b><pre>
[kern@rufus k]$ df
Filesystem      1k-blocks      Used Available Use% Mounted on
/dev/hda5         5044156    439232   4348692  10% /
/dev/hda1           62193      4935     54047   9% /boot
/dev/hda9        20161172   5524660  13612372  29% /home
/dev/hda2           62217      6843     52161  12% /rescue
/dev/hda8         5044156     42548   4745376   1% /tmp
/dev/hda6         5044156   2613132   2174792  55% /usr
none               127708         0    127708   0% /dev/shm
//minimatou/c$   14099200   9895424   4203776  71% /mnt/mmatou
lmatou:/          1554264    215884   1258056  15% /mnt/matou
lmatou:/home      2478140   1589952    760072  68% /mnt/matou/home
lmatou:/usr       1981000   1199960    678628  64% /mnt/matou/usr
lpmatou:/          995116    484112    459596  52% /mnt/pmatou
lpmatou:/home    19222656   2787880  15458228  16% /mnt/pmatou/home
lpmatou:/usr      2478140   2038764    311260  87% /mnt/pmatou/usr
deuter:/          4806936     97684   4465064   3% /mnt/deuter
deuter:/home      4806904    280100   4282620   7% /mnt/deuter/home
deuter:/files    44133352  27652876  14238608  67% /mnt/deuter/files
</pre><b></b></p>
		<p><b>And we see that there are a number of separate filesystems (/ /boot /home /rescue /tmp and /usr not to mention mounted systems). If you specify only <b>/</b> in your Include list, Bacula will only save the Filesystem <b>/dev/hda5</b>. To save all filesystems except <b>/tmp</b> with out including any of the Samba or NFS mounted systems, and explicitly excluding a /tmp, /proc, .journal, and .autofsck, which you will not want to be saved and restored, you can use the following: </b></p>
		<p><b></b><pre>
FileSet {
  Name = Include_example
  Include {
    Options {
       wilddir = /proc
       wilddir = /tmp
       wildfile = "/.journal"
       wildfile = "/.autofsck"
       exclude = yes
    }
    File = /
    File = /boot
    File = /home
    File = /rescue
    File = /usr
  }
}
</pre><b></b></p>
		<p><b>Since /tmp is on its own filesystem and it was not explicitly named in the Include list, it is not really needed in the exclude list. It is better to list it in the Exclude list for clarity, and in case the disks are changed so that it is no longer in its own partition. </b></p>
		<p><b>Now, lets assume you only want to backup .Z and .gz files and nothing else. This is a bit trickier because Bacula by default will select everything to backup, so we must exclude everything but .Z and .gz files. If we take the first example above and make the obvious modifications to it, we might come up with a FileSet that looks like this: </b></p>
		<p><b></b><pre>
FileSet {
  Name = "Full Set"
  Include {                    !!!!!!!!!!!!
     Options {                    This
        wildfile = "*.Z"          example
        wildfile = "*.gz"         doesn't
                                  work
     }                          !!!!!!!!!!!!
     File = /myfile
  }
}
</pre><b></b></p>
		<p><b>The *.Z and *.gz files will indeed be backed up, but all other files that are not matched by the Options directives will automatically be backed up too (i.e. that is the default rule). </b></p>
		<p><b>To accomplish what we want, we must explicitly exclude all other files. We do this with the following: </b></p>
		<p><b></b><pre>
FileSet {
  Name = "Full Set"
  Include {
     Options {
        wildfile = "*.Z"
        wildfile = "*.gz"
     }
     Options {
        Exclude = yes
        RegexFile = ".*"
     }
     File = /myfile
  }
}
</pre><b></b></p>
		<p><b>The “trick” here was to add a RegexFile expression that matches all files. It does not match directory names, so all directories in /myfile will be backed up (the directory entry) and any *.Z and *.gz files contained in them. If you know that certain directories do not contain any *.Z or *.gz files and you do not want the directory entries backed up, you will need to explicitly exclude those directories. Backing up a directory entries is not very expensive. </b></p>
		<p><b>Bacula uses the system regex library and some of them are different on different OSes. The above has been reported not to work on FreeBSD. This can be tested by using the <b>estimate job=job-name listing</b> command in the console and adapting the RegexFile expression appropriately. In a future version of Bacula, we will supply our own Regex code to avoid such system dependencies. </b></p>
		<p><b>Please be aware that allowing Bacula to traverse or change file systems can be <b>very</b> dangerous. For example, with the following: </b></p>
		<p><b></b><pre>
FileSet {
  Name = "Bad example"
  Include {
    Options { onefs=no }
    File = /mnt/matou
  }
}
</pre><b></b></p>
		<p><b>you will be backing up an NFS mounted partition (<b>/mnt/matou</b>), and since <b>onefs</b> is set to <b>no</b>, Bacula will traverse file systems. Now if <b>/mnt/matou</b> has the current machine's file systems mounted, as is often the case, you will get yourself into a recursive loop and the backup will never end. </b></p>
		<p><b>As a final example, let's say that you have only one or two subdirectories of /home that you want to backup. For example, you want to backup only subdirectories beginning with the letter a and the letter b - i.e. /home/a* and /home/b*. Now, you might first try: </b><pre>
FileSet {
  Name = "Full Set"
  Include {
     Options {
        wilddir = "/home/a*"
        wilddir = "/home/b*"
     }
     File = /home
  }
}
</pre><b></b></p>
		<p><b>The problem is that the above will include everything in /home. To get things to work correctly, you need to start with the idea of exclusion instead of inclusion. So, you could simply exclude all directories except the two you want to use: </b><pre>
FileSet {
  Name = "Full Set"
  Include {
     Options {
        RegexDir = "^/home/[c-z]"
        exclude = yes
     }
     File = /home
  }
}
</pre><b></b></p>
		<p><b>And assuming that all subdirectories start with a lowercase letter, this would work. </b></p>
		<p><b>An alternative would be to include the two subdirectories desired and exclude everything else: </b><pre>
FileSet {
  Name = "Full Set"
  Include {
     Options {
        wilddir = "/home/a*"
        wilddir = "/home/b*"
     }
     Options {
        RegexDir = ".*"
        exclude = yes
     }
     File = /home
  }
}
</pre><b></b></p>
		<p><b>The following example shows how to back up only the My Pictures directory inside the My Documents directory for all users in C:/Documents and Settings, i.e. everything matching the pattern: </b></p>
		<p><b>C:/Documents and Settings/*/My Documents/My Pictures/* </b></p>
		<p><b>To understand how this can be achieved, there are two important points to remember: </b></p>
		<p><b>Firstly, Bacula traverses the filesystem starting from the File = lines. It stops descending when a directory is excluded, so you must include all ancestor (higher level) directories of each directory containing files to be included. </b></p>
		<p><b>Secondly, each directory and file is compared to the Options clauses in the order they appear in the FileSet. When a match is found, no further Optionss are compared and the directory or file is either included or excluded. </b></p>
		<p><b>The FileSet resource definition below implements this by including specifc directories and files and excluding everything else. </b></p>
		<p><b></b><pre>
FileSet {
  Name = "AllPictures"

  Include {

    File  = "C:/Documents and Settings"

    Options {
      signature = SHA1
      verify = s1
      IgnoreCase = yes

      # Include all users' directories so we reach the inner ones.  Unlike a
      # WildDir pattern ending in *, this RegExDir only matches the top-level
      # directories and not any inner ones.
      RegExDir = "^C:/Documents and Settings/[^/]+$"

      # Ditto all users' My Documents directories.
      WildDir = "C:/Documents and Settings/*/My Documents"

      # Ditto all users' My Documents/My Pictures directories.
      WildDir = "C:/Documents and Settings/*/My Documents/My Pictures"

      # Include the contents of the My Documents/My Pictures directories and
      # any subdirectories.
      Wild = "C:/Documents and Settings/*/My Documents/My Pictures/*"
    }

    Options {
      Exclude = yes
      IgnoreCase = yes

      # Exclude everything else, in particular any files at the top level and
      # any other directories or files in the users' directories.
      Wild = "C:/Documents and Settings/*"
    }
  }
}
</pre><b></b></p>
		<p>
		</p>
		<h1><a name="SECTION002190000000000000000"> Backing up Raw Partitions</a></h1><b> <a name="11951"></a> <a name="11952"></a> </b><p><b>The following FileSet definition will backup a raw partition: </b></p>
		<p><b></b><pre>
FileSet {
  Name = "RawPartition"
  Include {
    Options { sparse=yes }
    File = /dev/hda2
  }
}
</pre><b></b></p>
		<p><b>While backing up and restoring a raw partition, you should ensure that no other process including the system is writing to that partition. As a precaution, you are strongly urged to ensure that the raw partition is not mounted or is mounted read-only. If necessary, this can be done using the <b>RunBeforeJob</b> directive. </b></p>
		<p>
		</p>
		<h1><a name="SECTION0021100000000000000000"> Excluding Files and Directories</a></h1><b> <a name="11957"></a> <a name="11958"></a> </b><p><b>You may also include full filenames or directory names in addition to using wild-cards and <b>Exclude=yes</b> in the Options resource as specified above by simply including the files to be excluded in an Exclude resource within the FileSet. It accepts wild-cards pattern, so for a directory, don't add a trailing /. For example: </b></p>
		<p><b></b><pre>
FileSet {
  Name = Exclusion_example
  Include {
    Options {
      Signature = SHA1
    }
    File = /
    File = /boot
    File = /home
    File = /rescue
    File = /usr
  }
  Exclude {
    File = /proc
    File = /tmp                          # Don't add trailing /
    File = .journal
    File = .autofsck
  }
}
</pre><b></b></p>
		<p><b><a name="win32"></a></b></p>
		<h1><a name="SECTION0021110000000000000000"> Windows FileSets</a></h1><b> <a name="11964"></a> <a name="11965"></a> If you are entering Windows file names, the directory path may be preceded by the drive and a colon (as in c:). However, the path separators must be specified in Unix convention (i.e. forward slash (/)). If you wish to include a quote in a file name, precede the quote with a backslash (\). For example you might use the following for a Windows machine to backup the “My Documents” directory: </b><p><b></b><pre>
FileSet {
  Name = "Windows Set"
  Include {
    Options {
       WildFile = "*.obj"
       WildFile = "*.exe"
       exclude = yes
     }
     File = "c:/My Documents"
  }
}
</pre><b></b></p>
		<p><b>For exclude lists to work correctly on Windows, you must observe the following rules: </b></p>
		<p>
			<ul>
				<li>Filenames are case sensitive, so you must use the correct case. </li>
				<li>To exclude a directory, you must not have a trailing slash on the directory name. </li>
				<li>If you have spaces in your filename, you must enclose the entire name in double-quote characters ("). Trying to use a backslash before the space will not work. </li>
				<li>If you are using the old Exclude syntax (noted below), you may not specify a drive letter in the exclude. The new syntax noted above should work fine including driver letters. </li>
			</ul>
		</p>
		<p><b>Thanks to Thiago Lima for summarizing the above items for us. If you are having difficulties getting includes or excludes to work, you might want to try using the <b>estimate job=xxx listing</b> command documented in the estimateestimateconsolecommand of Bacula Enterprise Console Manual. </b></p>
		<p><b>On Win32 systems, if you move a directory or file or rename a file into the set of files being backed up, and a Full backup has already been made, Bacula will not know there are new files to be saved during an Incremental or Differential backup (blame Microsoft, not me). To avoid this problem, please <b>copy</b> any new directory or files into the backup area. If you do not have enough disk to copy the directory or files, move them, but then initiate a Full backup. </b></p>
		<p>
		</p>
		<h4><a name="SECTION0021110010000000000000"> A Windows Example FileSet</a></h4><b> <a name="11978"></a> <a name="11979"></a> </b><p><b>The following example was contributed by Russell Howe. Please note that for presentation purposes, the lines beginning with Data and Internet have been wrapped and should included on the previous line with one space. </b></p>
		<p><b></b><pre>
This is my Windows 2000 fileset:
FileSet {
 Name = "Windows 2000"
 Include {
  Options {
   signature = MD5
   Exclude = yes
   IgnoreCase = yes
   # Exclude Mozilla-based programs' file caches
   WildDir = "[A-Z]:/Documents and Settings/*/Application 
Data/*/Profiles/*/*/Cache"
   WildDir = "[A-Z]:/Documents and Settings/*/Application 
Data/*/Profiles/*/*/Cache.Trash"
   WildDir = "[A-Z]:/Documents and Settings/*/Application
Data/*/Profiles/*/*/ImapMail"

   # Exclude user's registry files - they're always in use anyway.
   WildFile = "[A-Z]:/Documents and Settings/*/Local Settings/Application
Data/Microsoft/Windows/usrclass.*"
   WildFile = "[A-Z]:/Documents and Settings/*/ntuser.*"

   # Exclude directories full of lots and lots of useless little files
   WildDir = "[A-Z]:/Documents and Settings/*/Cookies"
   WildDir = "[A-Z]:/Documents and Settings/*/Recent"
   WildDir = "[A-Z]:/Documents and Settings/*/Local Settings/History"
   WildDir = "[A-Z]:/Documents and Settings/*/Local Settings/Temp"
   WildDir = "[A-Z]:/Documents and Settings/*/Local Settings/Temporary
Internet Files"

   # These are always open and unable to be backed up
   WildFile = "[A-Z]:/Documents and Settings/All Users/Application
Data/Microsoft/Network/Downloader/qmgr[01].dat"

   # Some random bits of Windows we want to ignore
   WildFile = "[A-Z]:/WINNT/security/logs/scepol.log"
   WildDir = "[A-Z]:/WINNT/system32/config"
   WildDir = "[A-Z]:/WINNT/msdownld.tmp"
   WildDir = "[A-Z]:/WINNT/Internet Logs"
   WildDir = "[A-Z]:/WINNT/$Nt*Uninstall*"
   WildDir = "[A-Z]:/WINNT/sysvol"
   WildFile = "[A-Z]:/WINNT/cluster/CLUSDB"
   WildFile = "[A-Z]:/WINNT/cluster/CLUSDB.LOG"
   WildFile = "[A-Z]:/WINNT/NTDS/edb.log"
   WildFile = "[A-Z]:/WINNT/NTDS/ntds.dit"
   WildFile = "[A-Z]:/WINNT/NTDS/temp.edb"
   WildFile = "[A-Z]:/WINNT/ntfrs/jet/log/edb.log"
   WildFile = "[A-Z]:/WINNT/ntfrs/jet/ntfrs.jdb"
   WildFile = "[A-Z]:/WINNT/ntfrs/jet/temp/tmp.edb"
   WildFile = "[A-Z]:/WINNT/system32/CPL.CFG"
   WildFile = "[A-Z]:/WINNT/system32/dhcp/dhcp.mdb"
   WildFile = "[A-Z]:/WINNT/system32/dhcp/j50.log"
   WildFile = "[A-Z]:/WINNT/system32/dhcp/tmp.edb"
   WildFile = "[A-Z]:/WINNT/system32/LServer/edb.log"
   WildFile = "[A-Z]:/WINNT/system32/LServer/TLSLic.edb"
   WildFile = "[A-Z]:/WINNT/system32/LServer/tmp.edb"
   WildFile = "[A-Z]:/WINNT/system32/wins/j50.log"
   WildFile = "[A-Z]:/WINNT/system32/wins/wins.mdb"
   WildFile = "[A-Z]:/WINNT/system32/wins/winstmp.mdb"

   # Temporary directories & files
   WildDir = "[A-Z]:/WINNT/Temp"
   WildDir = "[A-Z]:/temp"
   WildFile = "*.tmp"
   WildDir = "[A-Z]:/tmp"
   WildDir = "[A-Z]:/var/tmp"

   # Recycle bins
   WildDir = "[A-Z]:/RECYCLER"

   # Swap files
   WildFile = "[A-Z]:/pagefile.sys"

   # These are programs and are easier to reinstall than restore from
   # backup
   WildDir = "[A-Z]:/cygwin"
   WildDir = "[A-Z]:/Program Files/Grisoft"
   WildDir = "[A-Z]:/Program Files/Java"
   WildDir = "[A-Z]:/Program Files/Java Web Start"
   WildDir = "[A-Z]:/Program Files/JavaSoft"
   WildDir = "[A-Z]:/Program Files/Microsoft Office"
   WildDir = "[A-Z]:/Program Files/Mozilla Firefox"
   WildDir = "[A-Z]:/Program Files/Mozilla Thunderbird"
   WildDir = "[A-Z]:/Program Files/mozilla.org"
   WildDir = "[A-Z]:/Program Files/OpenOffice*"
  }

  # Our Win2k boxen all have C: and D: as the main hard drives.
  File = "C:/"
  File = "D:/"
 }
}
</pre><b></b></p>
		<p><b>Note, the three line of the above Exclude were split to fit on the document page, they should be written on a single line in real use. </b></p>
		<p>
		</p>
		<h4><a name="SECTION0021110020000000000000"> Windows NTFS Naming Considerations</a></h4><b> <a name="11983"></a> <a name="11984"></a> </b><p><b>NTFS filenames containing Unicode characters should now be supported as of version 1.37.30 or later. </b></p>
		<p>
		</p>
		<h1><a name="SECTION0021120000000000000000"> Testing Your FileSet</a></h1><b> <a name="11986"></a> <a name="11987"></a> </b><p><b>If you wish to get an idea of what your FileSet will really backup or if your exclusion rules will work correctly, you can test it by using the <b>estimate</b> command in the Console program. See the estimateestimateconsolecommand of Bacula Enterprise Console Manual. </b></p>
		<p><b>As an example, suppose you add the following test FileSet: </b></p>
		<p><b></b><pre>
FileSet {
  Name = Test
  Include {
    File = /home/xxx/test
    Options {
       regex = ".*\\.c$"
    }
  }
}
</pre><b></b></p>
		<p><b>You could then add some test files to the directory <b>/home/xxx/test</b> and use the following command in the console: </b></p>
		<p><b></b><pre>
estimate job=&lt;any-job-name&gt; listing client=&lt;desired-client&gt; fileset=Test
</pre><b></b></p>
		<p><b>to give you a listing of all files that match. In the above example, it should be only files with names ending in <b>.c</b>. </b></p>
		<p>
		</p>
		<h1><a name="SECTION0021130000000000000000"></a> <a name="ClientResource2"></a><br /> The Client Resource </h1><b> <a name="12001"></a> <a name="12002"></a> </b><p><b>The Client resource defines the attributes of the Clients that are served by this Director; that is the machines that are to be backed up. You will need one Client resource definition for each machine to be backed up. </b></p>
		<p>
			<dl>
				<dt><strong>Client (or FileDaemon)</strong></dt>
				<dd><a name="12004"></a> <a name="12005"></a> Start of the Client directives. <p>
					</p>
				</dd>
				<dt><strong>Name = name</strong></dt>
				<dd><a name="12008"></a> <a name="12009"></a> The client name which will be used in the Job resource directive or in the console run command. This directive is required. <p>
					</p>
				</dd>
				<dt><strong>Enabled = yes|no</strong></dt>
				<dd><a name="12012"></a> <a name="12013"></a> This directive allows you to enable or disable the Client resource. If the resource is disabled, the Client will not be used. <p>
					</p>
				</dd>
				<dt><strong>Address = address</strong></dt>
				<dd><a name="12016"></a> <a name="12017"></a> <a name="12018"></a> <a name="12019"></a> Where the address is a host name, a fully qualified domain name, or a network address in dotted quad notation for a Bacula File server daemon. This directive is required. <p>
					</p>
				</dd>
				<dt><strong>FD Port = port-number</strong></dt>
				<dd><a name="12022"></a> <a name="12023"></a> Where the port is a port number at which the Bacula File server daemon can be contacted. The default is 9102. <p>
					</p>
				</dd>
				<dt><strong>Catalog = Catalog-resource-name</strong></dt>
				<dd><a name="12026"></a> <a name="12027"></a> This specifies the name of the catalog resource to be used for this Client. This directive is required. <p>
					</p>
				</dd>
				<dt><strong>Password = password</strong></dt>
				<dd><a name="12030"></a> <a name="12031"></a> This is the password to be used when establishing a connection with the File services, so the Client configuration file on the machine to be backed up must have the same password defined for this Director. This directive is required. If you have either <b>/dev/random</b> <b>bc</b> on your machine, Bacula will generate a random password during the configuration process, otherwise it will be left blank. <p> The password is plain text. It is not generated through any special process, but it is preferable for security reasons to make the text random. </p>
					<p>
					</p>
				</dd>
				<dt><strong>Snapshot Retention = time-period-specification</strong></dt>
				<dd><a name="12036"></a> <a name="12037"></a><p> The Snapshot Retention directive defines the length of time that Bacula will keep Snapshots in the Catalog database and on the Client after the Snapshot creation. When this time period expires, and if using the <tt>snapshot prune</tt> command, Bacula will prune (remove) Snapshot records that are older than the specified Snapshot Retention period and will contact the FileDaemon to delete Snapshots from the system. </p>
					<p> The Snapshot retention period is specified as seconds, minutes, hours, days, weeks, months, quarters, or years. See the Configuration chapterTime of this manual for additional details of time specification. </p>
					<p> The default is 0 seconds, Snapshots are deleted at the end of the backup. The Job <span class="textbf">SnapshotRetention</span> directive overwrites the Client <span class="textbf">SnapshotRetention</span> directive. </p>
					<p>
					</p>
				</dd>
				<dt><strong>File Retention = time-period-specification</strong></dt>
				<dd><a name="FileRetention"></a> <a name="12046"></a> <a name="12047"></a> The File Retention directive defines the length of time that Bacula will keep File records in the Catalog database after the End time of the Job corresponding to the File records. When this time period expires, and if <b>AutoPrune</b> is set to <b>yes</b> Bacula will prune (remove) File records that are older than the specified File Retention period. Note, this affects only records in the catalog database. It does not affect your archive backups. <p> File records may actually be retained for a shorter period than you specify on this directive if you specify either a shorter <b>Job Retention</b> or a shorter <b>Volume Retention</b> period. The shortest retention period of the three takes precedence. The time may be expressed in seconds, minutes, hours, days, weeks, months, quarters, or years. See the Configuration chapterTime of this manual for additional details of time specification. </p>
					<p> The default is 60 days. </p>
					<p>
					</p>
				</dd>
				<dt><strong>Job Retention = time-period-specification</strong></dt>
				<dd><a name="JobRetention"></a> <a name="12057"></a> <a name="12058"></a> The Job Retention directive defines the length of time that Bacula will keep Job records in the Catalog database after the Job End time. When this time period expires, and if <b>AutoPrune</b> is set to <b>yes</b> Bacula will prune (remove) Job records that are older than the specified File Retention period. As with the other retention periods, this affects only records in the catalog and not data in your archive backup. <p> If a Job record is selected for pruning, all associated File and JobMedia records will also be pruned regardless of the File Retention period set. As a consequence, you normally will set the File retention period to be less than the Job retention period. The Job retention period can actually be less than the value you specify here if you set the <b>Volume Retention</b> directive in the Pool resource to a smaller duration. This is because the Job retention period and the Volume retention period are independently applied, so the smaller of the two takes precedence. </p>
					<p> The Job retention period is specified as seconds, minutes, hours, days, weeks, months, quarters, or years. See the Configuration chapterTime of this manual for additional details of time specification. </p>
					<p> The default is 180 days. </p>
					<p><a name="AutoPrune"></a></p>
				</dd>
				<dt><strong>AutoPrune = yes|no</strong></dt>
				<dd><a name="12067"></a> <a name="12068"></a> If AutoPrune is set to <b>yes</b> (default), Bacula (version 1.20 or greater) will automatically apply the File retention period and the Job retention period for the Client at the end of the Job. If you set <b>AutoPrune = no</b>, pruning will not be done, and your Catalog will grow in size each time you run a Job. Pruning affects only information in the catalog and not data stored in the backup archives (on Volumes). <p>
					</p>
				</dd>
				<dt><strong>Maximum Concurrent Jobs = number</strong></dt>
				<dd><a name="12073"></a> <a name="12074"></a> where number is the maximum number of Jobs with the current Client that can run concurrently. Note, this directive limits only Jobs for Clients with the same name as the resource in which it appears. Any other restrictions on the maximum concurrent jobs such as in the Director, Job, or Storage resources will also apply in addition to any limit specified here. The default is set to 1, but you may set it to a larger number. <p>
					</p>
				</dd>
				<dt><strong>Maximum Bandwidth Per Job = speed</strong></dt>
				<dd><a name="12079"></a> <a name="12080"></a><p> The speed parameter specifies the maximum allowed bandwidth that a job may use when started for this Client. The speed parameter should be specified in k/s, Kb/s, m/s or Mb/s, which are respective 1,000 bytes per second, 1,024 bytes per second, 1,000,000 bytes per second, or 1,048,576 bytes per second. </p>
					<p>
					</p>
				</dd>
				<dt><strong>Priority = number</strong></dt>
				<dd><a name="12083"></a> <a name="12084"></a> The number specifies the priority of this client relative to other clients that the Director is processing simultaneously. The priority can range from 1 to 1000. The clients are ordered such that the smaller number priorities are performed first (not currently implemented). <p><a name="Director:Client:SDCallsClient"></a></p>
				</dd>
				<dt><strong>SD Calls Client = yes/no</strong></dt>
				<dd><a name="12088"></a> <a name="12089"></a><p> If the <b>SD Calls Client</b> directive is set to true in a Client resource any Backup, Restore, Verify, Copy, or Migration Job where the client is involved, the client will wait for the Storage daemon to contact it. By default this directive is set to false, and the Client will call the Storage daemon. This directive can be useful if your Storage daemon is behind a firewall that permits outgoing connections but not incoming one. The following picture shows the communications connection paths in both cases. </p>
					<p><img align="BOTTOM" alt="Image sd-calls-client" border="0" height="541" src="../images/sd-calls-client.png" width="776" /></p>
					<p>
					</p>
				</dd>
			</dl>
		</p>
		<p><b>The following is an example of a valid Client resource definition: </b></p>
		<p><b></b><pre>
Client {
  Name = Minimatou
  Address = minimatou
  Catalog = MySQL
  Password = very_good
}
</pre><b></b></p>
		<p>
		</p>
		<h1><a name="SECTION0021140000000000000000"></a> <a name="StorageResource2"></a><br /> The Storage Resource </h1><b> <a name="12097"></a> <a name="12098"></a> </b><p><b>The Storage resource defines which Storage daemons are available for use by the Director. </b></p>
		<p>
			<dl>
				<dt><strong>Storage</strong></dt>
				<dd><a name="12100"></a> <a name="12101"></a> Start of the Storage resources. At least one storage resource must be specified. <p>
					</p>
				</dd>
				<dt><strong>Name = name</strong></dt>
				<dd><a name="12104"></a> <a name="12105"></a> The name of the storage resource. This name appears on the Storage directive specified in the Job resource and is required. <p>
					</p>
				</dd>
				<dt><strong>Enabled = yes|no</strong></dt>
				<dd><a name="12108"></a> <a name="12109"></a> This directive allows you to enable or disable a Storage resource. When the resource is disabled, the storage device will not be used. To reuse it you must re-enable the Storage resource. <p>
					</p>
				</dd>
				<dt><strong>Address = address</strong></dt>
				<dd><a name="12112"></a> <a name="12113"></a> <a name="12114"></a> Where the address is a host name, a <b>fully qualified domain name</b>, or an <b>IP address</b>. Please note that the address as specified here will be transmitted to the File daemon who will then use it to contact the Storage daemon. Hence, it is <b>not</b>, a good idea to use <b>localhost</b> as the name but rather a fully qualified machine name or an IP address. This directive is required. <p>
					</p>
				</dd>
				<dt><strong>FD Storage Address = address</strong></dt>
				<dd><a name="12123"></a> <a name="12124"></a> <a name="12125"></a> Where the address is a host name, a <b>fully qualified domain name</b>, or an <b>IP address</b>. The address specified here will be transmitted to the File daemon instead of the IP address that the Director uses to contact the Storage daemon. This FDStorageAddress will then be used by the File daemon to contact the Storage daemon. This directive particularly useful if the File daemon is in a different network domain than the Director or Storage daemon. It is also useful in NAT or firewal environments. <p>
						<div align="CENTER"><a name="fig:backupwan"></a><a name="12132"></a><table>
								<caption align="BOTTOM"><strong>Figure:</strong> Backup over WAN using FD Storage Address</caption>
								<tr>
									<td>
										<div align="CENTER">
										</div><img align="BOTTOM" alt="Image BackupOverWan1" border="0" height="630" src="../images/BackupOverWan1.png" width="695" /></td>
								</tr>
							</table>
						</div>
					</p>
					<p>
					</p>
				</dd>
				<dt><strong>SD Port = port</strong></dt>
				<dd><a name="12137"></a> <a name="12138"></a> Where port is the port to use to contact the storage daemon for information and to start jobs. This same port number must appear in the Storage resource of the Storage daemon's configuration file. The default is 9103. <p>
					</p>
				</dd>
				<dt><strong>Password = password</strong></dt>
				<dd><a name="12141"></a> <a name="12142"></a> This is the password to be used when establishing a connection with the Storage services. This same password also must appear in the Director resource of the Storage daemon's configuration file. This directive is required. If you have either <b>/dev/random</b> <b>bc</b> on your machine, Bacula will generate a random password during the configuration process, otherwise it will be left blank. <p> The password is plain text. It is not generated through any special process, but it is preferable for security reasons to use random text. </p>
					<p>
					</p>
				</dd>
				<dt><strong>Device = device-name</strong></dt>
				<dd><a name="12147"></a> <a name="12148"></a> This directive specifies the Storage daemon's name of the device resource to be used for the storage. If you are using an Autochanger, the name specified here should be the name of the Storage daemon's Autochanger resource rather than the name of an individual device. This name is not the physical device name, but the logical device name as defined on the <b>Name</b> directive contained in the <b>Device</b> or the <b>Autochanger</b> resource definition of the <b>Storage daemon</b> configuration file. You can specify any name you would like (even the device name if you prefer) up to a maximum of 127 characters in length. The physical device name associated with this device is specified in the <b>Storage daemon</b> configuration file (as <b>Archive Device</b>). Please take care not to define two different Storage resource directives in the Director that point to the same Device in the Storage daemon. Doing so may cause the Storage daemon to block (or hang) attempting to open the same device that is already open. This directive is required. <p><a name="MediaType"></a></p>
				</dd>
				<dt><strong>Media Type = MediaType</strong></dt>
				<dd><a name="12158"></a> <a name="12159"></a> This directive specifies the Media Type to be used to store the data. This is an arbitrary string of characters up to 127 maximum that you define. It can be anything you want. However, it is best to make it descriptive of the storage media (e.g. File, DAT, "HP DLT8000", 8mm, ...). <p>
					</p>
					<p>
					</p> In addition, it is essential that you make the <b>Media Type</b> specification unique for each storage Device in the bacula-sd.conf file. If you have two DDS-4 drives that have incompatible formats, or if you have a DDS-4 drive and a DDS-4 autochanger, you almost certainly should specify different <b>Media Types</b>. During a restore, assuming a <b> DDS-4</b> Media Type is associated with the Job, Bacula can decide to use any Storage daemon that supports Media Type <b>DDS-4</b> and on any drive that supports it. <p>
					</p>
					<p>
					</p> If you are writing to disk Volumes, please make doubly sure that each Device resource defined in the Storage daemon (and hence in the Director's conf file) has a unique media type. Otherwise for Bacula your restores may not work because Bacula will assume that you can mount any Media Type with the same name on any Device associated with that Media Type. This is possible with tape drives, but with disk drives, unless you are very clever you cannot mount a Volume in any directory - this can be done by creating an appropriate soft link. <p>
					</p>
					<p>
					</p> Currently Bacula permits only a single Media Type per Storage Device definition. Consequently, if you have a drive that supports more than one Media Type, you can give a unique string to Volumes with different intrinsic Media Type (Media Type = DDS-3-4 for DDS-3 and DDS-4 types), but then those volumes will only be mounted on drives indicated with the dual type (DDS-3-4). <p>
					</p>
					<p>
					</p> If you want to tie Bacula to using a single Storage daemon or drive, you must specify a unique Media Type for that drive. This is an important point that should be carefully understood. Note, this applies equally to Disk Volumes. If you define more than one disk Device resource in your Storage daemon's conf file, the Volumes on those two devices are in fact incompatible because one can not physically be mounted on the other device since they are found in different directories. For this reason, you probably should use two different Media Types for your two disk Devices (even though you might think of them as both being File types). You can find more on this subject in the Basic Volume ManagementDiskChapter chapter of this manual. <p>
					</p>
					<p>
					</p> The <b>MediaType</b> specified in the Director's Storage resource, <b> must</b> correspond to the <b>Media Type</b> specified in the <b>Device</b> resource of the <b>Storage daemon</b> configuration file. This directive is required, and it is used by the Director and the Storage daemon to ensure that a Volume automatically selected from the Pool corresponds to the physical device. If a Storage daemon handles multiple devices (e.g. will write to various file Volumes on different partitions), this directive allows you to specify exactly which device. <p>
					</p>
					<p>
					</p> As mentioned above, the value specified in the Director's Storage resource must agree with the value specified in the Device resource in the <b>Storage daemon's</b> configuration file. It is also an additional check so that you don't try to write data for a DLT onto an 8mm device. <p><a name="Autochanger1"></a></p>
				</dd>
				<dt><strong>Autochanger = yes|no</strong></dt>
				<dd><a name="12175"></a> <a name="12176"></a> If you specify <b>yes</b> for this command (the default is <b>no</b>), when you use the <b>label</b> command or the <b>add</b> command to create a new Volume, <b>Bacula</b> will also request the Autochanger Slot number. This simplifies creating database entries for Volumes in an autochanger. If you forget to specify the Slot, the autochanger will not be used. However, you may modify the Slot associated with a Volume at any time by using the <b>update volume</b> or <b>update slots</b> command in the console program. When <b>autochanger</b> is enabled, the algorithm used by Bacula to search for available volumes will be modified to consider only Volumes that are known to be in the autochanger's magazine. If no <b>in changer</b> volume is found, Bacula will attempt recycling, pruning, ..., and if still no volume is found, Bacula will search for any volume whether or not in the magazine. By privileging in changer volumes, this procedure minimizes operator intervention. The default is <b>no</b>. <p>
					</p>
					<p>
					</p> For the autochanger to be used, you must also specify <b>Autochanger = yes</b> in the Device ResourceAutochanger in the Storage daemon's configuration file as well as other important Storage daemon configuration information. To help Bacula understand your Autochanger setup, instead of using the Directive <b>Autochanger = yes</b>, it is preferable to specify the name of the Autochanger in place of the word <b>yes</b>. Please consult the Using AutochangersAutochangersChapter manual of this chapter for the details of using autochangers. <p>
					</p>
				</dd>
				<dt><strong>Maximum Concurrent Jobs = number</strong></dt>
				<dd><a name="12196"></a> <a name="12197"></a> where number is the maximum number of Jobs with the current Storage resource that can run concurrently. Note, this directive limits only Jobs for Jobs using this Storage daemon. Any other restrictions on the maximum concurrent jobs such as in the Director, Job, or Client resources will also apply in addition to any limit specified here. The default is set to 1, but you may set it to a larger number. However, if you set the Storage daemon's number of concurrent jobs greater than one, we recommend that you read the warning documented under Maximum Concurrent JobsDirMaxConJobs in the Director's resource or simply turn data spooling on as documented in the Data SpoolingSpoolingChapter chapter of this manual. <p>
					</p>
				</dd>
				<dt><strong>Maximum Concurrent Read Jobs = number</strong></dt>
				<dd><a name="12206"></a> <a name="12207"></a> The main purpose of this directive is to limit the number of concurrent Copy, Migration, and VirtualFull jobs so that they don't monopolize all the Storage drives causing a deadlock situation where all the drives are allocated for reading but none remain for writing. This deadlock situation can occur when running multiple simultaneous Copy, Migration, and VirtualFull jobs. <p>
					</p>
					<p>
					</p> The default value is set to 0 (zero), which means there is no limit on the number of read jobs. Note, limiting the read jobs does not apply to Restore jobs, which are normally started by hand. A reasonable value for this directive is one half the number of drives that the Storage resource has rounded down. Doing so, will leave the same number of drives for writing and will generally avoid over committing drives and a deadlock. <p>
					</p>
				</dd>
				<dt><strong>AllowCompression = yes|no</strong></dt>
				<dd><a name="AllowCompression"></a> <a name="12211"></a> <a name="12212"></a><p> This directive is optional, and if you specify <b>No</b> (the default is <b>Yes</b>), it will cause backups jobs running on this storage resource to run without client File Daemon compression. This effectively overrides compression options in FileSets used by jobs which use this storage resource. </p>
					<p>
					</p>
				</dd>
				<dt><strong>Heartbeat Interval = time-interval</strong></dt>
				<dd><a name="12217"></a> <a name="12218"></a> This directive is optional and if specified will cause the Director to set a keepalive interval (heartbeat) in seconds on each of the sockets it opens for the Storage resource. This value will override any specified at the Director level. It is implemented only on systems (Linux, ...) that provide the <b>setsockopt</b> TCP_KEEPIDLE function. The default value is 300 seconds (5 minutes). <p>
					</p>
				</dd>
			</dl>
		</p>
		<p><b>The following is an example of a valid Storage resource definition: </b></p>
		<p><b></b><pre>
# Definition of tape storage device
Storage {
  Name = DLTDrive
  Address = lpmatou
  Password = storage_password # password for Storage daemon
  Device = "HP DLT 80"    # same as Device in Storage daemon
  Media Type = DLT8000    # same as MediaType in Storage daemon
}
</pre><b></b></p>
		<p>
		</p>
		<h1><a name="SECTION0021150000000000000000"> The Autochanger Resources</a></h1><b> <a name="12224"></a> <a name="12225"></a> </b><p><b>Each autochanger that you have defined in an <b>Autochanger</b> resource in the Storage daemon's <b>bacula-sd.conf</b> file, must have a corresponding <b>Autochanger</b> resource defined in the Director's <b>bacula-dir.conf</b> file. The <b>Autochanger</b> resource uses the same directives as the <b>Storage</b> resource defined StorageResource. </b></p>
		<p><b>Normally you will already have a <b>Storage</b> resource that points to the Storage daemon's <b>Autochanger</b> resource. Thus you need only to change the name of the <b>Storage</b> resource to <b>Autochanger</b>. In addition the <b>Autochanger = yes</b> directive is not needed in the Director's <b> Autochanger</b> resource, since the resource name is <b>Autochanger</b>, the Director already knows that it represents an autochanger. </b></p>
		<p>
		</p>
		<p>
		</p><b>In addition to the above change (<b>Storage</b> to <b>Autochanger</b>), you must modify any additional <b>Storage</b> resources that correspond to devices that are part of the <b>Autochanger</b> device. Instead of the previous <b>Autochanger = yes</b> directive they should be modified to be <b>Autochanger = xxx</b> where you replace the <b>xxx</b> with the name of the Autochanger. </b><p>
		</p>
		<p>
		</p><b>For example, in the bacula-dir.conf file: </b><p><pre>
Autochanger {             # New resource
  Name = Changer-1
  Address = cibou.company.com
  SDPort = 9103
  Password = "xxxxxxxxxx"
  Device = LTO-Changer-1
  Media Type = LTO-4
  Maximum Concurrent Jobs = 50
}

Storage {
  Name = Changer-1-Drive0
  Address = cibou.company.com
  SDPort = 9103
  Password = "xxxxxxxxxx"
  Device = LTO4_1_Drive0
  Media Type = LTO-4
  Maximum Concurrent Jobs = 5
  Autochanger = Changer-1  # New directive
}

Storage {
  Name = Changer-1-Drive1
  Address = cibou.company.com
  SDPort = 9103
  Password = "xxxxxxxxxx"
  Device = LTO4_1_Drive1
  Media Type = LTO-4
  Maximum Concurrent Jobs = 5
  Autochanger = Changer-1  # New directive
}

...
</pre></p>
		<p><b>Note that Storage resources <b>Changer-1-Drive0</b> and <b>Changer-1-Drive1</b> are not required since they make up part of an autochanger, and normally, Jobs refer only to the Autochanger resource. However, by referring to those Storage definitions in a Job, you will use only the indicated drive. This is not normally what you want to do, but it is very useful and often used for reserving a drive for restores. See the Storage daemon example .conf below and the use of <b>AutoSelect = no</b>. </b></p>
		<p>
		</p>
		<h1><a name="SECTION0021160000000000000000"></a> <a name="PoolResource"></a><br /> The Pool Resource </h1><b> <a name="12254"></a> <a name="12255"></a> </b><p><b>The Pool resource defines the set of storage Volumes (tapes or files) to be used by Bacula to write the data. By configuring different Pools, you can determine which set of Volumes (media) receives the backup data. This permits, for example, to store all full backup data on one set of Volumes and all incremental backups on another set of Volumes. Alternatively, you could assign a different set of Volumes to each machine that you backup. This is most easily done by defining multiple Pools. </b></p>
		<p><b>Another important aspect of a Pool is that it contains the default attributes (Maximum Jobs, Retention Period, Recycle flag, ...) that will be given to a Volume when it is created. This avoids the need for you to answer a large number of questions when labeling a new Volume. Each of these attributes can later be changed on a Volume by Volume basis using the <b>update</b> command in the console program. Note that you must explicitly specify which Pool Bacula is to use with each Job. Bacula will not automatically search for the correct Pool. </b></p>
		<p><b>Most often in Bacula installations all backups for all machines (Clients) go to a single set of Volumes. In this case, you will probably only use the <b>Default</b> Pool. If your backup strategy calls for you to mount a different tape each day, you will probably want to define a separate Pool for each day. For more information on this subject, please see the Backup StrategiesStrategiesChapter chapter of this manual. </b></p>
		<p><b>To use a Pool, there are three distinct steps. First the Pool must be defined in the Director's configuration file. Then the Pool must be written to the Catalog database. This is done automatically by the Director each time that it starts, or alternatively can be done using the <b>create</b> command in the console program. Finally, if you change the Pool definition in the Director's configuration file and restart Bacula, the pool will be updated alternatively you can use the <b>update pool</b> console command to refresh the database image. It is this database image rather than the Director's resource image that is used for the default Volume attributes. Note, for the pool to be automatically created or updated, it must be explicitly referenced by a Job resource. </b></p>
		<p><b>Next the physical media must be labeled. The labeling can either be done with the <b>label</b> command in the <b>console</b> program or using the <b>btape</b> program. The preferred method is to use the <b>label</b> command in the <b>console</b> program. </b></p>
		<p><b>Finally, you must add Volume names (and their attributes) to the Pool. For Volumes to be used by Bacula they must be of the same <b>Media Type</b> as the archive device specified for the job (i.e. if you are going to back up to a DLT device, the Pool must have DLT volumes defined since 8mm volumes cannot be mounted on a DLT drive). The <b>Media Type</b> has particular importance if you are backing up to files. When running a Job, you must explicitly specify which Pool to use. Bacula will then automatically select the next Volume to use from the Pool, but it will ensure that the <b>Media Type</b> of any Volume selected from the Pool is identical to that required by the Storage resource you have specified for the Job. </b></p>
		<p><b>If you use the <b>label</b> command in the console program to label the Volumes, they will automatically be added to the Pool, so this last step is not normally required. </b></p>
		<p><b>It is also possible to add Volumes to the database without explicitly labeling the physical volume. This is done with the <b>add</b> console command. </b></p>
		<p><b>As previously mentioned, each time Bacula starts, it scans all the Pools associated with each Catalog, and if the database record does not already exist, it will be created from the Pool Resource definition. <b>Bacula</b> probably should do an <b>update pool</b> if you change the Pool definition, but currently, you must do this manually using the <b>update pool</b> command in the Console program. </b></p>
		<p><b>The Pool Resource defined in the Director's configuration file (bacula-dir.conf) may contain the following directives: </b></p>
		<p>
			<dl>
				<dt><strong>Pool</strong></dt>
				<dd><a name="12276"></a> <a name="12277"></a> Start of the Pool resource. There must be at least one Pool resource defined. <p>
					</p>
				</dd>
				<dt><strong>Name = name</strong></dt>
				<dd><a name="12280"></a> <a name="12281"></a> The name of the pool. For most applications, you will use the default pool name <b>Default</b>. This directive is required. <p><a name="MaxVolumes"></a></p>
				</dd>
				<dt><strong>Maximum Volumes = number</strong></dt>
				<dd><a name="12286"></a> <a name="12287"></a> This directive specifies the maximum number of volumes (tapes or files) contained in the pool. This directive is optional, if omitted or set to zero, any number of volumes will be permitted. In general, this directive is useful for Autochangers where there is a fixed number of Volumes, or for File storage where you wish to ensure that the backups made to disk files do not become too numerous or consume too much space. <p>
					</p> This directive is only applied to case of volumes automatically created by Bacula. If you add volumes to a pool manually with the <b>label</b> command, it is possible to have more volumes in a pool than specified by <b>Maximum Volumes</b>. <p>
					</p>
				</dd>
				<dt><strong>Pool Type = type</strong></dt>
				<dd><a name="12292"></a> <a name="12293"></a> This directive defines the pool type, which corresponds to the type of Job being run. It is required and may be one of the following: <p>
						<table width="90%">
							<tr>
								<td align="right" valign="top">Backup</td>
								<td valign="top"> </td>
							</tr>
							<tr>
								<td align="right" valign="top">*Archive</td>
								<td valign="top"> </td>
							</tr>
							<tr>
								<td align="right" valign="top">*Cloned</td>
								<td valign="top"> </td>
							</tr>
							<tr>
								<td align="right" valign="top">*Migration</td>
								<td valign="top"> </td>
							</tr>
							<tr>
								<td align="right" valign="top">*Copy</td>
								<td valign="top"> </td>
							</tr>
							<tr>
								<td align="right" valign="top">*Save</td>
								<td valign="top"> </td>
							</tr>
						</table> Note, only Backup is current implemented. </p>
					<p>
					</p>
				</dd>
				<dt><strong>Storage = storage-resource-name</strong></dt>
				<dd><a name="12298"></a> <a name="12299"></a> The Storage directive defines the name of the storage services where you want to backup the FileSet data. For additional details, see the Storage Resource ChapterStorageResource2 of this manual. The Storage resource may also be specified in the Job resource, but the value, if any, in the Pool resource overrides any value in the Job. This Storage resource definition is not required by either the Job resource or in the Pool, but it must be specified in one or the other. If not configuration error will result. <p>
					</p>
				</dd>
				<dt><strong>Use Volume Once = yes|no</strong></dt>
				<dd><a name="12304"></a> <a name="12305"></a> This directive if set to <b>yes</b> specifies that each volume is to be used only once. This is most useful when the Media is a file and you want a new file for each backup that is done. The default is <b>no</b> (i.e. use volume any number of times). This directive will most likely be phased out (deprecated), so you are recommended to use <b>Maximum Volume Jobs = 1</b> instead. <p> The value defined by this directive in the bacula-dir.conf file is the default value used when a Volume is created. Once the volume is created, changing the value in the bacula-dir.conf file will not change what is stored for the Volume. To change the value for an existing Volume you must use the <b>update</b> command in the Console. </p>
					<p> Please see the notes below under <b>Maximum Volume Jobs</b> concerning using this directive with multiple simultaneous jobs. </p>
					<p>
					</p>
				</dd>
				<dt><strong>Maximum Volume Jobs = positive-integer</strong></dt>
				<dd><a name="12313"></a> <a name="12314"></a> This directive specifies the maximum number of Jobs that can be written to the Volume. If you specify zero (the default), there is no limit. Otherwise, when the number of Jobs backed up to the Volume equals <b> positive-integer</b> the Volume will be marked <b>Used</b>. When the Volume is marked <b>Used</b> it can no longer be used for appending Jobs, much like the <b>Full</b> status, but it can be recycled if recycling is enabled, and thus used again. By setting <b>MaximumVolumeJobs</b> to one, you get the same effect as setting <b>UseVolumeOnce = yes</b>. <p> The value defined by this directive in the bacula-dir.conf file is the default value used when a Volume is created. Once the volume is created, changing the value in the bacula-dir.conf file will not change what is stored for the Volume. To change the value for an existing Volume you must use the <b>update</b> command in the Console. </p>
					<p> If you are running multiple simultaneous jobs, this directive may not work correctly because when a drive is reserved for a job, this directive is not taken into account, so multiple jobs may try to start writing to the Volume. At some point, when the Media record is updated, multiple simultaneous jobs may fail since the Volume can no longer be written. </p>
					<p>
					</p>
				</dd>
				<dt><strong>Maximum Volume Files = positive-integer</strong></dt>
				<dd><a name="12324"></a> <a name="12325"></a> This directive specifies the maximum number of files that can be written to the Volume. If you specify zero (the default), there is no limit. Otherwise, when the number of files written to the Volume equals <b> positive-integer</b> the Volume will be marked <b>Used</b>. When the Volume is marked <b>Used</b> it can no longer be used for appending Jobs, much like the <b>Full</b> status but it can be recycled if recycling is enabled and thus used again. This value is checked and the <b>Used</b> status is set only at the end of a job that writes to the particular volume. <p> The value defined by this directive in the bacula-dir.conf file is the default value used when a Volume is created. Once the volume is created, changing the value in the bacula-dir.conf file will not change what is stored for the Volume. To change the value for an existing Volume you must use the <b>update</b> command in the Console. </p>
					<p>
					</p>
				</dd>
				<dt><strong>Maximum Volume Bytes = size</strong></dt>
				<dd><a name="12334"></a> <a name="12335"></a> This directive specifies the maximum number of bytes that can be written to the Volume. If you specify zero (the default), there is no limit except the physical size of the Volume. Otherwise, when the number of bytes written to the Volume equals <b>size</b> the Volume will be marked <b>Full</b>. When the Volume is marked <b>Full</b> it can no longer be used for appending Jobs, but it can be recycled if recycling is enabled, and thus the Volume can be re-used after recycling. The size specified is checked just before each block is written to the Volume and if the Volume size would exceed the specified Maximum Volume Bytes the <b>Full</b> status will be set and the Job will request the next available Volume to continue. <p> This directive is particularly useful for restricting the size of disk volumes, and will work correctly even in the case of multiple simultaneous jobs writing to the volume. </p>
					<p> The value defined by this directive in the bacula-dir.conf file is the default value used when a Volume is created. Once the volume is created, changing the value in the bacula-dir.conf file will not change what is stored for the Volume. To change the value for an existing Volume you must use the <b>update</b> command in the Console. </p>
					<p>
					</p>
				</dd>
				<dt><strong>Volume Use Duration = time-period-specification</strong></dt>
				<dd><a name="12343"></a> <a name="12344"></a> The Volume Use Duration directive defines the time period that the Volume can be written beginning from the time of first data write to the Volume. If the time-period specified is zero (the default), the Volume can be written indefinitely. Otherwise, the next time a job runs that wants to access this Volume, and the time period from the first write to the volume (the first Job written) exceeds the time-period-specification, the Volume will be marked <b>Used</b>, which means that no more Jobs can be appended to the Volume, but it may be recycled if recycling is enabled. Using the command <b> status dir</b> applies algorithms similar to running jobs, so during such a command, the Volume status may also be changed. Once the Volume is recycled, it will be available for use again. <p> You might use this directive, for example, if you have a Volume used for Incremental backups, and Volumes used for Weekly Full backups. Once the Full backup is done, you will want to use a different Incremental Volume. This can be accomplished by setting the Volume Use Duration for the Incremental Volume to six days. I.e. it will be used for the 6 days following a Full save, then a different Incremental volume will be used. Be careful about setting the duration to short periods such as 23 hours, or you might experience problems of Bacula waiting for a tape over the weekend only to complete the backups Monday morning when an operator mounts a new tape. </p>
					<p> The use duration is checked and the <b>Used</b> status is set only at the end of a job that writes to the particular volume, which means that even though the use duration may have expired, the catalog entry will not be updated until the next job that uses this volume is run. This directive is not intended to be used to limit volume sizes and will not work correctly (i.e. will fail jobs) if the use duration expires while multiple simultaneous jobs are writing to the volume. </p>
					<p> Please note that the value defined by this directive in the bacula-dir.conf file is the default value used when a Volume is created. Once the volume is created, changing the value in the bacula-dir.conf file will not change what is stored for the Volume. To change the value for an existing Volume you must use the update volumeUpdateCommandconsolecommand in the Bacula Enterprise Console Manual. </p>
					<p>
					</p>
				</dd>
				<dt><strong>Catalog Files = yes|no</strong></dt>
				<dd><a name="12354"></a> <a name="12355"></a> This directive defines whether or not you want the names of the files that were saved to be put into the catalog. The default is <b>yes</b>. The advantage of specifying <b>Catalog Files = No</b> is that you will have a significantly smaller Catalog database. The disadvantage is that you will not be able to produce a Catalog listing of the files backed up for each Job (this is often called Browsing). Also, without the File entries in the catalog, you will not be able to use the Console <b> restore</b> command nor any other command that references File entries. <p><a name="PoolAutoPrune"></a></p>
				</dd>
				<dt><strong>AutoPrune = yes|no</strong></dt>
				<dd><a name="12362"></a> <a name="12363"></a> If AutoPrune is set to <b>yes</b> (default), Bacula (version 1.20 or greater) will automatically apply the Volume Retention period when new Volume is needed and no appendable Volumes exist in the Pool. Volume pruning causes expired Jobs (older than the <b>Volume Retention</b> period) to be deleted from the Catalog and permits possible recycling of the Volume. <p><a name="VolRetention"></a></p>
				</dd>
				<dt><strong>Volume Retention = time-period-specification</strong></dt>
				<dd><a name="12369"></a> <a name="12370"></a> The Volume Retention directive defines the longest amount of time that <b>Bacula</b> will keep records associated with the Volume in the Catalog database after the End time of each Job written to the Volume. When this time period expires, and if <b>AutoPrune</b> is set to <b>yes</b> Bacula may prune (remove) Job records that are older than the specified Volume Retention period if it is necessary to free up a Volume. Note, it is also possible for all the Job and File records to be pruned before the Volume Retention period is reached. In that case the Volume can then be marked Pruned and subsequently recycled prior to expiration of the Volume Retention period. <p>
					</p>
					<p>
					</p> Recycling will not occur until it is absolutely necessary to free up a volume (i.e. no other writable volume exists). All File records associated with pruned Jobs are also pruned. The time may be specified as seconds, minutes, hours, days, weeks, months, quarters, or years. The <b>Volume Retention</b> is applied independently of the <b>Job Retention</b> and the <b>File Retention</b> periods defined in the Client resource. This means that all the retention periods are applied in turn and that the shorter period is the one that effectively takes precedence. Note, that when the <b> Volume Retention</b> period has been reached, and it is necessary to obtain a new volume, Bacula will prune both the Job and the File records. And the inverse is also true that if all the Job and File records that refer to a Volume are pruned, then the Volume may be pruned and recycled regardless of its retention period. Pruning may also occur during a <b>status dir</b> command because it uses similar algorithms for finding the next available Volume. <p> It is important to know that when the Volume Retention period expires, or all the Job and File records have been pruned that refer to a Volume, Bacula does not automatically recycle a Volume. It attempts to keep the Volume data intact as long as possible before over writing the Volume. </p>
					<p> By defining multiple Pools with different Volume Retention periods, you may effectively have a set of tapes that is recycled weekly, another Pool of tapes that is recycled monthly and so on. However, one must keep in mind that if your <b>Volume Retention</b> period is too short, it may prune the last valid Full backup, and hence until the next Full backup is done, you will not have a complete backup of your system, and in addition, the next Incremental or Differential backup will be promoted to a Full backup. As a consequence, the minimum <b>Volume Retention</b> period should be at twice the interval of your Full backups. This means that if you do a Full backup once a month, the minimum Volume retention period should be two months. </p>
					<p> The default Volume retention period is 365 days, and either the default or the value defined by this directive in the bacula-dir.conf file is the default value used when a Volume is created. Once the volume is created, changing the value in the bacula-dir.conf file will not change what is stored for the Volume. To change the value for an existing Volume you must use the <b>update</b> command in the Console. </p>
					<p>
					</p>
				</dd>
				<dt><strong>Cache Retention = time-period-specification</strong></dt>
				<dd><a name="12384"></a> The Cache Retention directive defines the longest amount of time that <b>Bacula</b> will keep Parts associated with the Volume in the Storage daemon Cache directory after a successful upload to the Cloud. When this time period expires, and if the <tt>cloud prune</tt> command is issued, Bacula may prune (remove) Parts that are older than the specified Cache Retention period. <p> Note, it is also possible for all the Parts to be removed before the Cache Retention period is reached. In that case the <tt>cloud truncate</tt> command must be used. </p>
					<p>
					</p>
				</dd>
				<dt><strong>Action On Purge = Truncate</strong></dt>
				<dd><a name="12389"></a><p> The directive <span class="textbf">ActionOnPurge=Truncate</span> instructs Bacula to permit the Volume to be truncated after it has been purged. Note: the ActionOnPurge is a bit misleading since the volume is not actually truncated when it is purged, but is enabled to be truncated. The actual truncation is done with the Truncate command/ </p>
					<p> To actually truncate a Volume, you must first set the ActionOnPurge to Truncate in the Pool, then you must ensure that any existing Volumes also have this information in them, by doing an <b>update Volumes</b> comand. Finally, after the Volume has been purged, you may then truncate it. It is useful to prevent disk based volumes from consuming too much space. See below for more details of how to ensure Volumes are truncated after being purged. </p>
					<p> First set the Pool to permit truncation. <pre>
Pool {
  Name = Default
  Action On Purge = Truncate
  ...
}
</pre></p>
					<p> Then assuming a Volume has been Purged, you can schedule truncate operation at the end of your CatalogBackup job like in this example: </p>
					<p><pre>
Job {
 Name = CatalogBackup
 ...
 RunScript {
   RunsWhen=After
   RunsOnClient=No
   Console = "purge volume action=all allpools storage=File"
 }
}
</pre></p>
					<p><a name="PoolScratchPool"></a></p>
				</dd>
				<dt><strong>ScratchPool = pool-resource-name</strong></dt>
				<dd><a name="12399"></a> <a name="12400"></a> This directive permits to specify a dedicate <span class="textsl">Scratch</span> for the current pool. This pool will replace the special pool named <span class="textsl">Scrach</span> for volume selection. For more information about <span class="textsl">Scratch</span> see Scratch PoolTheScratchPool section of this manual. This is useful when using multiple storage sharing the same mediatype or when you want to dedicate volumes to a particular set of pool. <p><a name="PoolRecyclePool"></a></p>
				</dd>
				<dt><strong>RecyclePool = pool-resource-name</strong></dt>
				<dd><a name="12409"></a> <a name="12410"></a> This directive defines to which pool the Volume will be placed (moved) when it is recycled. Without this directive, a Volume will remain in the same pool when it is recycled. With this directive, it can be moved automatically to any existing pool during a recycle. This directive is probably most useful when defined in the Scratch pool, so that volumes will be recycled back into the Scratch pool. For more on the see the Scratch PoolTheScratchPool section of this manual. <p> Although this directive is called RecyclePool, the Volume in question is actually moved from its current pool to the one you specify on this directive when Bacula prunes the Volume and discovers that there are no records left in the catalog and hence marks it as <b>Purged</b>. </p>
					<p><a name="PoolRecycle"></a></p>
				</dd>
				<dt><strong>Recycle = yes|no</strong></dt>
				<dd><a name="12417"></a> <a name="12418"></a> This directive specifies whether or not Purged Volumes may be recycled. If it is set to <b>yes</b> (default) and Bacula needs a volume but finds none that are appendable, it will search for and recycle (reuse) Purged Volumes (i.e. volumes with all the Jobs and Files expired and thus deleted from the Catalog). If the Volume is recycled, all previous data written to that Volume will be overwritten. If Recycle is set to <b> no</b>, the Volume will not be recycled, and hence, the data will remain valid. If you want to reuse (re-write) the Volume, and the recycle flag is no (0 in the catalog), you may manually set the recycle flag (update command) for a Volume to be reused. <p> Please note that the value defined by this directive in the bacula-dir.conf file is the default value used when a Volume is created. Once the volume is created, changing the value in the bacula-dir.conf file will not change what is stored for the Volume. To change the value for an existing Volume you must use the <b>update</b> command in the Console. </p>
					<p> When all Job and File records have been pruned or purged from the catalog for a particular Volume, if that Volume is marked as Full or Used, it will then be marked as Purged. Only Volumes marked as Purged will be considered to be converted to the Recycled state if the <b>Recycle</b> directive is set to <b>yes</b>. </p>
					<p><a name="RecycleOldest"></a></p>
				</dd>
				<dt><strong>Recycle Oldest Volume = yes|no</strong></dt>
				<dd><a name="12427"></a> <a name="12428"></a> This directive instructs the Director to search for the oldest used Volume in the Pool when another Volume is requested by the Storage daemon and none are available. The catalog is then <b>pruned</b> respecting the retention periods of all Files and Jobs written to this Volume. If all Jobs are pruned (i.e. the volume is Purged), then the Volume is recycled and will be used as the next Volume to be written. This directive respects any Job, File, or Volume retention periods that you may have specified, and as such it is <b>much</b> better to use this directive than the Purge Oldest Volume. <p> This directive can be useful if you have a fixed number of Volumes in the Pool and you want to cycle through them and you have specified the correct retention periods. </p>
					<p> However, if you use this directive and have only one Volume in the Pool, you will immediately recycle your Volume if you fill it and Bacula needs another one. Thus your backup will be totally invalid. Please use this directive with care. The default is <b>no</b>. </p>
					<p><a name="RecycleCurrent"></a></p>
					<p>
					</p>
				</dd>
				<dt><strong>Recycle Current Volume = yes|no</strong></dt>
				<dd><a name="12435"></a> <a name="12436"></a> If Bacula needs a new Volume, this directive instructs Bacula to Prune the volume respecting the Job and File retention periods. If all Jobs are pruned (i.e. the volume is Purged), then the Volume is recycled and will be used as the next Volume to be written. This directive respects any Job, File, or Volume retention periods that you may have specified, and thus it is <b>much</b> better to use it rather than the Purge Oldest Volume directive. <p> This directive can be useful if you have: a fixed number of Volumes in the Pool, you want to cycle through them, and you have specified retention periods that prune Volumes before you have cycled through the Volume in the Pool. </p>
					<p> However, if you use this directive and have only one Volume in the Pool, you will immediately recycle your Volume if you fill it and Bacula needs another one. Thus your backup will be totally invalid. Please use this directive with care. The default is <b>no</b>. </p>
					<p><a name="PurgeOldest"></a></p>
				</dd>
				<dt><strong>Purge Oldest Volume = yes|no</strong></dt>
				<dd><a name="12442"></a> <a name="12443"></a> This directive instructs the Director to search for the oldest used Volume in the Pool when another Volume is requested by the Storage daemon and none are available. The catalog is then <b>purged</b> irrespective of retention periods of all Files and Jobs written to this Volume. The Volume is then recycled and will be used as the next Volume to be written. This directive overrides any Job, File, or Volume retention periods that you may have specified. <p> This directive can be useful if you have a fixed number of Volumes in the Pool and you want to cycle through them and reusing the oldest one when all Volumes are full, but you don't want to worry about setting proper retention periods. However, by using this option you risk losing valuable data. </p>
					<p> Please be aware that <b>Purge Oldest Volume</b> disregards all retention periods. If you have only a single Volume defined and you turn this variable on, that Volume will always be immediately overwritten when it fills! So at a minimum, ensure that you have a decent number of Volumes in your Pool before running any jobs. If you want retention periods to apply do not use this directive. To specify a retention period, use the <b>Volume Retention</b> directive (see above). </p>
					<p> We <b>highly</b> recommend against using this directive, because it is sure that some day, Bacula will recycle a Volume that contains current data. The default is <b>no</b>. </p>
					<p>
					</p>
				</dd>
				<dt><strong>File Retention = time-period-specification</strong></dt>
				<dd><a name="12451"></a> <a name="12452"></a> The File Retention directive defines the length of time that Bacula will keep File records in the Catalog database after the End time of the Job corresponding to the File records. <p> This directive takes precedence over Client directives of the same name. For example, you can decide to increase Retention times for Archive or OffSite Pool. </p>
					<p> Note, this affects only records in the catalog database. It does not affect your archive backups. </p>
					<p> For more information see Client documentation about FileRetentionFileRetention </p>
					<p>
					</p>
				</dd>
				<dt><strong>Job Retention = time-period-specification</strong></dt>
				<dd><a name="12457"></a> <a name="12458"></a><p> The Job Retention directive defines the length of time that Bacula will keep Job records in the Catalog database after the Job End time. As with the other retention periods, this affects only records in the catalog and not data in your archive backup. </p>
					<p> This directive takes precedence over Client directives of the same name. For example, you can decide to increase Retention times for Archive or OffSite Pool. </p>
					<p> For more information see Client side documentation JobRetentionJobRetention </p>
					<p>
					</p>
				</dd>
				<dt><strong>Cleaning Prefix = string</strong></dt>
				<dd><a name="12463"></a> <a name="12464"></a> This directive defines a prefix string, which if it matches the beginning of a Volume name during labeling of a Volume, the Volume will be defined with the VolStatus set to <b>Cleaning</b> and thus Bacula will never attempt to use this tape. This is primarily for use with autochangers that accept barcodes where the convention is that barcodes beginning with <b>CLN</b> are treated as cleaning tapes. <p><a name="Label"></a></p>
				</dd>
				<dt><strong>Label Format = format</strong></dt>
				<dd><a name="12470"></a> <a name="12471"></a> This directive specifies the format of the labels contained in this pool. The format directive is used as a sort of template to create new Volume names during automatic Volume labeling. <p> The <b>format</b> should be specified in double quotes, and consists of letters, numbers and the special characters hyphen (<b>-</b>), underscore (<b>_</b>), colon (<b>:</b>), and period (<b>.</b>), which are the legal characters for a Volume name. The <b>format</b> should be enclosed in double quotes ("). </p>
					<p> In addition, the format may contain a number of variable expansion characters which will be expanded by a complex algorithm allowing you to create Volume names of many different formats. In all cases, the expansion process must resolve to the set of characters noted above that are legal Volume names. Generally, these variable expansion characters begin with a dollar sign (<b>$</b>) or a left bracket (<b>[</b>). If you specify variable expansion characters, you should always enclose the format with double quote characters (<b>"</b>). For more details on variable expansion, please see the Variable ExpansionVarsChaptermiscchapter of the Bacula Enterprise Misc Manual. </p>
					<p> If no variable expansion characters are found in the string, the Volume name will be formed from the <b>format</b> string appended with the a unique number that increases. If you do not remove volumes from the pool, this number should be the number of volumes plus one, but this is not guaranteed. The unique number will be edited as four digits with leading zeros. For example, with a <b>Label Format = "File-"</b>, the first volumes will be named <b>File-0001</b>, <b> File-0002</b>, ... </p>
					<p> With the exception of Job specific variables, you can test your <b> LabelFormat</b> by using the varvarconsolecommand in the Bacula Enterprise Console Manual. </p>
					<p><pre>
 Label Format="${Level}_${Type}_${Client}_${Year}-${Month:p/2/0/r}-${Day:p/2/0/r}"
</pre> Once defined, the name of the volume cannot be changed. When the volume is recycled, the volume can be used by an other Job at an other time, and possibly from an other Pool. In the example above, the volume defined with such name is probably not supposed to be recycled or reused. </p>
					<p> In almost all cases, you should enclose the format specification (part after the equal sign) in double quotes. </p>
				</dd>
			</dl>
		</p>
		<p><b>In order for a Pool to be used during a Backup Job, the Pool must have at least one Volume associated with it. Volumes are created for a Pool using the <b>label</b> or the <b>add</b> commands in the <b>Bacula Console</b>, program. In addition to adding Volumes to the Pool (i.e. putting the Volume names in the Catalog database), the physical Volume must be labeled with a valid Bacula software volume label before <b>Bacula</b> will accept the Volume. This will be automatically done if you use the <b>label</b> command. Bacula can automatically label Volumes if instructed to do so, but this feature is not yet fully implemented. </b></p>
		<p><b>The following is an example of a valid Pool resource definition: </b></p>
		<p><b></b><pre>
Pool {
  Name = Default
  Pool Type = Backup
}
</pre><b></b></p>
		<p>
		</p>
		<h2><a name="SECTION0021161000000000000000"></a> <a name="TheScratchPool"></a><br /> The Scratch Pool </h2><b> <a name="12506"></a> In general, you can give your Pools any name you wish, but there is one important restriction: the Pool named <b>Scratch</b>, if it exists behaves like a scratch pool of Volumes in that when Bacula needs a new Volume for writing and it cannot find one, it will look in the Scratch pool, and if it finds an available Volume, it will move it out of the Scratch pool into the Pool currently being used by the job. </b><p>
		</p>
		<h1><a name="SECTION0021170000000000000000"></a> <a name="CatalogResource"></a><br /> The Catalog Resource </h1><b> <a name="12510"></a> <a name="12511"></a> </b><p><b>The Catalog Resource defines what catalog to use for the current job. Currently, Bacula can only handle a single database server (MySQL or PostgreSQL) that is defined when configuring <b>Bacula</b>. However, there may be as many Catalogs (databases) defined as you wish. For example, you may want each Client to have its own Catalog database, or you may want backup jobs to use one database and verify or restore jobs to use another database. </b></p>
		<p><b>Since both MySQL and PostgreSQL are networked databases, they may reside either on the same machine as the Director or on a different machine on the network. See below for more details. </b></p>
		<p>
			<dl>
				<dt><strong>Catalog</strong></dt>
				<dd><a name="12514"></a> <a name="12515"></a> Start of the Catalog resource. At least one Catalog resource must be defined. <p>
					</p>
				</dd>
				<dt><strong>Name = name</strong></dt>
				<dd><a name="12518"></a> <a name="12519"></a> The name of the Catalog. No necessary relation to the database server name. This name will be specified in the Client resource directive indicating that all catalog data for that Client is maintained in this Catalog. This directive is required. <p>
					</p>
				</dd>
				<dt><strong>password = password</strong></dt>
				<dd><a name="12522"></a> <a name="12523"></a> This specifies the password to use when logging into the database. This directive is required. <p>
					</p>
				</dd>
				<dt><strong>DB Name = name</strong></dt>
				<dd><a name="12526"></a> <a name="12527"></a> This specifies the name of the database. If you use multiple catalogs (databases), you specify which one here. If you are using an external database server rather than the internal one, you must specify a name that is known to the server (i.e. you explicitly created the Bacula tables using this name. This directive is required. <p>
					</p>
				</dd>
				<dt><strong>user = user</strong></dt>
				<dd><a name="12530"></a> <a name="12531"></a> This specifies what user name to use to log into the database. This directive is required. <p>
					</p>
				</dd>
				<dt><strong>DB Socket = socket-name</strong></dt>
				<dd><a name="12534"></a> <a name="12535"></a> This is the name of a socket to use on the local host to connect to the database. This directive is used only by MySQL. Normally, if neither <b>DB Socket</b> or <b>DB Address</b> are specified, MySQL will use the default socket. If the DB Socket is specified, the MySQL server must reside on the same machine as the Director. <p>
					</p>
				</dd>
				<dt><strong>DB Address = address</strong></dt>
				<dd><a name="12540"></a> <a name="12541"></a> This is the host address of the database server. Normally, you would specify this instead of <b>DB Socket</b> if the database server is on another machine. In that case, you will also specify <b>DB Port</b>. This directive is used only by MySQL and PostgreSQL. This directive is optional. <p>
					</p>
				</dd>
				<dt><strong>DB Port = port</strong></dt>
				<dd><a name="12546"></a> <a name="12547"></a> This defines the port to be used in conjunction with <b>DB Address</b> to access the database if it is on another machine. This directive is used only by MySQL and PostgreSQL. directive is optional. <p> the different </p>
					<p>
					</p>
				</dd>
			</dl>
		</p>
		<p><b>The following is an example of a valid Catalog resource definition: </b></p>
		<p><b></b><pre>
Catalog
{
  Name = MySQL
  dbname = bacula;
  user = bacula;
  password = ""                       # no password = no security
}
</pre><b></b></p>
		<p><b>or for a Catalog on another machine: </b></p>
		<p><b></b><pre>
Catalog
{
  Name = MySQL
  dbname = bacula
  user = bacula
  password = ""
  DB Address = remote.acme.com
  DB Port = 1234
}
</pre><b></b></p>
		<p>
		</p>
		<h1><a name="SECTION0021180000000000000000"></a> <a name="MessagesResource2"></a><br /> The Messages Resource </h1><b> <a name="12556"></a> <a name="12557"></a> </b><p><b>For the details of the Messages Resource, please see the Messages Resource ChapterMessagesChapter of this manual. </b></p>
		<p>
		</p>
		<h1><a name="SECTION0021190000000000000000"></a> <a name="ConsoleResource1"></a><br /> The Console Resource </h1><b> <a name="12562"></a> <a name="12563"></a> </b><p><b>As of Bacula version 1.33 and higher, there are three different kinds of consoles, which the administrator or user can use to interact with the Director. These three kinds of consoles comprise three different security levels. </b></p>
		<p>
			<ul>
				<li>The first console type is an <b>anonymous</b> or <b>default</b> console, which has full privileges. There is no console resource necessary for this type since the password is specified in the Director's resource and consequently such consoles do not have a name as defined on a <b>Name =</b> directive. This is the kind of console that was initially implemented in versions prior to 1.33 and remains valid. Typically you would use it only for administrators. <p>
					</p>
				</li>
				<li>The second type of console, and new to version 1.33 and higher is a "named" console defined within a Console resource in both the Director's configuration file and in the Console's configuration file. Both the names and the passwords in these two entries must match much as is the case for Client programs. <p> This second type of console begins with absolutely no privileges except those explicitly specified in the Director's Console resource. Thus you can have multiple Consoles with different names and passwords, sort of like multiple users, each with different privileges. As a default, these consoles can do absolutely nothing - no commands whatsoever. You give them privileges or rather access to commands and resources by specifying access control lists in the Director's Console resource. The ACLs are specified by a directive followed by a list of access names. Examples of this are shown below. </p>
					<p>
					</p>
				</li>
				<li>The third type of console is similar to the above mentioned one in that it requires a Console resource definition in both the Director and the Console. In addition, if the console name, provided on the <b>Name =</b> directive, is the same as a Client name, that console is permitted to use the <b>SetIP</b> command to change the Address directive in the Director's client resource to the IP address of the Console. This permits portables or other machines using DHCP (non-fixed IP addresses) to "notify" the Director of their current IP address. </li>
			</ul>
		</p>
		<p><b>The Console resource is optional and need not be specified. The following directives are permitted within the Director's configuration resource: </b></p>
		<p>
			<dl>
				<dt><strong>Name = name</strong></dt>
				<dd><a name="12574"></a> <a name="12575"></a> The name of the console. This name must match the name specified in the Console's configuration resource (much as is the case with Client definitions). <p>
					</p>
				</dd>
				<dt><strong>Password = password</strong></dt>
				<dd><a name="12578"></a> <a name="12579"></a> Specifies the password that must be supplied for a named Bacula Console to be authorized. The same password must appear in the <b>Console</b> resource of the Console configuration file. For added security, the password is never actually passed across the network but rather a challenge response hash code created with the password. This directive is required. If you have either <b>/dev/random</b> <b>bc</b> on your machine, Bacula will generate a random password during the configuration process, otherwise it will be left blank. <p> The password is plain text. It is not generated through any special process. However, it is preferable for security reasons to choose random text. </p>
					<p>
					</p>
				</dd>
				<dt><strong>JobACL = name-list</strong></dt>
				<dd><a name="12585"></a> <a name="12586"></a> This directive is used to specify a list of Job resource names that can be accessed by the console. Without this directive, the console cannot access any of the Director's Job resources. Multiple Job resource names may be specified by separating them with commas, and/or by specifying multiple JobACL directives. For example, the directive may be specified as: <p><pre>
    JobACL = kernsave, "Backup client 1", "Backup client 2"
    JobACL = "RestoreFiles"
</pre></p>
					<p> With the above specification, the console can access the Director's resources for the four jobs named on the JobACL directives, but for no others. </p>
					<p>
					</p>
				</dd>
				<dt><strong>ClientACL = name-list</strong></dt>
				<dd><a name="12591"></a> <a name="12592"></a> This directive is used to specify a list of Client resource names that can be accessed by the console. <p>
					</p>
				</dd>
				<dt><strong>StorageACL = name-list</strong></dt>
				<dd><a name="12595"></a> <a name="12596"></a> This directive is used to specify a list of Storage resource names that can be accessed by the console. <p>
					</p>
				</dd>
				<dt><strong>ScheduleACL = name-list</strong></dt>
				<dd><a name="12599"></a> <a name="12600"></a> This directive is used to specify a list of Schedule resource names that can be accessed by the console. <p>
					</p>
				</dd>
				<dt><strong>PoolACL = name-list</strong></dt>
				<dd><a name="12603"></a> <a name="12604"></a> This directive is used to specify a list of Pool resource names that can be accessed by the console. <p>
					</p>
				</dd>
				<dt><strong>FileSetACL = name-list</strong></dt>
				<dd><a name="12607"></a> <a name="12608"></a> This directive is used to specify a list of FileSet resource names that can be accessed by the console. <p>
					</p>
				</dd>
				<dt><strong>CatalogACL = name-list</strong></dt>
				<dd><a name="12611"></a> <a name="12612"></a> This directive is used to specify a list of Catalog resource names that can be accessed by the console. <p>
					</p>
				</dd>
				<dt><strong>CommandACL = name-list</strong></dt>
				<dd><a name="12615"></a> <a name="12616"></a> This directive is used to specify a list of of console commands that can be executed by the console. <p>
					</p>
				</dd>
				<dt><strong>WhereACL = string</strong></dt>
				<dd><a name="12619"></a> <a name="12620"></a> This directive permits you to specify where a restricted console can restore files. If this directive is not specified, only the default restore location is permitted (normally <b> /tmp/bacula-restores</b>. If <b>*all*</b> is specified any path the user enters will be accepted (not very secure), any other value specified (there may be multiple WhereACL directives) will restrict the user to use that path. For example, on a Unix system, if you specify "/", the file will be restored to the original location. This directive is untested. <p>
					</p>
				</dd>
			</dl>
		</p>
		<p><b>Aside from Director resource names and console command names, the special keyword <b>*all*</b> can be specified in any of the above access control lists. When this keyword is present, any resource or command name (which ever is appropriate) will be accepted. For an example configuration file, please see the Console ConfigurationConsoleConfChapter chapter of this manual. </b></p>
		<p>
		</p>
		<h1><a name="SECTION0021200000000000000000"></a> <a name="CounterResource"></a><br /> The Counter Resource </h1><b> <a name="12629"></a> <a name="12630"></a> </b><p><b>The Counter Resource defines a counter variable that can be accessed by variable expansion used for creating Volume labels with the <b>LabelFormat</b> directive. See the LabelFormatLabel directive in this chapter for more details. </b></p>
		<p>
			<dl>
				<dt><strong>Counter</strong></dt>
				<dd><a name="12635"></a> <a name="12636"></a> Start of the Counter resource. Counter directives are optional. <p>
					</p>
				</dd>
				<dt><strong>Name = name</strong></dt>
				<dd><a name="12639"></a> <a name="12640"></a> The name of the Counter. This is the name you will use in the variable expansion to reference the counter value. <p>
					</p>
				</dd>
				<dt><strong>Minimum = integer</strong></dt>
				<dd><a name="12643"></a> <a name="12644"></a> This specifies the minimum value that the counter can have. It also becomes the default. If not supplied, zero is assumed. <p>
					</p>
				</dd>
				<dt><strong>Maximum = integer</strong></dt>
				<dd><a name="12647"></a> <a name="12648"></a> <a name="12649"></a> This is the maximum value value that the counter can have. If not specified or set to zero, the counter can have a maximum value of 2,147,483,648 (2 to the 31 power). When the counter is incremented past this value, it is reset to the Minimum. <p>
					</p>
				</dd>
				<dt><strong>*WrapCounter = counter-name</strong></dt>
				<dd><a name="12652"></a> <a name="12653"></a> If this value is specified, when the counter is incremented past the maximum and thus reset to the minimum, the counter specified on the <b>WrapCounter</b> is incremented. (This is not currently implemented). <p>
					</p>
				</dd>
				<dt><strong>Catalog = catalog-name</strong></dt>
				<dd><a name="12657"></a> <a name="12658"></a> If this directive is specified, the counter and its values will be saved in the specified catalog. If this directive is not present, the counter will be redefined each time that Bacula is started. </dd>
			</dl>
		</p>
		<p>
		</p>
		<h1><a name="SECTION0021210000000000000000"></a> <a name="SampleDirectorConfiguration"></a><br /> Example Director Configuration File </h1><b> <a name="12662"></a> <a name="12663"></a> </b><p><b>An example Director configuration file might be the following: </b></p>
		<p><b></b><pre>
#
# Default Bacula Director Configuration file
#
#  The only thing that MUST be changed is to add one or more
#   file or directory names in the Include directive of the
#   FileSet resource.
#
#  For Bacula release 1.15 (5 March 2002) -- redhat
#
#  You might also want to change the default email address
#   from root to your address.  See the "mail" and "operator"
#   directives in the Messages resource.
#
Director {                           # define myself
  Name = rufus-dir
  QueryFile = "/home/kern/bacula/bin/query.sql"
  WorkingDirectory = "/home/kern/bacula/bin/working"
  PidDirectory = "/home/kern/bacula/bin/working"
  Password = "XkSfzu/Cf/wX4L8Zh4G4/yhCbpLcz3YVdmVoQvU3EyF/"
}
# Define the backup Job
Job {
  Name = "NightlySave"
  Type = Backup
  Level = Incremental                 # default
  Client=rufus-fd
  FileSet="Full Set"
  Schedule = "WeeklyCycle"
  Storage = DLTDrive
  Messages = Standard
  Pool = Default
}
Job {
  Name = "Restore"
  Type = Restore
  Client=rufus-fd
  FileSet="Full Set"
  Where = /tmp/bacula-restores
  Storage = DLTDrive
  Messages = Standard
  Pool = Default
}

# List of files to be backed up
FileSet {
  Name = "Full Set"
  Include {
    Options {signature=SHA1}
#
#  Put your list of files here, one per line or include an
#    external list with:
#
#    @file-name
#
#  Note: / backs up everything
  File = /
}
  Exclude {}
}
# When to do the backups
Schedule {
  Name = "WeeklyCycle"
  Run = level=Full sun at 2:05
  Run = level=Incremental mon-sat at 2:05
}
# Client (File Services) to backup
Client {
  Name = rufus-fd
  Address = rufus
  Catalog = MyCatalog
  Password = "MQk6lVinz4GG2hdIZk1dsKE/LxMZGo6znMHiD7t7vzF+"
  File Retention = 60d      # sixty day file retention
  Job Retention = 1y        # 1 year Job retention
  AutoPrune = yes           # Auto apply retention periods
}
# Definition of DLT tape storage device
Storage {
  Name = DLTDrive
  Address = rufus
  Password = "jMeWZvfikUHvt3kzKVVPpQ0ccmV6emPnF2cPYFdhLApQ"
  Device = "HP DLT 80"      # same as Device in Storage daemon
  Media Type = DLT8000      # same as MediaType in Storage daemon
}
# Definition for a DLT autochanger device
Storage {
  Name = Autochanger
  Address = rufus
  Password = "jMeWZvfikUHvt3kzKVVPpQ0ccmV6emPnF2cPYFdhLApQ"
  Device = "Autochanger"    # same as Device in Storage daemon
  Media Type = DLT-8000     # Different from DLTDrive
  Autochanger = yes
}
# Definition of DDS tape storage device
Storage {
  Name = SDT-10000
  Address = rufus
  Password = "jMeWZvfikUHvt3kzKVVPpQ0ccmV6emPnF2cPYFdhLApQ"
  Device = SDT-10000        # same as Device in Storage daemon
  Media Type = DDS-4        # same as MediaType in Storage daemon
}
# Definition of 8mm tape storage device
Storage {
  Name = "8mmDrive"
  Address = rufus
  Password = "jMeWZvfikUHvt3kzKVVPpQ0ccmV6emPnF2cPYFdhLApQ"
  Device = "Exabyte 8mm"
  MediaType = "8mm"
}
# Definition of file storage device
Storage {
  Name = File
  Address = rufus
  Password = "jMeWZvfikUHvt3kzKVVPpQ0ccmV6emPnF2cPYFdhLApQ"
  Device = FileStorage
  Media Type = File
}
# Generic catalog service
Catalog {
  Name = MyCatalog
  dbname = bacula; user = bacula; password = ""
}
# Reasonable message delivery -- send most everything to
#   the email address and to the console
Messages {
  Name = Standard
  mail = root@localhost = all, !skipped, !terminate
  operator = root@localhost = mount
  console = all, !skipped, !saved
}

# Default pool definition
Pool {
  Name = Default
  Pool Type = Backup
  AutoPrune = yes
  Recycle = yes
}
#
# Restricted console used by tray-monitor to get the status of the director
#
Console {
  Name = Monitor
  Password = "GN0uRo7PTUmlMbqrJ2Gr1p0fk0HQJTxwnFyE4WSST3MWZseR"
  CommandACL = status, .status
}
</pre><b></b><b></b></p>
		<p>
			<div class="navigation">
				<hr /><a href="Client_File_daemon_Configur.html" name="tex2html1884"> <img align="BOTTOM" alt="next" border="0" class="navigation-next" height="24" src="../images/next.png" width="37" /></a> <a href="Main_Reference.html" name="tex2html1878"> <img align="BOTTOM" alt="up" border="0" class="navigation-up" height="24" src="../images/up.png" width="26" /></a> <a href="Customizing_Configuration_F.html" name="tex2html1872"> <img align="BOTTOM" alt="previous" border="0" class="navigation-prev" height="24" src="../images/prev.png" width="63" /></a> <a href="Contents.html" name="tex2html1880"> <img align="BOTTOM" alt="contents" border="0" class="navigation-next" height="24" src="../images/contents.png" width="65" /></a> <a href="Index.html" name="tex2html1882"> <img align="BOTTOM" alt="index" border="0" class="navigation-next" height="24" src="../images/index.png" width="43" /></a><br /><b> Next:</b> <a href="Client_File_daemon_Configur.html" name="tex2html1885">Client/File daemon Configuration</a> <b> Up:</b> <a href="Main_Reference.html" name="tex2html1879">Main Reference</a> <b> Previous:</b> <a href="Customizing_Configuration_F.html" name="tex2html1873">Customizing the Configuration Files</a>   <b> <a href="Contents.html" name="tex2html1881">Contents</a></b>   <b> <a href="Index.html" name="tex2html1883">Index</a></b></div>
		</p>
	</body>
</html>