I have problem while i import database from backup I gives many output and many "invalid command" messages. In the end it gives an encoding error. what can the reason be?
my command: sudo -u postgres psql -U postgres -d modd -f database.sql
error:
ERROR: invalid byte sequence for encoding "UTF8": 0xe3 0x43 0xf1
psql:database.sql:6923400: invalid command \.
psql:database.sql:6923404: invalid command \.
psql:database.sql:6923426: invalid command \.
psql:database.sql:6923431: invalid command \.
Query buffer reset (cleared).
psql:database.sql:6923456: invalid command \n%checkoutdate%
psql:database.sql:6923461: ERROR: syntax error at or near "emailtemplate_overdue_subject"
LINE 1: emailtemplate_overdue_subject Kutuphane materyallerinizin ia...
^
Query buffer reset (cleared).
psql:database.sql:6923462: invalid command \n%checkoutdate%
psql:database.sql:6923465: ERROR: syntax error at or near "emailtemplate_reminder_subject"
LINE 1: emailtemplate_reminder_subject Materyal iade hatırlatma
^
Query buffer reset (cleared).
psql:database.sql:6923467: invalid command \n
.....
...
psql:database.sql:7913855: invalid command g��:`�
psql:database.sql:7913857: invalid command \�}>��p��{z�
psql:database.sql:7913858: invalid command \�[�P�j5)��xZ��N��YQ��M�Ю+$���6.1�d0)}W��eN6$��NP#N|bY�kηI)R!��%�媄RCY�ѽÌ�����'}ӭ�;!D�wh�_���b�L0J�0�қ�
psql:database.sql:8357490: ERROR: invalid byte sequence for encoding "UTF8": 0xe3 0x43 0xf1
my file is more than 1 gb. there is some errors when I open with more.
psql -v ON_ERROR_STOP=1 -f my_dump.sql
to see the first error. – Craig Ringer May 24 at 3:24psql:Desktop/database.sql:2: ERROR: syntax error at or near "toc" LINE 1: toc.dat AS '$libdir/tsearch2', 'gtsvector_in' ^
– Ahmet Melih Başbuğ May 24 at 6:02file Desktop/database.sql Desktop/database.sql: tar archive
It was database.sql.gz I extracted. but when i use "file", output is this. – Ahmet Melih Başbuğ May 24 at 6:34