Longhorn Snapshot Installation
CommunityEnterpriseStarting with Bacula Enterprise 18.1.0, support for Longhorn snapshot functionality was introduced, along with various other features. The plugin automatically detects its ability to perform this functionality.
Longhorn is a lightweight, distributed block storage system designed for Kubernetes. Developed by Rancher Labs, it provides a highly available solution for managing persistent volumes. Longhorn enables the creation, management, and recovery of data volumes with ease, ensuring data integrity and availability even in the event of node failures. More information about Longhorn.
This storage type supports Kubernetes CSI snapshot mechanism, see CSI snapshot support. If you do not want to integrate with this technology, you can still perform snapshot-based backups using Longhorn through this plugin. To do so, follow the steps below.
Longhorn Snapshot Backup Requirements
For Longhorn Snapshot Backup functionality, the Bacula Enterprise
Kubernetes Plugin uses Longhorn Python Client .
It requires access to Longhorn endpoint. One way to communicate with Longhorn is through the longhorn-frontend service.
If you run Bacula Enterprise Kubernetes Plugin inside the cluster, connect to:
http://longhorn-frontend.longhorn-system/v1.
If you run Bacula Enterprise Kubernetes Plugin outside the cluster and have kubectl installed,
you can use kubectl port-forward to forward the longhorn-frontend service to localhost:
kubectl port-forward services/longhorn-frontend 8080:http -n longhorn-system
Then connect to endpoint: http://localhost:8080/v1.
If you have not installed kubectl, you can create an Ingress resources in the longhorn-system namespace to access
the longhorn-frontend service:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: longhorn-ingress
namespace: longhorn-system
annotations:
nginx.ingress.kubernetes.io/ssl-redirect: "false"
# If you want to limit the access to Bacula-FD IP (Example: "192.168.1.34")
nginx.ingress.kubernetes.io/whitelist-source-range: "192.168.1.34/32"
spec:
rules:
- host: longhorn-frontend.testing-cluster.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: longhorn-frontend
port:
number: 80
Then connect to: http://longhorn-frontend.testing-cluster.com/v1.
You must also configure a Backup Target in Longhorn. Follow the steps in: Setting a Backup Target in Longhorn.
See also
Previous articles:
Go back to: Installation.