ubuntuusers.de

Problem mit Bacula auf Ubuntu Server 8.04

Status: Ungelöst | Ubuntu-Version: Server 8.04 (Hardy Heron)
Antworten |

jojoburk

Anmeldungsdatum:
26. November 2009

Beiträge: 26

Hallo, ich hab ein Problem, an dem ich mir schon seit Tagen die Zaehne ausbeisse. Problemstellung: Die Backupsoftware Bacula auf Ubuntu Server 8.04 installieren und vorerst mit Standarteinstellungen laufen lassen.

Kein Ding dacht ich mir. "sudo aptitude install bacula" eingetippt und bestaetigt... Nunja ganz so einfach wars dann doch nicht. Installation wurde zwar "erfolgreich" abgeschlossen aber mit der Bacula Console konnte ich nicht zu dem Director verbinden. "netstat -tapn" verriet mir, dass der Port auch gar nicht offen war... "sudo /etc/init.d/bacula-director restart" war meine naechste Idee. Ah.. Fehler beim Starten des Diensts, Konfigurationsdatei fehlerhaft. (fuer die Mysql Datenbank war dbuser="bacula" angegeben, dbuser hat er aber nicht verstanden... richtig war nur user="bacula") Nach der Korrektur das ganze nochmal. Dienst gestartet! Super, nochmal zur Kontrolle "netstat -tapn"... Wieder kein offener Port...

Zu testzwecken ne VM aufgesetzt auf der ich die neuste Verison von Bacula installieren wollte (Die im Paketmanager ist nen stuecken aelter). Nach zahlreichen Problemen mit Abhaengigkeiten hab ichs dann geschafft. Gleiches Problem allerdings wie bei der aelteren Version. Dann hab ich spasseshalber mal auf der vm nochmal "sudo aptitude install bacula" eingetippt. Ueberraschung: der Port war auf einmal offen... alles funtkionierte aufeinmal mit der Version aus dem Paketmanager.

Das Problem ist allerdings das ich das nicht reproduzieren kann. Ich hab keine Ahnung warum es aufeinmal geht.

Hat dazu jemand eine Idee? Wenn ich noch Informationen vergessen hab sagt bescheid.

PS: bacula Version im Paketmanager: 2.2.8-5ubuntu7.2 Version die ich selbst kompiliert habe: 3.03 (dafuehr installierte pakete: alles aus dem von bacula zur verfuegung gestellten depkgs, build-essential, libssl-dev)

Colttt

Anmeldungsdatum:
29. April 2009

Beiträge: 1517

hilfreich wäre es wenn du die config schicken würdest, dann kann man dir bestimmt helfen 😉

jojoburk

(Themenstarter)

Anmeldungsdatum:
26. November 2009

Beiträge: 26

Nach einer frischen Installation auf einem neu aufgesetzten Ubuntu Server hab ich vielmehr das Problem, dass keine bacula-dir.conf existiert...

Aber hier erstmal die restlichen konfigs:

bacula-fd.conf

 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
#
# Default  Bacula File Daemon Configuration file
#
#  For Bacula release 2.2.8 (26 January 2008) -- debian lenny/sid
#
# There is not much to change here except perhaps the
# File daemon Name to
#

#
# List Directors who are permitted to contact this File daemon
#
Director {
  Name = bla1-dir
  Password = "Cv70F6pf1t6pBopT4vQOnigDrR0v3LT3Cg"
}

#
# Restricted Director, used by tray-monitor to get the
#   status of the file daemon
#
Director {
  Name = bla1-mon
  Password = "Cv70F6pf1t6pBopT4vQOnigDrR0v3LT3Cg"
  Monitor = yes
}

#
# "Global" File daemon configuration specifications
#
FileDaemon {                          # this is me
  Name = bla1-fd
  FDport = 9102                  # where we listen for the director
  WorkingDirectory = /var/lib/bacula
  Pid Directory = /var/run/bacula
  Maximum Concurrent Jobs = 20
  FDAddress = 127.0.0.1
}

# Send all messages except skipped files back to Director
Messages {
  Name = Standard
  director = bla1-dir = all, !skipped, !restored
}

bacula-sd.conf

  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
#
# Default Bacula Storage Daemon Configuration file
#
#  For Bacula release 2.2.8 (26 January 2008) -- debian lenny/sid
#
# You may need to change the name of your tape drive
#   on the "Archive Device" directive in the Device
#   resource.  If you change the Name and/or the 
#   "Media Type" in the Device resource, please ensure
#   that dird.conf has corresponding changes.
#

Storage {                             # definition of myself
  Name = bla1-sd
  SDPort = 9103                  # Director's port      
  WorkingDirectory = "/var/lib/bacula"
  Pid Directory = "/var/run/bacula"
  Maximum Concurrent Jobs = 20
  SDAddress = 127.0.0.1
}

#
# List Directors who are permitted to contact Storage daemon
#
Director {
  Name = bla1-dir
  Password = "Cv70F6pf1t6pBopT4vQOnigDrR0v3LT3Cgkiyj"
}

#
# Restricted Director, used by tray-monitor to get the
#   status of the storage daemon
#
Director {
  Name = bla1-mon
  Password = "Cv70F6pf1t6pBopT4vQOnigDrR0v3LT3Cgkiyj"
  Monitor = yes
}

#
# Devices supported by this Storage daemon
# To connect, the Director's bacula-dir.conf must have the
#  same Name and MediaType. 
#

Device {
  Name = FileStorage
  Media Type = File
  Archive Device = 
  LabelMedia = yes;                   # lets Bacula label unlabeled media
  Random Access = Yes;
  AutomaticMount = yes;               # when device opened, read it
  RemovableMedia = no;
  AlwaysOpen = no;
}

#
# An autochanger device with two drives
#
#Autochanger {
#  Name = Autochanger
#  Device = Drive-1
#  Device = Drive-2
#  Changer Command = "/etc/bacula/scripts/mtx-changer %c %o %S %a %d"
#  Changer Device = /dev/sg0
#}

#Device {
#  Name = Drive-1                      #
#  Drive Index = 0
#  Media Type = DLT-8000
#  Archive Device = /dev/nst0
#  AutomaticMount = yes;               # when device opened, read it
#  AlwaysOpen = yes;
#  RemovableMedia = yes;
#  RandomAccess = no;
#  AutoChanger = yes
#  #
#  # Enable the Alert command only if you have the mtx package loaded
#  # Note, apparently on some systems, tapeinfo resets the SCSI controller
#  #  thus if you turn this on, make sure it does not reset your SCSI 
#  #  controller.  I have never had any problems, and smartctl does
#  #  not seem to cause such problems.
#  #
#  Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
#  If you have smartctl, enable this, it has more info than tapeinfo 
#  Alert Command = "sh -c 'smartctl -H -l error %c'"  
#}

#Device {
#  Name = Drive-2                      #
#  Drive Index = 1
#  Media Type = DLT-8000
#  Archive Device = /dev/nst1
#  AutomaticMount = yes;               # when device opened, read it
#  AlwaysOpen = yes;
#  RemovableMedia = yes;
#  RandomAccess = no;
#  AutoChanger = yes
#  # Enable the Alert command only if you have the mtx package loaded
#  Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
#  If you have smartctl, enable this, it has more info than tapeinfo 
#  Alert Command = "sh -c 'smartctl -H -l error %c'"  
#}

#
# A Linux or Solaris tape drive
#
#Device {
#  Name = DDS-4                        # 
#  Media Type = DDS-4
#  Archive Device = /dev/nrst0
#  AutomaticMount = yes;               # when device opened, read it
#  AlwaysOpen = yes;
#  RemovableMedia = yes;
#  RandomAccess = no;
## Changer Command = "/etc/bacula/scripts/mtx-changer %c %o %S %a %d"
## Changer Device = /dev/sg0
## AutoChanger = yes
#  # Enable the Alert command only if you have the mtx package loaded
## Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
## If you have smartctl, enable this, it has more info than tapeinfo 
## Alert Command = "sh -c 'smartctl -H -l error %c'"  
#}

#
# A FreeBSD tape drive
#
#Device {
#  Name = DDS-4 
#  Description = "DDS-4 for FreeBSD"
#  Media Type = DDS-4
#  Archive Device = /dev/nsa1
#  AutomaticMount = yes;               # when device opened, read it
#  AlwaysOpen = yes
#  Offline On Unmount = no
#  Hardware End of Medium = no
#  BSF at EOM = yes
#  Backward Space Record = no
#  Fast Forward Space File = no
#  TWO EOF = yes
#  If you have smartctl, enable this, it has more info than tapeinfo 
#  Alert Command = "sh -c 'smartctl -H -l error %c'"  
#}

#
# A OnStream tape drive. 
# You need the kernel osst driver 0.9.14 or later, and
#   do "mt -f /dev/nosst0 defblksize 32768" once as root.
#
#Device {
#  Name = OnStream
#  Description = "OnStream drive on Linux"
#  Media Type = OnStream
#  Archive Device = /dev/nrst0
#  AutomaticMount = yes;               # when device opened, read it
#  AlwaysOpen = yes
#  Offline On Unmount = no
## The min/max blocksizes of 32768 are *required*
#  Minimum Block Size = 32768
#  Maximum Block Size = 32768
#  If you have smartctl, enable this, it has more info than tapeinfo 
#  Alert Command = "sh -c 'smartctl -H -l error %c'"  
#}
 
#
# A DVD device
#
#Device {
#  Name = "DVD Writer"
#  Media Type = DVD
#  Device Type = DVD
#  Archive Device = /dev/hdc
#  LabelMedia = yes;                   # lets Bacula label unlabeled media
#  Random Access = Yes;
#  AutomaticMount = yes;               # when device opened, read it
#  RemovableMedia = yes;
#  AlwaysOpen = no;
#  MaximumPartSize = 800M;
#  RequiresMount = yes;
#  MountPoint = /mnt/cdrom;
#  MountCommand = "/bin/mount -t iso9660 -o ro %a %m";
#  UnmountCommand = "/bin/umount %m";
#  SpoolDirectory = /tmp/backup;
#  WritePartCommand = "/etc/bacula/dvd-handler %a write %e %v"
#  FreeSpaceCommand = "/etc/bacula/dvd-handler %a free"
#}

#
# For OpenBSD OS >= 3.6
#
#Device {
#  Name = DDS-3
#  Media Type = DDS-3
#  Archive Device = /dev/nrst0
#  Use MTIOCGET= no
#  BSF at EOM = yes
#  TWO EOF = no
#  AutomaticMount = yes;
#  AlwaysOpen = yes;
#  RemovableMedia = yes;
#  RandomAccess = no;
#  If you have smartctl, enable this, it has more info than tapeinfo 
#  Alert Command = "sh -c 'smartctl -H -l error %c'"  
#}

#
# A very old Exabyte with no end of media detection
#
#Device {
#  Name = "Exabyte 8mm"
#  Media Type = "8mm"
#  Archive Device = /dev/nrst0
#  Hardware end of medium = No;
#  AutomaticMount = yes;               # when device opened, read it
#  AlwaysOpen = Yes;
#  RemovableMedia = yes;
#  RandomAccess = no;
#  If you have smartctl, enable this, it has more info than tapeinfo 
#  Alert Command = "sh -c 'smartctl -H -l error %c'"  
#}

# 
# Send all messages to the Director, 
# mount messages also are sent to the email address
#
Messages {
  Name = Standard
  director = bla1-dir = all
}

bconsole.conf

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#
# Bacula User Agent (or Console) Configuration File
#

Director {
  Name = localhost-dir
  DIRport = 9101
  address = localhost
  Password = "Cv70F6pf1t6pBopT4vQOnigDrR0v3L"
}

jojoburk

(Themenstarter)

Anmeldungsdatum:
26. November 2009

Beiträge: 26

So hab die Nuss grad selber geknackt. Irgendwie deprimierend, jetzt wo ich weiss woran es gelegen hat. Das ich da nicht hintergestiegen bin liegt aber wahrscheinlich nicht zu letzt an meinen noch relativ beschraenkten Linuxkuensten.

Nun gut, hier nun die Loesung fuer Leute wie mich: Bei Mysql wurde weder ein user noch eine Datenbank, geschweige denn die noetigen Tabellen angelegt. Also hab ich als erstes eine Datenbank namens "bacula" angelegt (mysql: create database bacula) und den User "bacula" erstellt (mysql: grant all on bacula.* to 'bacula'@'localhost' identified by ' password '). Als naechstes hab ich die standard config von /usr/share/bacula-common/deconfig/bacula-dir.conf nach /etc/bacula kopiert und entsprechend angepasst. Dann habe ich Bacula noch die Tabellen erstellen lassen mit "sudo /usr/share/bacula-director/make_mysql_tables -u bacula -pPasswort". Und zu guter letzt den director neu gestartet. Funktioniert praechtig.

Colttt

Anmeldungsdatum:
29. April 2009

Beiträge: 1517

wow.. toll.. und wie bist du darauf gekommen??

jojoburk

(Themenstarter)

Anmeldungsdatum:
26. November 2009

Beiträge: 26

Colttt schrieb:

wow.. toll.. und wie bist du darauf gekommen??

Das ließt sich irgendwie ironisch. Ich hoffe das ist es nicht.

Darauf gekommen bin ich "einfach so". Bin einfach alle Möglichkeiten durchgegangen. Überprüft hab ich das ganze dann mit dem Befehl "mysqlshow". Warum ich da allerdings nicht früher drauf gekommen bin wüsste ich auch gerne. Könnt mir echt in den Arsch beißen für die ganze verschwendete Zeit.

Colttt

Anmeldungsdatum:
29. April 2009

Beiträge: 1517

nein war nicht ironisch gemeint..

aber ist schon komisch, da er das theoretisch alles bei der installation machen sollte, ausser es gab dort ein problem..

jojoburk

(Themenstarter)

Anmeldungsdatum:
26. November 2009

Beiträge: 26

Eigentlich war die Installation "erfolgreich". Während der Installation wurde ich ja auch noch nach den entsprechenden Daten für die MySQL Datenbank gefragt (root Zugang, Datenbankname für Bacula, usw.)

*schulterzuck*

Auf nem System mit Ubuntu Desktop funktionierte auch alles auf anhieb einwandfrei. Nur die Serverversion wollte nicht so recht.

jojoburk

(Themenstarter)

Anmeldungsdatum:
26. November 2009

Beiträge: 26

Meine Problemstraene scheint nicht abzureissen... Vielleicht kann man mir an der Stelle noch weiterhelfen. Im Grunde sagt folgende Fehlermeldung schon alles ueber mein Problem.

 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
18-Dec 12:09 bla1-dir JobId 9: Warning: bsock.c:123 Could not connect to Storage daemon on bla1:9103. ERR=Connection refused
Retrying ...
18-Dec 12:14 bla1-dir JobId 9: Warning: bsock.c:123 Could not connect to Storage daemon on bla1:9103. ERR=Connection refused
Retrying ...
18-Dec 12:19 bla1-dir JobId 9: Warning: bsock.c:123 Could not connect to Storage daemon on bla1:9103. ERR=Connection refused
Retrying ...
18-Dec 12:24 bla1-dir JobId 9: Warning: bsock.c:123 Could not connect to Storage daemon on bla1:9103. ERR=Connection refused
Retrying ...
*
18-Dec 12:29 bla1-dir JobId 9: Fatal error: bsock.c:129 Unable to connect to Storage daemon on bla1:9103. ERR=Connection refused
18-Dec 12:29 bla1-dir JobId 9: Error: Bacula bla1-dir 2.2.8 (26Jan08): 18-Dec-2009 12:29:00
  Build OS:               x86_64-pc-linux-gnu debian lenny/sid
  JobId:                  9
  Job:                    Client1.2009-12-18_11.58.04
  Backup Level:           Full (upgraded from Incremental)
  Client:                 "bla1-fd" 2.2.8 (26Jan08) x86_64-pc-linux-gnu,debian,lenny/sid
  FileSet:                "Full Set" 2009-12-16 22:02:35
  Pool:                   "Default" (From Job resource)
  Storage:                "File" (From Job resource)
  Scheduled time:         18-Dec-2009 11:58:51
  Start time:             18-Dec-2009 11:58:55
  End time:               18-Dec-2009 12:29:00
  Elapsed time:           30 mins 5 secs
  Priority:               10
  FD Files Written:       0
  SD Files Written:       0
  FD Bytes Written:       0 (0 B)
  SD Bytes Written:       0 (0 B)
  Rate:                   0.0 KB/s
  Software Compression:   None
  VSS:                    no
  Storage Encryption:     no
  Volume name(s):         
  Volume Session Id:      0
  Volume Session Time:    0
  Last Volume Bytes:      0 (0 B)
  Non-fatal FD errors:    0
  SD Errors:              0
  FD termination status:  
  SD termination status:  
  Termination:            *** Backup Error ***

bacula-dir.conf

  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

# 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 2.2.8 (26 January 2008) -- debian lenny/sid
#
#  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 = bla1-dir
  DIRport = 9101                # where we listen for UA connections
  QueryFile = "/etc/bacula/scripts/query.sql"
  WorkingDirectory = "/var/lib/bacula"
  PidDirectory = "/var/run/bacula"
  Maximum Concurrent Jobs = 1
  Password = "Cv70F6pf1t6pBopT4vQOnigDrR0v3L"         # Console password
  Messages = Daemon
  DirAddress = 127.0.0.1
}

JobDefs {
  Name = "DefaultJob"
  Type = Backup
  Level = Incremental
  Client = bla1-fd 
  FileSet = "Full Set"
  Schedule = "WeeklyCycle"
  Storage = File
  Messages = Standard
  Pool = Default
  Priority = 10
}


#
# Define the main nightly save backup job
#   By default, this job will back up to disk in 
Job {
  Name = "Client1"
  JobDefs = "DefaultJob"
  Write Bootstrap = "/var/lib/bacula/Client1.bsr"
}

#Job {
#  Name = "Client2"
#  Client = bla12-fd
#  JobDefs = "DefaultJob"
#  Write Bootstrap = "/var/lib/bacula/Client2.bsr"
#}

# Backup the catalog database (after the nightly save)
Job {
  Name = "BackupCatalog"
  JobDefs = "DefaultJob"
  Level = Full
  FileSet="Catalog"
  Schedule = "WeeklyCycleAfterBackup"
  # This creates an ASCII copy of the catalog
  # WARNING!
  # Ubuntu uses make_catalog_backup_awk script for
  # security reasons
  # Replace <CatalogName> with the real Catalog name
  RunBeforeJob = "/usr/bin/awk -f /etc/bacula/scripts/make_catalog_backup_awk -v cat1=bacula /etc/bacula/bacula-dir.conf"
  # This deletes the copy of the catalog
  RunAfterJob  = "/etc/bacula/scripts/delete_catalog_backup"
  Write Bootstrap = "/var/lib/bacula/BackupCatalog.bsr"
  Priority = 11                   # run after main backup
}

#
# Standard Restore template, to be changed by Console program
#  Only one such job is needed for all Jobs/Clients/Storage ...
#
Job {
  Name = "RestoreFiles"
  Type = Restore
  Client=bla1-fd                 
  FileSet="Full Set"                  
  Storage = File                      
  Pool = Default
  Messages = Standard
  Where = /bacula-restores
}


# List of files to be backed up
FileSet {
  Name = "Full Set"
  Include {
    Options {
      signature = MD5
    }
#    
#  Put your list of files here, preceded by 'File =', one per line
#    or include an external list with:
#
#    File = <file-name
#
#  Note: / backs up everything on the root partition.
#    if you have other partitons such as /usr or /home
#    you will probably want to add them too.
#
#  By default this is defined to point to the Bacula build
#    directory to give a reasonable FileSet to backup to
#    disk storage during initial testing.
#
    File = /build/buildd/bacula-2.2.8/debian/tmp-build-sqlite
  }

#
# If you backup the root directory, the following two excluded
#   files can be useful
#
  Exclude {
    File = /proc
    File = /tmp
    File = /.journal
    File = /.fsck
  }
}

#
# When to do the backups, full backup on first sunday of the month,
#  differential (i.e. incremental since full) every other sunday,
#  and incremental backups other days
Schedule {
  Name = "WeeklyCycle"
  Run = Full 1st sun at 23:05
  Run = Differential 2nd-5th sun at 23:05
  Run = Incremental mon-sat at 23:05
}

# This schedule does the catalog. It starts after the WeeklyCycle
Schedule {
  Name = "WeeklyCycleAfterBackup"
  Run = Full sun-sat at 23:10
}

# This is the backup of the catalog
FileSet {
  Name = "Catalog"
  Include {
    Options {
      signature = MD5
    }
    File = /var/lib/bacula/bacula.sql
  }
}

# Client (File Services) to backup
Client {
  Name = bla1-fd
  Address = bla1
  FDPort = 9102
  Catalog = bacula
  Password = "Cv70F6pf1t6pBopT4vQOnigDrR0v3L"          # password for FileDaemon
  File Retention = 30 days            # 30 days
  Job Retention = 6 months            # six months
  AutoPrune = yes                     # Prune expired Jobs/Files
}

#
# Second Client (File Services) to backup
#  You should change Name, Address, and Password before using
#
#Client {
#  Name = bla12-fd                
#  Address = bla12
#  FDPort = 9102
#  Catalog = bacula
#  Password = "Cv70F6pf1t6pBopT4vQOnigDrR0v3L"         # password for FileDaemon 2
#  File Retention = 30 days            # 30 days
#  Job Retention = 6 months            # six months
#  AutoPrune = yes                     # Prune expired Jobs/Files
#}


# Definition of file storage device
Storage {
  Name = File
# Do not use "localhost" here    
  Address = bla1                # N.B. Use a fully qualified name here
  SDPort = 9103
  Password = "Cv70F6pf1t6pBopT4vQOnigDrR0v3L"
  Device = FileStorage
  Media Type = File
}



# Definition of DDS tape storage device
#Storage {
#  Name = DDS-4    
#  Do not use "localhost" here
#  Address = bla1                # N.B. Use a fully qualified name here
#  SDPort = 9103
#  Password = "Cv70F6pf1t6pBopT4vQOnigDrR0v3L"          # password for Storage daemon
#  Device = DDS-4                      # must be same as Device in Storage daemon
#  Media Type = DDS-4                  # must be same as MediaType in Storage daemon
#  Autochanger = yes                   # enable for autochanger device
#}

# Definition of 8mm tape storage device
#Storage {
#  Name = "8mmDrive"
#  Do not use "localhost" here
#  Address = bla1                # N.B. Use a fully qualified name here
#  SDPort = 9103
#  Password = "Cv70F6pf1t6pBopT4vQOnigDrR0v3L"
#  Device = "Exabyte 8mm"
#  MediaType = "8mm"
#}

# Definition of DVD storage device
#Storage {
#  Name = "DVD"
#  Do not use "localhost" here
#  Address = bla1                # N.B. Use a fully qualified name here
#  SDPort = 9103
#  Password = "Cv70F6pf1t6pBopT4vQOnigDrR0v3L"
#  Device = "DVD Writer"
#  MediaType = "DVD"
#}


# Generic catalog service
Catalog {
  Name = bacula
  dbname = bacula; user = bacula; password = "master"
}

# Reasonable message delivery -- send most everything to email address
#  and to the console
Messages {
  Name = Standard
#
# NOTE! If you send to two email or more email addresses, you will need
#  to replace the %r in the from field (-f part) with a single valid
#  email address in both the mailcommand and the operatorcommand.
#  What this does is, it sets the email address that emails would display
#  in the FROM field, which is by default the same email as they're being
#  sent to.  However, if you send email to more than one address, then
#  you'll have to set the FROM address manually, to a single address. 
#  for example, a 'no-reply@mydomain.com', is better since that tends to
#  tell (most) people that its coming from an automated source.

#
  mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: %t %e of %c %l\" %r"
  operatorcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: Intervention needed for %j\" %r"
  mail = root@localhost = all, !skipped            
  operator = root@localhost = mount
  console = all, !skipped, !saved
#
# WARNING! the following will create a file that you must cycle from
#          time to time as it will grow indefinitely. However, it will
#          also keep all your messages if they scroll off the console.
#
  append = "/var/lib/bacula/log" = all, !skipped
}


#
# Message delivery for daemon messages (no job).
Messages {
  Name = Daemon
  mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula daemon message\" %r"
  mail = root@localhost = all, !skipped            
  console = all, !skipped, !saved
  append = "/var/lib/bacula/log" = all, !skipped
}



    
# Default pool definition
Pool {
  Name = Default
  Pool Type = Backup
  Recycle = yes                       # Bacula can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 365 days         # one year
}

# Scratch pool definition
Pool {
  Name = Scratch
  Pool Type = Backup
}

#
# Restricted console used by tray-monitor to get the status of the director
#
Console {
  Name = bla1-mon
  Password = "Cv70F6pf1t6pBopT4vQOnigDrR0v3L"
  CommandACL = status, .status
}

bacula-sd.conf

  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
#
# Default Bacula Storage Daemon Configuration file
#
#  For Bacula release 2.2.8 (26 January 2008) -- debian lenny/sid
#
# You may need to change the name of your tape drive
#   on the "Archive Device" directive in the Device
#   resource.  If you change the Name and/or the 
#   "Media Type" in the Device resource, please ensure
#   that dird.conf has corresponding changes.
#

Storage {                             # definition of myself
  Name = bla1-sd
  SDPort = 9103                  # Director's port      
  WorkingDirectory = "/var/lib/bacula"
  Pid Directory = "/var/run/bacula"
  Maximum Concurrent Jobs = 20
  SDAddress = bla1
}

#
# List Directors who are permitted to contact Storage daemon
#
Director {
  Name = bla1-dir
  Password = "Cv70F6pf1t6pBopT4vQOnigDrR0v3L"
}

#
# Restricted Director, used by tray-monitor to get the
#   status of the storage daemon
#
Director {
  Name = bla1-mon
  Password = "Cv70F6pf1t6pBopT4vQOnigDrR0v3L"
  Monitor = yes
}

#
# Devices supported by this Storage daemon
# To connect, the Director's bacula-dir.conf must have the
#  same Name and MediaType. 
#

Device {
  Name = FileStorage
  Media Type = File
  Archive Device = /var/bacula/
  LabelMedia = yes;                   # lets Bacula label unlabeled media
  Random Access = Yes;
  AutomaticMount = yes;               # when device opened, read it
  RemovableMedia = no;
  AlwaysOpen = no;
}

#
# An autochanger device with two drives
#
#Autochanger {
#  Name = Autochanger
#  Device = Drive-1
#  Device = Drive-2
#  Changer Command = "/etc/bacula/scripts/mtx-changer %c %o %S %a %d"
#  Changer Device = /dev/sg0
#}

#Device {
#  Name = Drive-1                      #
#  Drive Index = 0
#  Media Type = DLT-8000
#  Archive Device = /dev/nst0
#  AutomaticMount = yes;               # when device opened, read it
#  AlwaysOpen = yes;
#  RemovableMedia = yes;
#  RandomAccess = no;
#  AutoChanger = yes
#  #
#  # Enable the Alert command only if you have the mtx package loaded
#  # Note, apparently on some systems, tapeinfo resets the SCSI controller
#  #  thus if you turn this on, make sure it does not reset your SCSI 
#  #  controller.  I have never had any problems, and smartctl does
#  #  not seem to cause such problems.
#  #
#  Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
#  If you have smartctl, enable this, it has more info than tapeinfo 
#  Alert Command = "sh -c 'smartctl -H -l error %c'"  
#}

#Device {
#  Name = Drive-2                      #
#  Drive Index = 1
#  Media Type = DLT-8000
#  Archive Device = /dev/nst1
#  AutomaticMount = yes;               # when device opened, read it
#  AlwaysOpen = yes;
#  RemovableMedia = yes;
#  RandomAccess = no;
#  AutoChanger = yes
#  # Enable the Alert command only if you have the mtx package loaded
#  Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
#  If you have smartctl, enable this, it has more info than tapeinfo 
#  Alert Command = "sh -c 'smartctl -H -l error %c'"  
#}

#
# A Linux or Solaris tape drive
#
#Device {
#  Name = DDS-4                        # 
#  Media Type = DDS-4
#  Archive Device = /dev/nrst0
#  AutomaticMount = yes;               # when device opened, read it
#  AlwaysOpen = yes;
#  RemovableMedia = yes;
#  RandomAccess = no;
## Changer Command = "/etc/bacula/scripts/mtx-changer %c %o %S %a %d"
## Changer Device = /dev/sg0
## AutoChanger = yes
#  # Enable the Alert command only if you have the mtx package loaded
## Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
## If you have smartctl, enable this, it has more info than tapeinfo 
## Alert Command = "sh -c 'smartctl -H -l error %c'"  
#}

#
# A FreeBSD tape drive
#
#Device {
#  Name = DDS-4 
#  Description = "DDS-4 for FreeBSD"
#  Media Type = DDS-4
#  Archive Device = /dev/nsa1
#  AutomaticMount = yes;               # when device opened, read it
#  AlwaysOpen = yes
#  Offline On Unmount = no
#  Hardware End of Medium = no
#  BSF at EOM = yes
#  Backward Space Record = no
#  Fast Forward Space File = no
#  TWO EOF = yes
#  If you have smartctl, enable this, it has more info than tapeinfo 
#  Alert Command = "sh -c 'smartctl -H -l error %c'"  
#}

#
# A OnStream tape drive. 
# You need the kernel osst driver 0.9.14 or later, and
#   do "mt -f /dev/nosst0 defblksize 32768" once as root.
#
#Device {
#  Name = OnStream
#  Description = "OnStream drive on Linux"
#  Media Type = OnStream
#  Archive Device = /dev/nrst0
#  AutomaticMount = yes;               # when device opened, read it
#  AlwaysOpen = yes
#  Offline On Unmount = no
## The min/max blocksizes of 32768 are *required*
#  Minimum Block Size = 32768
#  Maximum Block Size = 32768
#  If you have smartctl, enable this, it has more info than tapeinfo 
#  Alert Command = "sh -c 'smartctl -H -l error %c'"  
#}
 
#
# A DVD device
#
#Device {
#  Name = "DVD Writer"
#  Media Type = DVD
#  Device Type = DVD
#  Archive Device = /dev/hdc
#  LabelMedia = yes;                   # lets Bacula label unlabeled media
#  Random Access = Yes;
#  AutomaticMount = yes;               # when device opened, read it
#  RemovableMedia = yes;
#  AlwaysOpen = no;
#  MaximumPartSize = 800M;
#  RequiresMount = yes;
#  MountPoint = /mnt/cdrom;
#  MountCommand = "/bin/mount -t iso9660 -o ro %a %m";
#  UnmountCommand = "/bin/umount %m";
#  SpoolDirectory = /tmp/backup;
#  WritePartCommand = "/etc/bacula/dvd-handler %a write %e %v"
#  FreeSpaceCommand = "/etc/bacula/dvd-handler %a free"
#}

#
# For OpenBSD OS >= 3.6
#
#Device {
#  Name = DDS-3
#  Media Type = DDS-3
#  Archive Device = /dev/nrst0
#  Use MTIOCGET= no
#  BSF at EOM = yes
#  TWO EOF = no
#  AutomaticMount = yes;
#  AlwaysOpen = yes;
#  RemovableMedia = yes;
#  RandomAccess = no;
#  If you have smartctl, enable this, it has more info than tapeinfo 
#  Alert Command = "sh -c 'smartctl -H -l error %c'"  
#}

#
# A very old Exabyte with no end of media detection
#
#Device {
#  Name = "Exabyte 8mm"
#  Media Type = "8mm"
#  Archive Device = /dev/nrst0
#  Hardware end of medium = No;
#  AutomaticMount = yes;               # when device opened, read it
#  AlwaysOpen = Yes;
#  RemovableMedia = yes;
#  RandomAccess = no;
#  If you have smartctl, enable this, it has more info than tapeinfo 
#  Alert Command = "sh -c 'smartctl -H -l error %c'"  
#}

# 
# Send all messages to the Director, 
# mount messages also are sent to the email address
#
Messages {
  Name = Standard
  director = bla1-dir = all
}

bacula-fd.conf

 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
#
# Default  Bacula File Daemon Configuration file
#
#  For Bacula release 2.2.8 (26 January 2008) -- debian lenny/sid
#
# There is not much to change here except perhaps the
# File daemon Name to
#

#
# List Directors who are permitted to contact this File daemon
#
Director {
  Name = bla1-dir
  Password = "Cv70F6pf1t6pBopT4vQOnigDrR0v3L"
}

#
# Restricted Director, used by tray-monitor to get the
#   status of the file daemon
#
Director {
  Name = bla1-mon
  Password = "Cv70F6pf1t6pBopT4vQOnigDrR0v3L"
  Monitor = yes
}

#
# "Global" File daemon configuration specifications
#
FileDaemon {                          # this is me
  Name = bla1-fd
  FDport = 9102                  # where we listen for the director
  WorkingDirectory = /var/lib/bacula
  Pid Directory = /var/run/bacula
  Maximum Concurrent Jobs = 20
  FDAddress = bla1
}

# Send all messages except skipped files back to Director
Messages {
  Name = Standard
  director = bla1-dir = all, !skipped, !restored
}

Colttt

Anmeldungsdatum:
29. April 2009

Beiträge: 1517

hmmm kommst du über die bconsole rein?? und hast du evtl mal die dienste neu gestartet?? kommen dort fehlermeldungen??

jojoburk

(Themenstarter)

Anmeldungsdatum:
26. November 2009

Beiträge: 26

Dienste lassen sich ohne Probleme neustarten. Alles ohne Fehler. Und auf die bconsole komm ich auch. Der Auszug ist sogar aus selbiger.

Folgende Meldung bekomm ich, wenn ich in der bconsole nach dem Status des sd frage.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
Connecting to Storage daemon File at bla1:9103

Failed to connect to Storage daemon File.
====
You have messages.
*
*
*
*
18-Dec 16:02 bla1-dir JobId 0: Fatal error: bsock.c:129 Unable to connect to Storage daemon on bla1:9103. ERR=Connection refused
18-Dec 16:02 bla1-dir JobId 0: Error: bsock.c:306 Write error sending 19 bytes to client:127.0.0.1:36131: ERR=Broken pipe
18-Dec 16:03 bla1-dir JobId 0: Fatal error: bsock.c:129 Unable to connect to Storage daemon on bla1:9103. ERR=Connection refused
*

Colttt

Anmeldungsdatum:
29. April 2009

Beiträge: 1517

jojoburk

(Themenstarter)

Anmeldungsdatum:
26. November 2009

Beiträge: 26

sieht interessant aus. dummerweise hab ich jetzt feierabend. werd ich dann bei nächster gelegenheit ausprobieren.

Colttt

Anmeldungsdatum:
29. April 2009

Beiträge: 1517

schönes WE! 😉

ich hab auch eine verständnis frage i hoffe du kannst du mir helfen ...

in der JobDefs direktive gebe ich ja an was für ein backup gemacht werden soll (full, inkremental, differential) und ich gebe den schedule (hier test1) an, also wann es gemacht werden soll.. so jetzt zu meiner frage warum soll ich bzw warum ist es so vorgegeben das hier nochmal das level(full, inkremental, etc) angegeben? kann ich das auch weg lassen oder was ist der sinn dahinter?! hier ein beispiel:

    Schedule {
      Name = "test1"
      Run = Level=Full sun at 2:05
      Run = Level=Incremental mon-sat at 2:05
    }

schonmal danke für eure hilfe!

jojoburk

(Themenstarter)

Anmeldungsdatum:
26. November 2009

Beiträge: 26

Mit JobDefs definierst du keinen bestimmten Job, sondern nur eine art Voreinstellung.

So richtig durchblicken tu ich da auch noch nicht. Aber du musst das Level dort angeben, da du ja zu unterschiedlichen Zeiten unterschiedliche Level definieren kannst. Beispielsweise jeden Samstag voll, an den anderen Tagen inkrementell. Und Beim Job wird es angegeben, damit Bacula weiß was es tun soll, wenn du den Job manuell startest. Glaube zumindest das es so ist. Gebe keine 100%ige Garantie.

PS: dir auch ein schönes WE ☺

Antworten |