Bacula-users

Re: [Bacula-users] Catalog writing to wrong storage device

2015-08-21 11:22:32
Subject: Re: [Bacula-users] Catalog writing to wrong storage device
From: Adam Clark <adam AT eryjus DOT com>
To: "bacula-users AT lists.sourceforge DOT net" <bacula-users AT lists.sourceforge DOT net>
Date: Fri, 21 Aug 2015 15:20:14 +0000

Hello,

 

My Catalog still did not make its first attempt to write to the proper volume, resulting in a volume in error.  Here are the console messages for the catalog backup:

 

2015-08-20 23:55:02   BaculaDirector JobId 296: shell command: run BeforeJob "/usr/libexec/bacula/make_catalog_backup.pl MyCatalog"
2015-08-20 23:55:03   BaculaDirector JobId 296: Start Backup JobId 296, Job=BackupCatalog.2015-08-20_23.55.00_49
2015-08-20 23:55:03   BaculaDirector JobId 296: Using Device "Backup-File" to write.
2015-08-20 23:55:03   bacula-sd JobId 296: Warning: Volume "Thu-0028" not on file device "Backup-File" (/backup).
2015-08-20 23:55:03   bacula-sd JobId 296: Marking Volume "Thu-0028" in Error in Catalog.
2015-08-20 23:55:04   bacula-sd JobId 296: Warning: Volume "Thu-0028" not on file device "Backup-File" (/backup).
2015-08-20 23:55:04   bacula-sd JobId 296: Marking Volume "Thu-0028" in Error in Catalog.

2015-08-20 23:55:04   bacula-sd JobId 296: Warning: mount.c:212 Open of file device "Backup-File" (/backup) Volume "Thu-0028" failed: ERR=file_dev.c:172 Could not open(/backup/Thu-0028,OPEN_READ_WRITE,0640): ERR=No such file or directory


2015-08-20 23:55:04   bacula-sd JobId 296: Volume "Thu-0010" previously written, moving to end of data.
2015-08-20 23:55:04   bacula-sd JobId 296: Ready to append to end of Volume "Thu-0010" size=8,163,946
2015-08-20 23:55:14   bacula-sd JobId 296: Elapsed time=00:00:10, Transfer rate=4.591 M Bytes/second
2015-08-20 23:55:14   bacula-sd JobId 296: Sending spooled attrs to the Director. Despooling 290 bytes ...
2015-08-20 23:55:14   BaculaDirector JobId 296: Bacula BaculaDirector 7.0.5 (28Jul14):

  Build OS:               x86_64-redhat-linux-gnu redhat Two)

  JobId:                  296

  Job:                    BackupCatalog.2015-08-20_23.55.00_49

  Backup Level:           Full

  Client:                 "Bacula-Server" 7.0.5 (28Jul14) x86_64-redhat-linux-gnu,redhat,Two)

  FileSet:                "Catalog" 2015-07-04 23:55:00

  Pool:                   "ThuPool" (From Run Pool override)

  Catalog:                "MyCatalog" (From Client resource)

  Storage:                "Backup-File" (From run override)

  Scheduled time:         20-Aug-2015 23:55:00

  Start time:             20-Aug-2015 23:55:03

  End time:               20-Aug-2015 23:55:14

  Elapsed time:           11 secs

  Priority:               11

  FD Files Written:       1

  SD Files Written:       1

  FD Bytes Written:       45,913,490 (45.91 MB)

  SD Bytes Written:       45,913,606 (45.91 MB)

  Rate:                   4174.0 KB/s

  Software Compression:   None

  VSS:                    no

  Encryption:             no

  Accurate:               no

  Volume name(s):         Thu-0010

  Volume Session Id:      43

  Volume Session Time:    1439603392

  Last Volume Bytes:      54,112,032 (54.11 MB)

  Non-fatal FD errors:    0

  SD Errors:              0

  FD termination status:  OK

  SD termination status:  OK

  Termination:            Backup OK
2015-08-20 23:55:14   BaculaDirector JobId 296: Begin pruning Jobs older than 6 months .
2015-08-20 23:55:14   BaculaDirector JobId 296: No Jobs found to prune.
2015-08-20 23:55:14   BaculaDirector JobId 296: Begin pruning Files.
2015-08-20 23:55:14   BaculaDirector JobId 296: No Files found to prune.
2015-08-20 23:55:14   BaculaDirector JobId 296: End auto prune.
2015-08-20 23:55:14   BaculaDirector JobId 296: shell command: run AfterJob "/usr/libexec/bacula/delete_catalog_backup"

 

 

Please let me note that I really wanted the backup to write to Thu-0010 all along, but without setting Thu-0028 to error since this is my file server backup.

 

To help things along, here is my bacula-dir.conf in its entirety:

 

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

#

# bacula-dir.conf -- This file is modified from the Default Bacula Director Configuration file.

#

# There are several resources that are defined in this file.  And other files define resources

# that all must match for bacula to work properly.  Eventually, I will be removing the "default"

# portions of this file as I am able to get other pieces working.

#

# All backups will be written to the /backup folder on this server.  This folder is for now

# part of the whole file system, but will later be replaced to be a fixed (independent) disk.

# Once the backup is completed and the catalog is written, then the whole thing will be zipped

# up and FTP'd to eryjus.com (off-site backup).

#

# I prefer to execute only full backups.  There are several reasons for this:

# 1.  A backup is only of any value when you need to restore from it; at any other time it is

#     just an annoyance that must be completed to maintain your insurance policy.  During the

#     restore, someone is always "looking over your shoulder" wanting to get the the data in

#     question.  Restoring only a full backup reduces this time.

# 2.  Any differential or incremental backup is only as good as its based-on full backup.  If

#     that full backup bacomes corrupt or otherwise unusable, then you must go back to the

#     prior bull backup, which depending on the backup methods could be a month or more.  A

#     full backup that fails only requires going back one addidional day for the next attempt.

#

#

# *********************************************************************************************

# **                                                                                         **

# **  !!NOTE!!: Once a change to this file is made, the Bacula Director service will need    **

# **  to be restarted.  This can be accomplished with the following command:                 **

# **                                                                                         **

# **      systemctl restart bacula-dir.service                                               **

# **                                                                                         **

# *********************************************************************************************

#

# ----------------------------------------------------------------------------------------------

#

#    Date     Pgmr  Tracker  Description

# ----------  ----  -------  -------------------------------------------------------------------

# 2015/07/04  Adam  Initial  This is the initial version as I develop the backup server.

#

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

 

 

#

# -- This director resource is the base configuration against which all other configuration

#    files are required to match.  This section defines the Bacula Director.

#    --------------------------------------------------------------------------------------

 

Director {                                              # define myself

  Name = BaculaDirector

  Description = The Bacula Backup Director and Orchestrator

  DIRport = 9101                                        # where we listen for UA connections

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

  WorkingDirectory = "/var/spool/bacula"

  PidDirectory = "/var/run"

  Maximum Concurrent Jobs = 20

  Password = "Password"                       # Console password

  Messages = Daemon

}

 

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

 

 

#

# -- This Job Defaults resource fills in any blanks in the below Job resources.  It cannot be

#    executed directly, and anything that is specified at the Job resource overrides these

#    values.

#    ----------------------------------------------------------------------------------------

#

 

JobDefs {

  Name = "DefaultJob"

  Type = Backup

  Level = Full

  Storage = Backup-File

  Messages = Standard

  Pool = Perm

  SpoolAttributes = yes

  Priority = 10

  Write Bootstrap = "/var/spool/bacula/%c.bsr"

  Max Start Delay = 20h

}

 

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

 

 

#

# -- The Catalog resource defines the database for keeping track of the files that were backed

#    up.  There can technically be more than 1 catalog (for instance one for each client), but

#    I do not see any value in that.

#    -----------------------------------------------------------------------------------------

#

 

Catalog {

  Name = MyCatalog

  dbname = "bacula"; dbuser = "bacula"; dbpassword = ""

}

 

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

 

 

#

# -- The Storage resource defines where the backup files will be placed.  I may decide to add

#    a folder for each individual client I am backup up, in which case I will have to create

#    a storage location for each client.  Note that this must match the condifuration in the

#    in the bacula-sd.conf configuration file.

#    ----------------------------------------------------------------------------------------

#

 

Storage {

  Name = Backup-File

  Address = 10.0.0.111

  SDPort = 9103

  Password = "Password"

  Device = Backup-File

  Media Type = File

  Maximum Concurrent Jobs = 10

}

 

 

#

# -- So, it is time to split the Zentyal file server data from the rest.  The reason is that I

#    really want to be able to FTP the data to the eryjus.com site for safe keeping.  The file

#    share data that is on the Zentyal server is 10+ GB when compressed.  This is too much data

#    to move every night.  Therefore, I will be adding a sun-directory to the /backup mount

#    point and storing the data there.

#    ------------------------------------------------------------------------------------------

 

Storage {

  Name = Zentyal-File

  Address = 10.0.0.111

  SDPort = 9103

  Password = "Password"

  Device = Zentyal-File

  Media Type = File

  Maximum Concurrent Jobs = 10

}

 

 

 

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

 

 

#

#  -- Message delivery for daemon messages (no job).

#     ----------------------------------------------

#

 

Messages {

  Name = Daemon

  mailcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula daemon message\" %r"

  mail = root@adam AT eryjus DOT com = all, !skipped

  console = all, !skipped, !saved

  append = "/var/log/bacula/bacula.log" = all, !skipped

}

 

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

 

 

#

# -- Reasonable message delivery -- send most everything to email address and to the console

#    ---------------------------------------------------------------------------------------

#

 

Messages {

  Name = Standard

  mailcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: %t %e of %c %l\" %r"

  operatorcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: Intervention needed for %j\" %r"

  mail = adam AT eryjus DOT com = all, !skipped

  operator = adam@@eryjus.com = mount

  console = all, !skipped, !saved

  append = "/var/log/bacula/bacula.log" = all, !skipped

  catalog = all

}

 

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

 

 

#

# -- This schedule is added for my needs -- Even though it is longer to run, I prefer full

#    backups every day.

#    -------------------------------------------------------------------------------------

#

 

Schedule {

  Name = "Full"

  Run = Level=Full Pool=Perm Storage=Backup-File mar 31 at 22:00

  Run = Level=Full Pool=Perm Storage=Backup-File jun 30 at 22:00

  Run = Level=Full Pool=Perm Storage=Backup-File sep 30 at 22:00

  Run = Level=Full Pool=Perm Storage=Backup-File dec 31 at 22:00

  Run = Level=Full Pool=MonPool Storage=Backup-File mon at 22:00

  Run = Level=Full Pool=TuePool Storage=Backup-File tue at 22:00

  Run = Level=Full Pool=WedPool Storage=Backup-File wed at 22:00

  Run = Level=Full Pool=ThuPool Storage=Backup-File thu at 22:00

  Run = Level=Full Pool=FriPool Storage=Backup-File fri at 22:00

  Run = Level=Full Pool=SatPool Storage=Backup-File sat at 22:00

  Run = Level=Full Pool=SunPool Storage=Backup-File sun at 22:00

}

 

#

 

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

 

 

#

# -- This schedule is used for the Zentyal Server

#    --------------------------------------------

#

 

Schedule {

  Name = "Full-Zentyal"

  Run = Level=Full Pool=Perm Storage=Zentyal-File mar 31 at 22:00

  Run = Level=Full Pool=Perm Storage=Zentyal-File jun 30 at 22:00

  Run = Level=Full Pool=Perm Storage=Zentyal-File sep 30 at 22:00

  Run = Level=Full Pool=Perm Storage=Zentyal-File dec 31 at 22:00

  Run = Level=Full Pool=MonPool Storage=Zentyal-File mon at 22:00

  Run = Level=Full Pool=TuePool Storage=Zentyal-File tue at 22:00

  Run = Level=Full Pool=WedPool Storage=Zentyal-File wed at 22:00

  Run = Level=Full Pool=ThuPool Storage=Zentyal-File thu at 22:00

  Run = Level=Full Pool=FriPool Storage=Zentyal-File fri at 22:00

  Run = Level=Full Pool=SatPool Storage=Zentyal-File sat at 22:00

  Run = Level=Full Pool=SunPool Storage=Zentyal-File sun at 22:00

}

 

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

 

 

#

# -- This schedule is added for my needs -- Even though it is longer to run, I prefer full

#    backups every day.

#    -------------------------------------------------------------------------------------

#

 

Schedule {

  Name = "FullCatalog"

  Run = Level=Full Pool=Perm Storage=Backup-File mar 31 at 23:55

  Run = Level=Full Pool=Perm Storage=Backup-File jun 30 at 23:55

  Run = Level=Full Pool=Perm Storage=Backup-File sep 30 at 23:55

  Run = Level=Full Pool=Perm Storage=Backup-File dec 31 at 23:55

  Run = Level=Full Pool=MonPool Storage=Backup-File mon at 23:55

  Run = Level=Full Pool=TuePool Storage=Backup-File tue at 23:55

  Run = Level=Full Pool=WedPool Storage=Backup-File wed at 23:55

  Run = Level=Full Pool=ThuPool Storage=Backup-File thu at 23:55

  Run = Level=Full Pool=FriPool Storage=Backup-File fri at 23:55

  Run = Level=Full Pool=SatPool Storage=Backup-File sat at 23:55

  Run = Level=Full Pool=SunPool Storage=Backup-File sun at 23:55

}

 

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

 

 

#

# -- Default pool definition -- even though it is not used

#    -----------------------------------------------------

#

 

Pool {

  Name = Default

  Pool Type = Backup

}

 

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

 

 

#

# -- Scratch pool definition -- required by bacula

#    ---------------------------------------------

 

Pool {

  Name = Scratch

  Pool Type = Backup

}

 

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

 

 

#

# -- Define the permanent pool for all backups that will never be overwritten

#    ------------------------------------------------------------------------

#

 

Pool {

  Name = Perm

  Pool Type = Backup

  Recycle = No

  AutoPrune = Yes

  Volume Use Duration = 1d

  Label Format = "Perm-"

}

 

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

 

 

#

# -- Define the pool to be used for Monday's backups

#    -----------------------------------------------

#

 

Pool {

  Name = MonPool

  Pool Type = Backup

  Recycle = Yes

  AutoPrune = Yes

  Volume Retention = 6d

  Volume Use Duration = 1d

  Label Format = "Mon-"

}

 

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

 

 

#

# -- Define the pool to be used for Tuesday's backups

#    ------------------------------------------------

#

 

Pool {

  Name = TuePool

  Pool Type = Backup

  Recycle = Yes

  AutoPrune = Yes

  Volume Retention = 6d

  Volume Use Duration = 1d

  Label Format = "Tue-"

}

 

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

 

 

#

# -- Define the pool to be used for Wednesday's backups

#    --------------------------------------------------

#

 

Pool {

  Name = WedPool

  Pool Type = Backup

  Recycle = Yes

  AutoPrune = Yes

  Volume Retention = 6d

  Volume Use Duration = 1d

  Label Format = "Wed-"

}

 

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

 

 

#

# -- Define the pool to be used for Thursday's backups

#    -------------------------------------------------

#

 

Pool {

  Name = ThuPool

  Pool Type = Backup

  Recycle = Yes

  AutoPrune = Yes

  Volume Retention = 6d

  Volume Use Duration = 1d

  Label Format = "Thu-"

}

 

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

 

 

#

# -- Define the pool to be used for Friday's backups

#    -----------------------------------------------

#

 

Pool {

  Name = FriPool

  Pool Type = Backup

  Recycle = Yes

  AutoPrune = Yes

  Volume Retention = 6d

  Volume Use Duration = 1d

  Label Format = "Fri-"

}

 

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

 

 

#

# -- Define the pool to be used for Saturday's backups

#    -------------------------------------------------

#

 

Pool {

  Name = SatPool

  Pool Type = Backup

  Recycle = Yes

  AutoPrune = Yes

  Volume Retention = 6d

  Volume Use Duration = 1d

  Label Format = "Sat-"

}

 

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

 

 

#

# -- Define the pool to be used for Sunday's backups

#

#    Sunday's backups will be kept for 13 weeks before they are purged (after which the Perm

#    pool takes over)

#    ---------------------------------------------------------------------------------------

#

 

Pool {

  Name = SunPool

  Pool Type = Backup

  Recycle = Yes

  AutoPrune = Yes

  Volume Retention = 90d                        # This is (13*7)-1

  Volume Use Duration = 1d

  Label Format = "Sun-"

}

 

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

 

 

#

# -- Finally, this is the global job to back up the Catalog and add it to the save file.  Since

#    this taks is really a global task, I am adding it at the top of the coknfiguration file.

#    ------------------------------------------------------------------------------------------

#

 

 

Job {

  Name = "BackupCatalog"

  JobDefs = "DefaultJob"

  Level = Full

  Client = Bacula-Server

  FileSet="Catalog"

  Schedule = "FullCatalog"

  Storage = Backup-File

  RunBeforeJob = "/usr/libexec/bacula/make_catalog_backup.pl MyCatalog"

  RunAfterJob  = "/usr/libexec/bacula/delete_catalog_backup"

  Write Bootstrap = "/var/spool/bacula/%n.bsr"

  Priority = 11                                 # run after main backup

}

 

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

 

#

# -- This is the backup of the catalog

#    ---------------------------------

#

 

FileSet {

  Name = "Catalog"

  Include {

    Options {

      signature = MD5

    }

    File = "/var/spool/bacula/bacula.sql"

  }

}

 

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

 

 

#

#  -- Finally, a 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-Server

  FileSet="Bacula-Server-Files"

  Storage = Backup-File

  Pool = Perm

  Messages = Standard

  Where = /tmp/bacula-restores

}

 

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

 

 

#

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

#

#    This is an unused feature at this point, but I wanted to pull the configuration to the

#    "global" section.

#    --------------------------------------------------------------------------------------

#

 

Console {

  Name = bacula-mon

  Password = "Password"

  CommandACL = status, .status

}

 

 

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

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

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

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

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

 

 

 

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

#

# This next section contains all the client-specific jobs and backups specifications.

#

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

 

 

#

# -- This job is to backup this server.  For now, the only things that are needed are the items

#    in the /etc/bacula folder.  The Catalog is added at the end.  Some additional items will

#    have to be added to pick up the security changes.

#    ------------------------------------------------------------------------------------------

#

 

Client {

  Name = Bacula-Server

  Address = 10.0.0.111

  FDPort = 9102

  Catalog = MyCatalog

  Password = "Password"          # password for FileDaemon

}

 

# -----------------------------------------------------------------------------------------------

 

Job {

  Name = "Backup Bacula Server"

  JobDefs = "DefaultJob"

  Client = Bacula-Server

  FileSet = Bacula-Server-Files

  Schedule = "Full"

}

 

# -----------------------------------------------------------------------------------------------

 

FileSet {

  Name = "Bacula-Server-Files"

  Include {

    Options {

      signature = MD5

      compression = gzip

    }

    File = /etc/bacula

    File = /usr/share/webacula

  }

 

  Exclude {

    File = /

  }

}

 

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

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

 

 

#

# -- This is the backup specification for the Zentyal server.  Of particular interest is the

#    /media/shares folder.  The rest will be added as it is identified.

#    ------------------------------------------------------------------------------------------

#

 

Client {

  Name = Zentyal-Server

  Address = 10.0.0.250

  FDPort = 9102

  Catalog = MyCatalog

  Password = "Password"          # password for FileDaemon

}

 

# -----------------------------------------------------------------------------------------------

 

Job {

  Name = "Backup Zentyal Server"

  JobDefs = "DefaultJob"

  Client = Zentyal-Server

  FileSet = Zentyal-Server-Files

  Storage = Zentyal-File

  Schedule = "Full-Zentyal"

}

 

 

# -----------------------------------------------------------------------------------------------

 

FileSet {

  Name = "Zentyal-Server-Files"

  Include {

    Options {

      signature = MD5

      compression = gzip

    }

    File = /media/shares

  }

 

  Exclude {

    File = /

  }

}

 

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

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

 

 

#

# -- This is the backup specification for the Recipe server.

#    ------------------------------------------------------------------------------------------

#

 

Client {

  Name = Recipe-Server

  Address = 10.0.0.12

  FDPort = 9102

  Catalog = MyCatalog

  Password = "Password"          # password for FileDaemon

}

 

# -----------------------------------------------------------------------------------------------

 

Job {

  Name = "Backup Recipe Server"

  JobDefs = "DefaultJob"

  Client = Recipe-Server

  FileSet = Recipe-Server-Files

  Client Run Before Job = /usr/libexec/bacula/before.sh

  Client Run After Job = /usr/libexec/bacula/after.sh

  Schedule = "Full"

}

 

# -----------------------------------------------------------------------------------------------

 

FileSet {

  Name = "Recipe-Server-Files"

  Include {

    Options {

      signature = MD5

      compression = gzip

    }

    File = /var/www/html

    File = /tmp/recipedb.sql

  }

 

  Exclude {

    File = /

  }

}

 

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

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

 

 

#

# -- This is the backup specification for the Redmine server.

#    ------------------------------------------------------------------------------------------

#

 

Client {

  Name = Redmine-Server

  Address = 10.0.0.73

  FDPort = 9102

  Catalog = MyCatalog

  Password = "Password"          # password for FileDaemon

}

 

# -----------------------------------------------------------------------------------------------

 

Job {

  Name = "Backup Redmine Server"

  JobDefs = "DefaultJob"

  Client = Redmine-Server

  FileSet = Redmine-Server-Files

  Client Run Before Job = /usr/libexec/bacula/before.sh

  Client Run After Job = /usr/libexec/bacula/after.sh

  Schedule = "Full"

}

 

# -----------------------------------------------------------------------------------------------

 

FileSet {

  Name = "Redmine-Server-Files"

  Include {

    Options {

      signature = MD5

      compression = gzip

    }

    File = /etc/httpd

    File = /usr/share/redmine

    File = /tmp/redmine.sql

  }

 

  Exclude {

    File = /

  }

}

 

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

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

 

 

#

# -- This is the backup specification for the OS-Development Workstation

#    -------------------------------------------------------------------

#

 

Client {

  Name = OS-Development

  Address = 10.0.0.64

  FDPort = 9102

  Catalog = MyCatalog

  Password = "Password"          # password for FileDaemon

}

 

# -----------------------------------------------------------------------------------------------

 

Job {

  Name = "Backup OS Development Workstation"

  JobDefs = "DefaultJob"

  Client = OS-Development

  FileSet = OS-Development-Files

  Schedule = "Full"

}

 

# -----------------------------------------------------------------------------------------------

 

FileSet {

  Name = "OS-Development-Files"

  Include {

    Options {

      signature = MD5

      compression = gzip

    }

    File = /etc/bacula

#    File = /usr/share/cross

    File = /root

    File = /home

  }

 

  Exclude {

    File = /

    File = /home/adam/.*

    File = /home/adam/Downloads

    File = *.iso

    File = */.git

    File = *.o

    File = /home/adam/src/bochs*

  }

}

 

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

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

 

 

 

 

 

 

Thank you!

 

Adam Clark

 

From: Adam Clark [mailto:adam AT eryjus DOT com]
Sent: Thursday, August 20, 2015 12:40 PM
To: Ana Emília M. Arruda
Cc: bacula-users AT lists.sourceforge DOT net
Subject: Re: [Bacula-users] Catalog writing to wrong storage device

 

Ana,

 

Thank you for your reply.

 

The job defaults resource had the Schedule specified in it.  The Schedule resource did not have a specified Storage resource in it.  I have added the Storage resource to the Schedule resource and created a separate Schedule resource for the server to go to a separate location.  I have then cleaned up the Job Defaults, and added the proper Schedule to each Job resource (explicitly).  I will let you know how these changes work tomorrow.

 

 

Thank you!

 

Adam Clark

 

From: Ana Emília M. Arruda [mailto:emiliaarruda AT gmail DOT com]
Sent: Thursday, August 20, 2015 4:19 AM
To: Adam Clark
Cc: bacula-users AT lists.sourceforge DOT net
Subject: Re: [Bacula-users] Catalog writing to wrong storage device

 

Hello Adam,

 

Do you have any storage resource defined in the pool or schedule resources defined for this job? The pool is not defined in your BackupCatalog job, therefore I suppose it is spedified in the schedule resource for this job?

 

Best regards,

Ana

 

On Thu, Aug 20, 2015 at 12:18 AM, Adam Clark <adam AT eryjus DOT com> wrote:

Hello all,

 

I have been using Bacula to back up several servers for about 2 months now.  I now would like to take the next step to FTP my backups off-site.  However, I back up about 10GB each night and that is a bit too much data to move every night.  My backups are to the file system.

 

To get around this, I have created a second storage device that puts a backup in a subfolder that I will not FTP.  The remaining backups are left to the original storage device.  By the way, I have pools Sun to Sat set up, plus a Perm pool.  These all work fine.  

 

So far, everything is working as I would expect…  except, the catalog backup is not going to the device (and therefore the volume mounted on that device) that I specify.  Let me try to elaborate:

 

Server A backup kicks off at 22:00 and writes to storage Z

Server B backup kicks off at 22:00 and writes to storage Z

Server C backup kicks off at 22:00 and writes to storage Z

Server D backup kicks off at 22:00 and writes to storage Y

Catalog backup kicks off at 23:55 and is supposed to write to storage Z, but attempts to write to storage Y.

 

Now, since the volume it is expecting does not reside in storage Z, it invalidates the volume to which it wanted to write (sets it to Error), and ultimately finds the correct volume on the correct storage.  However, it leaves me with a volume in error each night.

 

I’m afraid that my only solution is to create a second pool set (Sun-Sat + Perm for this 1 server) in order to get the catalog to write to the correct storage device.  That is bit of complexity I did not want to take on if I could help it.

 

Here is the catalog backup job in my bacula-dir.conf:

 

Job {

Name = "BackupCatalog"

JobDefs = "DefaultJob"

Level = Full

Client = Bacula-Server

FileSet="Catalog"

Schedule = "FullCatalog"

Storage = Backup-File

RunBeforeJob = "/usr/libexec/bacula/make_catalog_backup.pl MyCatalog"

RunAfterJob  = "/usr/libexec/bacula/delete_catalog_backup"

Write Bootstrap = "/var/spool/bacula/%n.bsr"

Priority = 11                                 # run after main backup

}

 

Notice I am explicit about the storage to which to write the catalog.

 

Is there anything I might be missing before I set up another set of pools? 

 

Thanks in advance for your help!

 

 

 

Thank you!

 

Adam Clark


------------------------------------------------------------------------------

_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

 

------------------------------------------------------------------------------
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users