7.4. Restore#
This section describes how to restore Nubus for Kubernetes from a backup and how to get detailed information about it.
7.4.1. Restore a backup#
This section describes how to restore Nubus to the same namespace as the backup. This type of restore requires a fresh, clean, and empty namespace.
Important
Velero supports restoring a backup to a different namespace.
However, such a restore is only partially complete,
because it doesn’t overwrite Nubus’s existing Order
or ConfigMap
Kubernetes objects,
such as certificates.
Describing a restore to a different namespace is beyond the scope of this document.
Finding the backup for restore and the namespace
To find the backup to restore and the namespace to delete, follow the commands listed in Information about a backup to list all backups and to view the details of a specific backup. You find the name of the namespace in the details in the
Namespaces.included
section of the output.Deleting the Kubernetes namespace used for the backup
To delete the namespace, use the commands in Listing 7.9.
$ export NAMESPACE_FOR_NUBUS="your namespace including Nubus" $ kubectl delete namespace "$NAMESPACE_FOR_NUBUS"
Danger
Deleting the namespace terminates all pods running Nubus and your Nubus deployment ceases to exist. You can’t stop or revert this action.
Defining the settings for restore
To define the namespace where Velero runs and which backup to restore, initialize the environment variables in Listing 7.10.
$ export BACKUP_NAME="Name your backup to restore" $ export NAMESPACE_FOR_VELERO="your namespace for Velero"
Restore a backup
To create a restore and tell Velero to restore your backup of Nubus to the same namespace as before, run the command in Listing 7.11.
$ velero restore create \ --namespace "$NAMESPACE_FOR_VELERO" \ --from-backup "$BACKUP_NAME"
Velero begins the restore process. You can see activity in the logs of the Velero pod and appending data when you request Information about a restore.
See also
- Velero Docs - Restore Reference
for a reference of the restore command and information about the restore order.
7.4.2. Information about a restore#
After you have created a restore, you can retrieve various information about it, as shown in this section. To set the environment variables used, see Listing 7.10.
To list all restores that Velero created so far, run the command in Listing 7.12.
$ velero restore get --namespace "$NAMESPACE_FOR_VELERO"
To view the details of a particular restore, run the command in Listing 7.13.
For
$RESTORE_NAME
, use the name from the listing of restores in Listing 7.12.$ velero restore describe "$RESTORE_NAME" --namespace "$NAMESPACE_FOR_VELERO"
For a detailed listing with all restore item operations, and resources, use the command in Listing 7.14.
For
$RESTORE_NAME
, use the name from the listing of restores in Listing 7.12.$ velero restore describe "$RESTORE_NAME" \ --namespace "$NAMESPACE_FOR_VELERO" \ --details