All Projects → vmware-tanzu → velero-plugin-example

vmware-tanzu / velero-plugin-example

Licence: Apache-2.0 license
Example project for plugins for Velero, a Kubernetes disaster recovery utility

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects
shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to velero-plugin-example

Velero
Backup and migrate Kubernetes applications and their persistent volumes
Stars: ✭ 5,864 (+12931.11%)
Mutual labels:  backup, disaster-recovery, velero
velero-plugin-for-aws
Plugins to support Velero on AWS
Stars: ✭ 115 (+155.56%)
Mutual labels:  velero, velero-plugin
velero-plugin-for-csi
Velero plugins for integrating with CSI snapshot API
Stars: ✭ 57 (+26.67%)
Mutual labels:  velero, velero-plugin
ansible-role-backup
Ansible Role - Backup for simple servers
Stars: ✭ 122 (+171.11%)
Mutual labels:  backup, disaster-recovery
ocsinventory
📚 Curso GRÁTIS OCS Inventory NG e GLPI Help Desk REPOSITÓRIO CONGELADO - Esse repositório não irá mais receber atualizações.
Stars: ✭ 58 (+28.89%)
Mutual labels:  backup, plugins
helm-backup
Helm plugin which performs backup/restore of releases in a namespace to/from a file
Stars: ✭ 70 (+55.56%)
Mutual labels:  backup, disaster-recovery
n3dr
Nexus3 Disaster Recovery (N3DR) is a tool that is capable of downloading all artifacts from a Nexus3 server and to migrate them to another Nexus3 server. Note that some repository formats are not supported at the moment.
Stars: ✭ 110 (+144.44%)
Mutual labels:  backup, disaster-recovery
radio
Redundant Array of Distributed Independent Objectstores in short RADIO performs synchronous mirroring, erasure coding across multiple object stores
Stars: ✭ 25 (-44.44%)
Mutual labels:  backup, disaster-recovery
aws-backup-automation
AWS CloudFormation templates and Python code for AWS blog post on how to automate centralized backup at scale across AWS services using AWS Backup.
Stars: ✭ 12 (-73.33%)
Mutual labels:  backup, disaster-recovery
virt-backup
Backup your kvm guests managed by libvirt
Stars: ✭ 88 (+95.56%)
Mutual labels:  backup
noplugin
Play legacy media in modern browsers without plugins.
Stars: ✭ 29 (-35.56%)
Mutual labels:  plugins
jira-backup-py
python script to create, download and upload to s3 your Jira or Confluence cloud instance backup
Stars: ✭ 36 (-20%)
Mutual labels:  backup
dedupsqlfs
Deduplicating filesystem via Python3, FUSE and SQLite
Stars: ✭ 24 (-46.67%)
Mutual labels:  backup
pagila
PostgreSQL Sample Database
Stars: ✭ 46 (+2.22%)
Mutual labels:  sample
extract-xiso
Xbox ISO Creation/Extraction utility. Imported from SourceForge.
Stars: ✭ 358 (+695.56%)
Mutual labels:  backup
blockyarchive
Blocky archive - multithreaded archiver offering bit rot protection and sector level recoverability
Stars: ✭ 88 (+95.56%)
Mutual labels:  backup
goodrexport
Goodreads data export
Stars: ✭ 16 (-64.44%)
Mutual labels:  backup
grafana-backup
[ON HOLD] CLI tool for backup/restore Grafana dashboards and datasources.
Stars: ✭ 28 (-37.78%)
Mutual labels:  backup
react-devise-token-auth-sample
React on Rails using devise_token_auth for authentication
Stars: ✭ 25 (-44.44%)
Mutual labels:  sample
mindav
A self-hosted file backup server which bridges WebDAV protocol with @minio written in @totoval. Webdav ❤️ Minio
Stars: ✭ 64 (+42.22%)
Mutual labels:  backup

Velero Example Plugins

Build Status

This repository contains example plugins for Velero.

Kinds of Plugins

Velero currently supports the following kinds of plugins:

  • Object Store - persists and retrieves backups, backup log files, restore warning/error files, restore logs.
  • Volume Snapshotter - creates snapshots from volumes (during a backup) and volumes from snapshots (during a restore).
  • Backup Item Action - performs arbitrary logic on individual items prior to storing them in the backup file.
  • Restore Item Action - performs arbitrary logic on individual items prior to restoring them in the Kubernetes cluster.
  • Delete Item Action - performs arbitrary logic on individual items prior to deleting them from the backup file.

Velero can host multiple plugins inside of a single, resumable process. The plugins can be of any supported type. See main.go.

For more information, please see the full plugin documentation.

Building the plugins

To build the plugins, run

$ make

To build the image, run

$ make container

This builds an image tagged as velero/velero-plugin-example:main. If you want to specify a different name or version/tag, run:

$ IMAGE=your-repo/your-name VERSION=your-version-tag make container 

Deploying the plugins

To deploy your plugin image to an Velero server:

  1. Make sure your image is pushed to a registry that is accessible to your cluster's nodes.
  2. Run velero plugin add <registry/image:version>. Example with a dockerhub image: velero plugin add velero/velero-plugin-example.

Using the plugins

When the plugin is deployed, it is only made available to use. To make the plugin effective, you must modify your configuration:

Backup storage:

  1. Run kubectl edit backupstoragelocation <location-name> -n <velero-namespace> e.g. kubectl edit backupstoragelocation default -n velero OR velero backup-location create <location-name> --provider <provider-name>
  2. Change the value of spec.provider to enable an Object Store plugin
  3. Save and quit. The plugin will be used for the next backup/restore

Volume snapshot storage:

  1. Run kubectl edit volumesnapshotlocation <location-name> -n <velero-namespace> e.g. kubectl edit volumesnapshotlocation default -n velero OR velero snapshot-location create <location-name> --provider <provider-name>
  2. Change the value of spec.provider to enable a Volume Snapshotter plugin
  3. Save and quit. The plugin will be used for the next backup/restore

Backup/Restore actions:

  1. Add the plugin to Velero as described in the Deploying the plugins section.
  2. The plugin will be used for the next backup/restore.

Examples

To run with the example plugins, do the following:

  1. Run velero backup-location create default --provider file Optional: --config bucket:<your-bucket>,prefix:<your-prefix> to configure a bucket and/or prefix directories.
  2. Run velero snapshot-location create example-default --provider example-volume-snapshotter
  3. Run kubectl edit deployment/velero -n <velero-namespace>
  4. Change the value of spec.template.spec.args to look like the following:
      - args:
        - server
        - --default-volume-snapshot-locations
        - example-volume-snapshotter:example-default
  1. Run kubectl create -f examples/with-pv.yaml to apply a sample nginx application that uses the example block store plugin. Note: This example works best on a virtual machine, as it uses the host's /tmp directory for data storage.
  2. Save and quit. The plugins will be used for the next backup/restore

Creating your own plugin project

  1. Create a new directory in your $GOPATH, e.g. $GOPATH/src/github.com/someuser/velero-plugins
  2. Copy everything from this project into your new project
$ cp -a $GOPATH/src/github.com/vmware-tanzu/velero-plugin-example/* $GOPATH/src/github.com/someuser/velero-plugins/.
  1. Remove the git history
$ cd $GOPATH/src/github.com/someuser/velero-plugins
$ rm -rf .git
  1. Adjust the existing plugin directories and source code as needed.

The Makefile is configured to automatically build all directories starting with the prefix velero-. You most likely won't need to edit this file, as long as you follow this convention.

If you need to pull in additional dependencies to your vendor directory, just run

$ make modules
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].