Hello,
On 14.10.2005 15:34, Bart Verwilst wrote:
Greetings!
I'm trying to setup a Bacula to back up a remote server. I'm going to try and
explain my current setup and ultimate goal ;)
What i have now:
* 1 tapedrive, Dell, with LTO-2 tapes, that works perfectly on my server.
* 1 backup server, Ubuntu 5.10
* Bacula 1.36.3
* 8 LTO-2 tapes in the drive
* My config files, which are attached.
* 1 tape is loaded and present ( otherwise i get I/O errors ;) )
... which indicates a problem if it's really an eror and only an
informational message.
What the eventual outcome should be:
* Daily (Full) backup from monday to sunday, each day on a new tape.
* On sunday, the tape should be ejected after the backup for off-site storage,
and a new one will be placed in the device, which should become the new
sunday-tape.
* Picking up the ejected tape, and inserting a new one, should be the only
manual tasks ( if possible )
Please take a moment to look at my included config files now..
Nah, I didn't do that... sorry. But I think I can give you some advice.
Here are some output pieces to show the 'virgin" status of the system.
Bacula etc ]# btape -c /etc/bacula/bacula-sd.conf TapeStorage
Tape block granularity is 1024 bytes.
btape: butil.c:258 Using device: "TapeStorage" for writing.
btape: btape.c:335 open_dev /dev/nst0 OK
*label
Enter Volume Name: Tape1
Wrote Volume label for volume "Tape1".
Don't forget to remove that label again. And, of course, this doesn't
show us a lot about the status of your system.
Have you run the tests suggested in the manual?
Bacula etc ]# bconsole
Connecting to Director Bacula:9101
1000 OK: Bacula-dir Version: 1.36.3 (22 April 2005)
Enter a period to cancel a command.
*list media
Using default Catalog name=MyCatalog DB=bacula
Pool: Default
No results to list.
Pool: MondayPool
No results to list.
Pool: TuesdayPool
No results to list.
Pool: WednesdayPool
No results to list.
Pool: ThursdayPool
No results to list.
Pool: FridayPool
No results to list.
Pool: SaturdayPool
No results to list.
Pool: SundayPool
No results to list.
*list jobs
No results to list.
*status all
Bacula-dir Version: 1.36.3 (22 April 2005) i486-pc-linux-gnu debian
testing/unstable
Daemon started 14-Oct-05 14:34, 0 Jobs run since started.
Scheduled Jobs:
Level Type Pri Scheduled Name Volume
===================================================================================
Full Backup 10 14-Oct-05 22:00 TestFridayBackup *unknown*
====
Running Jobs:
No Jobs running.
====
Device status:
Archive "FileStorage" is not open or does not exist.
Archive "TapeStorage" is not open or does not exist.
Hmm, no clients defined? How did you get a job scheduled?
Now, how do i proceed to automate the tape naming and such? When i created a
volume on bconsole with the add command, then tried to run a backup, it
nagged that the tape had the wrong label,
Re-read the manual. Add doesn't label a tape.
and to insert a tape with another
name.. But it should just automatically overwrite the existing ones.. :$
Again, the fine manual - Bacula doesn't overwrite labeled tapes.
I don't fully get the naming.. Should i manually give all 8 tapes a name, and
then add them through bconsole with the same names? But the naming i want
them to have is dynamic ( Label Format = "Test-$Day$Month$Year" ), so it'll
nag again that i don't have the correct named tape present, and to insert
it... :$
If I understand your setup, you will only need to label tapes in one
pool automatically. The other ones, for the weekdays, will always keep
their names.
Note that in your situation I would not use automatic labeling. Two
reasons: You need to label a tape only when you swap tapes, i.e. you
have to go to the backup host anyway (or log into it). You have to
unmount the tape, remove it, insert a new one, and mount that one. Then
you could also issue the label command manually. Reason number two:
Automatic tape labeling is definitely too complicated to setup (in my
opinion). The LabelFormat alone... and doing tape labeling automatically
will, as far as I know, only work with barcodes, and you will hardly
have barcodes with your desired format...
What I would - perhaps - do to make tape management easier: Create a
script that ejects the used sunday tape and informs bacula of this. Run
this script after the sunday backup.
Create another script that looks for a new tape, and lets bacula label
it. If it can't find a new tape, send a reminder to the operator. If the
new tape for the week has already been labeled, do nothing. Let this
script run as a cronjob monday to friday. Thursday and Friday, send the
reminder to the operators superior, too :-)
Thanks a lot for clearing this out for me :$
I hope this helps.
Arno
Thanks in advance!
Kind regards,
Bart Verwilst
------------------------------------------------------------------------
#
# Bacula Director Configuration file
#
###########
## DIRECTOR ##
###########
Director {
Name =Bacula-dir
DIRport = 9101
QueryFile = "/etc/bacula/scripts/query.sql"
WorkingDirectory = "/var/lib/bacula"
PidDirectory = "/var/run/bacula"
Maximum Concurrent Jobs = 1
Password = "" # Console password
Messages = Daemon
}
########
## JOBS ##
########
JobDefs {
Name = "CommonJob"
Max Start Delay = 22h
Storage = Tape
Messages = Standard
Type = Backup
Level = Full
FileSet = "Test Data Set"
}
Job {
Name = "TestMondayBackup"
Client = test-fd
Schedule = "MondayEvening"
Pool = MondayPool
Write Bootstrap = "/var/lib/bacula/TestMondayBackup.bsr"
JobDefs = CommonJob
}
Job {
Name = "TestTuesdayBackup"
Client = test-fd
Schedule = "TuesdayEvening"
Pool = TuesdayPool
Write Bootstrap = "/var/lib/bacula/TestTuesdayBackup.bsr"
JobDefs = CommonJob
}
Job {
Name = "TestWednesdayBackup"
Client = test-fd
Schedule = "WednesdayEvening"
Pool = WednesdayPool
Write Bootstrap = "/var/lib/bacula/TestWednesdayBackup.bsr"
JobDefs = CommonJob
}
Job {
Name = "TestThursdayBackup"
Client = test-fd
Schedule = "ThursdayEvening"
Pool = ThursdayPool
Write Bootstrap = "/var/lib/bacula/TestThursdayBackup.bsr"
JobDefs = CommonJob
}
Job {
Name = "TestFridayBackup"
Client = test-fd
Schedule = "FridayEvening"
Pool = FridayPool
Write Bootstrap = "/var/lib/bacula/TestFridayBackup.bsr"
JobDefs = CommonJob
}
Job {
Name = "TestSaturdayBackup"
Client = test-fd
Schedule = "SaturdayEvening"
Pool = SaturdayPool
Write Bootstrap = "/var/lib/bacula/TestSaturdayBackup.bsr"
JobDefs = CommonJob
}
Job {
Name = "TestSundayBackup"
Client = test-fd
Schedule = "SundayEvening"
Pool = SundayPool
Write Bootstrap = "/var/lib/bacula/TestSundayBackup.bsr"
JobDefs = CommonJob
}
# Standard Restore template, changed by Console program
Job {
Name = "RestoreFiles"
Type = Restore
Client = test-fd
FileSet = "Test Data Set"
Storage = Tape
Messages = Standard
Pool = Default
Where = /tmp/bacula-restores
}
###########
## FILESETS ##
###########
# List of files to be backed up
FileSet {
Name = "Test Data Set"
Include {
Options { signature = SHA1 compression=GZIP }
File = "c:\\data"
}
}
#############
## SCHEDULES ##
#############
Schedule {
Name = "MondayEvening"
Run = Full Monday at 10:00pm
}
Schedule {
Name = "TuesdayEvening"
Run = Full Tuesday at 10:00pm
}
Schedule {
Name = "WednesdayEvening"
Run = Full Wednesday at 10:00pm
}
Schedule {
Name = "ThursdayEvening"
Run = Full Thursday at 10:00pm
}
Schedule {
Name = "FridayEvening"
Run = Full Friday at 10:00pm
}
Schedule {
Name = "SaturdayEvening"
Run = Full Saturday at 10:00pm
}
Schedule {
Name = "SundayEvening"
Run = Full Sunday at 10:00pm
}
#############
## CLIENTS ##
#############
Client {
Name = Bacula-fd
Address = Bacula
FDPort = 9102
Catalog = MyCatalog
Password = "" # password for FileDaemon
File Retention = 30 days # 30 days
Job Retention = 6 months # six months
AutoPrune = yes # Prune expired Jobs/Files
}
Client {
Name = test-fd
Address = 192.168.15.154
FDPort = 9102
Catalog = MyCatalog
Password = "avenger"
File retention = 30 days
Job Retention = 6 months
AutoPrune = yes
}
#############
## STORAGE ##
#############
# Definiton of file storage device
Storage {
Name = File
Address = 172.16.1.71
SDPort = 9103
Password = ""
Device = FileStorage
Media Type = File
}
Storage {
Name = Tape
Address = 172.16.1.71
SDPort = 9103
Password = ""
Device = TapeStorage
Media Type = LTO-2
}
#############
## CATALOGS ##
#############
Catalog {
Name = MyCatalog
dbname = bacula; DB Address = localhost; user = bacula; password = ""
}
#############
## MESSAGES ##
#############
Messages {
Name = Standard
mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) %r\" -s \"Bacula: %t
%e of %c %l\" %r"
operatorcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) %r\" -s \"Bacula:
Intervention needed for %j\" %r"
mail = [EMAIL PROTECTED] = all, !skipped
operator = [EMAIL PROTECTED] = mount
console = all, !skipped, !saved
append = "/var/lib/bacula/log" = all, !skipped
}
#
# Message delivery for daemon messages (no job).
Messages {
Name = Daemon
mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\) %r\" -s \"Bacula
daemon message\" %r"
mail = [EMAIL PROTECTED] = all, !skipped
console = all, !skipped, !saved
append = "/var/lib/bacula/log" = all, !skipped
}
############
## POOLS ##
############
# Default Pool for jobs, but will hold no actual volumes
Pool {
Name = Default
Pool Type = Backup
}
Pool {
Name = MondayPool
Pool Type = Backup
Recycle = yes
AutoPrune = yes
Volume Retention = 6d
Accept Any Volume = yes
Maximum Volume Jobs = 1
Label Format = "Test-$Day$Month$Year"
}
Pool {
Name = TuesdayPool
Pool Type = Backup
Recycle = yes
AutoPrune = yes
Volume Retention = 6d
Accept Any Volume = yes
Maximum Volume Jobs = 1
Label Format = "Test-$Day$Month$Year"
}
Pool {
Name = WednesdayPool
Pool Type = Backup
Recycle = yes
AutoPrune = yes
Volume Retention = 6d
Accept Any Volume = yes
Maximum Volume Jobs = 1
Label Format = "Test-$Day$Month$Year"
}
Pool {
Name = ThursdayPool
Pool Type = Backup
Recycle = yes
AutoPrune = yes
Volume Retention = 6d
Accept Any Volume = yes
Maximum Volume Jobs = 1
Label Format = "Test-$Day$Month$Year"
}
Pool {
Name = FridayPool
Pool Type = Backup
Recycle = yes
AutoPrune = yes
Volume Retention = 6d
Accept Any Volume = yes
Maximum Volume Jobs = 1
Label Format = "Test-$Day$Month$Year"
}
Pool {
Name = SaturdayPool
Pool Type = Backup
Recycle = yes
AutoPrune = yes
Volume Retention = 6d
Accept Any Volume = yes
Maximum Volume Jobs = 1
Label Format = "Test-$Day$Month$Year"
}
Pool {
Name = SundayPool
Pool Type = Backup
Recycle = yes
AutoPrune = yes
Volume Retention = 6d
Accept Any Volume = yes
Maximum Volume Jobs = 1
Label Format = "Test-$Day$Month$Year"
}
############
## CONSOLES ##
############
#
# Restricted console used by tray-monitor to get the status of the director
#
Console {
Name = Bacula-mon
Password = ""
CommandACL = status, .status
}
------------------------------------------------------------------------
#
# Default Bacula File Daemon Configuration file
#
# For Bacula release 1.36.3 (22 April 2005) -- debian testing/unstable
#
# There is not much to change here except perhaps the
# File daemon Name to
#
#
# List Directors who are permitted to contact this File daemon
#
Director {
Name = Bacula-dir
Password = ""
}
#
# Restricted Director, used by tray-monitor to get the
# status of the file daemon
#
Director {
Name = Bacula-mon
Password = ""
Monitor = yes
}
#
# "Global" File daemon configuration specifications
#
FileDaemon { # this is me
Name = Bacula-fd
FDport = 9102 # where we listen for the director
WorkingDirectory = /var/lib/bacula
Pid Directory = /var/run/bacula
Maximum Concurrent Jobs = 20
}
# Send all messages except skipped files back to Director
Messages {
Name = Standard
director = Bacula-dir = all, !skipped
}
------------------------------------------------------------------------
#
# Default Bacula Storage Daemon Configuration file
#
Storage { # definition of myself
Name = Bacula-sd
SDPort = 9103 # Director's port
WorkingDirectory = "/var/lib/bacula"
Pid Directory = "/var/run/bacula"
Maximum Concurrent Jobs = 20
}
#
# List Directors who are permitted to contact Storage daemon
#
Director {
Name = Bacula-dir
Password = ""
}
#
# Restricted Director, used by tray-monitor to get the
# status of the storage daemon
#
Director {
Name = Bacula-mon
Password = ""
Monitor = yes
}
#
# Devices supported by this Storage daemon
# To connect, the Director's bacula-dir.conf must have the
# same Name and MediaType.
#
Device {
Name = FileStorage
Media Type = File
Archive Device = /tmp
LabelMedia = yes; # lets Bacula label unlabeled media
Random Access = Yes;
AutomaticMount = yes; # when device opened, read it
RemovableMedia = no;
AlwaysOpen = no;
}
Device {
Name = TapeStorage
Media Type = LTO-2
Archive Device = /dev/nst0
Automatic Mount = yes;
LabelMedia = yes
AlwaysOpen = no;
RemovableMedia = yes;
RandomAccess = no;
Changer Command = "/etc/bacula/scripts/mtx-changer %c %o %S %a %d"
Changer Device = /dev/sg3
AutoChanger = yes
Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
}
#
# Send all messages to the Director,
# mount messages also are sent to the email address
#
Messages {
Name = Standard
director = Bacula-dir = all
}
--
IT-Service Lehmann [EMAIL PROTECTED]
Arno Lehmann http://www.its-lehmann.de
-------------------------------------------------------
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