Skip to content

Instantly share code, notes, and snippets.

@nicksantamaria
Created August 16, 2019 06:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicksantamaria/7c60616f3b8e93517db122502793628d to your computer and use it in GitHub Desktop.
Save nicksantamaria/7c60616f3b8e93517db122502793628d to your computer and use it in GitHub Desktop.
Backup and Restore with skpr/operator

Backup and Restore with skpr/operator

In github.com/skpr/operator are CRDs which you can use to handle backups and restores of applications with state stored in mysql and persistent volume claims.

The three CRDs are:

  • Backup - Takes a list of PVCs and databases to backup, and stores them in a restic repository.
  • BackupScheduled - Essentially a cronjob template for Backup, but with a cron expression to define the frequency.
  • Restore - Takes a backup ID, and destination PVCs and mysql databases to restore to.

Sample Objects

Here are example YAML manifests which define how each object should run.

Installing and Running the Operators

  1. @todo Need the restic repository secret
  2. Install the CRDs (see below for links to manifests)
  3. @todo Install RBAC policies.
  4. @todo Run manager statefulsets.

In The Weeds

Custom Resource Definitions

Operator Reconcilers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment