Bacula-users

[Bacula-users] Problems with automatic labeling

2010-03-02 05:48:31
Subject: [Bacula-users] Problems with automatic labeling
From: gnowar <g.nowar AT gmail DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Tue, 2 Mar 2010 02:45:58 -0800 (PST)
Hello,

I've some problems with automatic labeling. Here is my conf :

Bacula v5.0.0

bacula-dir.conf

Job {
  Name = "BackupCvsOnTape"
  Client = cvs-fd
  Pool = TapePool
  FileSet = "cvsFileSet"
  Schedule = "SchedTape"
  RunBeforeJob  = "/opt/bacula/sysconf/mount_tape"
  JobDefs = "DefaultJob"
  Storage = Tape
}

Here is my BeforeJob script :

#!/bin/sh
mt -f /dev/st0 rewind
mt -f /dev/st0 weof
/opt/bacula/sbin/bconsole -c /opt/bacula/sysconf/bconsole.conf <<END_OF_DATA
unmount storage=Tape
END_OF_DATA
/opt/bacula/sbin/bconsole -c /opt/bacula/sysconf/bconsole.conf <<END_OF_DATA
mount storage=Tape
END_OF_DATA

Pool {
  Name = TapePool
  Pool Type = Backup
  Recycle = yes                       # Bacula can automatically recycle
Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 365 days         # one year
  Maximum Volume Jobs = 2
  Maximum Volumes = 1                 # Limit number of Volumes in Pool
  Label Format =
"${Pool}_${Storage}_${Year}-${Month:p/2/0/r}-${Day:p/2/0/r}_${Hour:p/2/0/r}h${Minute:p/2/0/r}m"
}

Schedule {
  Name = "SchedTape"
  Run = Full mon-sun at 23:05
}


bacula-sd.conf

Device {
  Name = LTO-2
  Drive Index = 0
  Device Type = Tape
  Media Type = Ultrium2
  Archive Device = /dev/st0
  AutomaticMount = yes;
  AlwaysOpen = yes;
  RemovableMedia = yes;
  RandomAccess = no;
  AutoChanger = no;
  LabelMedia = yes;
  Spool Directory = /tmp/spool
  Maximum Spool Size = 700000000
  Random Access = no;
}


Well, when i run the BackupCvsOnTape job, I have the following error : 

BeforeJob: mount storage=Tape
 BeforeJob: Automatically selected Catalog: MyCatalog
 BeforeJob: Enter a period to cancel a command.
 BeforeJob: 1000 OK: lan-backup01-dir Version: 5.0.0 (26 January 2010)
 BeforeJob: Connecting to Director lan-backup01:9101
 BeforeJob: You have messages.
 BeforeJob: 3002 Device "LTO-2" (/dev/st0) unmounted.
 BeforeJob: Using Catalog "MyCatalog"
 BeforeJob: Automatically selected Catalog: MyCatalog
 BeforeJob: unmount storage=Tape
 BeforeJob: Enter a period to cancel a command.
 shell command: run BeforeJob "/opt/bacula/sysconf/mount_tape"
 BeforeJob: /dev/st0: Device or resource busy
 BeforeJob: /dev/st0: Device or resource busy
 BeforeJob: Connecting to Director lan-backup01:9101
 BeforeJob: 1000 OK: lan-backup01-dir Version: 5.0.0 (26 January 2010)
lan-backup01-dir BeforeJob: 3001 Mounted Volume: File_2010-02-22_17h47m
 BeforeJob: 3001 Device "LTO-2" (/dev/st0) is mounted with Volume
"File_2010-02-22_17h47m"
 BeforeJob: You have messages.
 Start Backup JobId 72, Job=BackupCvsOnTape.2010-03-02_11.09.54_04
 Created new Volume "TapePool_Tape_2010-03-02_11h10m" in catalog.
 Using Device "LTO-2"
lan-backup01-sd Warning: Director wanted Volume
"TapePool_Tape_2010-03-02_11h10m".
    Current Volume "File_2010-02-22_17h47m" not acceptable because:
    1997 Volume "File_2010-02-22_17h47m" not in catalog.
 Please mount Volume "TapePool_Tape_2010-03-02_11h10m" or label a new one
for:
    Job:          BackupCvsOnTape.2010-03-02_11.09.54_04
    Storage:      "LTO-2" (/dev/st0)
    Pool:         TapePool
    Media type:   Ultrium2

Assuming that I've already started a backup on this tape (with volume name =
File_2010-02-22_17h47m), even whet I purge Tape Volume on the catalog,
relabeling doesn't seems to work fine (TapePool is set to Recyle = yes).

Do you have any idea ?

Thanks !
-- 
View this message in context: 
http://old.nabble.com/Problems-with-automatic-labeling-tp27754420p27754420.html
Sent from the Bacula - Users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users