velero-restic-restore-helper

307 views
Skip to first unread message

Peter Fulier

unread,
May 27, 2021, 6:10:21 AM5/27/21
to Project Velero
Hello,

please what is exactly purpose/benefit of velero-restic-restore-helper?

We have Velero 1.4.3 with restic  integrated with Minio, but the restore helper was apparently not needed for the installation itself...(the velero-restic-restore-helper docker image was apparently not attempted by pulled down)...

Many thanks for your advice/help

Peter

PF

Bo Zou

unread,
May 30, 2021, 11:09:32 PM5/30/21
to Project Velero
Hi,

As my understanding, velero-restic-restore-helper is used when velero is using restic to restore file data from S3 to mounted PV path.
When restic finishes restore of one directory of files, it will touch a .velero directory and the file name which is equal to the prefix of the directory that is stored in S3 to indicate velero that the restore for this directory is done.
velero-restic-restore-helper is just a simple logic to check the existence of .velero and file for certain prefix, and build as binary into the helper image.
The velero-restic-restore-helper is embeded as an init container to the original pod, so when the original pod is restored to the cluster, the completion of the init container means the restore of pv data is done. The image is pulled when the pod is restored.

Bo

Peter Fulier

unread,
Jun 2, 2021, 4:28:03 AM6/2/21
to Project Velero
Hi Bo,

many thanks for your reply and my apologies here, but am still rather confused.

I was testing the PVs restore without the helper added/configured (velero integrated with minio (using AWS plugin) with restic and it was OK:
- I scaled down the app deployment config to zero
- deleted the app pod PVC, which then triggered the auto PV delete
- run velero restore create from taken backup file with including the relevant namespace and PV and PVC only (--include-namespaces testapp --include-resources persistentvolumeclaims,persistentvolumes )
The restore run and completed fine, the PV and PVC were brought back. After scaling the deployment config back to original replicas count, pod was working.

So the main question is, if the restic restore helper is mandatory when using velero with restic. And how to see/test it properly when we add it.

I created the documented config map file to enable the helper, but saw no effect on the restoration process (maybe the restore was too fast).
I added at the end the helper docker image as a plugin via velero CLI directly, the velero pod was restarted and the velero logs were listing image pull, but again no  direct visibility that it is active (the number of velero and all restic pod containers is 1 only).

Is .velero directory present on the source (minio dir structure) during restoration process only? I was not able to find it on subdirectory under restic directory structure.


Many thanks for your advices/help

Kind regards,

Peter

Ashish Amarnath

unread,
Jun 2, 2021, 2:08:07 PM6/2/21
to Peter Fulier, Project Velero
The restic restore helper is added as an init container to pods that uses volumes that were backed up by restic. This init container runs a loop waiting for the volumes to be populated with data from restic- waiting for a sentinel file that’s written in the .velero dir. This ensures that your application pod don’t start until the data restore is complete.

-Ashish


From: projec...@googlegroups.com <projec...@googlegroups.com> on behalf of Peter Fulier <pet.f...@gmail.com>
Sent: Wednesday, June 2, 2021 1:28:03 AM
To: Project Velero <projec...@googlegroups.com>
Subject: [projectvelero] Re: velero-restic-restore-helper
 
--
You received this message because you are subscribed to the Google Groups "Project Velero" group.
To unsubscribe from this group and stop receiving emails from it, send an email to projectveler...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/projectvelero/08e4261e-0a20-4d32-97bd-c67024c94df2n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages