How to restore pvc backed up using kopia integration #8165
-
I have created my backup using kopia integration in velero and wanted to know what parameters I have to pass to restore my pvc. For example, i have deleted my pvc and my deployment and now how do I restore it? i tried using attached |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 5 replies
-
You have specified
This mean it will only restore deployment and nothing else. Removing that from your restore text should restore more items. |
Beta Was this translation helpful? Give feedback.
-
@kaovilai But I wanted to test "only one pvc restore for a namespace which was backed up using kopia integration in velro" attached veleronew restore describe restore-nginx-example-pvc-nginx-logs8 --insecure-skip-tls-verify --details o/p below is what i see in my backup describe : `Backup Volumes: CSI Snapshots: Pod Volume Backups - kopia: |
Beta Was this translation helpful? Give feedback.
-
so should I delete deployment, pvc and then include deployment, pvc and pv in restore yaml ? |
Beta Was this translation helpful? Give feedback.
-
including these three also not restoring the data includedResources:
|
Beta Was this translation helpful? Give feedback.
-
@sseago Thanks! that worked. I have one more query -
includedResources:
|
Beta Was this translation helpful? Give feedback.
-
okay thanks so attached restore yaml should be good as i am not setting this parameter if we do not specify then default value for this will be |
Beta Was this translation helpful? Give feedback.
Yes. If there are other deployments, PVCs, etc in the backup, you will see restore warnings saying that Velero was unable to restore them because they already exist in the cluster, but that's fine since that's what you want here. Note that you should not set the
existingResourcePolicy
field on the Restore -- setting it to "update" would tell Velero to attempt to update/modify resources that already exist in the cluster, which could result in kubernetes metadata being changed on your pods/deployments, although it would not cause PV data to be update.So the short answer is that, yes, as long as you don't set the
existingResourcePolicy
field on the restore, then only deleted (or otherwise n…