Hi, a couple of days ago I had to restore a database and today I noticed that there was at least one table that was not restored. The restore was successful and the log showed no errors.
Just in case I checked that the table in question was in the restored SQL file and yes, it is, and with all its records.
I did the restore on another PC with Postgres and the same thing happened.
For the moment I solved it by transforming the whole section.
COPY {table}{columns) FROM stdin;
{record1}
…
{recordN}
To a CSV and importing from there.
What could I check to find the problem and prevent it from happening again?
To help us understand the issue better — could you please confirm if you tried restoring the database manually using pg_restore? If so, does the table still not appear after the manual restore?
Also, during the manual restore process, did pg_restore display any warnings or messages that might relate to this issue?
Hi, I did not try to restore the database with pg_restore, I always did it from Sql Backup and FTP.
When I use pg_restore, is it convenient for me to pass any particular option to it?
Regards.
14754317: value too long for type character varying(50)
CONTEXT: COPY tablename, line 7401, column name: «SAN ANDRES / PEÃ’A M C, DORRONZORO P Y DORRONZORO T»
The original data is:
SAN ANDRES / PEÑA M C, DORRONZORO P Y DORRONZORO T
It appears to be a character encoding issue.
Some time ago I detected that when making the backup copy the encoding was not respected and when I consulted in the forum I was told that it would be corrected in future versions. Is this already corrected?
In any case, I would have to update the software version, maybe it is outdated.
Regards.
The error you encountered does appear to be related to character encoding. If the encoding used during the backup did not match the one used during the restore, it could cause data corruption or misinterpretation — as in your case.
To address this, please try specifying the correct encoding in the Extra command-line parameters field of your backup job settings by adding:
Additionaly, if you’re using an older version of the software, we recommend updating to the latest version, as several encoding-related improvements have been made over time.