Home -> Backup and Recovery Strategies Blog -> How to Backup and Restore a Kubernetes Cluster with Bacula Enterprise?
1 Star2 Stars3 Stars4 Stars5 Stars
(11 votes, average: 5.00 out of 5)
Loading...

How to Backup and Restore a Kubernetes Cluster with Bacula Enterprise?

  • February 14, 2020

Overview

As containers are increasingly deployed in mission-critical operational environments, organizations are increasingly becoming concerned with security, backup and recovery, and other data management issues. Initially, the majority of containerized applications were stateless, which allowed them to be more easily be deployed on a public cloud. However, as stateful applications that require access to a database have become containerized, the need to seriously consider backup and recovery has increased dramatically. Typically, an IT department’s concerns for deployed container environments are now largely around data security, data loss and planning for disaster recovery and business continuity.

Whether Containers are being used in a deployed environment to give a new lease of life to monolithic applications, or refactor legacy applications, or implement new dynamic distributed applications, the need to protect its stateful data remains. An organization’s need to maintain SLAs, and ensure container-based services are always available in a correct state, will always be top of mind. Therefore, a minimum viable Kubernetes distribution requires effective backup and recovery of cluster components and persistent data for productive operation.

For organizations running containers in production environments, Bacula Enterprise is the first enterprise backup and recovery platform that provides an enterprisegrade solution for an organization with deployed Kubernetes Clusters to back up and recover data consistently across all its platforms.

Bacula brings agility benefits to Container environments because of its unusually high degree of modularity and flexibility. For example, Bacula can also make it
possible to migrate persistent volumes between Kubernetes clusters – e.g., at the restore time, you can specify another Kubernetes system to write to. This agility
in turn offers organizations the opportunity not only to save time, but also to significantly reduce complexity, costs and vendor lock-in.

Many organizations have deployed containers on least two of three major public clouds, and a good proportion of those running containers on Amazon Web Services (AWS), Google Cloud Platform (GCP) and Microsoft Azure. Bacula’s native integration with these Cloud platforms help to speed and ease operations in these environments. Bacula also helps companies to avoid being locked into a single vendor, because apart from its own open source-based code, it also facilitates containers to be more easily moved from one cloud to another. Bacula also facilities Hybrid cloud via its ease of integration of private and public cloud services to support parallel, integrated or complementary tasks.

Bacula’s unique solution for Kubenetes clusters includes not just backups of persistent volumes, but also of config. files.

For What Uses Should Kubernetes Environments Be Backed Up?

People using Kubernetes in production typically need a real strategy for restoring and upgrading clusters. In the case that a cluster goes into an unrecoverable state, backup of the config file and its persistent volumes is required to revert back to the previous stable state of the Kubernetes cluster.

Kubernetes cluster level backups give DevOps teams the tools to back up and restore their entire Kubernetes clusters (automatically) and restore them with a
single action to a known good state to minimize production interruption. Bacula Systems asserts that speed and efficiency of restores always needs to be considered, even in a highly automated and resilient containerized environment.

Overall, Bacula Enterprise’s unique solution for Kubernetes both safeguards critical data and enables developers to be more productive. It helps to streamline the workflow of a DevOps environment through to deployment of mission-critical systems. However, there are four main reasons why an IT department will likely be able to benefit from having Bacula Enterprise’s backup and recovery mechanism in place for its deployed Kubernetes cluster. These are:

  • As part of a solution to help recover from disasters in the event of catastrophic cluster failure
  • To help replicate an environment
  • To help migrate Kubernetes Clusters
  • To have an independent recovery tool that provides additional security and separation of duties from the cluster automation tools and code repository

Bacula Enterprise’s Kubernetes Features Summary

  • Kubernetes cluster resources configuration backup
  • Ability to restore single Kubernetes configuration resource
  • Ability to restore Kubernetes resource configuration to local directory
  • Kubernetes Persistent Volumes data backup and restore
  • Ability to restore Kubernetes Persistent Volumes data to local directory

Bacula Enterprise’s Kubernetes module can back up a number of Kubernetes Resources, including:

  • Deployments,
  • Pods
  • Services
  • Persistent Volume Claims

 

Example of how Bacula Enterprise integrates with Kuberbetes

Figure 1: Example of how Bacula Enterprise integrates with Kuberbetes

Restore

The Kubernetes Plugin provides a choice of two targets for restore operations:

  • Restore to Kubernetes cluster
  • Restore to a local directory

To ensure best practice backup and recovery for container environments, data should be backed up automatically and System Administrators should test backups regularly to make certain that they will do what is needed when recovery is necessary.

 Selecting a Pod for restore

Figure 2: Selecting a Pod for restore

Resource listing

The Bacula Enterprise Kubernetes module supports the Plugin Listing feature of Bacula Enterprise 8.x or newer. This mode displays some useful information about available Kubernetes resources such as:

  • List of Kubernetes namespaces
  • List of Kubernetes persistent volumes

The feature uses the special .ls command command with a plugin=<plugin> command parameter.

Some of the benefits of Bacula’s integrated Kubernetes module include:

  • Free of charge with Bronze Level Subscriptions and above
  • Safeguarding states of Kubernetes clusters
  • Enabling fast and efficient redeployment of a cluster’s resources
Kubernetes Restore Options

Figure 3: Kubernetes Restore Options

Kubernetes Restore Job Log

Figure 4: Kubernetes Restore Job Log

  • Saving amended configurations for complete security, and restoring to exact same state
  • Saving configurations for use with other operations

Who needs to know about Kubernetes backup capabilities?

The person responsible for operationalizing Kubernetes clusters needs to understand clearly the importance of their organization’s need for backing up - and more to the point - quickly and easily recovering Kubernetes and Kubernetes clusters. A good example of the type of person within an organization that would need to be directly concerned with ensuring that backup and recovery is enabled when a deployment is operationalized would be a ‘DevOps Lead’, a ‘Platform Engineering Lead’, or a ‘Platform Ops Lead’. Of course, in a wider context, there are many stakeholders within the hierarchy of an organization that have a responsibility to ensure that their company’s data is safe.

The key advantage to using Bacula Enterprise to backup Kubernetes cluster

Bacula Enterprise has an especially broad range of features, flexibility and modularity in order to integrate into modern, complicated Kubernetes environments.

By being a particularly robust, stable platform that is highly scalable for large enterprises, Bacula offers its key advantage to users in that it brings enterprise-grade backup and recovery capabilities that span physical, virtual, container and cloud environments all from one single platform. These capabilities include advanced deduplication techniques, a large variety of different backup levels, snapshots, GUI and command line interfaces, high-speed recovery and hot backup options for databases, CDP and much more.

The Bacula Business Advantage

Bacula Enterprise’s licensing model is not based on data volume. This means that users are free to have increasing data volume, but without increasing costs from
Bacula. One annual subscription fee provides the user with everything needed from Bacula, vastly simplifying the calculation and making it easier to predict what
costs will be in future. Bacula’s rapid recovery times, coupled with robust stability, reliability, high automation levels and ease of use translate into clear monetary
advantages.

Bacula Enterprise Also Covers Docker Container Environments

Bacula Systems is committed to building on its reputation as a leader in Container backup and recovery. Its Docker module, for example, can back up the configuration of all high level resources (services, replication controllers, deployments, etc.), as well as external volumes.

This is the world’s first enterprise class backup and recovery solution to offer advanced, automated backup of Docker containers. Its Docker module takes container ease of use to a new level. The module is integrated via the Docker API and means users can rapidly and easily back up multiple containers without having to install an agent inside each container. This automated backup for Docker is available at most subscription levels of Bacula Enterprise, at no additional cost.

With the Docker Module, Bacula Enterprise can save the full container image including all read-only and writable layers as a single image archive. It is possible to
backup a Docker image which can then be used to create new containers when required. Bacula can also back up Docker volumes belonging to a container, ensuring that any persistent data can be easily protected.

Bacula’s advanced technology means that it is not necessary to install a Bacula File daemon (agent) inside each container, so containers can be backed up from
a common image repository. The Bacula Docker Module will contact the Docker service to read and save the contents of any system image or container image using snapshots (default behavior) and dump them using the Docker API. Efficiency is a key feature of this module: Bacula does not need to walk through the container filesystem to open, read, close and stat files, so it consumes less resources of the Docker infrastructure than a standard file level backup. The backup of a Docker system images does not make a snapshot as every system image is a read-only template used for container creation. Backups can be performed for container in any state (created, running or stopped).

More details are available from Bacula Systems “Backup and Recovery for Docker Containers" whitepaper.

Leave a comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>