We are very excited to announce Stash v0.9.0-rc.4
which brings some cool features like batch backup and hooks. We have also added Percona-XtraDB
addon. This version also comes with some bug fixes and general improvements.
Stash by AppsCode is a data backup and recovery solution for Kubernetes workloads. If you are running production workloads in Kubernetes, you might want to take backup of your disks, databases etc. Traditional tools are too complex to setup and maintain in a dynamic compute environment like Kubernetes. Stash is a Kubernetes operator that uses restic or Kubernetes CSI Driver VolumeSnapshotter functionality to address these issues. Using Stash, you can backup Kubernetes volumes mounted in workloads, stand-alone volumes and databases. User may even extend Stash via addons for any custom workload.
Features
Features | Availability | Scope |
---|---|---|
Backup & Restore Workload Data | ✓ | Deployment, DaemonSet, StatefulSet, ReplicaSet, ReplicationController, OpenShift DeploymentConfig |
Backup & Restore Stand-alone Volume (PVC) | ✓ | PersistentVolumeClaim, PersistentVolume |
Backup & Restore databases | ✓ | PostgreSQL, MySQL, MongoDB, Elasticsearch |
VolumeSnapshot | ✓ | CSI Driver must support VolumeSnapshot and Kubernetes Alpha features must be enabled |
Schedule Backup | ✓ | Schedule through cron expression |
Instant Backup | ✓ | Use CLI or create BackupSession manually |
Auto Backup | ✓ | Using a Template and annotations |
Batch Backup | ✓ | Backup multiple co-related targets under a single configuration |
Pause Scheduled Backup | ✓ | |
Support Multiple Storage Provider | ✓ | AWS S3, Minio, Rook, GCS, Azure, OpenStack Swift, Backblaze B2, Rest Server, any PV/PVC |
Encryption | ✓ | AES-256 in counter mode (CTR) (for Restic driver) |
Deduplication (send only diff) | ✓ | Uses Content Defined Chunking (CDC) (for Restic driver) |
Cleanup old snapshots automatically | ✓ | Cleanup according to different retention policies |
Prometheus Metrics for Backup & Restore Process | ✓ | Official Prometheus Server, CoreOS Prometheus Operator |
Prometheus Metrics for Stash Operator | ✓ | Official Prometheus Server, CoreOS Prometheus Operator |
Support RBAC enabled cluster | ✓ | |
Support PSP enabled cluster | ✓ | |
CLI | ✓ | kubectl plugin (for Kubernetes 1.12+) |
Extensibility | ✓ | Extend using Function and Task |
Customizability | ✓ | Customize backup / restore process using Function and Task |
Hooks | ✓ | Execute httpGet , httpPost , tcpSocket and exec hooks before and after of backup or restore process. |
Send Notification to Webhook | ✓ | Use hooks to send notification to webhooks(i.e. Slack channel) |
What’s New
The following new features has been introduced in this version.
Batch Backup
Sometimes, a single component may not meet the requirement for your application. For example, in order to deploy a WordPress, you will need a Deployment for the WordPress and another Deployment for database to store it’s contents. Now, you may want to backup both of the deployment and database under a single configuration as they are parts of a single application.
In order to support this use case, we are introducing BackupBatch CRD. This allows users to specify multiple targets under single configuration. For more details, please check these guides:
Hooks
You may need to prepare your application before backup/restore. For, example you may want to pause your application before backup and resume it after backup to ensure the backed up data consistency. You may want to send a notification after a backup is completed. Or, you may want to remove corrupted data before restoring. In order to support those use cases, we are introducing Hooks
in this version.
Stash hooks allows executing certain action before and after a backup/restore process. You can send HTTP requests to a remote server via httpGet
or httpPost
hooks. You can check whether a TCP socket is open using tcpSocket
hook. You can also execute some commands into your application pod using exec
hook. For more details, please follow these guides:
- Types of Hooks and How They Works
- Example of Backup and Restore Hooks
- Example of Hooks in Batch Backup
- How to Configure Different Types of Hooks
Percona-XtraDB Addon
We have added a new addon for taking backup Percona-XtraDB
cluster. Currently, it only supports Percona XtraDB version 5.7
. Please check these guides for more details:
- What is a Stash Addon
- How Percona XtraDB Backup Works
- How to Install Percona-XtraDB Addon
- Example of How to Backup a Percona-XtraDB Cluster
Important Bug Fixes
We have fixes the following noticeable bugs:
- Failed to create CronJob when BackupConfiguration name is same as Database crd name #1022
- Can’t install stash #1032
- Backup mysql creates infinite dumps #1030
- BackupSession skipped for paused BackupConfiguration #997
- Operator is observing panic() while handling failed CronJob creation for BackupConfiguration #1019
- Stash Addons: Make chart.sh script compatible with helm 3#984
- backup error for items #1018
- RBAC permission missing in Chart for PersistentVolumeClaim, exists in installer deploy script #981
- Clarify that user can not user
/stash
asmountPath
for local backend #945 - Invalid flag name for PVC restorer job #956
Please try this version and let us know if you face any issues. You can follow us on Twitter @KubeStash , talk to us on Slack or file an issue here .