Bacula-users

[Bacula-users] Autochanger problem

2009-04-28 12:01:06
Subject: [Bacula-users] Autochanger problem
From: Davka87 <bacula-forum AT backupcentral DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Tue, 28 Apr 2009 09:04:31 -0400
Hi guys,

i have many problem with bacula. I'm trying now a long time to get this changer 
to work, but it will not!

Wenn I use the Btape tool, then he told me that the changertest was succesful, 
but when I start to backup some clients and the first tape get full he dont 
take the next.

I think I'm the main problem, because I am a beginner and I have some big 
problems to understand this system.

I hope there is someone who can help me to get this changer to work.

Here are my Configs:



lsscsi -g

&#91;0&#58;0&#58;0&#58;0&#93;&nbsp; &nbsp; disk&nbsp; &nbsp; ServeRA&nbsp; 
Array1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;V1.0&nbsp; /dev/sda&nbsp; 
/dev/sg0
&#91;1&#58;0&#58;0&#58;0&#93;&nbsp; &nbsp; tape&nbsp; &nbsp; IBM&nbsp; &nbsp; 
&nbsp; ULT3580-TD3&nbsp; &nbsp; &nbsp; 73P5&nbsp; /dev/st0&nbsp; /dev/sg1
&#91;1&#58;0&#58;0&#58;1&#93;&nbsp; &nbsp; mediumx IBM&nbsp; &nbsp; &nbsp; 
3573-TL&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 3.75&nbsp; /dev/sch0&nbsp; /dev/sg2
&#91;4&#58;0&#58;0&#58;0&#93;&nbsp; &nbsp; cd/dvd&nbsp; HL-DT-ST RW/DVD 
GCC-T10N&nbsp; 1.00&nbsp; /dev/scd0&nbsp; /dev/sg3



#
# Konfiguration des Bacula Directors
#
Director &#123;
&nbsp; Name = backup-dir
&nbsp; DIRport = 9101
&nbsp; QueryFile = "/etc/bacula/scripts/query.sql"
&nbsp; WorkingDirectory = "/var/lib/bacula"
&nbsp; PidDirectory = "/var/run/bacula"
&nbsp; Maximum Concurrent Jobs = 1
&nbsp; Password = ""
&nbsp; Messages = Daemon
&nbsp; DirAddress = 192.168.100.253
&#125;








#
# Definition der Job Defaults
#
JobDefs &#123;
&nbsp; Name = "DefaultJob"
&nbsp; Type = Backup
&nbsp; Level = Full
&nbsp; Client = backup-fd 
&nbsp; FileSet = "Full Set"
&nbsp; Schedule = "WeeklyCycle"
&nbsp; Storage = lokal
&nbsp; Messages = Standard
&nbsp; Pool = Default
&nbsp; Priority = 10
&#125;


# Job Definition für die StudIP Datenbank
JobDefs &#123;
&nbsp; &nbsp;Name = "DB"
&nbsp; &nbsp;Type = Backup
&nbsp; &nbsp;Level = Full
&nbsp; &nbsp;Client = studip_db-fd
&nbsp; &nbsp;FileSet = "StudIPDB"
&nbsp; &nbsp;Schedule = "WeeklyCycle"
&nbsp; &nbsp;Storage = lokal
&nbsp; &nbsp;Messages = Standard
&nbsp; &nbsp;Pool = Default
&nbsp; &nbsp;Priority = 11
&#125;



#
# Definition der einzelnen Jobs
#

#
# Sicherung eines Baculatestservers
#
Job &#123;
&nbsp; Name = "test"
&nbsp; Client = test-fd
&nbsp; JobDefs = "DefaultJob"
&nbsp; Storage = lokal
&nbsp; Write Bootstrap = "/var/lib/bacula/test.bsr"
&#125;


# Sicherung der Datebbankbackups
Job &#123;
&nbsp; &nbsp;Name = StudIP_DB
&nbsp; &nbsp;Client = studip_db-fd
&nbsp; &nbsp;JobDefs = "DB"
&nbsp; &nbsp;Storage = lokal
&nbsp; &nbsp;Write Bootstrap = "/var/lib/bacula/studip_db.bsr"
&#125;


# Sicherung der Bacula Datenbank
Job &#123;
&nbsp; Name = "BackupCatalog"
&nbsp; JobDefs = "DefaultJob"
&nbsp; Level = Full
&nbsp; FileSet="Catalog"
&nbsp; Schedule = "WeeklyCycleAfterBackup"
&nbsp; # This creates an ASCII copy of the catalog
&nbsp; # WARNING!!! Passing the password via the command line is insecure.
&nbsp; # see comments in make_catalog_backup for details.
&nbsp; # Arguments to make_catalog_backup are&#58;
&nbsp; #&nbsp; make_catalog_backup <database-name> <user-name> <password> <host>
&nbsp; RunBeforeJob = "/etc/bacula/scripts/make_catalog_backup bacula bacula 
gerand"
&nbsp; # This deletes the copy of the catalog
&nbsp; RunAfterJob&nbsp; = "/etc/bacula/scripts/delete_catalog_backup"
&nbsp; Write Bootstrap = "/var/lib/bacula/BackupCatalog.bsr"
&nbsp; Priority = 11
&#125;

# Wiederherstellung
Job &#123;
&nbsp; Name = "RestoreFiles"
&nbsp; Type = Restore
&nbsp; Client=backup-fd&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp;
&nbsp; FileSet="Full Set"&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; 
&nbsp; Storage = lokal&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; 
&nbsp; Pool = Default
&nbsp; Messages = Standard
&nbsp; Where = /tmp/bacula-restores
&#125;









#
# Definition der Sicherungsart &#40;Was soll gesichert werden&#41;
#
FileSet &#123;
&nbsp; Name = "Full Set"
&nbsp; Include &#123;
&nbsp; &nbsp; Options &#123;
&nbsp; &nbsp; &nbsp; signature = MD5
&nbsp; &nbsp;onefs = no
&nbsp; &nbsp; &#125;
&nbsp; &nbsp;
&nbsp; &nbsp; File =&nbsp; /
&nbsp; &#125;

&nbsp; # Welche Dateien, Verzeichnisse, ... sollen dabei nicht beachtet werden?
&nbsp; Exclude &#123;
&nbsp; &nbsp; File = /proc
&nbsp; &nbsp; File = /tmp
&nbsp; &nbsp; File = /.journal
&nbsp; &nbsp; File = /.fsck
&nbsp; &nbsp; File = /sys
&nbsp; &nbsp; File = /dev
&nbsp; &#125;
&#125;


FileSet &#123;
&nbsp; &nbsp;Name = "StudIPDB"
&nbsp; &nbsp;Include &#123;
&nbsp; &nbsp;&nbsp; &nbsp;Options &#123;
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;signature = MD5
&nbsp; &nbsp;&nbsp; &nbsp;onefs = no
&nbsp; &nbsp;&nbsp; &nbsp;&#125;
&nbsp; &nbsp;File = /
&nbsp; &nbsp;&#125;
&nbsp; &nbsp;
&nbsp; &nbsp;Exclude &#123;
&nbsp; &nbsp; File = /proc
&nbsp; &nbsp; File = /tmp
&nbsp; &nbsp; File = /.journal
&nbsp; &nbsp; File = /.fsck
&nbsp; &nbsp; File = /sys
&nbsp; &nbsp; File = /dev
&nbsp; &#125;
&#125;
&nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; &nbsp;
# This is the backup of the catalog
FileSet &#123;
&nbsp; Name = "Catalog"
&nbsp; Include &#123;
&nbsp; &nbsp; Options &#123;
&nbsp; &nbsp; &nbsp; signature = MD5
&nbsp; &nbsp; &#125;
&nbsp; &nbsp; File = /var/lib/bacula/bacula.sql
&nbsp; &#125;
&#125;







#
# Zeitliche Steuerung der Sicherung
#
Schedule &#123;
&nbsp; Name = "WeeklyCycle"
&nbsp; Run = Full mon-sat at 23&#58;05
&nbsp; Run = Differential 2nd-5th sun at 23&#58;05
&nbsp; Run = Incremental sun at 23&#58;05
&#125;

# This schedule does the catalog. It starts after the WeeklyCycle
Schedule &#123;
&nbsp; Name = "WeeklyCycleAfterBackup"
&nbsp; Run = Full sun-sat at 23&#58;10
&#125;





#
# Die Clients, die gesichert werden sollen

# Backupserver
Client &#123;
&nbsp; Name = backup-fd
&nbsp; Address = 192.168.100.253
&nbsp; FDPort = 9102
&nbsp; Catalog = MyCatalog
&nbsp; Password = ""
&nbsp; File Retention = 30 days&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # 30 
days
&nbsp; Job Retention = 6 months&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # six 
months
&nbsp; AutoPrune = yes&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp;# Prune expired Jobs/Files
&#125;


&nbsp; &nbsp;

#
# Definition des Speichermediums/-ort
# Es handelt sich hierbei um die Tapelibarie
#
Storage &#123;
&nbsp; Name = "lokal"&nbsp; 
&nbsp; Address = 192.168.100.253
&nbsp; SDPort = 9103
&nbsp; Password = ""
&nbsp; Device = "Autochanger"
&nbsp; Media Type = Tape 
&#125;


Storage &#123;
&nbsp; Name = File
&nbsp; Address = 192.168.100.253
&nbsp; SDPort = 9103
&nbsp; Password = ""
&nbsp; Device = FileStorage
&nbsp; Media Type = File
&#125;

# Generic catalog service
Catalog &#123;
&nbsp; Name = MyCatalog
&nbsp; dbname = bacula; DB Address = ""; user = bacula; password = ""
&#125;

# Reasonable message delivery -- send most everything to email address
#&nbsp; and to the console
Messages &#123;
&nbsp; Name = Standard
#
# NOTE! If you send to two email or more email addresses, you will need
#&nbsp; to replace the %r in the from field &#40;-f part&#41; with a single 
valid
#&nbsp; email address in both the mailcommand and the operatorcommand.
#&nbsp; What this does is, it sets the email address that emails would display
#&nbsp; in the FROM field, which is by default the same email as they're being
#&nbsp; sent to.&nbsp; However, if you send email to more than one address, then
#&nbsp; you'll have to set the FROM address manually, to a single address. 
#&nbsp; for example, a 'no-reply AT mydomain DOT com', is better since that 
tends to
#&nbsp; tell &#40;most&#41; people that its coming from an automated source.


#
# WARNING! the following will create a file that you must cycle from
#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; time to time as it will grow indefinitely. 
However, it will
#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; also keep all your messages if they scroll 
off the console.
#
&nbsp; append = "/var/lib/bacula/log" = all, !skipped
&#125;






&nbsp; &nbsp; 
# 
# Pool Definition
#
Pool &#123;
&nbsp; Name = Default
&nbsp; Pool Type = Backup
&nbsp; Recycle = yes&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp;# Bacula can automatically recycle Volumes
&nbsp; AutoPrune = yes&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp;# Prune expired volumes
&nbsp; Volume Retention = 365 days&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# one year
#&nbsp; Accept Any Volume = yes
&nbsp; Label Format = "file-"
&nbsp; Maximum Volume Bytes = 400G
&nbsp; Maximum Volumes = 4
&#125;

# Scratch pool definition
Pool &#123;
&nbsp; Name = Scratch
&nbsp; Pool Type = Backup
&#125;

#
# Restricted console used by tray-monitor to get the status of the director
#
Console &#123;
&nbsp; Name = backup-lib-mon
&nbsp; Password = ""
&nbsp; CommandACL = status, .status
&#125;




#
# Default Bacula Storage Daemon Configuration file
#
#&nbsp; For Bacula release 2.4.4 &#40;28 December 2008&#41; -- debian 5.0
#
# You may need to change the name of your tape drive
#&nbsp; &nbsp;on the "Archive Device" directive in the Device
#&nbsp; &nbsp;resource.&nbsp; If you change the Name and/or the 
#&nbsp; &nbsp;"Media Type" in the Device resource, please ensure
#&nbsp; &nbsp;that dird.conf has corresponding changes.
#

#
# Definition of myself
#
Storage &#123; 
&nbsp; Name = backup-sd
&nbsp; SDPort = 9103&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; # Director's port&nbsp; &nbsp; &nbsp; 
&nbsp; WorkingDirectory = "/var/lib/bacula"
&nbsp; Pid Directory = "/var/run/bacula"
&nbsp; Maximum Concurrent Jobs = 20
&nbsp; SDAddress = 192.168.100.253
&#125;

#
# List Directors who are permitted to contact Storage daemon
#
Director &#123;
&nbsp; Name = backup-dir
&nbsp; Password = ""
&#125;


#
# Devices supported by this Storage daemon
# To connect, the Director's bacula-dir.conf must have the
#&nbsp; same Name and MediaType. 
#

Device &#123;
&nbsp; Name = FileStorage
&nbsp; Media Type = File
&nbsp; Archive Device = /tmp
&nbsp; LabelMedia = yes;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp;# lets Bacula label unlabeled media
&nbsp; Random Access = Yes;
&nbsp; AutomaticMount = yes;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp;# when device opened, read it
&nbsp; RemovableMedia = no;
&nbsp; AlwaysOpen = no;
&#125;

#
# An autochanger device with two drives
#
Autochanger &#123;
&nbsp; Name = Autochanger
&nbsp; Device = Drive-1
&nbsp; Changer Command = "/etc/bacula/scripts/mtx-changer %c %o %S %a %d"
&nbsp; Changer Device = /dev/sg2
&#125;

Device &#123;
&nbsp; Name = Drive-1 
&nbsp; Drive Index = 0 
&nbsp; Media Type = LT03 
&nbsp; Archive Device = /dev/st0
&nbsp; AutomaticMount = yes;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp;# when device opened, read it
&nbsp; AlwaysOpen = yes;
&nbsp; RemovableMedia = yes;
&nbsp; RandomAccess = no;
&nbsp; AutoChanger = yes
&nbsp; LabelMedia = yes
&nbsp; #
&nbsp; # Enable the Alert command only if you have the mtx package loaded
&nbsp; # Note, apparently on some systems, tapeinfo resets the SCSI controller
&nbsp; #&nbsp; thus if you turn this on, make sure it does not reset your SCSI 
&nbsp; #&nbsp; controller.&nbsp; I have never had any problems, and smartctl 
does
&nbsp; #&nbsp; not seem to cause such problems.
&nbsp; #
&nbsp; Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
#&nbsp; If you have smartctl, enable this, it has more info than tapeinfo 
#&nbsp; Alert Command = "sh -c 'smartctl -H -l error %c'"&nbsp; 
&#125;



# 
# Send all messages to the Director, 
# mount messages also are sent to the email address
#
Messages &#123;
&nbsp; Name = Standard
&nbsp; director = backup-dir = all
&#125;


+----------------------------------------------------------------------
|This was sent by ds.siegfried AT googlemail DOT com via Backup Central.
|Forward SPAM to abuse AT backupcentral DOT com.
+----------------------------------------------------------------------



------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
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>