Skip to content
Snippets Groups Projects

Do not rsync permissions during restore

Merged Vineet Reddy Rajula requested to merge rsync-perms-fix into master
1 file
+ 2
1
Compare changes
  • Side-by-side
  • Inline
@@ -43,7 +43,8 @@ sleep 60s
@@ -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}"`
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"
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,
# 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.
# as we detected this malfunction in our infra.
Loading