"invalid locale name" error received when attempting to restore the Cloud Director database dump from the external PostgreSQL server to embedded database
searchcancel
"invalid locale name" error received when attempting to restore the Cloud Director database dump from the external PostgreSQL server to embedded database
book
Article ID: 320433
calendar_today
Updated On: 01-02-2025
Products
VMware Cloud Director
Issue/Introduction
Symptoms:
When restoring a Cloud Director database, you receive an error could not execute query: ERROR: invalid locale name
"invalid locale name" error received when attempting to restore the Cloud Director database dump from the external PostgreSQL server to embedded database
Using pg_restore to restore a Cloud Director database results in an error invalid locale name
Environment
VMware Cloud Director 10.x
Cause
This issue occurs when the server encoding of the database is not set to en_US.UTF-8. This is a requirement for Cloud Director databases as specified in the Cloud Director Database documentation.
Resolution
To resolve this issue, you will need to modify the server encoding to match the Cloud Director requirement of en_US.UTF-8. This will require a new Cloud Director database to be created on the External PostgreSQL server.
To achieve this, follow the steps below:
Take a backup of the Cloud Director database
pg_dump vcloud > /tmp/vcloud.sql
Create a new Database using the expected server encoding.