This blog post is a report of how I installed and configured Bacula on the server.
(I'm going to add to this post as I go, because I'll probably not be able to do this all in one day.)
It'll also be a small recap of the Bacula documentation as I go over it. Mostly for future reference in case I need to repeat this installation.
Installing
Well what can I say, it's Gentoo, so it was basicly just 'emerge bacula'.I did however add this line to /etc/portage/package.use:
app-backup/bacula bacula-console sqlite3 readlineTo have the (for my installation) correct options installed.
Configuring
Before actually configuring, knowing what to configure could help.Reading up on the Quickstart documentation helped a lot here.
Bacula uses its own terminology:
- FileSet: What files to backup
- Client: Who to backup. This is the servers where the files are.
- Schedule: When to backup
- Pool: where does the backup go?
- Volume: the actual tape. A collection of tapes is a pool.
First thing that needed to be done was to edit the bconsole.conf file.
There isn't really a lot there, the default seemed good.
Director {
Name = fileserver-dir
DIRport = 9101
address = fileserver
Password = "thepassword" # not really :)
} Only thing I needed to change was the password. (The default is set to something crazy for security).
Next, edit the bacula-sd.conf file.
I have a Dell TL2000 so I needed to make an 'Autochanger' and a 'Device'.
Autochanger {
Name = Autochanger
Device = LTO-3
Changer Command = "/usr/libexec/bacula/mtx-changer %c %o %S %a %d"
Changer Device = /dev/sg5
}
Device {
Name = LTO-3
Media Type = LTO-3
Archive Device = /dev/st0
Changer Command = "/usr/libexec/bacula/mtx-changer %c %o %S %a %d"
Changer Device = /dev/sg5
}
With this configuration I ran the 'btape' tool and issued the 'test' command.All tests successful.. yay!
Now, in the Director configuration file: bacula-dir.conf I had to make jobs/clients/etc...
There's a pretty nice default example in there, so it was just basicly editing of the examples to get it to work.
Some things you need to pay attention to:
- making sure all the passwords are correct helps lots ;-)
- Choose the correct storage, configure it in the bacula-sd.conf
- restart the appropriate daemon when you've changed it's configuration file.
The tapes I use in the TL-2000 library all have barcode stickers on them. It would be very convenient if I could use those names in bacula aswell. Fortunately, there are console commands for this:
label barcodeIf afterwards tapes (volumes) need to be put in a different pool, use update volume to change the pool of the volume.
update slots
cleaning prefix
Creating the filesets
Filesets on my server are quite simple:
FileSet {For every folder you wish to backup.
Name = "datadir"
Include {
Options {
signature = MD5
}
File = /data
}
}
Schedules
These define when a backup needs to run.
One of my schedules looks like this:
Should be self-explanatory.
Schedule {
Name = "daily_4"
Run = Level=Full mon-fri at 4:00
}
Jobs
These are the most important ones. They define what is backed up, how and when.
The one for the weekly backups looks like this:
Job {Where JobDefs is this:
Name = "weekday"
JobDefs = "DefaultJob"
Level = Full
FileSet = "dailyFiles"
Schedule = "daily_4"
Pool = "Default"
}
JobDefs {
Name = "DefaultJob"
Type = Backup
Client = fileserver-fd
Storage = Tape
Messages = Standard
Priority = 10
Write Bootstrap = "%c_%n.bsr"
}
It's a very small configuration, but it will be enough for the kind of backups I want to take. Ofcourse this example isn't the only job/fileset/schedule I configured.
It's running in test right now, I'll update here with the results.
2 comments:
You didn't update with the results... Probably because you're still using bacula confortably after you figured out how to handle the config. Good choice !
Yes, this config is still running there. I've changed jobs in Januari but as far as I know they're still using this system. Tho Bacula did have its hickups now and then, which were solved by cronned restarts of the service. But I think that's more of a configuration problem than it is a problem with the software.
Post a Comment