mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-02-03 18:42:18 +00:00
* add hugo default TOC Signed-off-by: Abigail McCarthy <mabigail@vmware.com> * point contributors to style guide (#2872) Signed-off-by: Abigail McCarthy <mabigail@vmware.com> * add hugo default TOC Signed-off-by: Abigail McCarthy <mabigail@vmware.com> * remove unused links Signed-off-by: Abigail McCarthy <mabigail@vmware.com>
1.6 KiB
1.6 KiB
title, layout
| title | layout |
|---|---|
| Examples | docs |
After you set up the Velero server, try these examples:
Basic example (without PersistentVolumes)
-
Start the sample nginx app:
kubectl apply -f examples/nginx-app/base.yaml -
Create a backup:
velero backup create nginx-backup --include-namespaces nginx-example -
Simulate a disaster:
kubectl delete namespaces nginx-exampleWait for the namespace to be deleted.
-
Restore your lost resources:
velero restore create --from-backup nginx-backup
Snapshot example (with PersistentVolumes)
NOTE: For Azure, you must run Kubernetes version 1.7.2 or later to support PV snapshotting of managed disks.
-
Start the sample nginx app:
kubectl apply -f examples/nginx-app/with-pv.yaml -
Create a backup with PV snapshotting:
velero backup create nginx-backup --include-namespaces nginx-example -
Simulate a disaster:
kubectl delete namespaces nginx-exampleBecause the default reclaim policy for dynamically-provisioned PVs is "Delete", these commands should trigger your cloud provider to delete the disk that backs the PV. Deletion is asynchronous, so this may take some time. Before continuing to the next step, check your cloud provider to confirm that the disk no longer exists.
-
Restore your lost resources:
velero restore create --from-backup nginx-backup