]> git.sur5r.net Git - bacula/bacula/blob - regress/scripts/bacula-dir.conf.testrunscript.in
Commit libdbi changes
[bacula/bacula] / regress / scripts / bacula-dir.conf.testrunscript.in
1 #
2 # Default Bacula Director Configuration file
3 #
4 #  The only thing that MUST be changed is to add one or more
5 #   file or directory names in the Include directive of the
6 #   FileSet resource.
7 #
8 #  For Bacula release 1.39.27 (24 October 2006) -- debian testing/unstable
9 #
10 #  You might also want to change the default email address
11 #   from root to your address.  See the "mail" and "operator"
12 #   directives in the Messages resource.
13 #
14
15 Director {                            # define myself
16   Name = @hostname@-dir
17   DIRPort = @dirport@                # where we listen for UA connections
18   QueryFile = "@scriptdir@/query.sql"
19   WorkingDirectory = "@working_dir@"
20   PidDirectory = "@piddir@"
21   SubSysDirectory = "@subsysdir@"
22   Maximum Concurrent Jobs = 4
23   Password = "pNvX1WiXnwv2C/F7E52LGvw6rKjbbPvu2kyuPa9pVaL3"         # Console password
24   Messages = Standard
25 }
26
27 JobDefs {
28   Name = "DefaultJob"
29   Type = Backup
30   Level = Incremental
31   Client = @hostname@-fd 
32   FileSet = FS_TESTJOB
33   Storage = File
34   Messages = Standard
35   Pool = Default
36   Priority = 10
37   Maximum Concurrent Jobs = 16
38 }
39
40 FileSet {
41  Name = FS_TESTJOB
42  Include {
43    File=<@tmpdir@/file-list
44  }
45 }
46
47 #dir: BeforeJob: run command "/bin/echo RunBeforeJob"
48 #fd: ClientRunBeforeJob: ClientRunBeforeJob
49 #fd: ClientAfterJob: run command "/bin/echo ClientRunAfterJob"
50 #dir: AfterJob: run command "/bin/echo RunAfterJob"
51
52 Job {
53   Name = "RUN_ALL_OK"
54   JobDefs = DefaultJob
55   FileSet = FS_TESTJOB
56   RunBeforeJob = "/bin/echo RunBeforeJob"
57   ClientRunBeforeJob = "/bin/echo ClientRunBeforeJob"
58   Run After Job = "/bin/echo RunAfterJob"
59   ClientRunAfterJob = "/bin/echo ClientRunAfterJob"
60 }
61
62 #After job are after before job
63 Job {
64   Name = "RUN_DIR_FAILED_BUG"
65   FileSet = FS_TESTJOB  
66   JobDefs = DefaultJob
67   Run After Failed Job = "/bin/echo RunAfterFailedJob"
68   RunBeforeJob = "/bin/false"
69 }
70
71 #@hostname@-dir: BeforeJob: run command "/bin/false"
72 #@hostname@-dir: BeforeJob: RunAfterFailedJob
73 Job {
74   Name = "RUN_DIR_FAILED"
75   FileSet = FS_TESTJOB  
76   JobDefs = DefaultJob
77   RunBeforeJob = "/bin/false RUN_DIR_FAILED"
78   Run After Failed Job = "/bin/echo RunAfterFailedJob"
79 }
80
81 #@hostname@-fd: ClientBeforeJob: run command "/bin/false RUN_FD_FAILED1"
82 #@hostname@-fd: ClientBeforeJob: run command "/bin/false RUN_FD_FAILED2"
83 #@hostname@-fd: ClientBeforeJob: run command "/bin/false RUN_FD_FAILED3"
84 #@hostname@-dir: AfterJob: run command "/bin/echo RunAfterFailedJob"
85 Job {
86   Name = "RUN_FD_FAILED"
87   FileSet = FS_TESTJOB  
88   JobDefs = DefaultJob
89   RunScript {
90     Command = "/bin/false RUN_FD_FAILED1"
91     Command = "/bin/false RUN_FD_FAILED2"
92     failjobonerror = no
93     RunsWhen = Before
94   }
95   RunScript {
96     Command = "/bin/false RUN_FD_FAILED3"
97     failjobonerror = yes
98     RunsWhen = Before
99   }
100
101   Run After Failed Job = "/bin/echo RunAfterFailedJob"
102   RunScript {
103     Command = "/bin/echo touching @tmpdir@/RUN_FD_FAILED"
104     RunsWhen = after
105     RunsOnFailure = yes
106   }
107   RunScript {
108     Command = "/bin/touch @tmpdir@/RUN_FD_FAILED"
109     RunsWhen = after
110     RunsOnFailure = yes
111   }
112 }
113
114 #@hostname@-fd: ClientBeforeJob: run command "/bin/false RUN_FD_FAILED1"
115 #we dont execute FAILED2 
116 #@hostname@-dir: AfterJob: run command "/bin/echo RunAfterFailedJob"
117 Job {
118   Name = "RUN_FD_FAILED2"
119   FileSet = FS_TESTJOB  
120   JobDefs = DefaultJob
121   RunScript {
122     Command = "/bin/false RUN_FD_FAILED1"
123     failjobonerror = yes
124     RunsWhen = Before
125   }
126   RunScript {
127     Command = "/bin/false RUN_FD_FAILED2"
128     failjobonerror = yes
129     RunsWhen = Before
130   }
131   RunScript {
132     Command = "/bin/false RUN_FD_FAILED3"
133     failjobonerror = yes
134     RunsOnFailure = yes
135     RunsWhen = Before
136   }
137
138   Run After Failed Job = "/bin/echo RunAfterFailedJob"
139 }
140
141 #@hostname@-fd: ClientBeforeJob: run command "/bin/false RUN_FD_WARNING"
142 #Backup OK -- with warnings
143 Job {
144   Name = "RUN_FD_WARNING"
145   FileSet = FS_TESTJOB  
146   JobDefs = DefaultJob
147   RunScript {
148     Command = "/bin/false RUN_FD_WARNING"
149     failjobonerror = no
150     RunsWhen = Before
151   }
152   Run After Failed Job = "/bin/echo RunAfterFailedJob"
153 }
154
155 Job {
156   Name = "RUN_CONSOLE_CMD"
157   FileSet = FS_TESTJOB  
158   JobDefs = DefaultJob
159   RunScript {
160     Console = "purge volume=TestVolume001 yes"
161     Console = "st dir"
162     RunsWhen = Before
163     runsonclient = no
164   }
165 }
166
167 Job { 
168   Name = "Restore" 
169   Type = Restore 
170   Client = @hostname@-fd 
171   FileSet = FS_TESTJOB
172   Storage = File
173   Messages = Standard
174   Pool = Default
175
176   RunScript  { 
177    RunsWhen = Before
178    RunsOnClient = Yes 
179    Command = "echo ClientBeforeRestore" 
180   } 
181
182   RunScript  { 
183    RunsOnFailure = No 
184    RunsWhen = After 
185    RunsOnClient = Yes 
186    Command = "echo ClientAfterRestore" 
187   } 
188
189   RunScript  { 
190    RunsWhen = Before
191    RunsOnClient = No
192    Command = "echo DirBeforeRestore" 
193   } 
194
195   RunScript  { 
196    RunsOnFailure = No 
197    RunsWhen = After 
198    RunsOnClient = Yes 
199    Command = "echo DirAfterRestore" 
200   } 
201
202
203 # Client (File Services) to backup
204 Client {
205   Name = @hostname@-fd
206   Address = @hostname@
207   FDPort = @fdport@
208   Catalog = MyCatalog
209   Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc"          # password for FileDaemon
210   File Retention = 30d                # 30 days
211   Job Retention = 180d                # six months
212   AutoPrune = yes                     # Prune expired Jobs/Files
213   Maximum Concurrent Jobs = 4
214 }
215
216 # Definiton of file storage device
217 Storage {
218   Name = File
219   Address = @hostname@                # N.B. Use a fully qualified name here
220   SDPort = @sdport@
221   Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
222   Device = FileStorage
223   Media Type = File
224   Maximum Concurrent Jobs = 4
225 }
226
227 # Generic catalog service
228 Catalog {
229   Name = MyCatalog
230   @libdbi@
231   dbname = regress; user = regress; password = ""
232 }
233
234
235 Messages {
236   Name = Standard
237   console = all, !skipped, !saved
238 }
239
240 # Default pool definition
241 Pool {
242   Name = Default
243   Pool Type = Backup
244   Recycle = yes                       # Bacula can automatically recycle Volumes
245   AutoPrune = yes                     # Prune expired volumes
246   Volume Retention = 365d             # one year
247 }