0

我们在 Digital Ocean 上运行了 Odoo 8,并希望将数据库移动到本地 Intranet。为此,我在本地机器上设置了 Odoo 8。

我想导出数据库,但无法从 Postgres 导出到已安装的驱动器,每当我尝试导出时都会遇到以下错误

pg_dump mydatabasetoday > /mnt/volume-fra1-01/db_backup/lakes2.sql


Error:
pg_dump: Dumping the contents of table "mail_message" failed: PQgetResult() failed.
pg_dump: Error message from server: ERROR:  missing chunk number 0 for toast value 148458 in pg_toast_18366
pg_dump: The command was: COPY public.mail_message (id, create_date, write_date, mail_server_id, write_uid, subject, create_uid, parent_id, subtype_id, res_id, message_id, body, model, record_name, no_auto_thread, date, author_id, type, reply_to, email_from, link_ebf, guid, type_email) TO stdout;

我尝试过reindex,但无法导出到 .sql 以从另一台服务器恢复

我只需要一个数据库导出就可以了。

到目前为止我们完成的步骤。

  1. 从 mydatabase 复制到 CSV 格式的命令
COPY ( select id, create_date, write_date, mail_server_id, write_uid,  create_uid, parent_id, subtype_id, res_id, message_id,body, record_name, no_auto_thread, date, model, reply_to, author_id,  email_from  from mail_message    ) TO '/tmp/sb_mail_message.csv' DELIMITER ',';

无法导入。

  1. mail_messages从 PGADMIN 4.1下载所有损坏表的 CSV 样本格式。但它的导入格式不正确。

  2. Ran 脚本将导出消息编码为 CSV 格式并尝试导入,但无法正确解决给我以下错误

INTERNAL SERVER ERROR
500 Internal Server Error
Internal Server Error
The server encountered an internal error and was unable to complete your request.  Either the server is overloaded or there is an error in the application

我想知道是否有可能备份损坏的表

  1. 获取 Postgres 数据库快照的完整快照并还原位置

  2. 将数据库从实时 Postgres 复制到本地 Postgres。

4

0 回答 0