Hi there!

I have a problem with an autochanger:

The Changer is an Overland Library with a Sony AIT-2 Drive
We are using 2 magazines with 18 Tapes each for backup.

The tapes for each magazine are assigned as followed:

Slot 1-3  : INTERNAL  , mediaid 1-3, 19-21,  used by job internal
Slot 4    : HOFFMANN  , mediaid 4, 22        used by job wadhoffmann
Slot 5-18 : CTX-FARM  , mediaid 5-18, 23-36  used by job db-2-tape

I am changing the magazines daily.

And now the problem:

As it seems, bacula doesn't recognize the change of a magazine.

The job db-2-tape writes to three tapes, leaving the last in the status APPEND. Now i change the magazine, the job db-2-tape is starting by schedule again and tries to continue writing to the tape which was left with the status APPEND. But this tape isn't available, as it is in the other magazine.

Has anyone an idea how i can fix that?

ATTACHMENTS:
bacula-dir.conf
bacula-sd.conf
bacula-fd.conf






#
# Default Bacula Storage Daemon Configuration file
#
#  For Bacula release 1.38.0 (28 October 2005) -- unknown unknown
#
# 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 = hadbackup-sd
  SDPort = 9103                  # Director's port      
  WorkingDirectory = "/var/lib/bacula"
  Pid Directory = "/var/run"
  Maximum Concurrent Jobs = 20
}

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

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


###############################################################################
##
#  DEVICES
##
###############################################################################

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


# this one is used for the hourly snaps from had-ad-02
Device {
  Name = FileStorage
  Media Type = File
  Archive Device = /backupdata/filestor
  LabelMedia = yes;                   # lets Bacula label unlabeled media
  Random Access = Yes;
  AutomaticMount = yes;               # when device opened, read it
  RemovableMedia = no;
  AlwaysOpen = no;
}

#used for the databases 
Autochanger {
  Name = Overland
  Device = SONY
  Changer Command = "/etc/bacula/scripts/mtx-changer %c %o %S %a %d"
  Changer Device = /dev/sg2
}

Device {
  Name = SONY                     
  Drive Index = 0                 
  Media Type = AIT-2
  Archive Device = /dev/st0                             # was /dev/nst0
  AutomaticMount = yes               # when device opened, read it
  LabelMedia = yes
  AlwaysOpen = yes
  RemovableMedia = yes
  RandomAccess = no
  AutoChanger = yes
  Autoselect = yes
  SpoolDirectory = "/backupdata/spooler"    #spool the jobs before write them 
to tape!
  # Enable the Alert command only if you have the mtx package loaded
#  Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
}




# 
# Send all messages to the Director, 
# mount messages also are sent to the email address
#
Messages {
  Name = Standard
  director = hadbackup-dir = all
}
# 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 1.38.0 (28 October 2005) -- unknown unknown
#
#  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  DON'T TOUCH 
##
########################################################################################################

Director {                            # define myself
  Name = hadbackup-dir
  DIRport = 9101                # where we listen for UA connections
  QueryFile = "/etc/bacula/scripts/query.sql"
  WorkingDirectory = "/var/lib/bacula"
  PidDirectory = "/var/run"
  Maximum Concurrent Jobs = 1
  Password = "bacula"         # Console password
  Messages = Daemon
}

########################################################################################################
##
#  JOB-Definitions
##
########################################################################################################


#had-ad-02 snapshot 
#JobDefs {
#       Name = "HADAD02"
#       Type = Backup
#       Level = Full 
#       Client = "HAD-AD-02"
#       FileSet = "FS-HAD-AD-02"
#       Schedule = "fullatnight"
#       Storage = SONYAIT2
#       Messages = Standard
#       Pool = INTERNAL
#       Priority = 10
#}#END JobDefs

#database backups
JobDefs {
        Name = "db2tape"
        Type = Backup
        Level = Full 
        Client = "hadbackup-fd"
        Fileset = "dbs"
        Schedule = "dbdaily"
        Storage = SONYAIT2
        Prefer Mounted Volumes = no
        Messages = Standard
        Pool = CTX-FARM
        Priority = 10
        Run After Job = "/etc/bacula/scripts/mtx-changer /dev/sg2 unload"
}

#Hoffmann
JobDefs {
        Name = hoffmann2tape
        Type = Backup
        Level = Full
        Client = wadhoffmann
        Fileset = fs-hoffmann
        schedule = hoffmanndaily
        Storage = SONYAIT2
        Prefer Mounted Volumes = no
        Messages = Standard
        Pool = HOFFMANN
        Priority = 10
}
##############################################################################
##
#  JOBS
##
###############################################################################

#
# Define the main nightly save backup job
#   By default, this job will back up to disk in /tmp

#Job {
#       SpoolData = yes
#       Name = "had-ad-02-to-TAPES"  ##client-name : in client-conf!
#       JobDefs = "HADAD02"
#       Write Bootstrap = "/var/lib/bacula/hadad02.bsr"
#}

Job {
        SpoolData = No
        Name = "db-to-tapes"
        JobDefs = "db2tape"
        Write Bootstrap = "/var/lib/bacula/db2tape.bsr"
}

Job {
        Spooldata = Yes
        Name = wadhoffman
        JobDefs = hoffmann2tape
        Write Bootstrap = "/var/lib/bacula/hoffman2tape.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
#  RunBeforeJob = "/etc/bacula/scripts/make_catalog_backup bacula bacula"
#  # 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=hadbackup-fd                 
  FileSet="FS-HAD-AD-02"                  
  Storage = File                      
  Pool = Default
  Messages = Standard
  Where = /tmp/bacula-restores
}

###############################################################################
##
#  FILESETS to process
##
###############################################################################

FileSet 
{
  Name = "FS-HAD-AD-02"  
  Enable VSS = yes
  Include {
      Options 
      {
        Signature = MD5
        #Compression = gzip
        IgnoreCase = yes
        portable = yes
        recurse = yes
      } #END Options
      File = "d:/mdaemon/" 
      File = "d:/daten/"
      File = "d:/bentzer/"
        }#END include     
}#End Fileset

#dbs : writing the db-files from disk to tape
FileSet {
        Name = dbs
        Include {
                Options {
                        Signature = MD5
                }
        File = /backupdata
        }
        Exclude {
                File = "/backupdata/lost+found"
                File = "/backupdata/spooler"
                File = "/backupdata/filestor"
                }
}

FileSet {
        Name = fs-hoffmann
        Include {
                Options {
                        Signature = MD5
                        portable = yes
                        Compression = gzip
                        recurse = yes
                }
                File = "c:/programme/mdaemon/users"
                File = "c:/programme/mdaemon/public folders"
                File = "d:/dokumente"
                File = "d:/kdg"
                File = "d:/mitarbeiter"
                File = "d:/sfirm32"
        }
}
 
# This is the backup of the catalog
FileSet {
  Name = "Catalog"
  Include {
    Options {
      signature = MD5
    }
    File = /var/lib/bacula/bacula.sql
  }
}#END Fileset



###############################################################################
##
# SCHEDULES
##
###############################################################################

#
# 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-5th sun at 23:05
#  #Run = Differential 2nd-5th sun at 23:05
#  Run = Differential mon-sat at 23:05
#}

#Schedule for had-ad-02: perform a full backup at night
#Schedule 
#{
#    Name = "fullatnight"    
#    Run = Level = Full at 22:00
#}

Schedule 
{
        Name = "dbdaily"
        Run = Level = Full at 5:15
}

Schedule
{
        Name = hoffmanndaily 
        Run = Level = Full at 19:00
}

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


#############################################################################
##
#   CLIENTS 
##
#############################################################################

# SELF 
Client {
  Name = hadbackup-fd
  Address = hadbackup
  FDPort = 9102
  Catalog = hadbackupCat
  Password = "bacula"          # password for FileDaemon
  File Retention = 12 hours            # 30 days
  Job Retention = 12 hours            # six months
  AutoPrune = yes                     # Prune expired Jobs/Files
}#END Client


# HAD-AD-02
Client 
{
  Name = "HAD-AD-02"                
  Address = 192.168.210.11
  FDPort = 9102
  Catalog = hadbackupCat
  Password = "bacula"         # password for FileDaemon , must match in 
bacula-fd on client
  File Retention = 12 hours            # 30 days
  Job Retention = 12 hours            # six months
  AutoPrune = yes                     # Prune expired Jobs/Files
}#END Client


# HOFFMANN
Client 
{
  Name = wadhoffmann                
  Address = 192.168.210.25
  FDPort = 9102
  Catalog = hadbackupCat
  Password = "bacula"         # password for FileDaemon , must match in 
bacula-fd on client
  File Retention = 12 hours            # 30 days
  Job Retention = 12 hours            # six months
  AutoPrune = yes                     # Prune expired Jobs/Files
}#END Client



##################################################################################################
##
#  STORAGE Definitions!!!!!!
##
##################################################################################################

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


Storage {
  Name = SONYAIT2    
  #Do not use "localhost" here
  Address = hadbackup                # N.B. Use a fully qualified name here
  SDPort = 9103
  Password = "bacula"                # password for Storage daemon
  Device = SONY                      # must be same as Device in Storage daemon
  Media Type = AIT-2                  # must be same as MediaType in Storage 
daemon
  Autochanger = yes                   # enable for autochanger device
}

##################################################################################################
##
#  CATALOG Definitions!!!!!!
##
##################################################################################################



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

##################################################################################################
##
#  MESSAGE Definitions!!!!!!
##
##################################################################################################

# 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.
#
  mailcommand = "/usr/sbin/bsmtp -h \"192.168.210.11:25\" -f \"Bajohr\" -s 
\"HADBACKUP: %t %e of %c %l\" %r"
  operatorcommand = "/usr/sbin/bsmtp -h \"192.168.210.11:25\" -f \"Bajohr\" -s 
\"HADBACKUP: Intervention needed for %j\" %r"
  mail = bajohr = all, !skipped            
  operator = bajohr = 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/sbin/bsmtp -h \"192.168.210.11:25\" -f \"[EMAIL 
PROTECTED]" -s \"HADBACKUP daemon message\" %r"
  mail = \"[EMAIL PROTECTED]" = all, !skipped            
  console = all, !skipped, !saved
  append = "/var/lib/bacula/log" = all, !skipped
}

##################################################################################################
##
#  POOL Definitions!!!!!!
##
##################################################################################################
    
# Default pool definition
Pool {
  Name = Default
  Pool Type = Backup
  Recycle = yes                       # Bacula can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 12 hours         # one year
  Accept Any Volume = yes             # write on any volume in the pool
}

Pool
{
        Name = FileSnap
        Pool Type = Backup
        Maximum Volumes = 1
        Recycle = yes
        AutoPrune = yes
        Volume Retention = 12 hours
        Accept Any Volume = No
        
}

#internal data pool
Pool
{
        Name = INTERNAL
        Pool Type = Backup
        Maximum Volumes = 6
        Recycle = yes
        Recycle Oldest Volume = no
        AutoPrune = yes
        Volume Retention = 12 Hours
        Accept Any Volume = yes
}

Pool
{
        Name = HOFFMANN
        Pool Type = Backup
        Maximum Volumes = 2
        Recycle = yes
        Recycle Oldest Volume = no
        AutoPrune = yes
        Volume Retention = 12 Hours
        Accept Any Volume = yes
}

Pool
{
        Name = CTX-FARM
        Pool Type = Backup
        Maximum Volumes = 28
        Recycle = yes
        Recycle Oldest Volume = no
        AutoPrune = yes
        Volume Retention = 12 Hours
        Accept Any Volume = yes
}

###########################################################################
##                                                                    
#  Monitor for X
##
###########################################################################

# Restricted console used by tray-monitor to get the status of the director
Console {
  Name = hadbackup-mon
  Password = "baculamon"
  CommandACL = status, .status
}
#
# Default  Bacula File Daemon Configuration file
#
#  For Bacula release 1.38.0 (28 October 2005) -- unknown unknown
#
# 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 = hadbackup-dir
  Password = "bacula"
}

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

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

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

Reply via email to