Hi,
On 21.09.2005 16:22, John wrote:
I'm just starting to use Bacula and am trying to set it up to use 2
filesystem Pools (Full and Partials). I would like to have the Fulls go
to the full pool, and incrementals & differentials go to the Partial
Pool. I would also like to have Bacula automatically generate the
volumes, 1 per job using the job name, date, and counter. When I try to
run a job it say that I need to use the label command. Can Bacula auto
create volumes?
Yes. Sometimes, it even does so when you don't want it to :-)
Here are my bacula-dir.conf and bacula-sd.conf.
Oh. I'll put my observations inline...
# bacula-dir.conf
...
JobDefs {
Name = "DefaultJobDefs"
Type = Backup
Level = Full
FileSet = "Full Set"
Storage = File
Schedule = "DailyBackups"
Pool = FullPool
Full Backup Pool = FullPool
Differential Backup Pool = PartialPool
Incremental Backup Pool = PartialPool
Priority = 10
Messages = Standard
}
Job {
Name = "Marge"
JobDefs = "DefaultJobDefs"
Client = marge-fd
Write Bootstrap = "/var/bacula/marge.bsr"
}
Client {
Name = marge-fd
Address = marge.mydomain
FDPort = 9102
Catalog = MyCatalog
Password = "backup5" # password for FileDaemon
File Retention = 30 days # 30 days
Job Retention = 6 months # six months
AutoPrune = yes # Prune expired Jobs/Files
}
...
FileSet {
Name = "Full Set"
Include {
Options {
signature = MD5
}
File = /
}
Exclude {
File = /var/storage/bacula
File = /proc
File = /tmp
File = /.journal
File = /.fsck
}
}
Schedule {
Name = "DailyBackups"
Run = Full 1st sun at 1:05
Run = Incremental mon-sat at 1:05
Run = Differential 2nd-5th sun at 1:05
}
This looks ok, up till here. Quite a standard setup, or, at least what I
would call one.
Storage {
Name = File
Address = marge.mydomain # N.B. Use a fully qualified
name here
SDPort = 9103
Password = "backup5"
Device = FullStorage
Media Type = File
}
Storage {
Name = File
Address = marge.mydomain # N.B. Use a fully qualified
name here
SDPort = 9103
Password = "backup5"
Device = PartialStorage
Media Type = File
}
But that doesn't work. The same Storage name twice is probably not a
good idea.
Since your device names imply that, I assume that you defined one
storage per pool - that's not necessary. One storage device can handle
as many pools as you like.
Counter {
Name = "Count"
Minimum = 0
Maximum = 0
}
Well, using counters and pre-defined variables is definitely something
easy to do. Your following Label Format lines are, in my opinion, likely
to cause trouble. Usually, I simply use the "standard" volume labels
like "Diff-" and leave the volume handling to bacula. If I really need
to know on which exact volume which job or file is stored I can always
query the database.
Pool {
Name = FullPool
Label Format =
"Full-${JobName}-${Year}${Month:p/2/0/r}${Day:p/2/0/r}-${Counter}+"
Pool Type = Backup
Recycle = yes # Bacula can automatically recycle
Volumes
AutoPrune = yes # Prune expired volumes
Volume Retention = 90 days # one year
Accept Any Volume = yes # write on any volume in the pool
Use Volume Once = yes
Maximum Volume Jobs = 1
Maximum Volume Bytes = 1000000000 #1GB
}
Most probably, as you set recycling and automatic pruning, you should
also limit the maximum number of volumes per pool. Otherwise, bacula
will always create new volumes and never recycle.
Pool {
Name = PartialPool
Label Format =
"Partial-${JobName}-${Year}${Month:p/2/0/r}${Day:p/2/0/r}-${Counter}+"
Pool Type = Backup
Recycle = yes
AutoPrune = yes
Volume Retention = 90 days
Accept Any Volume = yes
Use Volume Once = yes
Maximum Volume Jobs = 1
Maximum Volume Bytes = 1000000000 #1GB
}
Catalog {
Name = MyCatalog
dbname = bacula; user = bacula; password = ""
}
Messages {
Name = Standard
mailcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) %r\" -s
\"Bacula: %t %e of %c %l\" %r"
operatorcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) %r\"
-s \"Bacula: Intervention needed for %j\" %r"
mail = [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> = all, !skipped
operator = [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> = mount
console = all, !skipped, !saved
append = "/var/bacula/log" = all, !skipped
}
Messages {
Name = Daemon
mailcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) %r\" -s
\"Bacula daemon message\" %r"
mail = [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> = all, !skipped
console = all, !skipped, !saved
append = "/var/bacula/log" = all, !skipped
}
Console {
Name = marge-mon
Password = "backup5"
CommandACL = status, .status
}
#bacula-sd.conf
Storage { # definition of myself
Name = marge-sd
SDPort = 9103 # Director's port
WorkingDirectory = "/var/bacula"
Pid Directory = "/var/run"
Maximum Concurrent Jobs = 20
}
Director {
Name = marge-dir
Password = "backup5"
}
Director {
Name = marge-mon
Password = "backup5"
Monitor = yes
}
Device {
Name = FullStorage
Media Type = File
Archive Device = /var/storage/bacula/full
LabelMedia = yes; # lets Bacula label unlabeled media
Random Access = Yes;
AutomaticMount = yes; # when device opened, read it
RemovableMedia = no;
AlwaysOpen = no;
}
Device {
Name = PartialStorage
Media Type = File
Archive Device = /var/storage/bacula/partial
LabelMedia = yes;
Random Access = Yes;
AutomaticMount = Yes;
RemovableMedia = no;
AlwaysOpen = no;
}
Ok, when you want to keep the Full and Partial volumes in separate
directories the two storage devices make sense. But please try to do a
full restore soon, to see if the SD finds the right volume files - there
_might_ be some problem, but I never investigated into that myself.
Messages {
Name = Standard
director = marge-dir = all
}
Well, you should definitely tweak your storage names in the director
config, but otherwise, things look ok to me. Once you have that set up,
see what happens with automatic labeling - I know for sure that it
works, I know others have it working, so I don't see why it shouldn't
work for you.
Of course I'm as likely to overlook something, so you should observe the
first backup runs quite closely.
Arno
--
IT-Service Lehmann [EMAIL PROTECTED]
Arno Lehmann http://www.its-lehmann.de
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users