Bacula-users

[Bacula-users] How to tell Bacula to use new tape for Archiving

2009-11-04 18:49:31
Subject: [Bacula-users] How to tell Bacula to use new tape for Archiving
From: "May, John" <john.may AT fugrohorizons DOT com>
To: "bacula-users AT lists.sourceforge DOT net" <bacula-users AT lists.sourceforge DOT net>
Date: Wed, 4 Nov 2009 16:11:42 -0700
I frequently have to archive data off the server that should never expire.  I 
would like to archive this data onto a new tape, so the archived data is the 
only thing on the tape.  How do I tell Bacula to do this?  I think it has 
something to do with the Pools, so below is my bacula-dir.conf.  I've setup an 
Archive Pool along with some others, but haven't used them yet.

#####################################################################
##############  Director Configuration ##############################
#####################################################################
Director {
  Name = bkupsvr-dir
  DIRport = 9101
  QueryFile = "/etc/bacula/scripts/query.sql"
  WorkingDirectory = "/var/lib/bacula"
  PidDirectory = "/var/run/bacula"
  Maximum Concurrent Jobs = 1
  Password = "PASSWORD" # Console password
  Messages = Daemon
  DirAddress = 127.0.0.1
}


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

JobDefs {
  Name = "General"
  Type = Backup
  Level = Full
  Schedule = "Servers"
  Storage = Arcvault
  Messages = Standard
  Pool = Default
  Write Bootstrap = "/var/lib/bacula/%i-%c_%n.bsr"
}

#####################################################################
############## Jobs   ###############################################
#####################################################################
##### Backup the catalog database (after the nightly save)
Job {
  Name = "BackupCatalog"
  JobDefs = "DefaultJob"
  Level = Full
  FileSet="Catalog"
  Schedule = "WeeklyCycleAfterBackup"
  RunBeforeJob = "/etc/bacula/scripts/make_catalog_backup bacula bacula"
  RunAfterJob = "/etc/bacula/scripts/delete_catalog_backup"
  Write Bootstrap = "/var/lib/bacula/BackupCatalog.bsr"
  Priority = 11
}

##### Restore Files
Job {
  Name = "RestoreFiles"
  Type = Restore
  Client = bkupsvr-fd
  FileSet = "Full Set"
  Storage = File
  Pool = Default
  Messages = Standard
  Where = /tmp/Restores
}

Job {
  Name = "Server001"
  JobDefs = "General"
  FileSet = "Data"
  Schedule = "General"
  Client = "server001-fd"
}

#####################################################################
############## Filesets #############################################
#####################################################################
# List of files to be backed up
FileSet {
  Name = "Full Set"
  Include {
    Options {
      signature = MD5
    }
    File = /
  }
  Exclude {
    File = /proc
    File = /tmp
    File = /.journal
    File = /.fsck
  }
}

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

FileSet {
  Name = "Data"
  Include {
    Options {
          signature = MD5
          IgnoreCase = yes
          }
          File = "C:/Data/"
        }
}

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

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

Schedule {
        Name = "General"
        Run = IncrementalPool="Incremental" Level=Incremental mon-thu at 19:00
        Run = FullPool="Weekly" Level=Full 2nd-5th fri at 19:00
        Run = FullPool="Monthly" Level=Full 1st fri at 19:00
}

Schedule {
        Name = "Exchange"
        Run = FullPool="Exchange" Level=Full mon-fri at 18:00
        Run = FullPool="Monthly" Level=Full 1st fri at 18:00
}

Schedule {
        Name = "Servers"
        Run = FullPool="Weekly" Level=Full fri at 18:10
        Run = FullPool="Monthly" Level=Full 1st fri at 18:10
}

Schedule {
        Name = "SQL"
        Run = FullPool="Weekly" Level=Full fri at 18:45
        Run = FullPool="Monthly" Level=Full 1st fri at 18:45
}

#####################################################################
############## Clients  #############################################
#####################################################################
Client {
  Name = bkupsvr-fd
  Address = bkupsvr
  FDPort = 9102
  Catalog = MyCatalog
  Password = "PASSWORD"
  File Retention = 30 days  # 30 days
  Job Retention = 1y            # 1 years
  AutoPrune = yes           # Prune expired Jobs/Files
}

Client {
  Name = server001-fd
  Address = server001
  FDPort = 9102
  Catalog = MyCatalog
  Password = "PASSWORD"
  File Retention = 60 days
  Job Retention = 1y
  AutoPrune = yes
}

#####################################################################
############## Storage ##############################################
#####################################################################
Storage {
  Name = File
  Address = bkupsvr
  SDPort = 9103
  Password = "PASSWORD"
  Device = FileStorage
  Media Type = File
}

Storage {
  Name = Arcvault
  Address = bkupsvr
  SDPort = 9103
  Password = "PASSWORD"
  Device = Arcvault48  # must be same as Device in Storage daemon
  Media Type = LTO-4   # must be same as MediaType in Storage daemon
  Autochanger = yes    # enable for autochanger device
}

#####################################################################
############# Catalog ###############################################
#####################################################################
Catalog {
  Name = MyCatalog
  dbname = "bacula"; dbuser = "bacula"; dbpassword = ""
}

#####################################################################
############# Alerts ################################################
#####################################################################
# 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 = "/usr/sbin/bsmtp -h EXCHANGE -f \"\(Bacula\) \<%r\>\" -s 
\"Bacula: %t %e of %c %l\" %r"
  operatorcommand = "/usr/sbin/bsmtp -h EXCHANGE -f \"\(Bacula\) \<%r\>\" -s 
\"Bacula: Intervention needed for %j\" %r"
  mail = admin AT company DOT com = all, !skipped
  operator = admin AT company 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 = "/var/lib/bacula/log" = all, !skipped
}

#
# Message delivery for daemon messages (no job).
Messages {
  Name = Daemon
  mailcommand = "/usr/sbin/bsmtp -h EXCHANGE -f \"\(Bacula\) \<%r\>\" -s 
\"Bacula daemon message\" %r"
  mail = admin AT company DOT com = all, !skipped
  console = all, !skipped, !saved
  append = "/var/lib/bacula/log" = all, !skipped
}
    
#####################################################################
############# Pools #################################################
#####################################################################
Pool {
  Name = Default
  Pool Type = Backup
  Recycle = yes               # Bacula can automatically recycle Volumes
  AutoPrune = yes             # Prune expired volumes
  Volume Retention = 10y
  Cleaning Prefix = CLN
}

# Scratch pool definition
Pool {
  Name = Scratch
  Pool Type = Backup
  Cleaning Prefix = CLN
}

Pool {
  Name = "Monthly"
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Volume Retention = 1y
  Catalog Files = yes
  Cleaning Prefix = CLN
}

Pool {
  Name = "Weekly"
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Volume Retention = 60 days
  Catalog Files = yes
  Cleaning Prefix = CLN
}

Pool {
  Name = "Incremental"
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Volume Retention = 13 days
  Catalog Files = yes
  Cleaning Prefix = CLN
}

Pool {
  Name = "Exchange"
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Volume Retention = 13 days
  Catalog Files = yes
  Cleaning Prefix = CLN
}

Pool {
   Name = "Archive"
   Pool Type = Backup
   Recycle = no
   Auto Prune = no
   Volume Retention = 30 years
   Accept Any Volume = yes
   Cleaning Prefix = CLN
}


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

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>