Files
velero/site/docs/master/examples.md
KubeKween aa9ca9a69d Reorg install and plugin docs (#1916)
* Reorg plugin docs

Signed-off-by: Carlisia <carlisia@vmware.com>

* Improve install docs

Signed-off-by: Carlisia <carlisia@vmware.com>

* Change path

Signed-off-by: Carlisia <carlisia@vmware.com>

* Fix broken links

Signed-off-by: Carlisia <carlisia@vmware.com>

* Address more feedback

Signed-off-by: Carlisia <carlisia@vmware.com>

* One more fix

Signed-off-by: Carlisia <carlisia@vmware.com>

* Minor changes to address feedback

Signed-off-by: Carlisia <carlisia@vmware.com>

* More fixes

Signed-off-by: Carlisia <carlisia@vmware.com>
2019-10-02 16:24:42 -04:00

1.6 KiB

Examples

After you set up the Velero server, try these examples:

Basic example (without PersistentVolumes)

  1. Start the sample nginx app:

    kubectl apply -f examples/nginx-app/base.yaml
    
  2. Create a backup:

    velero backup create nginx-backup --include-namespaces nginx-example
    
  3. Simulate a disaster:

    kubectl delete namespaces nginx-example
    

    Wait for the namespace to be deleted.

  4. 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.

  1. Start the sample nginx app:

    kubectl apply -f examples/nginx-app/with-pv.yaml
    
  2. Create a backup with PV snapshotting:

    velero backup create nginx-backup --include-namespaces nginx-example
    
  3. Simulate a disaster:

    kubectl delete namespaces nginx-example
    

    Because 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.

  4. Restore your lost resources:

    velero restore create --from-backup nginx-backup