TOOLS

Installing Vembu BDRSuite with Docker Compose

11 July, 2022

In these days we tend to think that just by having our services and data on the cloud everything related to backups is solved and is someone else problem. But for most of the companies this is not enough, and if we’re in charge of defining the infrastructure of an organization we should consider implementing several layers of backups no matter where the data is actually hosted.

For achieving this, there are a lot of tools, but I would like to discuss about the installation of a particular one that have several advantages, the ease of use, some powerful features and a flexible cost scheme depending on your needs. I’m talking about Vembu’s BDRSuite.

There is a lot of information on their site regarding how to install it depending on the several available supported environments. In my case I wanted to install the server side on a Rocky Linux installation with Docker Compose. I was able to find information about the docker installation, so that served as a starting point for implementing what I needed.

Why BDRSuite with Docker Compose?

Because it allows you to record a history of changes of your server in an easy way, by just using a VCS like git to guard and control the text files containing the docker recipes of your services.

BDRSuite allows you to install it in different ways depending on what you want to backup. My idea was to create a backup server to backup files that are on the workstations of our laptops. For this I need to install the server part of the solution in an internal server and then install the client part to select which folders I want to backup.

Configuring BDRSuite Services

The server part of BDRSuite is composed of two parts: the database and the actual server that will receive and store the data from the clients.

For the database it uses a special PostgreSQL database image that is already available in docker hub. So this was just a matter of converting this:

docker pull vembubdr/bdr-latest:psql-latest-new

To this:

  vembu-postgres:    # The Postgres Database Service
    image: vembubdr/bdr-latest:psql-latest-new
    restart: always
    container_name: vembu-db
    hostname: VembuDatabase
    environment:   # Username, password and database name variables
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: admin
      POSTGRES_DB: SGDatabase
    volumes:
      - ./pgdata:/var/lib/postgresql/data
    networks:
      vembu-network:
        ipv4_address: 172.21.0.2

This is the explanation of each part:

  • We’re using the latest version of the vembu database for postgresql: bdr-latest:psql-latest-new .
  • There is a configuration to restart always when the host machine starts.
  • We configured the container name to vembu-db.
  • Definition of the user and password of the database and also the name.
  • We’re also externalizing the binary data of the database, just in case you would like also to backup the database info using another tool.
  • Finally we’re giving the container a specific ipv4 address as explained in the original article.

After this we can continue with the actual server.

For this we have to convert this:

docker pull vembubdr/bdr-latest:vembubdr-4201-u2

Into the following:

  vembu-server:  
    image: vembubdr/bdr-latest:vembubdr-5200
    container_name: vembu-server
    hostname: vembu-server
    restart: always
    extra_hosts:
      - "VembuDatabase:172.21.0.2"
    depends_on:
      - vembu-postgres
    networks:
      vembu-network:
        ipv4_address: 172.21.0.3
    ports:
       - 6060:6060
       - 32004:32004
    devices:
      - "/dev/fuse:/dev/fuse"
    volumes:
      - ./vembu:/vembu
    privileged: true
    tty: true

A lot to say in this part:

  • We’re specifying to use the latest version of BDRSuite (5.2.0) instead of the version mentioned in the original document.
  • There is a container and a host name for it.
  • We also want it to be restarted automatically when the host restarts.
  • This service will depend on the database service.
  • We’re opening some ports that are needed for the communication between the client and the server, the same ones mentioned in the document. It could be that other ports need to be opened.
  • We’re exposing a folder to the host, were the backups are going to be stored, so it can be even backed up by a different tool if you want.
  • The other configurations (devices, privileged and tty) are the “translations” from the docker command line to docker-compose settings.

After this you can install the client in the machine that you want to backup and connect it to the server by following the steps mentioned in the documentation.

Conclusion

We published a GitHub repository with all of these configurations so you can play around and try it for yourself.

Hope you find it useful. If you have any doubt regarding this implementation or if you’re interested in the tool, please contact us, as certified partners, we’ll be glad to help you!

Martín López
By Martín López

Systems Engineer, coding is my passion. Strong experience in Java Ecosystem, and frameworks like Vaadin, Hibernate and Spring. Always willing to help companies to design build workflows and how to use the correct tools for producing high quality software.

Join the conversation!
Profile Picture

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.