Giter Club home page Giter Club logo

docker-bacula-opensource's Introduction

Bacula on Docker

Introduction

This is a working technology preview of running Bacula (Open Source) 7.4.1 in multiple Docker containers.

To make it easier to get started a docker-compose.yml is provided and it's assumed that docker-compose is used to start the containers. For actual deployment the docker binary ought to be used directly (e.g. by starting the containers as a service).

Images

The images are available on the Docker Hub as:

Requirements

The following components are required for this setup:

  • Docker >= 1.9.0
  • Docker Compose >= 1.5.0

Instructions on how to install these on for example CentOS, can be found here and here. Please note that the Docker version shipped with CentOS 7 is too old and cannot be used.

Networking

This setup uses the networking features of Docker, therefore docker-compose needs to be invoked with the --x-networking flag. The remainder of this document assumes that a shell alias has been setup to shrink repeated shell commands:

alias docker-compose='docker-compose --x-networking'

The local network that will be created is named after the directory the docker-compose.yml file is located in. E.g. if the full path is /home/bat/docker/bacula then the network will be named bacula and this can be verified (after docker-compose up) with docker network ls.

Starting the setup

Then fetch the images:

docker-compose pull

When this has succesfully completed you can start the containers:

docker-compose up

This will spawn five containers, which can be verified with docker ps:

  • bacula-db-data: data volume container; will not actually run but provide a persistent storage
  • bacula-db: PostgreSQL container, using storage provided by bacula-db-data
  • bacula-dir: Bacula Director container
  • bacula-sd: Bacula Storage Daemon container
  • bacula-fd: Bacula File Daemon (client) container

docker-compose will run in the foreground and multiplex the container's output to the controlling terminal. To run all containers in the background:

docker-compose start

To stop all containers one can simple hit ^C if they run in the foreground, or when running the background:

docker-compose stop

Configuration

Bacula

Configuration files are stored in $PWD/configs/{dir,sd}/ relative to the directory this README file is located. The dir/sd directories are mounted read-only into the container to /opt/bacula/etc/

In order to apply new configuration the associated container has to be restarted. For example:

docker-compose restart bacula-dir

Docker

There are several options which can be modified in docker-compose.yml. Changing their values does require either a docker-compose restart $CONTAINER, or a full restart of the setup if that's prefered (docker-compose ). The most common options:

  • BACULA_DEBUG: defaults to 50
  • mem_limit: limit the available memory the container is allowed to use. Size is memory + swap, in bytes.

bconsole

bconsole can be invoked from outside of the container:

docker exec -ti bacula-dir bconsole

Bacula client

A Bacula client container is started which runs the client daemon. The following environment variables are used to configure it's bacula-fd.conf:

  • FD_NAME
  • FD_PASSWORD
  • DIR_NAME
  • MON_NAME
  • MON_FD_PASSWORD

Of which only FD_PASSWORD must be set, the others have default values.

Support

These images are provided free of charge by RedCoolBeans. Various security measures have not been implemented or added in these images. For supported and security hardened images with Bacula Enterprise, please contact us.

Caveats

  • upgrades between Bacula versions is not yet accounted for
  • e-mail notifications are not enabled in the default configuration shipped with this demonstration setup. If e-mail is desired it can be enabled and pointed to an existing mailhost.
  • Mounting a local bacula-fd.conf into the bacula-fd container is not supported yet. Due to the limited configuration possible in this file it is advised to set the documented environment variables for now.

Copyright and license

MIT, please see the LICENSE file.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.