7.3. Backup#
After installing Velero, you’re ready to create your backup. This section describes how to create a backup and how to get detailed information about it. The backup covers the entire Kubernetes namespace where you have deployed Nubus. It creates snapshots of the persistent volumes and stores information about the resources in the S3-compatible object store.
Important
For backup consistency, you need to run the database backup at the same time as the backup for Nubus. For the database backup, see Databases.
7.3.1. Create a backup#
To create a full backup of all pods that Nubus for Kubernetes has deployed to the Nubus namespace, follow these steps:
Defining the settings for the backup
To define the namespace where Velero runs and which namespace of Nubus you want to include in the backup, see Listing 7.4.
$ export BACKUP_NAME="Name of your backup" $ export NAMESPACE_FOR_VELERO="your namespace for Velero" $ export NAMESPACE_FOR_NUBUS="your namespace including Nubus"
Creating the backup
To create a backup and tell Velero to back up Nubus, run the command in Listing 7.5.
$ velero backup create "$BACKUP_NAME" \ --namespace "$NAMESPACE_FOR_VELERO" \ --include-namespaces "$NAMESPACE_FOR_NUBUS"
See also
- Velero Docs - Backup Reference
for a reference of the backup command and how to schedule a backup.
7.3.2. Information about a backup#
After you create a backup, you can retrieve various information about it, as shown in this section. To set the environment variables used, see Listing 7.4.
To list all that backups that Velero has created so far, run the command in Listing 7.6.
$ velero backup get --namespace "$NAMESPACE_FOR_VELERO"
To view the details of a particular backup, run the command in Listing 7.7.
For
$BACKUP_NAME
, use the name from the listing of backups retrieved in Listing 7.6.$ velero backup describe "$BACKUP_NAME" --namespace "$NAMESPACE_FOR_VELERO"
For a detailed listing of all backup item operations, resources, and backup volumes, use the command in Listing 7.8.
For
$BACKUP_NAME
, use the name from the listing of backups retrieved in Listing 7.6.$ velero backup describe "$BACKUP_NAME" \ --namespace "$NAMESPACE_FOR_VELERO" \ --details