Backup Lösungen

_Keule_

Member
Hallo Forengemeinde,

ich soll für unser Unternehmen eine Lösung suchen, mit welcher verschiedene Backups von verschiedenen Server erstellt werden können.
Dazu gibt es doch bestimmt reichlich Software, oder?

Am besten wäre es, wenn es zentrale GUI gibt z.b. eine Website, die dann alles steuert und eine Übersicht gibt...

ich meine damit sowas in der Richtung Bacula

...die Versuche damit waren damit - wie soll ich sagen - erfolglos...hat jemand vielleicht noch alternativen oder vorschläge was es dazu gibt?

Gruß

_Keule_


EDIT:
Alle Server haben als Betriebssystem FreeBSD 7.2
 
Hallo!

Vielleicht kannst Du uns sagen was genau bei Bakula das Problem war. Ich habe mir bzgl. Backups eine Art TimeMachine (wie beim Mac) gescriptet. Das Ganze basiert auf rsync und hard links (funktioniert also ueberall). Falls Interesse besteht kann ich Dir das gerne zukommen lassen. Bin allerdings nicht wirklich das was einen versierten Scripter nennen wuerde. =)

Gruss
 
Hier rennt sehr erfolgreich Bacula für Server von FBSD, Mac OS X und Windows. Was für Probleme hast du damit?
Ausserdem verwende ich "dump"/"restore" sehr gerne (so lange das Dateisystem UFS ist). Bei ZFS nutze ich Snapshots und zfs send/rec fürs Backups.

BackupPC hab ich für Clients im Einsatz....funzt auch gut...auch wenn ich mir endlich mal einen überarbeiteten rsync Windows BackupPC Client wünschen würde.

Und das von "FierceOne" erwähnte Rsync-Timemachine hab ich auch sehr gerne in Verwendung.
 
Ich kann da im Grunde nicht mitreden, was ich machte, lief fast immer über rsync und einen einfachen Cron-Job. Das ging sehr gut und ich denke, rsync wird zu oft und zu sehr vernachlässigt. Für mich ist es lokal und auch im Netz eine sehr gute Wahl.

In einem anderen Beitrag hier las ich kürzlich von ports/sysutils/flexbackup und denke, das könnte vielleicht auch was für dich sein.
 
Für verschlüsselte Backups verwende ich seit einiger Zeit systutils/duplicity. Das erlaubt volle oder inkrementelle Backups nach lokal, remote server oder auch die Amazon cloud. Backups können sehr einfach nach revisions-Zeitpunkt wieder hergestellt werden - einzelne Dateien oder ganze Verzeichnisstrukturen.

Beim Anlegen eines Skriptes dafür (z.B. für einen Cronjob) habe ich mich hier bedient (auf die Einbindung der PGP-Passphrase wäre ich nicht gekommen - das ist praktisch): http://www.drak0.com/2008/06/13/duplicity-on-dns323-shell-scripts/

Für unverschlüsselte Backups gibt es ein "Schwesterprojekt", das in den Ports unter sysutils/rdiff-backup liegt.

Aber: alles command line, keine GUI.

Gruß
SolarCatcher
 
Hi,

erstmal vielen Dank für die Antworten.

Habe jetzt nochmal von vorne mit Bacula begonnen.
Auf einem FreeBSD 7.2 läuft Bacula ... also die einzelnen Dienste...jedoch bekomme ich keinerlei Backups zum laufen...

Wenn ich ein Job starte, dann gibt mir zwar die console den Status "running" aus, aber es passiert nichts.


Ich weiß ja nicht ob das möglich ist, aber hätte jemand eine Beispielkonfiguration vom director, storage, und file deamon und könnte die zur Verfügung stellen?
Also es soll erstmal nur ein Server gesichert komplett gesichert werden und die Sicherung soll auf dem Bacula Server unter /sicherung abgespeichert werden.
...was muss bei der console noch konfiguriert werden?

Hatte mich hier dran probiert, aber irgendwie fehlt da noch was....


Danke schonmal im Vorraus!

Gruß
 
Die Anleitung sieht eigentlich vollständig und auf den schnellen Blick richtig aus.

Öffne die Bacula Console "bconsole" und halte mit "messages" mal Ausschau nach Fehlermeldungen.

Mit dem "status" Befehl kannst du ausserdem auch die funktionsweise und die Kommunikation zwischen den einzelnen Modulen überprüfen.

Auf dem Server muss laufen: Bacula-Director und Storage Director
Auf den Clients muss laufen: File Director

Auch die Verschlüsselungskeys müssen entsprechend überall angeglichen werden, damit die Module kommunizieren können.
 
So ich habe jetzt die Konfiguration erneut erstellt...jetzt fängt er auch an zu sichern und plötzlich mitten in der sicherung schließt sich der director...
logs, messages...keien meldungen :(
jemand eine Idee?

hier mal meine Dateien:

bacula-dir.conf
Code:
cat bacula-dir.conf
#
# 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 3.0.3 (18 October 2009) -- freebsd 7.2-RELEASE
#
#  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 = bacula-dir
  DIRport = 9101                # where we listen for UA connections
  QueryFile = "/usr/local/share/bacula/query.sql"
  WorkingDirectory = "/var/db/bacula"
  PidDirectory = "/var/run"
  Maximum Concurrent Jobs = 1
  Password = "123"         # Console password
  Messages = Daemon
  DirAddress = 127.0.0.1
}

JobDefs {
  Name = "DefaultJob"
  Type = Backup
  Level = Incremental
  Client = bacula-fd 
  FileSet = "Full Set"
  Schedule = "WeeklyCycle"
  Storage = lokal 
  Messages = Standard
  Pool = backup-folder 
  Priority = 10
}


#
# Define the main nightly save backup job
#   By default, this job will back up to disk in /tmp
#Job {
#  Name = "BackupClient1"
#  JobDefs = "DefaultJob"
#  Write Bootstrap = "/var/db/bacula/Client1.bsr"
#}
Job {
  Name = "Server1"
  Client = server1-fd
  JobDefs = "DefaultJob"
  Write Bootstrap = "/var/db/bacula/Server1.bsr"
} 

#Job {
#  Name = "BackupClient2"
#  Client = testfreebsd2-fd
#  JobDefs = "DefaultJob"
#  Write Bootstrap = "/var/db/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!!! Passing the password via the command line is insecure.
  # see comments in make_catalog_backup for details.
  # Arguments to make_catalog_backup are:
  #  make_catalog_backup <database-name> <user-name> <password> <host>
  RunBeforeJob = "/usr/local/share/bacula/make_catalog_backup bacula bacula"
  # This deletes the copy of the catalog
  RunAfterJob  = "/usr/local/share/bacula/delete_catalog_backup"
  Write Bootstrap = "/var/db/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=bacula-fd                 
  FileSet="Full Set"                  
  Storage = lokal                      
  Pool = backup-folder 
  Messages = Standard
  Where = /tmp/bacula-restores
}


# List of files to be backed up
FileSet {
  Name = "Full Set"
  Include {
    Options {
      signature = MD5
      onefs = no
    }
#    
#  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 partitions such as /usr or /home
#    you will probably want to add them too.
#
#  By default this is defined to point to the Bacula binary
#    directory to give a reasonable FileSet to backup to
#    disk storage during initial testing.
#
#    File = /usr/local/sbin
    File = /
  }

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

#
# 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/db/bacula/bacula.sql
  }
}

# Client (File Services) to backup
Client {
  Name = bacula-fd
  Address = bacula 
  FDPort = 9102
  Catalog = MyCatalog
  Password = "123"          # 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 = testfreebsd2-fd                
#  Address = localhost2
#  FDPort = 9102
#  Catalog = MyCatalog
#  Password = "+omXCKryJpr4cLSC9wlXcptdIXkXbHR/upyHz4WTH3Nh2"         # password for FileDaemon 2
#  File Retention = 30 days            # 30 days
#  Job Retention = 6 months            # six months
#  AutoPrune = yes                     # Prune expired Jobs/Files
#}
Client {
  Name = server1-fd
  Address = server1.domain.de
  FDPort = 9102
  Catalog = MyCatalog
  Password = "123"
  File Retention = 3 weeks
  Job Retention = 3 weeks
  AutoPrune = yes
}


# Definition of file storage device
Storage {
  Name = lokal 
# Do not use "localhost" here    
  Address = bacula.mk-netzdienste.de                # N.B. Use a fully qualified name here
  SDPort = 9103
  Password = "123"
  Device = Local-Storage 
  Media Type = File
}



# Definition of DDS tape storage device
#Storage {
#  Name = DDS-4    
#  Do not use "localhost" here
#  Address = localhost                # N.B. Use a fully qualified name here
#  SDPort = 9103
#  Password = "qiis6/iJpWhwL/d0qNqvNRremx5T/gbv5m9vjwLinn8Z"          # 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 = localhost                # N.B. Use a fully qualified name here
#  SDPort = 9103
#  Password = "qiis6/iJpWhwL/d0qNqvNRremx5T/gbv5m9vjwLinn8Z"
#  Device = "Exabyte 8mm"
#  MediaType = "8mm"
#}

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


# Generic catalog service
Catalog {
  Name = MyCatalog
# Uncomment the following line if you want the dbi driver
# dbdriver = "dbi:mysql"; dbaddress = 127.0.0.1; dbport =  
  dbname = "bacula"; dbaddress = 127.0.0.1; dbuser = "bacula"; dbpassword = "bacula"
}

# 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/local/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: %t %e of %c %l\" %r"
  operatorcommand = "/usr/local/sbin/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/db/bacula/log" = all, !skipped
  catalog = all
}


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



    
# Default pool definition
Pool {
  Name = backup-folder 
  Pool Type = Backup
  Recycle = yes                       # Bacula can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 365 days         # one year
#  Accept Any Volume = yes
  Label Format = "file-"
#  Maximun Volume Bytes = 50G
#  Maximum Volumes = 18
}

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

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

bacula-sd.conf
Code:
cat bacula-sd.conf
#
# Default Bacula Storage Daemon Configuration file
#
#  For Bacula release 3.0.3 (18 October 2009) -- freebsd 7.2-RELEASE
#
# 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 = bacula-sd
  SDPort = 9103                  # Director's port      
  WorkingDirectory = "/var/db/bacula"
  Pid Directory = "/var/run"
  Maximum Concurrent Jobs = 20
}

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

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

#
# Note, for a list of additional Device templates please
#  see the directory <bacula-source>/examples/devices
# Or follow the following link:
#  http://bacula.svn.sourceforge.net/viewvc/bacula/trunk/bacula/examples/devices/
#

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

Device {
  Name = Local-Storage 
  Media Type = File
  Archive Device = /usr/storage
  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 = "/usr/local/share/bacula/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 LTO-2 tape drive
#
#Device {
#  Name = LTO-2
#  Media Type = LTO-2
#  Archive Device = /dev/nrsa0
#  AutomaticMount = yes;               # when device opened, read it
#  AlwaysOpen = yes;
#  RemovableMedia = yes;
#  RandomAccess = no;
#  Maximum File Size = 3GB
## Changer Command = "/usr/local/share/bacula/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 Linux or Solaris LTO-3 tape drive
#
#Device {
#  Name = LTO-3
#  Media Type = LTO-3
#  Archive Device = /dev/nrsa0
#  AutomaticMount = yes;               # when device opened, read it
#  AlwaysOpen = yes;
#  RemovableMedia = yes;
#  RandomAccess = no;
#  Maximum File Size = 4GB
## Changer Command = "/usr/local/share/bacula/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 Linux or Solaris LTO-4 tape drive
#
#Device {
#  Name = LTO-4
#  Media Type = LTO-4
#  Archive Device = /dev/nrsa0
#  AutomaticMount = yes;               # when device opened, read it
#  AlwaysOpen = yes;
#  RemovableMedia = yes;
#  RandomAccess = no;
#  Maximum File Size = 5GB
## Changer Command = "/usr/local/share/bacula/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'"  
#}

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

bacula-fd.conf [auf dem server]
Code:
cat bacula-fd.conf
#
# Default  Bacula File Daemon Configuration file
#
#  For Bacula release 3.0.3 (18 October 2009) -- freebsd 7.2-RELEASE
#
# 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 = bacula-dir
  Password = "123"
}

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

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

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

und zum schluss die bacula-fd.conf [vom client]
Code:
cat bacula-fd.conf
#
# Default  Bacula File Daemon Configuration file
#
#  For Bacula release 2.4.4 (28 December 2008) -- debian 5.0
#
# 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 = bacula-dir
  Password = "123"
}

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

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

# Send all messages except skipped files back to Director
Messages {
  Name = Standard
  director = bacula-dir = all, !skipped, !restored
}
 
Hm...beenden darf sich der Director eigentlich gar nicht...sollte als Dämon immer aktiv bleiben.

Was mir lediglich auffällt:

bacula-dir.conf:
DirAddress = 127.0.0.1

Ich hatte das eigentlich so verstanden, das der Director mit den Clients kommuniziert...und dazu auch von diesen erreicht werden muss. In deinem Fall ist alles nur an localhost gebunden...das mag für ein Backup des selben Rechners funktionieren...aber für eine Client-Server Netzwerksituation kann ich mir irgendwie nicht vorstellen, das das funktioniert. Lass die Zeile mal komplett raus.
Mehr seh ich jetzt auch grad nicht.
 
hab ich draussen, fehler bleibt derselbe

es werden ja auch ca 544MB gesichert und dann brichts zusammen, dann kann ich es wieder anstellen und er sichert wieder, dann brichts zusammen...

der dienst beendet sich einfach und ich muss den jedes mal neu starten..

kann man irgendwo das loglevel erhöhen, bzw. irgendwelche informationen ausgeben lassen, dass man mal mehr sehen kann?

EDIT:
wenn ich keinen job starte, dann beendet der dienst sich auch nicht...

EDIT2:
wenn ein job läuft, dann kommt in /var/log/messages mit dem beenden:
Code:
kernel: pid 1073 (bacula-dir), uid 910: exited on signal 4

EDIT3:
nachdem ich "/usr/local/sbin/bacula-dir -f" gemacht habe um den director zu starten, kam es nun zu folgender ausgabe (wenn ich einen job gestartet habe):
Code:
16-Dec 14:19 bacula-dir: ABORTING due to ERROR in lockmgr.c:65
Mutex lock failure. ERR=Resource deadlock avoided
16-Dec 14:19 bacula-dir: ABORTING due to ERROR in lockmgr.c:65
Mutex lock failure. ERR=Resource deadlock avoided
16-Dec 14:19 bacula-dir: ABORTING due to ERROR in lockmgr.c:65
Mutex lock failure. ERR=Resource deadlock avoided
16-Dec 14:19 bacula-dir: ABORTING due to ERROR in lockmgr.c:65
Mutex lock failure. ERR=Resource deadlock avoided
16-Dec 14:19 bacula-dir: ABORTING due to ERROR in lockmgr.c:65
Mutex lock failure. ERR=Resource deadlock avoided
16-Dec 14:19 bacula-dir: ABORTING due to ERROR in lockmgr.c:65
Mutex lock failure. ERR=Resource deadlock avoided
16-Dec 14:19 bacula-dir: ABORTING due to ERROR in lockmgr.c:65
Mutex lock failure. ERR=Resource deadlock avoided
16-Dec 14:19 bacula-dir: ABORTING due to ERROR in lockmgr.c:65
Mutex lock failure. ERR=Resource deadlock avoided
Illegal instruction: 4 (core dumped)
 
Zuletzt bearbeitet:
*gegenkopfhau*

so es scheint jetzt zu laufen...
...hatte der maschine beim installieren irgendein namen mitgegeben und dann als ich angefangen habe einfach "hostname bacula" gesagt (entsprechende einträge in den /etc/hosts durchgeführt)...so nachdem ich dann den dienst mit
"[root@bacula ~]# /usr/local/sbin/bacula-dir -d1000 -v -u root -g bacula -c bacula-dir.conf" gestartet habe, hat mich erstmal ne welle von informationen erschlagen...backup job gestartet und dann gesehen, dass die sicherung vom client durchläuft und er dann versucht bei sich selbst was zu schreiben und dort stand noch der "alte" hostname drin...änderung in der rc.conf und jetzt läufts durch und steigt nicht mehr aus...

nun gut, jetzt weiter testen ;)
bin erstmal nur happy, dass das dingen nicht mehr zusammen bricht ;)

gruß
_Keule_
 
hmm ich hätte da nochmal eine kurze Frage!

wenn ich z.b. 2 Server sichern möchte, dann fügt Bacula die Sicherung in die bestehende Sicherungsdatei hinzu, anstatt dafür extra eine Datei anzulegen (gelabelt hab ich dafür eine, aber wird die zugewiesen?)
 
Du musst unterschiedliche Backup-Pools definieren und die Clients dann in den jeweiligen Backup-Pool speichern lassen. So habe ich das separiert.
 
Gut, dass ich hier die Lösung für mein Problem finde. Das hat mir viel Sucherei gespart, danke!


Zu meinem Problem:

Das Problem tritt auch unter folgenden Beindungen auf:
- Rechner bezieht IP-Adresse per DHCP (rc.conf: ifconfig_em0="DHCP")
- Bacula hat die Version 3.0.3

Bis zum heutigen Tag hatte ich Version 3.0.2 und DHCP aber dieses Problem nicht.
Jetzt habe ich mal die IP-Adresse statisch eingestellt und hoffe, dass das Problemd damit verschwunden ist.
 
Haben bacula nun sehr lange im Einsatz - glaube Fehler lieht in der Denkweise wie bacula funktioniert:

bacula-dir (Port 9101) -> sagt client was zu tun ist (Port 9102)
bacula-fd (port 9102) -> macht und sendet an bacula-sd (Port 9103), der sichert weg

Es ist extrem wichtig, dass sich da alle über ihre richtige IP-Adresse unterhalten können, ein 127.0.0.1 bei irgendeneinem Teil ist schlichtweg falsch.

Es müssen alle mit ihren richtigen IPs untereinander Daten austauschen können also
bacula-dir -> bacula-fd direkt
bacula-fd -> bacula-sd direkt
dann solls auch klappen.

Hoffe das hilft etwas....
 
Danke für die Schnelle Antwort.

Ich habe jetzt DHCP weggenommen und alle (Routen, Resolv usw.) korrekt eingetragen und trotzdem bleibt der Fehler bestehen.

Der Bacula-Dir fliegt nach dem Backup mit einem rc= 4 ins Grab.

Nirgendwo ist "localhost" oder "127.0.0.1" eingetragen.

Komisch ist, dass Bacula 3.0.2 noch lief und das Problem erst bei 3.0.3 bei identischer Config auftritt.
 
Hm...hier läuft auch noch 3.0.2.
Jetzt, da vor ein paar Tagen Bacula 5.0.0 released wurde, warte ich noch darauf, das er in die Ports übernommen wird...dann werd ich unseren Backupserver hier auch neu aufsetzen...mal sehen auf welche Probleme ich da dann stoße.
 
Zumindest habe ich jetzt endlich mal eine Fehlermeldung vor dem Ableben:

Code:
30-Jan 22:42 backup-dir: ABORTING due to ERROR in lockmgr.c:65
Mutex lock failure. ERR=Resource deadlock avoided
backup-dir: message.c:737-0 MAIL for following msg: backup-dir: ABORTING due to ERROR in lockmgr.c:65
Mutex lock failure. ERR=Resource deadlock avoided
 
Hm...Google wirft mir folgendes aus, was evtl. auch auf dich zutreffen könnte:

http://archive.netbsd.se/?ml=bacula-users&a=2009-12&m=12063563

Ziemlich am Ende des Threads werden 2 Lösungsansätze gepostet.

Und die Bugfixes für das neue Bacula 5 klingen auch vielversprechend:

Code:
Fixed:
 - Problem that locks the Director when the SMTP server wasn't 
   responding to the bsmtp program 
 - Eliminate several deadlocks or potential race conditions from SD
 
@cla:

Danke für die Ansätze. Die habe ich wie folgt abgearbeitet:

Unicode in Tablespace:

Ich verwende sqlite in der Version 2.8. Erst Version 3.0 könnte UTF8, also dürfte das nicht bei mir zutreffen​

bsmtp:
Das hat bei mir schon lange nicht funktioniert - hat aber noch keine Fehler verursacht. Trotzdem deutet vieles nun darauf hin. Das Problem bin ich wieder stufenweise angegangen, wobei ich gerade in meinem letzten Versuch an den lokalen sendmail habe schicken lassen, der in jedem Fall die Mail annehmen sollte. Das hilft nichts.​

Gerade habe ich den Debug-Level noch mal verändert.

Im nächsten Schritt werde ich als Mail-Command vielleicht mal "/bin/true" versuchen.
 
ui ui ui, ich kann die Ursache für das Problem nicht fassen:

alte Konfiguration
Code:
mailcommand = "/usr/local/sbin/bsmtp -h localhost -f \"\(Bacula\) %r\"
      -s \"Bacula: %t %e of %c %l\" %r"
Die alte Konfiguration wurde bei der Installation von Bacula 3.0.2 aus den Ports erzeugt.
Bacula-Dir frisst die beim Starten ohne zu mucken, hängt sich aber beim Ende eines Backups mit Illegal Instruction an den Galgen.

neue Konfiguration
Code:
mailcommand = "/usr/local/sbin/bsmtp -h localhost -f \"\(Bacula\) %r\" -s \"Bacula: %t %e of %c %l\" %r"
Hier ist nur der Zeilenvorschub entfernt.

Das Backup läuft nun fehlerfrei durch:
Code:
31-Jan 22:56 backup-dir JobId 21: Bacula backup-dir 3.0.3 (18Oct09): 31-Jan-2010 22:56:04
  Build OS:               amd64-portbld-freebsd7.2 freebsd 7.2-RELEASE-p4
  JobId:                  21
  Job:                    client-job.2010-01-31_21.36.35_04
  Backup Level:           Full (upgraded from Incremental)
  Client:                 "client-fd" 3.0.3 (18Oct09) amd64-portbld-freebsd7.2,freebsd,7.2-RELEASE-p4
  FileSet:                "fileset" 2010-01-28 12:42:26
  Pool:                   "Full-Pool" (From Job FullPool override)
  Catalog:                "MyCatalog" (From Client resource)
  Storage:                "backup-sd" (From Job resource)
  Scheduled time:         31-Jan-2010 21:36:31
  Start time:             31-Jan-2010 21:36:38
  End time:               31-Jan-2010 22:56:04
  Elapsed time:           1 hour 19 mins 26 secs
  Priority:               10
  FD Files Written:       102,524
  SD Files Written:       102,524
  FD Bytes Written:       277,214,191,748 (277.2 GB)
  SD Bytes Written:       277,228,132,049 (277.2 GB)
  Rate:                   58165.0 KB/s
  Software Compression:   None
  VSS:                    no
  Encryption:             no
  Accurate:               no
  Volume name(s):         Full-0001
  Volume Session Id:      1
  Volume Session Time:    1264970025
  Last Volume Bytes:      277,435,807,628 (277.4 GB)
  Non-fatal FD errors:    0
  SD Errors:              0
  FD termination status:  OK
  SD termination status:  OK
  Termination:            Backup OK

Furchtbar!
Ich bin nur durch Zufall auf den Fehler gestoßen, da das Debugging darauf deutete, dass das Senden von der Status-Mail der Zeitpunkt des Fehlers darstellt und da das Handbuch extra beim Mailcommand darauf hinweist, dass man den Zeilenvorschub mit einem Backslash maskieren soll. Die ausgelieferte Konfiguration maskiert das aber nicht mit einem Backslash.

Bravo!
 
Zurück
Oben