Restoring container data
You can restore a persistent volume from a snapshot backup or a copy backup. A snapshot restore operation is generally the faster method for restoring a persistent volume.
Before you begin
For any type of restore, you cannot restore a volume to a different namespace.
You can restore a snapshot only to a new persistent volume. If you are restoring a snapshot, the persistent volume claim (PVC) for the new volume is automatically created when you restore the snapshot.
You can restore a copy backup to a new or original persistent volume. If you are restoring a copy backup to a new persistent volume, the PVC for the new volume is automatically created when you restore the copy backup. Except for the original location, the restore fails if you specify a PVC that already exists.
If you are restoring a copy backup to the original persistent volume, the application container to which the persistent volume is attached must not be running.
About this task
Depending on your recovery point objective and recovery time objective, you can run a
fast restore, a copy restore, or a fast-ondemand
restore operation.
- To rapidly restore a recent snapshot that was created as part of a schedule, run a fast restore operation. If another operation is in progress on the same volume, the fast restore operation might take longer to complete.
- To restore a volume from a particular point in time after the corresponding snapshot has expired, run a copy restore operation to restore the copy backup from IBM Spectrum Protect Plus.
- To restore a snapshot from an on-demand backup, run a
fast-ondemandrestore. - To verify a copy backup before it is restored to the original volume, you can run a copy restore operation to restore the copy backup to a new volume. Then, you can verify the contents of the new volume. If no issues are found in the new volume, you can restore the copy backup to the original volume.
Restore points are identified by the time stamp of the snapshot or copy backup.
Procedure
What to do next
If you restored data to a new persistent volume, you can reconfigure the application container to mount the new volume after the snapshot or copy backup is restored.
kubectl delete baasreq name_of_restore_request -n namespace- It reduces the size of the etcd database and allows you to reuse the name of a request for another operation.
- It makes troubleshooting easier.
- It makes it easier for you to track backup and restore requests that are running in your Kubernetes cluster.
- At any point in time, you have a clear picture of requests that are running in on your cluster
when you issue the following
command:
kubectl get baasreq -n namespace