Bacula-users

Re: [Bacula-users] How do I set up multiple tape devices

2009-03-03 12:15:34
Subject: Re: [Bacula-users] How do I set up multiple tape devices
From: "Jerry Lowry" <jlowry AT edt DOT com>
To: "'Pat Fricke'" <sales AT prfhome DOT com>
Date: Tue, 3 Mar 2009 09:12:12 -0800

Pat,  I have two drives on the same system, although my drives are both DLT.  I am running on Windows server 2003.  Here is my Director configuration file.  I have had no problems running with this configuration.

Hope this helps!

Jerry

Director {                            # define myself

  Name = Distress-dir

  DIRport = 9101                # where we listen for UA connections

  QueryFile = "C:\\Program Files\\Bacula\\bin\\query.sql"

  WorkingDirectory = "C:\\Documents and Settings\\All Users\\Application Data\\Bacula\\Work"

  PidDirectory = "C:\\Documents and Settings\\All Users\\Application Data\\Bacula\\Work"

  Maximum Concurrent Jobs = 1

  Password = "xxxx"         # Console password

  Messages = Daemon

}

# =======================================================================

# Job definition for backup server

JobDefs {

  Name = "DistressJob"

  Type = Backup

  Level = Incremental

  Client = Distress-fd

  FileSet = "Full Set"

  Schedule = "DistressWeeklyCycle"

  Storage = Weekly

  Messages = Standard

  Pool = Default

  Priority = 10

}

# Job definition for the monthly backup

JobDefs {

  Name = "DistressMonthly"

  Type = Backup

  Level = full

  Client = Distress-fd

  FileSet = "Monthly Set"

  Schedule = "DistressMonthlyCycle"

  Storage = Monthly

  Messages = Standard

  Pool = Monthly

  Priority = 10

}

# ========================================================================

#

# Define the main nightly backup jobs

#

# Backup job for backup server 'distress'

Job {

  Name = "Distress"

  Client = Distress-fd

  JobDefs = "DistressJob"

  # This creates an ASCII copy of the catalog

  RunBeforeJob = "\"C:\\Program Files\\Bacula\\bin\\make_catalog_backup\" bacula bacula"

  # This deletes the copy of the catalog

  RunAfterJob  = "\"C:\\Program Files\\Bacula\\bin\\delete_catalog_backup\""

  Write Bootstrap = "C:\\Documents and Settings\\All Users\\Application Data\\Bacula\\Work\\BackupCatalog.bsr"

}

# Backup job for backup server 'distress' Monthly

Job {

  Name = "Distress-Monthly"

  Client = Distress-fd

  JobDefs = "DistressMonthly"

  # This creates an ASCII copy of the catalog

  RunBeforeJob = "\"C:\\Program Files\\Bacula\\bin\\make_catalog_backup\" bacula bacula"

  # This deletes the copy of the catalog

  RunAfterJob  = "\"C:\\Program Files\\Bacula\\bin\\delete_catalog_backup\""

  Write Bootstrap = "C:\\Documents and Settings\\All Users\\Application Data\\Bacula\\Work\\BackupCatalog.bsr"

}

# Backup the catalog database (after the nightly save)

Job {

  Name = "BackupCatalog"

  JobDefs = "DistressJob"

  Level = Full

  FileSet="Catalog"

  Schedule = "WeeklyCycleAfterBackup"

  # This creates an ASCII copy of the catalog

  RunBeforeJob = "\"C:\\Program Files\\Bacula\\bin\\make_catalog_backup\" bacula bacula"

  # This deletes the copy of the catalog

  RunAfterJob  = "\"C:\\Program Files\\Bacula\\bin\\delete_catalog_backup\""

  Write Bootstrap = "C:\\Documents and Settings\\All Users\\Application Data\\Bacula\\Work\\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 = Distress-fd                

  FileSet = "Full Set"                 

  Storage = File                     

  Pool = Default

  Messages = Standard

  Where = "G:/restores/bacula-restores"

}


# ========================================================================

# List of files to be backed up on Backup server distress

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.

#

    File = c:/

    File = e:/          # current month backup

    File = f:/mysql

    File = g:/DBB

  }

#

# If you backup the root directory, the following two excluded

#   files can be useful

#

# Exclude {

#    File = c:/Windows

#  }

}

FileSet {

  Name = "Monthly 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.

#    Last month backup is copied to h:/ for storage onsite

#    then deleted from e:/ the current months backup

#

    File = e:/          # current month backup

    File = f:/mysql

    File = g:/DBB

  }

#

# If you backup the root directory, the following two excluded

#   files can be useful

#

# Exclude {

#    File = c:/Windows

#  }

}


# ========================================================================

#

# 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 = "DistressWeeklyCycle"

  Run = Full 1st sun at 23:05

  Run = Differential 2nd-5th sun at 23:05

  Run = Incremental mon-sat at 23:05

}

Schedule {

  Name = "DistressMonthlyCycle"

  Run = Full Pool=Monthly 2nd tue 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 = "C:\\Documents and Settings\\All Users\\Application Data\\Bacula\\Work\\bacula.sql"

  }

}

# ========================================================================

# Client (File Services) to backup

Client {

  Name = Distress-fd

  Address = distress.ACCOUNTING.EDT.LOCAL

  FDPort = 9102

  Catalog = MyCatalog

  Password = "xxxx"                   # password for FileDaemon

  File Retention = 30 days            # 30 days

  Job Retention = 1 months            # six months

  AutoPrune = yes                     # Prune expired Jobs/Files

}


# ==========================================================================

# Definition of file storage device

Storage {

  Name = File

# Do not use "localhost" here   

  Address = distress.ACCOUNTING.EDT.LOCAL   # N.B. Use a fully qualified name here

  SDPort = 9103

  Password = "XXXX"

  Device = FileStorage

  Media Type = File

}

# ==========================================================================

# Definition of DDS tape storage device

Storage {

  Name = Weekly

  Device = Quantum-DLT             # must be same as Device in Storage daemon

  Media Type = DLT-V4              # must be same as MediaType in Storage daemon

  Password = "XXXX"             # password for Storage daemon

                                   #  Do not use "localhost" here

  Address = distress.ACCOUNTING.EDT.LOCAL   # N.B. Use a fully qualified name here

  SDPort = 9103

}

Storage {

  Name = Monthly

  Device = Quantum-DLT-1           # must be same as Device in Storage daemon

  Media Type = DLT-V4              # must be same as MediaType in Storage daemon

  Password = "XXXX"             # password for Storage daemon

                                   #  Do not use "localhost" here

  Address = distress.ACCOUNTING.EDT.LOCAL   # N.B. Use a fully qualified name here

  SDPort = 9103

}

# Definition of DVD storage device

#Storage {

#  Name = "DVD"

#  Do not use "localhost" here

#  Address = distress.ACCOUNTING.EDT.LOCAL  # N.B. Use a fully qualified name here

#  SDPort = 9103

#  Password = "XXXX"

#  Device = "DVD Writer"

#  MediaType = "DVD"

#}

#=========================================================================

# Generic catalog service

Catalog {

  Name = MyCatalog

  dbname = bacula; user = bacula; password = ""

}

# 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 AT mydomain DOT com', is better since that tends to

#  tell (most) people that its coming from an automated source.

#

  mailcommand = "\"C:\\Program Files\\Bacula\\bin\\bsmtp\" -h mailhost.edt.com -f \"\(Bacula\) %r\" -s \"Bacula: %t %e of %c %l\" %r"

  operatorcommand = "\"C:\\Program Files\\Bacula\\bin\\bsmtp\" -h mailhost.edt.com -f \"\(Bacula\) %r\" -s \"Bacula: Intervention needed for %j\" %r"

  mail = jlowry AT edt DOT com = all, !skipped           

  operator = jlowry AT edt DOT com = 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 = "C:\\Documents and Settings\\All Users\\Application Data\\Bacula\\Work\\log" = all, !skipped

}


#

# Message delivery for daemon messages (no job).

Messages {

  Name = Daemon

  mailcommand = "\"C:\\Program Files\\Bacula\\bin\\bsmtp\" -h mailhost.edt.com -f \"\(Bacula\) %r\" -s \"Bacula daemon message\" %r"

  mail = jlowry AT edt DOT com = all, !skipped           

  console = all, !skipped, !saved

  append = "C:\\Documents and Settings\\All Users\\Application Data\\Bacula\\Work\\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 = 30 days          # one Months

}

   

# Monthly pool definition

Pool {

  Name = Monthly

  Pool Type = Backup

  Recycle = yes                       # Bacula can automatically recycle Volumes

  AutoPrune = yes                     # Prune expired volumes

  Volume Retention = 12 Months        # one year

}

#

# Restricted console used by tray-monitor to get the status of the director

#

Console {

  Name = distress-mon

  Password = "XXX"

  CommandACL = status, .status

}

_____________________________________________
From: Pat Fricke [mailto:sales AT prfhome DOT com]
Sent: Sunday, March 01, 2009 9:33 AM
To: bacula-users AT lists.sourceforge DOT net
Subject: [Bacula-users] How do I set up multiple tape devices

OK, call me stupid but I can’t make it work and I can’t seem to find the right “How To”.

Do I need to use autochanger?

I have two tape drives, one DLT (which has been running for a long time) and 1 LTO (new drive that I am trying to add).

Trying to run job Client1.

Getting  “Fatal Error: Device “Quantum-LTO” with MediaType “DLT” not found in SD Device resources.

Here are my configs:

# Default Bacula Director Configuration file

#  For Bacula release 1.38.3 (04 January 2006) -- redhat (Stentz)

Director {                            # define myself

  Name = Computer-dir

  DirAddress = 127.0.0.1

  DIRport = 9101                # where we listen for UA connections

  QueryFile = "/etc/bacula/bin/query.sql"

  WorkingDirectory = "/etc/bacula/working"

  PidDirectory = "/etc/bacula/pid"

  Maximum Concurrent Jobs = 1

  Password = "………………………………"         # Console password

  Messages = Daemon

}

JobDefs {

  Name = "DefaultJob"

  Type = Backup

  Level = Full

  Client = Computer -fd

  FileSet = "Full Set"

  Schedule = "WeeklyCycle"

  Storage = Computer -sd

  Messages = Standard

  Pool = LTO-Pool

  Priority = 10

}


Job {

  Name = "Client1"

  JobDefs = "DefaultJob"

  Write Bootstrap = "/etc/bacula/working/Client1.bsr"

}

Job {

  Name = "RestoreFiles"

  Type = Restore

  Client= Computer -fd                

  FileSet="Full Set"                 

  Storage = Computer -sd                    

  Pool = Default

  Messages = Standard

  Where = /tmp/bacula-restores

}


# List of files to be backed up

FileSet {

  Name = "Full Set"

  Include {

    Options {

      signature = MD5

    }

file = /etc/bacula

  }

  Exclude {

    File = /proc

    File = /tmp

    File = /.journal

    File = /.fsck

    File = /lost+found

    File = /.Trash-root

  }

}

  Name = "WeeklyCycle"

  Run = Full mon-fri at 22:11

}

Client {

  Name = Computer -fd

  Address = 127.0.0.1

  FDPort = 9102

  Catalog = MyCatalog

  Password = "……………………………………."          # password for FileDaemon

  File Retention = 5 days            # 30 days

  Job Retention = 5 days            # six months

  AutoPrune = yes                     # Prune expired Jobs/Files

}

# Definition of DLT tape storage device

Storage {

  Name = Computer -sd

  Address = 127.0.0.1              

  SDPort = 9103

  Password = "………………………………………………."

  Device = "Quantum-DLT"

  Media Type = DLT

}

# Definition of LTO tape storage device

Storage {

  Name = Computer -sd   

  Address = 127.0.0.1              

  SDPort = 9103

  Password = "……………………………………………….." 

  Device = Quantum-LTO      

  Media Type = LTO        

}

# Generic catalog service

Catalog {

  Name = MyCatalog

  dbname = bacula; user = ……….; password = "………."

}

Messages {

  Name = Standard

Email info intentionally left off here

}

   

# Default pool definition

Pool {

  Name = Default

  Pool Type = Backup

  Recycle = yes                       # Bacula can automatically recycle Volumes

  AutoPrune = yes                     # Prune expired volumes

  Volume Retention = 5 days         # one year

  Accept Any Volume = yes             # write on any volume in the pool

  Recycle Current Volume = yes

  Maximum Volume Jobs = 1

}

Pool {

  Name = LTO-Pool

  Pool Type = Backup

  Recycle = yes                       # Bacula can automatically recycle Volumes

  AutoPrune = yes                     # Prune expired volumes

  Volume Retention = 5 days         # one year

  Accept Any Volume = yes             # write on any volume in the pool

  Recycle Current Volume = yes

  Maximum Volume Jobs = 1

}

#

# Restricted console used by tray-monitor to get the status of the director

#

Console {

  Name = Computer -mon

  Password = "…………………………………………………"

  CommandACL = status, .status

}



#

# Default Bacula Storage Daemon Configuration file

#

#  For Bacula release 1.38.3 (04 January 2006) -- redhat (Stentz)

Storage {                             # definition of myself

  Name = Computer -sd

  SDPort = 9103                  # Director's port     

  WorkingDirectory = "/etc/bacula/working"

  Pid Directory = "/etc/bacula/pid"

  Maximum Concurrent Jobs = 20

}

Director {

  Name = Computer -dir

  Password = "…………………………………………"

#  Monitor = yes

}

Device {

  Name = Quantum-DLT

  Media Type = DLT

  Archive Device = /dev/nst0

  LabelMedia = yes;                   # lets Bacula label unlabeled media

  Random Access = Yes;

  AutomaticMount = yes;               # when device opened, read it

  RemovableMedia = yes;

  AlwaysOpen = no;

  RandomAccess = no;

}

Device {

  Name = Quantum-LTO

  Media Type = LTO

  Archive Device = /dev/nst1

  LabelMedia = yes;                   # lets Bacula label unlabeled media

  Random Access = Yes;

  AutomaticMount = yes;               # when device opened, read it

  RemovableMedia = yes;

  AlwaysOpen = no;

  RandomAccess = no;

}

Messages {

  Name = Standard

  director = Computer -dir = all

}

#

# Restricted Director, used by tray-monitor to get the

#   status of the storage daemon

#

Director {

  Name = Computer -mon

  Password = "………………………………………………………"

Either I am missing something obvious or I am doing this all wrong, whichever the case, I need HELP!!!

Please???


Pat

 << File: ATT00009.txt >>  << File: ATT00012.txt >>

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users