]> git.sur5r.net Git - bacula/bacula/blob - regress/scripts/bacula-dir.conf.testrunscript.in
Partial work on virtual-backup2-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 Job {
63   Name = "RUN_SUBST"
64   JobDefs = DefaultJob
65   FileSet = FS_TESTJOB
66   RunBeforeJob = "/bin/echo client_name=%c (@hostname@-fd) dir_name=%d (@hostname@-dir) jobid=%i job=%n type=%t"
67   ClientRunBeforeJob = "/bin/echo client_name=%c (@hostname@-fd) dir_name=%d (@hostname@-dir) jobid=%i job=%n type=%t"
68   ClientRunAfterJob = "/bin/echo client_name=%c (@hostname@-fd) dir_name=%d (@hostname@-dir) jobid=%i job=%n type=%t"
69   Run After Job = "/bin/echo client_name=%c (@hostname@-fd) dir_name=%d (@hostname@-dir) jobid=%i job=%n type=%t vol=%v status=%e"
70 }
71
72
73 #After job are after before job
74 Job {
75   Name = "RUN_DIR_FAILED_BUG"
76   FileSet = FS_TESTJOB  
77   JobDefs = DefaultJob
78   Run After Failed Job = "/bin/echo RunAfterFailedJob"
79   RunBeforeJob = "/bin/false"
80 }
81
82 #@hostname@-dir: BeforeJob: run command "/bin/false"
83 #@hostname@-dir: BeforeJob: RunAfterFailedJob
84 Job {
85   Name = "RUN_DIR_FAILED"
86   FileSet = FS_TESTJOB  
87   JobDefs = DefaultJob
88   RunBeforeJob = "/bin/false RUN_DIR_FAILED"
89   Run After Failed Job = "/bin/echo RunAfterFailedJob"
90 }
91
92 #@hostname@-fd: ClientBeforeJob: run command "/bin/false RUN_FD_FAILED1"
93 #@hostname@-fd: ClientBeforeJob: run command "/bin/false RUN_FD_FAILED2"
94 #@hostname@-fd: ClientBeforeJob: run command "/bin/false RUN_FD_FAILED3"
95 #@hostname@-dir: AfterJob: run command "/bin/echo RunAfterFailedJob"
96 Job {
97   Name = "RUN_FD_FAILED"
98   FileSet = FS_TESTJOB  
99   JobDefs = DefaultJob
100   RunScript {
101     Command = "/bin/false RUN_FD_FAILED1"
102     Command = "/bin/false RUN_FD_FAILED2"
103     failjobonerror = no
104     RunsWhen = Before
105   }
106   RunScript {
107     Command = "/bin/false RUN_FD_FAILED3"
108     failjobonerror = yes
109     RunsWhen = Before
110   }
111
112   Run After Failed Job = "/bin/echo RunAfterFailedJob"
113   RunScript {
114     Command = "/bin/echo touching @tmpdir@/RUN_FD_FAILED"
115     RunsWhen = after
116     RunsOnFailure = yes
117   }
118   RunScript {
119     Command = "/bin/touch @tmpdir@/RUN_FD_FAILED"
120     RunsWhen = after
121     RunsOnFailure = yes
122   }
123 }
124
125 #@hostname@-fd: ClientBeforeJob: run command "/bin/false RUN_FD_FAILED1"
126 #we dont execute FAILED2 
127 #@hostname@-dir: AfterJob: run command "/bin/echo RunAfterFailedJob"
128 Job {
129   Name = "RUN_FD_FAILED2"
130   FileSet = FS_TESTJOB  
131   JobDefs = DefaultJob
132   RunScript {
133     Command = "/bin/false RUN_FD_FAILED1"
134     failjobonerror = yes
135     RunsWhen = Before
136   }
137   RunScript {
138     Command = "/bin/false RUN_FD_FAILED2"
139     failjobonerror = yes
140     RunsWhen = Before
141   }
142   RunScript {
143     Command = "/bin/false RUN_FD_FAILED3"
144     failjobonerror = yes
145     RunsOnFailure = yes
146     RunsWhen = Before
147   }
148
149   Run After Failed Job = "/bin/echo RunAfterFailedJob"
150 }
151
152 #@hostname@-fd: ClientBeforeJob: run command "/bin/false RUN_FD_WARNING"
153 #Backup OK -- with warnings
154 Job {
155   Name = "RUN_FD_WARNING"
156   FileSet = FS_TESTJOB  
157   JobDefs = DefaultJob
158   RunScript {
159     Command = "/bin/false RUN_FD_WARNING"
160     failjobonerror = no
161     RunsWhen = Before
162   }
163   Run After Failed Job = "/bin/echo RunAfterFailedJob"
164 }
165
166 Job {
167   Name = "RUN_CONSOLE_CMD"
168   FileSet = FS_TESTJOB  
169   JobDefs = DefaultJob
170   RunScript {
171     Console = "purge volume=TestVolume001 yes"
172     Console = "st dir"
173     RunsWhen = Before
174     runsonclient = no
175   }
176 }
177
178 Job { 
179   Name = "Restore" 
180   Type = Restore 
181   Client = @hostname@-fd 
182   FileSet = FS_TESTJOB
183   Storage = File
184   Messages = Standard
185   Pool = Default
186
187   RunScript  { 
188    RunsWhen = Before
189    RunsOnClient = Yes 
190    Command = "echo ClientBeforeRestore" 
191   } 
192
193   RunScript  { 
194    RunsOnFailure = No 
195    RunsWhen = After 
196    RunsOnClient = Yes 
197    Command = "echo ClientAfterRestore" 
198   } 
199
200   RunScript  { 
201    RunsWhen = Before
202    RunsOnClient = No
203    Command = "echo DirBeforeRestore" 
204   } 
205
206   RunScript  { 
207    RunsOnFailure = No 
208    RunsWhen = After 
209    RunsOnClient = Yes 
210    Command = "echo DirAfterRestore" 
211   } 
212
213
214 # Client (File Services) to backup
215 Client {
216   Name = @hostname@-fd
217   Address = @hostname@
218   FDPort = @fdport@
219   Catalog = MyCatalog
220   Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc"          # password for FileDaemon
221   File Retention = 30d                # 30 days
222   Job Retention = 180d                # six months
223   AutoPrune = yes                     # Prune expired Jobs/Files
224   Maximum Concurrent Jobs = 4
225 }
226
227 # Definiton of file storage device
228 Storage {
229   Name = File
230   Address = @hostname@                # N.B. Use a fully qualified name here
231   SDPort = @sdport@
232   Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
233   Device = FileStorage
234   Media Type = File
235   Maximum Concurrent Jobs = 4
236 }
237
238 # Generic catalog service
239 Catalog {
240   Name = MyCatalog
241   @libdbi@
242   dbname = @db_name@; user = @db_user@; password = "@db_password@"
243 }
244
245
246 Messages {
247   Name = Standard
248   console = all, !skipped, !saved
249   catalog = all, !skipped
250 }
251
252 # Default pool definition
253 Pool {
254   Name = Default
255   Pool Type = Backup
256   Recycle = yes                       # Bacula can automatically recycle Volumes
257   AutoPrune = yes                     # Prune expired volumes
258   Volume Retention = 365d             # one year
259 }