-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thanks for the product.  I seem to have cajoled it into doing what I
want it to.

After much futzing around with bacula on a couple of gentoo boxes I seem
to have stumbled upon a fix to a problem that I was having trying to
implement a simple1 tape per pool (pools for each day of the work week
M-F) starting with the example in the online manual located here:

bacula.org/rel-manual/Backup_Strategies.html#SECTION000263000000000000000

Let me say that The way I am doing this is most probably INCORRECT - but
it does work for me, and I have seen others with this type of problem.
If my description starts a flurry of messages about how ignorant I am
about bacula then so be it.  I am pretty sure I can take it without
having to commit hari-kari (?) or any other such drastic action...

My backup scenario is to use 5 tapes (1 each for Monday thru Friday)
full backup each night - then reuse the same tape the next week.
Separate pools - much like the earlier mentioned example in the online
manual. When  the backup completes the tape is ejected and the users put
in the next daily tape and take the previous one off site.

In short, the problem was that something was wacky and the job would try
to start and would complain about there not being any volumes available.
 I would log into the box, start bconsole and issue a mount command and
the backup would start.  I tried doing this via a Run Before job with
no success - the director would squawk about there being no volumes
available.  Then one day I was scratching my head and logged in the box
during the day and issued a stat <enter> then 4 <enter> there was a
small but visible delay in the output... and lo and behold the volume
status  was set to Recycle and the job ran that evening without
intervention... I must have something messed up with my volume
definitions or something.  After executing the stat 4, I would receive a
daemon message about the volume being recycled.

Before I forget, it seems to me that entering stat 4 <enter> in bconsole
does not produce the same output as entering stat <enter> 4 <enter>.
Not sure what is going on there.

Here is my Default Pool stanza and my Pool definition for Monday -
Tuesday-Friday Pools have the same definitions.

# Default pool definition
Pool {
  Name = Default
  Pool Type = Backup
  Recycle = yes                  # Bacula can automatically recycle Volumes
  AutoPrune = yes                # Prune expired volumes
  Volume Retention = 6 days      #
  Accept Any Volume = yes        # write on any volume in the pool
}

Pool {
  Name = MondayPool
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Volume Retention = 6d
  Accept Any Volume = yes
  Maximum Volume Jobs = 2
  Volume Use Duration = 19 hours
}

My solution to my problem was to use the following in a Run Before
directive:

/etc/bacula/bconsole << END_OF_DATA
stat
4
mount storage=DDS-3
quit
END_OF_DATA

It produces a whack of output - here is a modded output from the job:

20-Oct 21:00 futz-dir: RunBefore: Connecting to Director futz:9101
20-Oct 21:00 futz-dir: RunBefore: 1000 OK: futz-dir Version: 1.36.3 (22
April 2005)
20-Oct 21:00 futz-dir: RunBefore: Enter a period to cancel a command.
20-Oct 21:00 futz-dir: RunBefore: stat
20-Oct 21:00 futz-dir: RunBefore: Using default Catalog name=MyCatalog
DB=bacula
20-Oct 21:00 futz-dir: RunBefore: Status available for:
20-Oct 21:00 futz-dir: RunBefore:      1: Director
20-Oct 21:00 futz-dir: RunBefore:      2: Storage
20-Oct 21:00 futz-dir: RunBefore:      3: Client
20-Oct 21:00 futz-dir: RunBefore:      4: All
20-Oct 21:00 futz-dir: RunBefore: Select daemon type for status (1-4): 4
20-Oct 21:00 futz-dir: RunBefore: futz-dir Version: 1.36.3 (22 April 2005)
i686-pc-linux-gnu gentoo 1.6.13
20-Oct 21:00 futz-dir: RunBefore: Daemon started 13-Oct-05 15:05, 15
Jobs run
since started.
20-Oct 21:00 futz-dir: RunBefore:
20-Oct 21:00 futz-dir: RunBefore: Scheduled Jobs:
20-Oct 21:00 futz-dir: RunBefore: Level          Type     Pri  Scheduled

  Name               Volume
20-Oct 21:00 futz-dir: RunBefore:
===================================================================================
20-Oct 21:00 futz-dir: RunBefore: Full           Backup    11  20-Oct-05
21:15
  BackupCatalog      *unknown*
20-Oct 21:00 futz-dir: RunBefore: Full           Backup    10  21-Oct-05
21:00
  NightlySave        *unknown*
20-Oct 21:00 futz-dir: RunBefore: ====
20-Oct 21:00 futz-dir: RunBefore:
20-Oct 21:00 futz-dir: RunBefore: Running Jobs:
20-Oct 21:00 futz-dir: RunBefore:  JobId Level   Name
    Status
20-Oct 21:00 futz-dir: RunBefore:
======================================================================
20-Oct 21:00 futz-dir: RunBefore:     47 Full
NightlySave.2005-10-20_21.00.00
is running
20-Oct 21:00 futz-dir: RunBefore: ====
20-Oct 21:00 futz-dir: RunBefore:
20-Oct 21:00 futz-dir: RunBefore: Terminated Jobs:
20-Oct 21:00 futz-dir: RunBefore:  JobId  Level     Files      Bytes
 Status
  Finished        Name
20-Oct 21:00 futz-dir: RunBefore:
========================================================================
20-Oct 21:00 futz-dir: RunBefore:     37  Full     13,889  2,750,413,962
OK
  13-Oct-05 21:46 NightlySave
20-Oct 21:00 futz-dir: RunBefore:     38  Full          1      6,736,130
OK
  13-Oct-05 21:48 BackupCatalog
20-Oct 21:00 futz-dir: RunBefore:     39  Full     13,893  2,762,999,308
OK
  14-Oct-05 21:45 NightlySave
20-Oct 21:00 futz-dir: RunBefore:     40  Full          1      6,740,817
OK
  14-Oct-05 21:47 BackupCatalog
20-Oct 21:00 futz-dir: RunBefore:     41  Full     13,895  2,762,959,178
OK
  17-Oct-05 21:47 NightlySave
20-Oct 21:00 futz-dir: RunBefore:     42  Full          1      8,297,406
OK
  17-Oct-05 21:48 BackupCatalog
20-Oct 21:00 futz-dir: RunBefore:     43  Full     13,912  2,765,093,801
OK
  18-Oct-05 21:50 NightlySave
20-Oct 21:00 futz-dir: RunBefore:     44  Full          1      8,304,174
OK
  18-Oct-05 21:51 BackupCatalog
20-Oct 21:00 futz-dir: RunBefore:     45  Full     13,924  2,766,253,876
OK
  19-Oct-05 21:48 NightlySave
20-Oct 21:00 futz-dir: RunBefore:     46  Full          1      8,311,117
OK
  19-Oct-05 21:50 BackupCatalog
20-Oct 21:00 futz-dir: RunBefore:
20-Oct 21:00 futz-dir: RunBefore: ====
20-Oct 21:00 futz-dir: RunBefore: Connecting to Storage daemon DDS-3 at
futz:9103
20-Oct 21:00 futz-dir: RunBefore:
20-Oct 21:00 futz-dir: RunBefore: futz-sd Version: 1.36.3 (22 April 2005)
i686-pc-linux-gnu gentoo 1.6.13
20-Oct 21:00 futz-dir: RunBefore: Daemon started 13-Oct-05 15:05, 10
Jobs run
since started.
20-Oct 21:00 futz-dir: RunBefore:
20-Oct 21:00 futz-dir: RunBefore: Running Jobs:
20-Oct 21:00 futz-dir: RunBefore: No Jobs running.
20-Oct 21:00 futz-dir: RunBefore: ====
20-Oct 21:00 futz-dir: RunBefore:
20-Oct 21:00 futz-dir: RunBefore: Terminated Jobs:
20-Oct 21:00 futz-dir: RunBefore:  JobId  Level   Files          Bytes
Status
Finished        Name
20-Oct 21:00 futz-dir: RunBefore:
======================================================================
20-Oct 21:00 futz-dir: RunBefore:     37  Full     13,889  2,752,452,701
OK
  13-Oct-05 21:46 NightlySave
20-Oct 21:00 futz-dir: RunBefore:     38  Full          1      6,736,236
OK
  13-Oct-05 21:48 BackupCatalog
20-Oct 21:00 futz-dir: RunBefore:     39  Full     13,893  2,765,038,667
OK
  14-Oct-05 21:45 NightlySave
20-Oct 21:00 futz-dir: RunBefore:     40  Full          1      6,740,923
OK
  14-Oct-05 21:46 BackupCatalog
20-Oct 21:00 futz-dir: RunBefore:     41  Full     13,895  2,764,998,847
OK
  17-Oct-05 21:47 NightlySave
20-Oct 21:00 futz-dir: RunBefore:     42  Full          1      8,297,512
OK
  17-Oct-05 21:48 BackupCatalog
20-Oct 21:00 futz-dir: RunBefore:     43  Full     13,912  2,767,136,090
OK
  18-Oct-05 21:50 NightlySave
20-Oct 21:00 futz-dir: RunBefore:     44  Full          1      8,304,280
OK
  18-Oct-05 21:51 BackupCatalog
20-Oct 21:00 futz-dir: RunBefore:     45  Full     13,924  2,768,297,987
OK
  19-Oct-05 21:48 NightlySave
20-Oct 21:00 futz-dir: RunBefore:     46  Full          1      8,311,223
OK
  19-Oct-05 21:50 BackupCatalog
20-Oct 21:00 futz-dir: RunBefore: ====
20-Oct 21:00 futz-dir: RunBefore:
20-Oct 21:00 futz-dir: RunBefore: Device status:
20-Oct 21:00 futz-dir: RunBefore: Archive "DDS-3" is not open or does
not exist.
20-Oct 21:00 futz-dir: RunBefore: Connecting to Client futz-fd at futz:9102
20-Oct 21:00 futz-dir: RunBefore:
20-Oct 21:00 futz-dir: RunBefore: futz-fd Version: 1.36.3 (22 April 2005)
i686-pc-linux-gnu gentoo 1.6.13
20-Oct 21:00 futz-dir: RunBefore: Daemon started 13-Oct-05 15:05, 10
Jobs run
since started.
20-Oct 21:00 futz-dir: RunBefore:
20-Oct 21:00 futz-dir: RunBefore: Terminated Jobs:
20-Oct 21:00 futz-dir: RunBefore:  JobId  Level     Files         Bytes
 Status
  Finished        Name
20-Oct 21:00 futz-dir: RunBefore:
======================================================================
20-Oct 21:00 futz-dir: RunBefore:     37  Full     13,889  2,750,413,962
OK
  13-Oct-05 21:46 NightlySave
20-Oct 21:00 futz-dir: RunBefore:     38  Full          1      6,736,130
OK
  13-Oct-05 21:48 BackupCatalog
20-Oct 21:00 futz-dir: RunBefore:     39  Full     13,893  2,762,999,308
OK
  14-Oct-05 21:45 NightlySave
20-Oct 21:00 futz-dir: RunBefore:     40  Full          1      6,740,817
OK
  14-Oct-05 21:46 BackupCatalog
20-Oct 21:00 futz-dir: RunBefore:     41  Full     13,895  2,762,959,178
OK
  17-Oct-05 21:47 NightlySave
20-Oct 21:00 futz-dir: RunBefore:     42  Full          1      8,297,406
OK
  17-Oct-05 21:48 BackupCatalog
20-Oct 21:00 futz-dir: RunBefore:     43  Full     13,912  2,765,093,801
OK
  18-Oct-05 21:50 NightlySave
20-Oct 21:00 futz-dir: RunBefore:     44  Full          1      8,304,174
OK
  18-Oct-05 21:51 BackupCatalog
20-Oct 21:00 futz-dir: RunBefore:     45  Full     13,924  2,766,253,876
OK
  19-Oct-05 21:48 NightlySave
20-Oct 21:00 futz-dir: RunBefore:     46  Full          1      8,311,117
OK
  19-Oct-05 21:50 BackupCatalog
20-Oct 21:00 futz-dir: RunBefore: ====
20-Oct 21:00 futz-dir: RunBefore: Running Jobs:
20-Oct 21:00 futz-dir: RunBefore: Director connected at: 20-Oct-05 21:00
20-Oct 21:00 futz-dir: RunBefore: No Jobs running.
20-Oct 21:00 futz-dir: RunBefore: ====
20-Oct 21:00 futz-dir: RunBefore: You have messages.
20-Oct 21:00 futz-dir: RunBefore: mount storage=DDS-3
20-Oct 21:00 futz-dir: RunBefore: 3001 Mounted Volume: Thursday
20-Oct 21:00 futz-dir: RunBefore: 3001 Device /dev/nst0 is already
mounted with
Volume "Thursday"
20-Oct 21:00 futz-dir: RunBefore: quit
20-Oct 21:00 futz-dir: Start Backup JobId 47,
Job=NightlySave.2005-10-20_21.00.00
20-Oct 21:00 futz-dir: Recycled volume "Thursday"
20-Oct 21:00 futz-sd: Recycled volume "Thursday" on device "/dev/nst0", all
previous data lost.
20-Oct 21:45 futz-dir: Bacula 1.36.3 (22Apr05): 20-Oct-2005 21:45:57
  JobId:                  47
  Job:                    NightlySave.2005-10-20_21.00.00
  Backup Level:           Full
  Client:                 futz-fd
  FileSet:                "Full Set" 2005-09-19 21:00:37
  Pool:                   "ThursdayPool"
  Storage:                "DDS-3"
  Start time:             20-Oct-2005 21:00:02
  End time:               20-Oct-2005 21:45:57
  FD Files Written:       13,954
  SD Files Written:       13,954
  FD Bytes Written:       2,780,927,739
  SD Bytes Written:       2,782,976,259
  Rate:                   1009.4 KB/s
  Software Compression:   None
  Volume name(s):         Thursday
  Volume Session Id:      11
  Volume Session Time:    1129237523
  Last Volume Bytes:      2,785,916,352
  Non-fatal FD errors:    0
  SD Errors:              0
  FD termination status:  OK
  SD termination status:  OK
  Termination:            Backup OK

20-Oct 21:45 futz-dir: Begin pruning Jobs.
20-Oct 21:45 futz-dir: No Jobs found to prune.
20-Oct 21:45 futz-dir: Begin pruning Files.
20-Oct 21:45 futz-dir: No Files found to prune.
20-Oct 21:45 futz-dir: End auto prune.

Maybe I have something messed up in my config - but this is the only way
that I could get the Volume status updated to Recycle so that the tape
would be used over again.

I would be happy to continue this thread and provide whatever details
are desired to interested persons.  Though i don't recall the recent
threads, I think some folks were fighting with the same kind of issue
recently.

Dave
- --
Dave Dmytriw
Principal, NetCetera Solutions Inc.
Calgary, AB
403-703-1399
[EMAIL PROTECTED]
http://www.netcetera-solutions.com
"It's about using NetWorks, Etc..."
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD4DBQFDWT0WDcivrcMaKcIRAvfnAJ9ObmvpmsKvAh89bkRPDSQ2uE3EogCVGLc2
MTfxVARv/uzIVtuJR1RhJg==
=eopA
-----END PGP SIGNATURE-----



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to