diff --git a/velero-restic-restore/restore_pvs.sh b/velero-restic-restore/restore_pvs.sh index ac471fc5b4bc1d41229a431258a81a64ffc1efe4..606a3c47aa89fd1baba2bf851d8e93b0a57bf969 100755 --- a/velero-restic-restore/restore_pvs.sh +++ b/velero-restic-restore/restore_pvs.sh @@ -43,7 +43,8 @@ sleep 60s POD_NAME=`oc get pod -l app=drupal,drupalSite="$DRUPALSITE" -n "$NAMESPACE" --sort-by=.metadata.creationTimestamp --field-selector=status.phase==Running -o jsonpath="{.items[-1:].metadata.name}"` validateVar "$POD_NAME" "POD_NAME" -oc rsync /restore/ "$POD_NAME":/drupal-data --delete -n "$NAMESPACE" -c php-fpm +# Add no-perms to abide by the existing permissions set on the PVC +oc rsync /restore/ "$POD_NAME":/drupal-data --no-perms=true --delete -n "$NAMESPACE" -c php-fpm # We remove /root/.cache/ in each iteration to prevent restic backups to run out of memory and fail the cronjobs we run, # as we detected this malfunction in our infra.