How to restore a specific pvc if backup all #1011
-
Hello. |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 1 reply
-
Did you have a look at our restore guide? https://docs.k8up.io/k8up/2.11/how-tos/restore.html If so, where do you struggle? |
Beta Was this translation helpful? Give feedback.
-
Hello @Kidswiss. |
Beta Was this translation helpful? Give feedback.
-
Each snapshot contains exactly one PVC. You can use the kubectl get snapshots 162e7a85 -oyaml
apiVersion: k8up.io/v1
kind: Snapshot
metadata:
name: 162e7a85
namespace: default
spec:
date: "2023-03-03T07:34:42Z"
id: 162e7a85acbc14de93dad31a3699331cb32187ff0d7bd2227b7c4362a1d13a42 # ID for the restore
paths:
- /data/subject-pvc # Name of the PVC
repository: s3:http://minio.minio.svc.cluster.local:9000/backup |
Beta Was this translation helpful? Give feedback.
-
@Kidswiss many thanks for your answer!
|
Beta Was this translation helpful? Give feedback.
-
@Kidswiss sorry, it seems i ignored the elephant in the room) I need to use snapshot to specify snapshot id, as mention in documentation. apiVersion: k8up.io/v1 |
Beta Was this translation helpful? Give feedback.
-
@stevemayster Yes that's right Were you successful in restoring you data? |
Beta Was this translation helpful? Give feedback.
Hi @stevemayster
Each snapshot contains exactly one PVC. You can use the
snapshot
objects to determine which ID matches to which PVC, thepaths
field contains the name of the PVC that has been backed up in this snapshot. Then use that ID to do the restore via k8up cli, restic or a restore object.