Bacula-users

[Bacula-users] Problem with my "eject tape" job

2010-11-17 04:32:34
Subject: [Bacula-users] Problem with my "eject tape" job
From: "Thorsten Reichelt" <Thorsten_Reichelt AT gmx DOT de>
To: bacula-users AT lists.sourceforge DOT net
Date: Wed, 17 Nov 2010 10:28:06 +0100
Hi!

On every last sunday of a month I backup my clients to an LTO drive. After all 
of these backup jobs are finished, I want to eject the tape. A solution may be 
to set a RunAfterJob script for the last executed backup job. But then, the 
ejecting depends on this one job. 

So I tried the create a special "Eject-LTO-Tape" job with a higher priority 
then all the other tape jobs and put it in the same pool/schedule with them.

But my eject job blocks bacula forever. The shell script seems not to be the 
problem. It's working fine when I start it manually.

Eventually someone can help me?

Thank you!!

  Thorsten




========================================
Configuration (without all the other jobs/clients/...):
========================================
Pool {
  Name = MonthlyTape
  Use Volume Once = no
  Pool Type = Backup
  AutoPrune = yes
  Recycle Current Volume = yes
  Volume Retention = 365 days
  Recycle = yes
}

Client {
  Name = backupserver-fd
  Address = backupserver
  FDPort = 9102
  Catalog = MyCatalog
  Password = "verySecret"
  File Retention = 30 days
  Job Retention = 6 months
  AutoPrune = yes
}

fileset {
  Name = "FS_NoFiles"
  Include {
    Options {
      signature = MD5
    }
  }
}

Schedule {
  Name = "MonthlyOnTape"
  Run = Level=Full Pool=MonthlyTape 1st sun at 22:00
}

Job {
  Name = "Eject-LTO-Tape"
  Type = Backup
  Client = backupserver-fd
  FileSet = "FS_NoFiles"
  Schedule = "MonthlyOnTape"
  Level = Full
  Storage = Bandlaufwerk
  Pool = MonthlyTape
  Full Backup Pool = MonthlyTape
  Messages = Standard
  Priority = 16
  RunAfterJob  = "/etc/bacula/scripts/eject_tape"
}



========================================
This is my eject script
========================================

#!/bin/sh
# /etc/bacula/scripts/eject_tape

# Unmount tape when mounted
if mt -f /dev/nst0 status 2>&1 | grep "busy" >/dev/null 2>&1; then
  /usr/bin/bconsole -c /etc/bacula/bconsole.conf << END_OF_DATA
  unmount Bandlaufwerk
END_OF_DATA
fi

mt -f /dev/nst0 rewind
mt -f /dev/nst0 eject
exit 0

-- 
GRATIS! Movie-FLAT mit über 300 Videos. 
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
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>