User:Delimiter/Applications/Bacula

From ConShell
Jump to: navigation, search

I have used bacula since about Jan 2006. It is very useful for backup in a heterogeneous environment because the agents will run on a multitude of platforms. Also, it is open-source, licensed under the GPL.

Here is a description of how I setup bacula for my home network.

I have a FreeBSD host franco with a 70GB home partition (/home) that I can spare for backups. So I designate /home/bacula/backups as my storage area. This is then linked (ln -s) to /var/db/bacula/backups

Well /home is used for other things also, so I want to ensure that no more than 18GB are used by bacula for backups. I setup the following volumes (analogy: tapes).

  • VolA
  • VolB
  • VolC
  • VolD

Each volume should be Recycled and have a limit of 4.7GB. Bacula should be instructed to recycle the oldest volume when it runs out of space on the current volume.

Example of Volume creation via the label command:

*label
Automatically selected Storage: File
Enter new Volume name: VolA
Automatically selected Pool: Default
Connecting to Storage daemon File at franco.foster.dmz:9103 ...
Sending label command for Volume "VolA" Slot 0 ...
3000 OK label. Volume=VolA Device="FileStorage" (/var/db/bacula/backups)
Catalog record for Volume "VolA", Slot 0  successfully created.
Requesting to mount FileStorage ...
3906 File device "FileStorage" (/var/db/bacula/backups) is always mounted.

Now modify the Pool entry in 'bacula-dir.conf

Pool {
  Name = Default
  Pool Type = Backup
  Recycle = yes                       # Bacula can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Use Duration = 730d          # Long on purpose, to avoid the dreaded 'Used' status
  Maximum Volume Bytes = 4700000000  # 4.7 GiB (hint: also will fit on a DVD)
}

As each volume fills up, use the relabel command to overwrite the oldest one.

Commands

Some commands (issued in bconsole) that are useful.

list files job=124


Windows XP notes Using the bacula agent on Windows XP can be problematic when the windows firewall is turned on. Just use the Exception tab and add 9101/tcp and 9102/tcp and all problems should clear up.

See Also: