]> git.sur5r.net Git - bacula/bacula/blob - regress/scripts/bacula-dir.conf.testrunscript.in
ebl Add multiple command test
[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@-dir: AfterJob: run command "/bin/echo RunAfterFailedJob"
84 Job {
85   Name = "RUN_FD_FAILED"
86   FileSet = FS_TESTJOB  
87   JobDefs = DefaultJob
88   RunScript {
89     Command = "/bin/false RUN_FD_FAILED1"
90     Command = "/bin/false RUN_FD_FAILED2"
91     failjobonerror = no
92     RunsWhen = Before
93   }
94   RunScript {
95     Command = "/bin/false RUN_FD_FAILED3"
96     failjobonerror = yes
97     RunsWhen = Before
98   }
99
100   Run After Failed Job = "/bin/echo RunAfterFailedJob"
101   RunScript {
102     Command = "/bin/echo touching @tmpdir@/RUN_FD_FAILED"
103     RunsWhen = after
104     RunsOnFailure = yes
105   }
106   RunScript {
107     Command = "/bin/touch @tmpdir@/RUN_FD_FAILED"
108     RunsWhen = after
109     RunsOnFailure = yes
110   }
111 }
112
113 #@hostname@-fd: ClientBeforeJob: run command "/bin/false RUN_FD_FAILED1"
114 #we dont execute FAILED2 
115 #@hostname@-dir: AfterJob: run command "/bin/echo RunAfterFailedJob"
116 Job {
117   Name = "RUN_FD_FAILED2"
118   FileSet = FS_TESTJOB  
119   JobDefs = DefaultJob
120   RunScript {
121     Command = "/bin/false RUN_FD_FAILED1"
122     failjobonerror = yes
123     RunsWhen = Before
124   }
125   RunScript {
126     Command = "/bin/false RUN_FD_FAILED2"
127     failjobonerror = yes
128     RunsWhen = Before
129   }
130   RunScript {
131     Command = "/bin/false RUN_FD_FAILED3"
132     failjobonerror = yes
133     RunsOnFailure = yes
134     RunsWhen = Before
135   }
136
137   Run After Failed Job = "/bin/echo RunAfterFailedJob"
138 }
139
140 #@hostname@-fd: ClientBeforeJob: run command "/bin/false RUN_FD_WARNING"
141 #Backup OK -- with warnings
142 Job {
143   Name = "RUN_FD_WARNING"
144   FileSet = FS_TESTJOB  
145   JobDefs = DefaultJob
146   RunScript {
147     Command = "/bin/false RUN_FD_WARNING"
148     failjobonerror = no
149     RunsWhen = Before
150   }
151   Run After Failed Job = "/bin/echo RunAfterFailedJob"
152 }
153
154 FileSet {
155  Name = FS_FIFO
156  Include {
157    Options { readfifo = yes }
158    File=<@tmpdir@/file-list
159  }
160 }
161
162 Job {
163   Name = BUG_897
164   JobDefs = DefaultJob
165   FileSet = FS_FIFO
166
167   RunScript {
168     Command = "/bin/echo touching @tmpdir@/RUN_BUG_897"
169     RunsWhen = after
170     RunsOnFailure = yes
171   }
172   RunScript {
173     Command = "/bin/touch @tmpdir@/RUN_BUG_897"
174     RunsWhen = after
175     RunsOnFailure = yes
176   }
177 }
178
179 # Client (File Services) to backup
180 Client {
181   Name = @hostname@-fd
182   Address = @hostname@
183   FDPort = @fdport@
184   Catalog = MyCatalog
185   Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc"          # password for FileDaemon
186   File Retention = 30d                # 30 days
187   Job Retention = 180d                # six months
188   AutoPrune = yes                     # Prune expired Jobs/Files
189   Maximum Concurrent Jobs = 4
190 }
191
192 # Definiton of file storage device
193 Storage {
194   Name = File
195   Address = @hostname@                # N.B. Use a fully qualified name here
196   SDPort = @sdport@
197   Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
198   Device = FileStorage
199   Media Type = File
200   Maximum Concurrent Jobs = 4
201 }
202
203 # Generic catalog service
204 Catalog {
205   Name = MyCatalog
206   dbname = regress; user = regress; password = ""
207 }
208
209
210 Messages {
211   Name = Standard
212   console = all, !skipped, !saved
213 }
214
215 # Default pool definition
216 Pool {
217   Name = Default
218   Pool Type = Backup
219   Recycle = yes                       # Bacula can automatically recycle Volumes
220   AutoPrune = yes                     # Prune expired volumes
221   Volume Retention = 365d             # one year
222 }