Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.

Cant Can't restore postgresqlPostgreSQL database backup

The backup was created from a database with the UTF8UTF-8 encoding using pg_dumppg_dump. The backup is in the tartar format.

I then created a new database on another server running the same version of postgreSQLPostgreSQL (8.2.4) using this command:

createdb -E utf8 db1

createdb -E utf8 db1 

When running pg_restorepg_restore I get the following error:

pg_restore: [archiver (db)] Error from TOC entry 1667; 0 14758638 TABLE DATA table1 db1 pg_restore: [archiver (db)] COPY failed: ERROR: invalid byte sequence for encoding "UTF8": 0xc520

pg_restore: [archiver (db)] Error from TOC entry 1667; 0 14758638 TABLE DATA table1 db1 pg_restore: [archiver (db)] COPY failed: ERROR: invalid byte sequence for encoding "UTF8": 0xc520 

The original databse is no longer available.

How can I restore this data or find the byte sequence that is causing the problem?

Cant restore postgresql database backup

The backup was created from a database with the UTF8 encoding using pg_dump. The backup is in the tar format.

I then created a new database on another server running the same version of postgreSQL (8.2.4) using this command:

createdb -E utf8 db1

When running pg_restore I get the following error:

pg_restore: [archiver (db)] Error from TOC entry 1667; 0 14758638 TABLE DATA table1 db1 pg_restore: [archiver (db)] COPY failed: ERROR: invalid byte sequence for encoding "UTF8": 0xc520

The original databse is no longer available.

How can I restore this data or find the byte sequence that is causing the problem?

Can't restore PostgreSQL database backup

The backup was created from a database with the UTF-8 encoding using pg_dump. The backup is in the tar format.

I then created a new database on another server running the same version of PostgreSQL (8.2.4) using this command:

createdb -E utf8 db1 

When running pg_restore I get the following error:

pg_restore: [archiver (db)] Error from TOC entry 1667; 0 14758638 TABLE DATA table1 db1 pg_restore: [archiver (db)] COPY failed: ERROR: invalid byte sequence for encoding "UTF8": 0xc520 

The original databse is no longer available.

How can I restore this data or find the byte sequence that is causing the problem?

added 54 characters in body
Source Link
Simon
  • 165
  • 1
  • 2
  • 8

The backup was created from a database with the UTF8 encoding using pg_dump. The backup is in the tar format.

I then created a new database on another server running the same version of postgreSQL (8.2.4) using this command:

createdb -E utf8 db1

When running pg_restore I get the following error:

pg_restore: [archiver (db)] Error from TOC entry 1667; 0 14758638 TABLE DATA table1 db1 pg_restore: [archiver (db)] COPY failed: ERROR: invalid byte sequence for encoding "UTF8": 0xc520

The original databse is no longer available.

How can I restore this data or find the byte sequence that is causing the problem?

The backup was created from a database with the UTF8 encoding using pg_dump. The backup is in the tar format.

I then created a new database on another server running the same version of postgreSQL using this command:

createdb -E utf8 db1

When running pg_restore I get the following error:

pg_restore: [archiver (db)] Error from TOC entry 1667; 0 14758638 TABLE DATA table1 db1 pg_restore: [archiver (db)] COPY failed: ERROR: invalid byte sequence for encoding "UTF8": 0xc520

How can I restore this data or find the byte sequence that is causing the problem?

The backup was created from a database with the UTF8 encoding using pg_dump. The backup is in the tar format.

I then created a new database on another server running the same version of postgreSQL (8.2.4) using this command:

createdb -E utf8 db1

When running pg_restore I get the following error:

pg_restore: [archiver (db)] Error from TOC entry 1667; 0 14758638 TABLE DATA table1 db1 pg_restore: [archiver (db)] COPY failed: ERROR: invalid byte sequence for encoding "UTF8": 0xc520

The original databse is no longer available.

How can I restore this data or find the byte sequence that is causing the problem?

edited tags
Link
Maxwell
  • 5.1k
  • 1
  • 28
  • 31
Source Link
Simon
  • 165
  • 1
  • 2
  • 8
Loading