SlideShare a Scribd company logo
Bivac
Container Volumes Backup
2/
Raphaël Pinson
● Infrastructure Developer
● Trainer
● DevOps Practitioner
● Puppet, Augeas, Terraform,
Kubernetes
3/
4/
Good Practices
Containers should be stateless, either:
○ No persistent data
○ Database
○ Object storage
5/
Reality
Many containers need local storage
○ in Docker: Docker volume
○ in Kubernetes: PVC/PV
○ (in Rancher 1: Rancher volume)
6/
Backing up data
Two approaches
○ infrastructure:
■ disaster recovery
■ physical drives (snapshots, etc.)
○ applications:
■ app backup
■ per data location
7/
How to backup
■ Traditionally
○ location unknown
○ custom scripts
■ In containers
○ location known (named volume)
○ possible to automate
8/
Bivac
■ Open-source backup tool
for container volumes
■ Supports:
○ Docker (local volumes)
○ Kubernetes (PVC)
○ Rancher (Rancher Volumes)
9/
Install: locally
---
version: '3'
services:
bivac:
image: camptocamp/bivac:2.2
command: "manager -v"
ports:
- "8182:8182"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
environment:
BIVAC_AGENT_IMAGE: camptocamp/bivac:2.1
BIVAC_SERVER_PSK: super-secret-psk
RESTIC_PASSWORD: not-so-good-password
BIVAC_TARGET_URL: s3:my-bucket
AWS_ACCESS_KEY_ID: XXXXX
AWS_SECRET_ACCESS_KEY: XXXXX
10/
Install: Helm (k8s)
$ helm repo add camptocamp http://charts.camptocamp.com
$ helm install camptocamp/bivac --version 1.0.0
11/
Performing & listing backups
$ bivac backup ssh_config
Backing up `ssh_config'...
ID: ssh_config
Name: ssh_sshconfig
Mountpoint: /etc/ssh
Backup date: 2019-06-13 09:35:38
Backup status: Success
...
$ bivac volumes
ID Name Hostname Mountpoint LastBackupDate LastBackupStatus Backing up
mysql mysql testing /var/lib/mysql 2019-06-13 01:33:44 Success false
ssh_config ssh_config testing /etc/ssh 2019-06-13 01:43:12 Success false
12/
Restoring backups
$ bivac restore canary
Restoring `canary'...
ID: canary
Name: canary
Mountpoint: /var/lib/docker/volumes/canary/_data
Backup date: 2019-06-13 07:56:36
Backup status: Success
...
13/
Metrics
■ Bivac exposes backup metrics
■ Can be scraped by Prometheus:
---
scrape_configs:
- job_name: 'bivac'
static_configs:
- targets: ['bivac:8182']
■ Can be used in Grafana to generate graphs
14/
Metrics: alerting
■ Use Prometheus metrics
with AlertManager:
---
groups:
- name: example
rules:
- alert: BackupError
expr: bivac_backupExitCode{} > 0
- alert: BackupOutdated
expr: time() - bivac_lastBackup{} > 49 * 3600
15/
Bivac - Container Volumes Backup

More Related Content

PDF
Ceph Block Devices: A Deep Dive
PDF
Thierry carrez openly developing open infrastructure
PDF
Ceph on Windows
PDF
Gluster Containerized Storage for Cloud Applications
ODP
Gluster d thread_synchronization_using_urcu_lca2016
PDF
Performance optimization for all flash based on aarch64 v2.0
ODP
GlusterFS Containers
PDF
The NetBSD package Collection - a.k.a pkgsrc
Ceph Block Devices: A Deep Dive
Thierry carrez openly developing open infrastructure
Ceph on Windows
Gluster Containerized Storage for Cloud Applications
Gluster d thread_synchronization_using_urcu_lca2016
Performance optimization for all flash based on aarch64 v2.0
GlusterFS Containers
The NetBSD package Collection - a.k.a pkgsrc

What's hot (20)

PDF
Gluster as Block Store in Containers
ODP
Gluster technical overview
PDF
Deploying pNFS over Distributed File Storage w/ Jiffin Tony Thottan and Niels...
PDF
CEPH DAY BERLIN - WELCOME
PDF
State of the_gluster_-_lceu
PDF
OSBConf 2015 | Scale out backups with bareos and gluster by niels de vos
ODP
oVirt DR Site to-site using ansible
PDF
Gluster and Kubernetes
PDF
nebulaconf
PDF
GlusterFS Talk for CentOS Dojo Bangalore
PDF
Ceph Day Santa Clara Welcome
PDF
Sdc 2012-challenges
ODP
Persistent Storage in Openshift using GlusterFS
ODP
Developing apps and_integrating_with_gluster_fs_-_libgfapi
PDF
NUS-ISS Learning Day 2017 - Bots-Managed CloudOps
ODP
Accessing gluster ufo_-_eco_willson
PDF
Gluster intro-tdose
ODP
GlusterFs Architecture & Roadmap - LinuxCon EU 2013
ODP
Gluster fs hadoop_fifth-elephant
PDF
20160401 guster-roadmap
Gluster as Block Store in Containers
Gluster technical overview
Deploying pNFS over Distributed File Storage w/ Jiffin Tony Thottan and Niels...
CEPH DAY BERLIN - WELCOME
State of the_gluster_-_lceu
OSBConf 2015 | Scale out backups with bareos and gluster by niels de vos
oVirt DR Site to-site using ansible
Gluster and Kubernetes
nebulaconf
GlusterFS Talk for CentOS Dojo Bangalore
Ceph Day Santa Clara Welcome
Sdc 2012-challenges
Persistent Storage in Openshift using GlusterFS
Developing apps and_integrating_with_gluster_fs_-_libgfapi
NUS-ISS Learning Day 2017 - Bots-Managed CloudOps
Accessing gluster ufo_-_eco_willson
Gluster intro-tdose
GlusterFs Architecture & Roadmap - LinuxCon EU 2013
Gluster fs hadoop_fifth-elephant
20160401 guster-roadmap
Ad

More from Raphaël PINSON (20)

PDF
Explore the World of Cilium, Tetragon & eBPF
PDF
Cfgmgmtcamp 2024 — eBPF-based Security Observability & Runtime Enforcement wi...
PDF
ContainerDays Hamburg 2023 — Cilium Workshop.pdf
PDF
KCD Zurich 2023 — Bridge Dev & Ops with eBPF.pdf
PDF
Cloud Native Bern 05.2023 — Zero Trust Visibility
PDF
DevOpsDays Zurich 2023 — Bridging Dev and Ops with eBPF: Extending Observabil...
PPTX
Révolution eBPF - un noyau dynamique
PPTX
Cfgmgmtcamp 2023 — eBPF Superpowers
PDF
Cloud Native Networking & Security with Cilium & eBPF
PDF
2022 DevOpsDays Geneva — The Hare and the Tortoise.pdf
PDF
SKS in git ops mode
PDF
The Hare and the Tortoise: Open Source, Standards & Technological Debt
PDF
Devops stack
PDF
YAML Engineering: why we need a new paradigm
PDF
Container Security: a toolchain for automatic image rebuilds
PDF
K9s - Kubernetes CLI To Manage Your Clusters In Style
PDF
Argocd up and running
PDF
Automating Puppet Certificates Renewal
PDF
Running the Puppet Stack in Containers
PDF
Automating Puppet Certificates Renewal
Explore the World of Cilium, Tetragon & eBPF
Cfgmgmtcamp 2024 — eBPF-based Security Observability & Runtime Enforcement wi...
ContainerDays Hamburg 2023 — Cilium Workshop.pdf
KCD Zurich 2023 — Bridge Dev & Ops with eBPF.pdf
Cloud Native Bern 05.2023 — Zero Trust Visibility
DevOpsDays Zurich 2023 — Bridging Dev and Ops with eBPF: Extending Observabil...
Révolution eBPF - un noyau dynamique
Cfgmgmtcamp 2023 — eBPF Superpowers
Cloud Native Networking & Security with Cilium & eBPF
2022 DevOpsDays Geneva — The Hare and the Tortoise.pdf
SKS in git ops mode
The Hare and the Tortoise: Open Source, Standards & Technological Debt
Devops stack
YAML Engineering: why we need a new paradigm
Container Security: a toolchain for automatic image rebuilds
K9s - Kubernetes CLI To Manage Your Clusters In Style
Argocd up and running
Automating Puppet Certificates Renewal
Running the Puppet Stack in Containers
Automating Puppet Certificates Renewal
Ad

Recently uploaded (20)

PPTX
Tartificialntelligence_presentation.pptx
PPTX
1. Introduction to Computer Programming.pptx
PPT
What is a Computer? Input Devices /output devices
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PDF
Getting started with AI Agents and Multi-Agent Systems
PDF
Developing a website for English-speaking practice to English as a foreign la...
PDF
2021 HotChips TSMC Packaging Technologies for Chiplets and 3D_0819 publish_pu...
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
PDF
August Patch Tuesday
PDF
Hybrid model detection and classification of lung cancer
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PPTX
The various Industrial Revolutions .pptx
PPTX
TLE Review Electricity (Electricity).pptx
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
cloud_computing_Infrastucture_as_cloud_p
Tartificialntelligence_presentation.pptx
1. Introduction to Computer Programming.pptx
What is a Computer? Input Devices /output devices
A contest of sentiment analysis: k-nearest neighbor versus neural network
Getting started with AI Agents and Multi-Agent Systems
Developing a website for English-speaking practice to English as a foreign la...
2021 HotChips TSMC Packaging Technologies for Chiplets and 3D_0819 publish_pu...
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
August Patch Tuesday
Hybrid model detection and classification of lung cancer
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
The various Industrial Revolutions .pptx
TLE Review Electricity (Electricity).pptx
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
A comparative study of natural language inference in Swahili using monolingua...
DP Operators-handbook-extract for the Mautical Institute
Hindi spoken digit analysis for native and non-native speakers
Assigned Numbers - 2025 - Bluetooth® Document
cloud_computing_Infrastucture_as_cloud_p

Bivac - Container Volumes Backup

  • 2. 2/ Raphaël Pinson ● Infrastructure Developer ● Trainer ● DevOps Practitioner ● Puppet, Augeas, Terraform, Kubernetes
  • 3. 3/
  • 4. 4/ Good Practices Containers should be stateless, either: ○ No persistent data ○ Database ○ Object storage
  • 5. 5/ Reality Many containers need local storage ○ in Docker: Docker volume ○ in Kubernetes: PVC/PV ○ (in Rancher 1: Rancher volume)
  • 6. 6/ Backing up data Two approaches ○ infrastructure: ■ disaster recovery ■ physical drives (snapshots, etc.) ○ applications: ■ app backup ■ per data location
  • 7. 7/ How to backup ■ Traditionally ○ location unknown ○ custom scripts ■ In containers ○ location known (named volume) ○ possible to automate
  • 8. 8/ Bivac ■ Open-source backup tool for container volumes ■ Supports: ○ Docker (local volumes) ○ Kubernetes (PVC) ○ Rancher (Rancher Volumes)
  • 9. 9/ Install: locally --- version: '3' services: bivac: image: camptocamp/bivac:2.2 command: "manager -v" ports: - "8182:8182" volumes: - "/var/run/docker.sock:/var/run/docker.sock:ro" environment: BIVAC_AGENT_IMAGE: camptocamp/bivac:2.1 BIVAC_SERVER_PSK: super-secret-psk RESTIC_PASSWORD: not-so-good-password BIVAC_TARGET_URL: s3:my-bucket AWS_ACCESS_KEY_ID: XXXXX AWS_SECRET_ACCESS_KEY: XXXXX
  • 10. 10/ Install: Helm (k8s) $ helm repo add camptocamp http://charts.camptocamp.com $ helm install camptocamp/bivac --version 1.0.0
  • 11. 11/ Performing & listing backups $ bivac backup ssh_config Backing up `ssh_config'... ID: ssh_config Name: ssh_sshconfig Mountpoint: /etc/ssh Backup date: 2019-06-13 09:35:38 Backup status: Success ... $ bivac volumes ID Name Hostname Mountpoint LastBackupDate LastBackupStatus Backing up mysql mysql testing /var/lib/mysql 2019-06-13 01:33:44 Success false ssh_config ssh_config testing /etc/ssh 2019-06-13 01:43:12 Success false
  • 12. 12/ Restoring backups $ bivac restore canary Restoring `canary'... ID: canary Name: canary Mountpoint: /var/lib/docker/volumes/canary/_data Backup date: 2019-06-13 07:56:36 Backup status: Success ...
  • 13. 13/ Metrics ■ Bivac exposes backup metrics ■ Can be scraped by Prometheus: --- scrape_configs: - job_name: 'bivac' static_configs: - targets: ['bivac:8182'] ■ Can be used in Grafana to generate graphs
  • 14. 14/ Metrics: alerting ■ Use Prometheus metrics with AlertManager: --- groups: - name: example rules: - alert: BackupError expr: bivac_backupExitCode{} > 0 - alert: BackupOutdated expr: time() - bivac_lastBackup{} > 49 * 3600
  • 15. 15/