How to fix the error role "xxxx" does not exist during the gprestore
search cancel

How to fix the error role "xxxx" does not exist during the gprestore

book

Article ID: 296928

calendar_today

Updated On:

Products

VMware Tanzu Greenplum

Issue/Introduction

We may see below error while conducting a metadata restore:
gprestore:gpadmin:jq2mdw01.ebscn.com:062463-[CRITICAL]:-ERROR: role "xxxx" does not exist (SQLSTATE 42704): Error encountered while creating schema archive

The syntax that might be used during the restore process could be as follows:
 gprestore --backup-dir /tmp/backup5 --create-db --metadata-only --timestamp 20240206141301 --verbose


Environment

Product Version: 6.25

Resolution

Cause: By default, metadata restoration does not include users. Users are typically established in advance. Additionally, users are considered global objects, which cannot be restored in this context.

Solution: You can overcome this by using the parameters --with-globals and --on-error-continue during the restore operation.

gprestore --backup-dir /tmp/backup5 --create-db --metadata-only --timestamp 20240206141301 --verbose --with-globals  --on-error-continue